更新的解决方案以保持可更新:
菜单条目:/user_classes/conf/admin_menu/menu_mymodule.xml
<?xml version="1.0"?>
<!-- {load_language_text section="admin_menu"} -->
<admin_menu>
<menugroup id="BOX_HEADING_IMPORT_EXPORT">
<menuitem sort="10" link="mymodule.php" link_param="your=param" title="MyModule" />
</menugroup>
</admin_menu>
创建 /admin/includes/modules/mymodule/css/mymodule_backend.css
创建 /admin/includes/modules/mymodule/index.php
<?php
$string = '<td class="boxCenter" width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading" style="background-image: url(images/icons/amicicard_30.png);float:left;"> MyModule</td>
<td class="pageHeading" align="right"><img src="images/pixel_trans.gif" border="0" alt="" width="HEADING_IMAGE_WIDTH" height="HEADING_IMAGE_HEIGHT"></td>
</tr>
</table>
<span class="main">
';
echo $string;
echo "Do your work here like that.<br>";
echo "You can include classes etc. in here and use echo as output.";
echo '</div>';
创建 /admin/mymodule.php
<?php
$version = phpversion();
$majorVersion = explode('.', $version);
$majorVersion = intval($majorVersion[0]);
if ($majorVersion < 5)
{
return;
}
require('includes/application_top.php');
$isPopup = isset($_GET['popup']) ? true : false;
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<link rel="stylesheet" type="text/css" href="includes/modules/mymodule/css/mymodule_backend.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<?php
if (!$isPopup)
{
//include header:
require(DIR_WS_INCLUDES . 'header.php');
//include body:
echo '<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="'.BOX_WIDTH.'" valign="top"><table border="0" width="'.BOX_WIDTH.'" cellspacing="1" cellpadding="1" class="columnLeft">';
//include left navigation:
require(DIR_WS_INCLUDES . 'column_left.php');
echo '</table></td>';
}
else
{
//include body:
echo '<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="100%" valign="top"><table border="0" width="0" cellspacing="1" cellpadding="1" class="columnLeft">';
}
require_once('./includes/modules/mymodule/index.php');
echo '</tr></table>';
if (!$isPopup)
{
//footer:
require(DIR_WS_INCLUDES . 'footer.php');
}
echo '<br>
</body>
</html>';
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
像用户提到的那样更新您的数据库不公平
最后一点插入数据库 ALTER TABLE admin_access ADD myfile INT( 1 ) NOT NULL DEFAULT '0';
并将其更新为 1 为真
而已。
结果图像