📄 newbbpro_to_newbb2.php
字号:
<?php// ------------------------------------------------------------------------- //// XOOPS - PHP Content Management System //// <http://www.xoops.org/> //// ------------------------------------------------------------------------- //// This program is free software; you can redistribute it and/or modify //// it under the terms of the GNU General Public License as published by //// the Free Software Foundation; either version 2 of the License, or //// (at your option) any later version. //// //// This program is distributed in the hope that it will be useful, //// but WITHOUT ANY WARRANTY; without even the implied warranty of //// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //// GNU General Public License for more details. //// //// You should have received a copy of the GNU General Public License //// along with this program; if not, write to the Free Software //// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //// ------------------------------------------------------------------------- //include_once "../../../mainfile.php";$myts =& MyTextSanitizer::getInstance();if ( isset($_POST) ) { foreach ($_POST as $k=>$v) { $$k = $myts->stripSlashesGPC($v); }}$language = $xoopsConfig['language'];if ( file_exists("language/".$language."/updater.php") ) { include_once "language/".$language."/updater.php";} elseif ( file_exists("language/english/updater.php") ) { include_once "language/english/updater.php"; $language = 'english';} else { echo 'no language file.'; exit();}function install_header(){?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head> <title>Newbb 2.0 Updater</title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _NEWBB_UPDATE_CHARSET ?>" /> <style type="text/css" media="all"><!-- @import url(../../../xoops.css); --></style> <link rel="stylesheet" type="text/css" media="all" href="style.css" /></head><body style="margin: 0; padding: 0;"><form action='newbbpro_to_newbb2.php' method='post'><table width="778" align="center" cellpadding="0" cellspacing="0" background="img/bg_table.gif"> <tr> <td width="150"><img src="img/hbar_left.gif" width="100%" height="23" alt="" /></td> <td width="478" background="img/hbar_middle.gif"> </td> <td width="150"><img src="img/hbar_right.gif" width="100%" height="23" alt="" /></td> </tr> <tr> <td width="150"><a href="index.php"><img src="img/logo.gif" width="150" height="80" alt="" /></a></td> <td width="478" background="img/bg_darkblue.gif"> </td> <td width="150"><img src="img/xoops2.gif" width="100%" height="80"></td> </tr> <tr> <td width="150"><img src="img/hbar_left.gif" width="100%" height="23" alt="" /></td> <td width="478" background="img/hbar_middle.gif"> </td> <td width="150"><img src="img/hbar_right.gif" width="100%" height="23" alt="" /></td> </tr></table><table width="778" align="center" cellspacing="0" cellpadding="0" background="img/bg_table.gif" <tr> <td width='5%'> </td> <td align="center"><h4 style="margin-top: 10px; margin-bottom: 5px; padding: 10px;"><?php echo _NEWBB_UPDATE_L01;?></h4><div style="padding: 10px; text-align:left;"><?php}function install_footer(){?> <td width='5%'> </td> </tr> <td colspan="3"> </td> </tr> <tr> <td colspan="3" align="center"><strong>Newbb 2.0 Updater by <a href='http://dev.xoops.org'>dev.xoops.org</a><br /><br /><a href='http://www.xoops.org/' target='_blank'><img src='../../../images/s_poweredby.gif' alt='XOOPS' border='0' /></a> <a href='http://www.spreadfirefox.com/?q=affiliates&id=0&t=70'><img border='0' alt='Get Firefox!' title='Get Firefox!' src='img/get.gif'/></a> </strong></div><br /> </td> </tr></table><table width="778" cellspacing="0" cellpadding="0" align="center" background="img/bg_table.gif"> <tr> <td width="150"><img src="img/hbar_left.gif" width="100%" height="23" alt="" /></td> <td width="478" background="img/hbar_middle.gif"> </td> <td width="150"><img src="img/hbar_installer_right.gif" width="100%" height="23" alt="" /></td> </tr></table></form></body></html><?php}if ( !isset($action) || $action == "" ) { $action = "message";}if ( $action == "message" ) { install_header(); echo " <table width='100%' border='0'><tr><td colspan='2'>". _NEWBB_UPDATE_L40."</td></tr> <tr><td>-</td><td>"._NEWBB_UPDATE_L03."</td></tr> <tr><td>-</td><td><span style='color:#ff0000;font-weight:bold;'>"._NEWBB_UPDATE_L04."</span></td></tr> <tr> <td colspan='2' align='center'><br /><br /><input type='hidden' name='action' value='update1' /><input type='submit' name='submit' value='"._NEWBB_UPDATE_L99."' /></td> </tr> </table> "; install_footer(); exit();}if ( $action == "update1" ) {install_header();echo "<table width='100%' border='0'><tr><td colspan='2' align='center'><b>". _NEWBB_UPDATE_L05."</b></td></tr>";$result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix("bb_archive")."( `topic_id` tinyint(8) NOT NULL default '0', `post_id` tinyint(8) NOT NULL default '0', `post_text` text NOT NULL ) TYPE=MyISAM");if (!$result) { echo "<tr align='center'><td width='30%' align='right'><img src='img/no.gif'></td><td width='70%' align='left'><span style='color:#ff0000;font-weight:bold'>Could not create ".$xoopsDB->prefix("bb_archive")."</span></td></tr>";}else { echo "<tr align='center'><td width='30%' align='right'><img src='img/yes.gif'></td><td width='70%' align='left'> Create ".$xoopsDB->prefix."_bb_archive</td></tr>";}$result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix("bb_attachments")."( `attach_id` int(8) unsigned NOT NULL auto_increment, `post_id` int(10) default NULL, `name_saved` varchar(255) default NULL, `name_disp` varchar(255) default NULL, `mimetype` varchar(255) default NULL, `online` int(1) NOT NULL default '1', `attach_time` int(10) NOT NULL default '0', `download` int(10) NOT NULL default '0', PRIMARY KEY (`attach_id`), KEY `post_id` (`post_id`)) TYPE=MyISAM");if (!$result) { echo "<tr align='center'><td width='30%' align='right'><img src='img/no.gif'></td><td width='70%' align='left'><span style='color:#ff0000;font-weight:bold'>Could not create ".$xoopsDB->prefix("bb_attachments")."</span></td></tr>";}else { echo "<tr align='center'><td width='30%' align='right'><img src='img/yes.gif'></td><td width='70%' align='left'> Create ".$xoopsDB->prefix."_bb_attachments</td></tr>";}$result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix("bb_digest")."( `digest_id` int(8) unsigned NOT NULL auto_increment, `digest_time` int(10) NOT NULL default '0', `digest_content` text, PRIMARY KEY (`digest_id`), KEY `digest_time` (`digest_time`)) TYPE=MyISAM");if (!$result) { echo "<tr align='center'><td width='30%' align='right'><img src='img/no.gif'></td><td width='70%' align='left'><span style='color:#ff0000;font-weight:bold'>Could not create ".$xoopsDB->prefix("bb_digest")."</span></td></tr>";}else { echo "<tr align='center'><td width='30%' align='right'><img src='img/yes.gif'></td><td width='70%' align='left'> Create ".$xoopsDB->prefix."_bb_digest</td></tr>";}$result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix("bb_online")."( `online_forum` int(10) NOT NULL default '0', `online_topic` int(10) NOT NULL default '0', `online_uid` int(10) default NULL, `online_uname` varchar(255) default NULL, `online_ip` varchar(32) default NULL, `online_updated` int(14) default NULL) TYPE=MyISAM");if (!$result) { echo "<tr align='center'><td width='30%' align='right'><img src='img/no.gif'></td><td width='70%' align='left'><span style='color:#ff0000;font-weight:bold'>Could not create ".$xoopsDB->prefix("bb_online")."</span></td></tr>";}else { echo "<tr align='center'><td width='30%' align='right'><img src='img/yes.gif'></td><td width='70%' align='left'> Create ".$xoopsDB->prefix."_bb_online</td></tr>";}$result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix("bb_report")."( `report_id` int(8) unsigned NOT NULL auto_increment, `post_id` int(10) default NULL, `reporter_uid` int(10) default NULL, `reporter_ip` int(11) NOT NULL default '0', `report_time` int(10) NOT NULL default '0', `report_text` varchar(255) default NULL, `report_result` tinyint(1) NOT NULL default '0', `report_memo` varchar(255) default NULL, PRIMARY KEY (`report_id`), KEY `post_id` (`post_id`)) TYPE=MyISAM");if (!$result) { echo "<tr align='center'><td width='30%' align='right'><img src='img/no.gif'></td><td width='70%' align='left'><span style='color:#ff0000;font-weight:bold'>Could not create ".$xoopsDB->prefix("bb_report")."</span></td></tr>";}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -