📄 upgrade.php
字号:
<?php
include '../../../include/cp_header.php';
xoops_cp_header();
if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid()))
{
$sql=sprintf("SHOW TABLES LIKE '%s'",$xoopsDB->prefix('stories_files'));
$result=$xoopsDB->queryF($sql);
if($xoopsDB->getRowsNum($result)==0)
{
$sql = "CREATE TABLE ".$xoopsDB->prefix('stories_files')." (
fileid int(8) unsigned NOT NULL auto_increment,
filerealname varchar(255) NOT NULL default '',
storyid int(8) unsigned NOT NULL default '0',
date int(10) NOT NULL default '0',
mimetype varchar(64) NOT NULL default '',
downloadname varchar(255) NOT NULL default '',
counter int(8) unsigned NOT NULL default '0',
PRIMARY KEY (fileid),
KEY storyid (storyid)
) TYPE=MyISAM;";
if ($xoopsDB->queryF($sql)) {
echo _AM_NEWS_UPGRADECOMPLETE." - <a href='".XOOPS_URL."/modules/system/admin.php?fct=modulesadmin&op=update&module=news'>"._AM_UPDATEMODULE."</a>";
}
else {
echo _AM_NEWS_UPGRADEFAILED;
}
} else {
redirect_header('index.php', 3, _AM_NEWS_UPGRADECOMPLETE);
}
} else {
printf("<H2>Error, to use the upgrade script, you must be an admin on this module</H2>\n");
}
xoops_cp_footer();
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -