锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲综合图色40p,久久精品国产亚洲av水果派,1区1区3区4区产品亚洲http://m.tkk7.com/tonyzhou00/category/8157.htmlzh-cnThu, 19 Jul 2007 11:26:38 GMTThu, 19 Jul 2007 11:26:38 GMT60杞繪澗寮鍙戣嚜宸辯殑緇勪歡 http://m.tkk7.com/tonyzhou00/articles/34007.html铔摜鈾傛灚铔摜鈾傛灚Tue, 07 Mar 2006 02:55:00 GMThttp://m.tkk7.com/tonyzhou00/articles/34007.htmlhttp://m.tkk7.com/tonyzhou00/comments/34007.htmlhttp://m.tkk7.com/tonyzhou00/articles/34007.html#Feedback0http://m.tkk7.com/tonyzhou00/comments/commentRss/34007.htmlhttp://m.tkk7.com/tonyzhou00/services/trackbacks/34007.html鎸? 鏈暀紼嬮潪鍘熷垱,鐗堟潈褰扠eliix06鎵鏈?

蹇熷垱寤轟竴涓畝鍗曠殑MAMBO緇勪歡
浣滆咃細Keliix06
璇戣咃細Applebee
鏈暀紼嬪皢瀹夎涓涓淗ello World鈥濈粍浠訛紝浣犲彲浠ュ幓緙栬緫鎴栬呭姞鍏ヤ綘鑷繁鎯寵鐨勬秷鎭傛湰鏁欑▼涓嶆秹鍙婂浣曡緗垎綾伙紝鎼滅儲鍔熻兘鍜岄〉闈㈠鑸傚茍鍋囧畾浣犲PHP鏈変竴涓熀鏈殑浜嗚В銆?
鍒涘緩鏈粍浠跺皢鐢ㄥ埌浠ヤ笅鏂囦歡錛?
hello_world.xml- 緇勪歡瀹夎閰嶇疆鏂囦歡
hello_world.php- 鏄劇ず鐣岄潰淇℃伅
admin.hello_world.php- 鏁版嵁搴撴煡璇㈠拰璁劇疆HTML杈撳嚭
admin.hello_world.html.php- 鎺у埗鎵鏈夌殑杈撳嚭
class.hello_world.php- 鏁版嵁搴撶被鏂囦歡
install.hello_world.php- 瀹夎鏂囦歡
uninstall.hello_world.php- 鍗歌澆鏂囦歡
toolbar.hello_world.php- 璁劇疆宸ュ叿鏍?
toolbar.hello_world.html.php- 鎺у埗宸ュ叿鏍忕殑杈撳嚭

鐜板湪鎴戜滑宸茬粡娓呮浜嗚鍒朵綔浠涔堟牱鐨勬枃浠訛紝涓嬮潰鎴戜滑涓涓枃浠朵竴涓枃浠剁殑浠嬬粛瀹冧滑濡備綍瀹炵幇鍚勮嚜鐨勫姛鑳姐?


Hello_world.xml- 緇勪歡瀹夎閰嶇疆鏂囦歡

<?xml version="1.0" ?>
<mosinstall type="component">
<name>hello_world</name>
<creationDate>04/15/2004</creationDate>
<author>Doyle Lewis</author>
<copyright>This component in released under the GNU/GPL License</copyright>
<authorEmail> support@mambo-hosting.com

