⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upgrade.php

📁 在综合英文版XOOPS 2.09, 2.091, 2.092 的基础上正式发布XOOPS 2.09中文版 XOOPS 2.09x 版主要是PHP5升级、bug修正和安全补正: 1 全面兼容PHP 5.
💻 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 + -