</authorEmail>
<authorUrl>www.mambo-hosting.com</authorUrl>
<version>1.0</version>
<files>
<filename>hello_world.php</filename>
</files>
<install>
<queries>
<query>DROP TABLE IF EXISTS `mos_hello_world`;</query>
<query>CREATE TABLE `mos_hello_world` (
`id` INT NOT NULL AUTO_INCREMENT,
`text` TEXT NOT NULL,
`published` TINYINT(1) NOT NULL,
PRIMARY KEY (`id`)
)
</query>
</queries>
</install>
<uninstall>
<queries>
<query>DROP TABLE IF EXISTS `mos_hello_world`;</query>
</queries>
</uninstall>
<installfile>
<filename>install.hello_world.php</filename>
</installfile>
<uninstallfile>
<filename>uninstall.hello_world.php</filename>
</uninstallfile>
<administration>
<menu>Hello World</menu>
<submenu>
<menu act="all">Show Text</menu>
</submenu>
<files>
<filename>admin.hello_world.php</filename>
<filename>admin.hello_world.html.php</filename>
<filename>class.hello_world.php</filename>
<filename>toolbar.hello_world.php</filename>
<filename>toolbar.hello_world.html.php</filename>
</files>
</administration>
</mosinstall>

鎴戜滑鏉ョ湅瀹冩槸濡備綍宸ヤ綔鐨勶細

<?xml version="1.0" ?>
XML鐨勫紑澶磋錛屼負鎵鏈塜ML鏂囦歡鎵蹇呴渶銆?

<mosinstall type="component">
鍛婅瘔MAMBO灝嗗紑濮嬪畨瑁呬竴涓粍浠?

<name>hello_world</name>
<creationDate>04/15/2004</creationDate>
<author>Doyle Lewis</author>
<copyright>This component in released under the GNU/GPL License</copyright>
<authorEmail> support@mambo-hosting.com

</authorEmail>
<authorUrl>www.mambo-hosting.com</authorUrl>
<version>1.0</version>
緇勪歡鐨勮緇嗕俊鎭紝鎵鏈夋湁鍏崇粍浠剁殑淇℃伅鍙兘鍦ㄨ繖鍔犲叆銆?

<files>
<filename>hello_world.php</filename>
</files>
鎵鏈夐渶瑕佸畨瑁呭湪緇勪歡鐣岄潰闇瑕佺殑鏂囦歡錛屽皢琚畨瑁呭埌components/com_hello_world/鐩綍涓嬨?

<install>
<queries>
<query>DROP TABLE IF EXISTS `mos_hello_world`;</query>
<query>CREATE TABLE `mos_hello_world` (
`id` INT NOT NULL AUTO_INCREMENT,
`text` TEXT NOT NULL,
`published` TINYINT(1) NOT NULL,
PRIMARY KEY (`id`)
)
</query>
</queries>
</install>
瀹夎緇勪歡鎵闇鐨勬暟鎹簱鏌ヨ璇彞錛屾湰緇勪歡涓皢鍒涘緩涓涓湁涓変釜瀛楁鐨勮〃銆備綘鍙互榪愯phpMyadmin鏉ュ緱鍒頒竴鎵闇鐨勬煡璇㈣鍙ョ殑錛岃繖鏄竴涓緢綆鍗曟槗琛岀殑鍔炴硶銆?

<uninstall>
<queries>
<query>DROP TABLE IF EXISTS `mos_hello_world`;</query>
</queries>
</uninstall>
鍗歌澆緇勪歡鎵闇鐨勬煡璇㈣鍙ワ紝榪欓噷鍙槸綆鍗曠殑鍒犻櫎浜嗘暟鎹簱琛ㄦ牸銆?

<installfile>
<filename>install.hello_world.php</filename>
</installfile>
<uninstallfile>
<filename>uninstall.hello_world.php</filename>
</uninstallfile>
榪欏嚑琛屼唬鐮佹槸鐢ㄦ潵璇存槑瀹夎鍜屽嵏杞界粍浠舵墍鐢ㄥ埌鐨勬枃浠跺悕銆?

<administration>
浠庤繖琛岃搗鎵鏈夌殑涓滀笢灝嗗畨瑁呭埌綆$悊鍛樼洰褰曚笅銆?

<menu>Hello World</menu>
榪欒灝嗚鏄劇ず鍒扮鐞嗛潰鏉夸腑鐨勨滅粍浠垛濈殑涓嬫媺鑿滃崟涓?

<submenu>
<menu act="all">Show Text</menu>
</submenu>
榪欏嚑琛屼唬鐮佸皢浜х敓涓涓簩綰ц彍鍗曪紙鐩稿浜庡垰鎵嶄駭鐢熺殑Hello World鑿滃崟閫夐」錛夛紝榪欎篃灝嗗憡璇塎AMBO浣犵殑緇勪歡灝嗘湁浜涗粈涔堝姛鑳姐?
<files>
<filename>admin.hello_world.php</filename>
<filename>admin.hello_world.html.php</filename>
<filename>class.hello_world.php</filename>
<filename>toolbar.hello_world.php</filename>
<filename>toolbar.hello_world.html.php</filename>
</files>
鎵鏈夊皢琚畨瑁呭埌administrator/components/com_hello_world/鐩綍涓嬬殑鏂囦歡銆?

</administration>
</mosinstall>
緇撴潫MAMBO緇勪歡瀹夎

hello_world.php-鐣岄潰鏄劇ず鏂囦歡

<?php
//hello_world Component//
/**
* Content code
* @package hello_world
* @Copyright (C) 2004 Doyle Lewis
* @ All rights reserved
* @ hello_world is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version 1.0
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $database;
$query = "SELECT * FROM mos_hello_world LIMIT 1";
$database->setQuery( $query );
$rows = $database->loadObjectList();
$row = $rows[0];
echo $row->text;
?>

璁╂垜浠潵鐪嬩竴涓嬭繖涓枃浠躲?

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
榪欎釜灝嗛獙璇佹槸鍚︾敱MAMBO鏉ヨ皟鐢ㄦ鏂囦歡錛岄槻姝㈤潪娉曠洿鎺ヨ繍琛屾湰鏂囦歡錛屽浜庡畨鍏ㄦч潪甯擱噸瑕併?

global $database;
灝?database璁劇疆涓哄叏灞鍙橀噺錛屼綘鍙互鍦ㄤ綘鐨勫嚱鏁頒腑浣跨敤$database銆?
$query = "SELECT * FROM mos_hello_world LIMIT 1";
杈撳嚭mos_hello_world琛ㄤ腑鐨勭涓涓褰曘?

$database->setQuery( $query );
鐢╠atabase綾諱腑鐨勬暟鎹簱鏌ヨ鍑芥暟璋冪敤涓婅堪鐨勬煡璇€?

$rows = $database->loadObjectList();
鐢ㄥ彉閲?rows 浠ユ暟鍒楁柟寮忓瓨鍌ㄦ煡璇㈢粨鏋溿?

$row = $rows[0];
鐢ㄥ彉閲?$row 瀛樺偍$row涓殑絎竴涓厓绱犮?

echo $row->text;
鎵撳嵃杈撳嚭text.

admin.hello_world.php -鏁版嵁搴撴煡璇㈠拰璁劇疆HTML杈撳嚭
<?php
//hello_world Component//
/**
* Content code
* @package hello_world
* @Copyright (C) 2004 Doyle Lewis
* @ All rights reserved
* @ hello_world is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version 1.0
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
require_once($mosConfig_absolute_path."/administrator/components/com_hello_world/class.hello_world.php");
require_once( $mainframe->getPath( 'admin_html' ) );
switch ($act) {
default:
$task = "showText";
break;
}
switch ($task) {
case "save":
save( $option );
break;
case "delete":
delete( $option, $id );
break;
case "new":
$id = '';
edit( $option, $id );
break;
case "edit":
save( $option, $id[0] );
break;
case "showText":
showText( $option );
break;
}
function save( $option ) {
global $database;
$row = new mosHello_world( $database );
if (!$row->bind( $_POST )) {
echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>n";
exit();
}
if (!$row->store()) {
echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>n";
exit();
}
mosRedirect( "index2.php?option=$option", "Saved" );
}
function edit( $option, $uid ) {
global $database;
$row = new mosHello_world( $database );
$row->load( $uid );
HTML_hello_world::edit( $option, $row );
}
function delete( $option, $cid ) {
global $database;
if (!is_array( $cid ) || count( $cid ) < 1) {
echo "<script> alert('Select an item to delete'); window.history.go(-1);</script>n";
exit;
}
if (count( $cid )) {
$cids = implode( ',', $cid );
$database->setQuery( "DELETE FROM mos_hello_world WHERE id IN ($cids)" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>n";
}
}
mosRedirect( "index2.php?option=$option" );
}
function showText($option) {
global $database;
# Do the main database query
$database->setQuery( "SELECT * FROM mos_hello_world ORDER BY id" );
$rows = $database->loadObjectList();
if ($database->getErrorNum()) {
echo $database->stderr();
return false;
}
HTML_hello_world::showText( $option, $rows );
}
璁╂垜浠潵鐪嬬湅榪欎釜鏂囦歡
:
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
榪欎釜灝嗛獙璇佹槸鍚︾敱MAMBO鏉ヨ皟鐢ㄦ鏂囦歡錛岄槻姝㈤潪娉曠洿鎺ヨ繍琛屾湰鏂囦歡錛屽浜庡畨鍏ㄦч潪甯擱噸瑕併?

require_once($mosConfig_absolute_path."/administrator/components/com_hello_world/class.hello_world.php");
require_once( $mainframe->getPath( 'admin_html' ) );
璋冪敤浠ヤ笅涓ゆ枃浠?class.hello_world.php and admin.hello_world.html.php

switch ($act) {
default:
$task = "showText";
break;
}
寤虹珛涓涓夋嫨寮鍏寵鍙ヨ繖鏍峰亣濡傛湁涓涓彉閲?act 鎴戜滑灝嗛噸瀹氫箟涓涓柊鍙橀噺$task. 榪欐牱$act 灝嗙敤鏉ュ疄鐜版樉紺烘枃瀛楃殑鍑芥暟涓紝鑰?task灝嗚鐢ㄥ湪淇濆瓨錛屽垹闄ょ瓑銆?

switch ($task) {
case "save":
save( $option );
break;
case "delete":
delete( $option, $id );
break;
case "new":
$id = '';
edit( $option, $id );
break;
case "edit":
save( $option, $id[0] );
break;
case "showText":
showText( $option );
break;
}
榪欎釜寮鍏寵鍙ュ皢鏍規(guī)嵁$task鏉ヨ繍琛屾墍闇鐨勫嚱鏁般?

function save( $option ) {
鎴戜滑鐨勭涓涓嚱鏁幫紝灝嗕繚瀛樻垜浠垱寤烘垨姝e湪緙栬緫鐨勫唴瀹廣?

global $database;
澹版槑$database涓哄叏灞鍙橀噺銆?

$row = new mosHello_world( $database );
榪欏皢瀹氫箟$row鏂板彉閲忔潵瀛樺偍鎻掑叆鍒版暟鎹簱涓殑淇℃伅錛?row鏄痗lass class.hello_world.php鏂囦歡瀹氫箟鐨刴osHello_world綾葷殑涓涓疄渚嬨?

if (!$row->bind( $_POST )) {
echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>n";
exit();
}
鍋囧 $row 榪斿洖絀哄鹼紝鏄劇ず閿欒淇℃伅騫惰繑鍥炰笂涓涓獥鍙c?

if (!$row->store()) {
echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>n";
exit();
}
鍋囧涓嶈兘瀹屾垚瀵規(guī)暟鎹簱鐨勫啓鎿嶄綔錛屽皢鏄劇ず閿欒淇℃伅騫惰繑鍥炰笂涓涓獥鍙o紝榪欎粎浠呬細鍦ㄦ暟鎹簱鍑虹幇寮傚父鏃朵細鍑虹幇銆?

mosRedirect( "index2.php?option=$option", "Saved" );
鍋囧涓鍒囨甯稿皢閲嶅畾鍚戜綘鐨勬祻瑙堝櫒鍒頒富閫夐」紿楀彛錛屽茍鏄劇ず"Saved".

function edit( $option, $uid ) {
寰堝浠g爜鍙弬鐓у墠闈㈢殑瑙i噴錛岃繖閲屼笉鍐嶈禈榪般?

$row->load( $uid );
瀹氫箟浜?row鍚庡茍澹版槑瀹冧負mosHello_world綾?瑁呰澆$uid鐩稿叧鐨勬暟鎹? $uid鏄?
鎴戜滑鎯崇紪杈戠殑鍐呭鐨?id鐨勫箋?

HTML_hello_world::edit( $option, $row );
灝?row 浼犻掑埌admin.hello_world.html.php 鏄劇ず銆?
.
function delete( $option, $cid ) {
鍚屽墠錛岃繖閲屼笉鍐嶈禈榪般?

if (!is_array( $cid ) || count( $cid ) < 1) {
echo "<script> alert('Select an item to delete'); window.history.go(-1);</script>n";
exit;
}
榪欏皢媯楠屾槸鍚︽湁鍒犻櫎瀵硅薄錛屽涓虹┖灝嗘樉紺烘彁紺轟俊鎭茍榪斿洖涓婁竴涓獥鍙c?

if (count( $cid )) {
$cids = implode( ',', $cid );
$database->setQuery( "DELETE FROM mos_hello_world WHERE id IN ($cids)" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>n";
}
榪欏皢媯楠?cid (瀛樺偍鎵鏈夋鍒犻櫎鐨勫璞$殑$id鍊肩殑鏁板垪)鏄惁涓虹┖錛屽鏋滀笉涓虹┖瀹冨皢鍒涘緩涓涓互閫楀彿涓哄垎闅旂鐨勬墍鏈塱d鐨勫垪琛ㄥ茍瀛樺偍鍦ㄥ瓧絎︿覆$cids鐒跺悗鏍規(guī)嵁鐩稿簲鐨刬d榪涜鍒犻櫎鎿嶄綔錛屽鏋滄搷浣滃嚭閿欏皢榪斿洖涓婁竴涓獥鍙c?

function showText($option) {
榪欐槸鎴戜滑鐨勪富杈撳嚭鍑芥暟錛屽皢鍒涘緩鎴戜滑瑕佽緭鍑虹殑鏂囧瓧鐨勫垪琛紝瑙i噴鍙傜収鍓嶉潰鎵榪般?

admin.hello_world.html.php 鈥撴帶鍒舵墍鏈夌殑杈撳嚭.
<?php
//hello_world Component//
/**
* Content code
* @package hello_world
* @Copyright (C) 2004 Doyle Lewis
* @ All rights reserved
* @ hello_world is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version 1.0
**/
// ensure this file is being included by a parent file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
require_once($mosConfig_absolute_path."/administrator/components/com_hello_world/class.hello_world.php");
class HTML_hello_world {
function edit( $option, &$row ) {
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == "cancel") {
submitform( pressbutton );
return;
}
submitform( pressbutton );
}
</script>
<form action="index2.php" method="post" name="adminForm" id="adminForm" class="adminForm">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td>Text Output: </td>
<td><input type="text" size="50" maxsize="100" name="text" value="<?php echo $row->text; ?>" /></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="task" value="" />
</form>
<?php } ?>
function showText( $option, &$rows ) {
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == "cancel") {
submitform( pressbutton );
return;
}
submitform( pressbutton );
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
<tr>
<th width="20"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);"
/></th>
<th class="title" width="25%">Text Output</th>
<th width="25%">Published</th>
</tr>
<?php
$k = 0;
for($i=0; $i < count( $rows ); $i++) {
$row = $rows[$i];
?>
<tr class="<?php echo "row$k"; ?>">
<td><input type="checkbox" id="cb<?php echo $i;?>" name="id[]" value="<?php echo $row->id; ?>"
onclick="isChecked(this.checked);" /></td>
<td><a onclick="return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $row->text; ?></a></td>
<td align="center">
<?php
if ($row->published == "1") {
echo "<img src="images/tick.png" border="0" />";
} else {
echo "<img src="images/publish_x.png" border="0" />";
}
?>
</td>
<?php $k = 1 - $k; ?>
</tr>
<?php } ?>
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
</form>
<?php }
} ?>

鎴戜滑鏉ョ湅涓涓嬭繖涓枃浠?
class HTML_hello_world {
澹版槑涓涓柊綾伙細HTML_hello_world

function edit( $option, &$row ) {
澹版槑edit鍑芥暟錛?灝嗘樉紺虹敤鏉ュ垱寤烘柊鍐呭騫剁紪杈戝凡鏈夌殑鍐呭鐨勮〃鍗曘?

<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == "cancel") {
submitform( pressbutton );
return;
}
submitform( pressbutton );
}
</script>
榪欏皢媯楠屼綘鏄惁鎸変笅浜嗕換浣曞伐鍏鋒爮鐨勬寜閽紝浣犲彲浠ュ姞鍏ヤ換浣曡〃鍗曢獙璇佷唬鐮佸湪榪欓噷銆?

<form action="index2.php" method="post" name="adminForm" id="adminForm" class="adminForm">
浣犲彲浠ュ皢榪欐浠g爜鎷瘋礉鍒頒換浣曠粍浠朵腑錛屽畠蹇呴』鍖呮嫭榪欎簺鏍囩銆?

<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="task" value="" />
淇濆瓨鎴栧彇娑堟搷浣滄墍蹇呴』鐨刼ption鍜宼ask瀛楁銆?

function showText( $option, &$rows ) {
灝嗘樉紺烘墍鏈夌殑鏂囧瓧閮ㄥ垎銆?

<th width="20"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);"
/></th>
榪欏皢蹇熷叏閫夋墍鏈夌殑閫夋嫨妗嗐?

<?php
$k = 0;
for($i=0; $i < count( $rows ); $i++) {
$row = $rows[$i];
$k鐢ㄦ潵浜х敓琛岀殑鏇挎崲鍥炬晥鏋滐紝for 璇彞灝嗕繚璇侀亶鍒楁墍鏈夌殑緇撴灉銆?

<td><input type="checkbox" id="cb<?php echo $i;?>" name="id[]" value="<?php echo $row->id; ?>"
onclick="isChecked(this.checked);" /></td>
榪欏皢閫変笂鏈鐨勯夋嫨妗嗐?

<td><a onclick="return listItemTask('cb<?php echo $i;?>','edit)"><?php echo $row->text; ?></a></td>
灝嗕駭鐢熺紪杈戞欏圭殑閾炬帴銆?

<?php
if ($row->published == "1") {
echo "<img src="images/tick.png" border="0" />";
} else {
echo "<img src="images/publish_x.png" border="0" />";
}
?>
鍋囧姝よ琚緗負鍙戣錛屼綘灝嗙湅鍒頒竴涓豢鐨勫弶錛屽惁鍒欏皢鐪嬪埌涓涓皬綰㈠弶銆?

<?php $k = 1 - $k; ?>
灝?$k璁句負 1鍜屽畠鑷韓鐨勫樊鍊鹼紝鍋囧$k鏄?0錛屽畠?yōu)q瓑浜?錛屽亣濡傚畠絳変簬1瀹冨氨琚涓?.

<input type="hidden" name="boxchecked" value="0" />
榪欒浠g爜寰堥噸瑕佷笉鐒舵墍鏈夌殑閫夋嫨妗嗗皢涓嶈兘姝e父宸ヤ綔銆?


class.hello_world.php -鏁版嵁搴撶被鏂囦歡.
<?php
//hello_world Component//
/**
* Content code
* @package hello_world
* @Copyright (C) 2004 Doyle Lewis
* @ All rights reserved
* @ hello_world is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version 1.0
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
class mosHello_world extends mosDBTable {
// INT(11) AUTO_INCREMENT
var $id=null;
// TEXT
var $text=null;
// TINYINT(1)
var $published=null;
function mosHello_world( &$db ) {
$this->mosDBTable( 'mos_hello_world', 'id', $db );
}
}

鎴戜滑鏉ョ湅涓涓嬭繖涓枃浠?

class mosHello_world extends mosDBTable {
澹版槑綾籱osHello_world涓簃osDBTable鐨勬淳鐢熺被錛屼綘鍙互灝唌osHello_world鏀規(guī)垚浣犺嚜宸辯殑綾誨悕縐般?

// INT(11) AUTO_INCREMENT
var $id=null;
娉ㄩ噴琛屽彧鏄粰鍑轟簡鍙橀噺鐨勪竴浜涗俊鎭紝鍙橀噺鍚嶅繀欏誨拰浣犳暟鎹簱鐨勭浉搴斿瓧孌電浉絎﹀悎騫跺皢瀹冧滑璁句負絀哄箋?

function mosHello_world( &$db ) {
$this->mosDBTable( 'mos_hello_world', 'id', $db );
}
璋冪敤鐖剁被鐨勬瀯閫犲嚱鏁幫紝浣犲彲浠ヨ皟鐢?row=new mosHello_world($database)鏉ュ緱鍒版兂瑕佺殑緇撴灉銆?
install.hello_world.php 鈥?瀹夎鏂囦歡.
<?php
function com_install() {
echo "Thank you for using this component. Please contact me at support@mambo-hosting.com

with any questions";
}
?>
鍦ㄦ枃浠朵腑璋冪敤鍑芥暟com_install()錛屼笉鐒朵細瀵艱嚧寮傚父銆?

uninstall.hello_world.php 鈥?鍗歌澆鏂囦歡.
<?
function com_uninstall() {
echo "Thank you for using this component. Please contact me at support@mambo-hosting.com

with any questions";
}
?>
鍦ㄦ枃浠朵腑璋冪敤鍑芥暟com_uninstall()錛屼笉鐒朵細瀵艱嚧寮傚父銆?

toolbar.hello_world.php -璁劇疆宸ュ叿鏍?
<?php
//hello_world Component//
/**
* Content code
* @package hello_world
* @Copyright (C) 2004 Doyle Lewis
* @ All rights reserved
* @ hello_world is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version 1.0
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
require_once( $mainframe->getPath( 'toolbar_html' ) );
if($task) {
switch($task) {
case 'new':
case 'edit':
$act = "edit";
break;
}
}
if ($act) {
switch ( $act ) {
case 'edit':
menuHello_world::EDIT_MENU();
break;
case 'text':
menuHello_world::TEXT_MENU();
break;
}
}
?>
鎴戜滑鏉ョ湅涓涓嬭繖涓枃浠?

require_once( $mainframe->getPath( 'toolbar_html' ) );
鍜屽湪admin.hello_world.php涓寘鎷琣dmin.hello_world.html.php涓鏍?

if($task) {
switch($task) {
case 'new':
case 'edit':
$act = "edit";
break;
}
}
"new" 鍜?edit" 灝嗗簲鐢ㄧ浉鍚岀殑宸ュ叿鏍忋?

case 'edit':
menuHello_world::EDIT_MENU();
break;
鍛婅瘔toolbar.hello_world.html.php 璇ヨ皟鐢ㄥ摢涓嚱鏁般?


toolbar.hello_world.html.php -鎺у埗宸ュ叿鏍忕殑杈撳嚭
<?php
//hello_world Component//
/**
* Content code
* @package hello_world
* @Copyright (C) 2004 Doyle Lewis
* @ All rights reserved
* @ hello_world is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version 1.0
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
class menuHello_world {
function TEXT_MENU() {
mosMenuBar::startTable();
mosMenuBar::publish('publish');
mosMenuBar::unpublish('unpublish');
mosMenuBar::divider();
mosMenuBar::addNew('new');
mosMenuBar::editList('edit', 'Edit');
mosMenuBar::deleteList( ' ', 'delete', 'Remove' );
mosMenuBar::endTable();
}
function EDIT_MENU() {
mosMenuBar::startTable();
mosMenuBar::back();
mosMenuBar::save('save');
mosMenuBar::spacer();
mosMenuBar::endTable();
}
}
?>
class menuHello_world {
Sets the toolbar class
function TEXT_MENU() {
mosMenuBar::startTable();
mosMenuBar::publish('publish');
mosMenuBar::unpublish('unpublish');
mosMenuBar::divider();
mosMenuBar::addNew('new');
mosMenuBar::editList('edit', 'Edit');
mosMenuBar::deleteList( ' ', 'delete', 'Remove' );
mosMenuBar::endTable();
}
鍛婅瘔mosMenuBar 鍦ㄥ伐鍏鋒爮涓緭鍑轟粈涔堝唴瀹癸紝鎷彿涓皬鍐欑殑鍐呭灝嗗憡璇塧dmin.hello_world.php
鎵ц鍝釜浠誨姟銆?

甯屾湜璇鎬綅鐪嬪畼鐪肩潧榪樻病鏈夎姳錛?錛?榪欏彧鏄緇勪歡鐨勪竴涓緢綆鍗曠殑浠嬬粛錛屼絾鏄鏋滀綘鎵撳嵃鏈暀紼嬬殑璇濊繕鏄湁16欏典箣闀匡細-錛? 甯屾湜鏈暀紼嬭兘甯姪浣犺璁″嚭鏇村己澶х殑MAMBO緇勪歡錛堟病鍑嗕細鏀跺叆MAMBO5.0鐗堜腑鍝︼級


*榪欓噷鍏跺疄鏈?7欏碉紝鍥犱負鎴戦噸鏂版帓浜嗕竴涓嬬増銆?


鍘熸枃浠g爜鍦ㄦ垜鐨勬満鍣ㄤ腑瀹夎鏈夎澶氶棶棰? 澶у鍙笅杞芥垜淇敼鍚庣殑浠g爜瀵規(guī)瘮婧愮爜, 浠呬緵鏂版墜瀛︿範浣跨敤(鍏卞悓瀛︿範.... )



]]>
主站蜘蛛池模板: 亚洲国产人成在线观看| 久久久无码精品亚洲日韩软件| 亚洲一区二区三区高清| 三年片免费观看大全国语| 亚洲日韩在线观看| 成年免费a级毛片| 久久国产成人精品国产成人亚洲| 国产精品亚洲一区二区三区久久| 四虎永久成人免费| 国产亚洲美女精品久久久久| 国产精品冒白浆免费视频 | 全黄a免费一级毛片人人爱| 亚洲AV香蕉一区区二区三区| 国产精品va无码免费麻豆| 亚洲av第一网站久章草| 国产乱子影视频上线免费观看| 日韩在线视频免费| 久久亚洲高清观看| 91精品导航在线网址免费| 亚洲AV无码一区二区三区在线| 在线A级毛片无码免费真人| 麻豆亚洲AV成人无码久久精品 | 无码人妻一区二区三区免费| 亚洲啪AV永久无码精品放毛片| 国产伦精品一区二区三区免费迷| 一级毛片正片免费视频手机看| 国产啪亚洲国产精品无码| 免费成人在线电影| 一本色道久久综合亚洲精品蜜桃冫 | 亚洲人成在线精品| 免费一级做a爰片久久毛片潮喷| 污视频网站免费在线观看| 亚洲精品狼友在线播放| 182tv免费观看在线视频| 理论亚洲区美一区二区三区 | 97se亚洲综合在线| 国产午夜免费福利红片| 日韩精品无码免费专区午夜不卡| 亚洲理论精品午夜电影| 免费乱码中文字幕网站| 久久伊人免费视频|