Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[解决中] 求助:论坛数据重新导入后首页最下面出现好多代码

[复制链接]
hosea 发表于 2012-3-25 19:59:37 | 显示全部楼层 |阅读模式
前段时间论坛数据库出现故障,重新导入备份数据后,论坛的首页最下面一直有一大串代码,请教各位高手是啥原因?
在此向您表示万分感谢!
论坛首页:www.fishing51.com
错误代码:
$db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('backupdir', '".$backupdir."')"); $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('extcredits', '".addslashes(serialize($extcredits))."')"); $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('attachdir', '$attachdir')"); $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('attachurl', '$attachurl')"); $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('tasktypes', '".addslashes(serialize($tasktypes))."')"); $db->query("DELETE FROM {$tablepre}members"); $db->query("DELETE FROM {$tablepre}memberfields"); $password = md5(random(10)); $db->query("INSERT INTO {$tablepre}members (uid, username, password, secques, adminid, groupid, regip, regdate, lastvisit, lastpost, email, dateformat, timeformat, showemail, newsletter, timeoffset) VALUES ('$uid', '$username', '$password', '', '1', '1', 'hidden', '".time()."', '".time()."', '".time()."', '$email', '', '0', '1', '1', '9999');"); $db->query("INSERT INTO {$tablepre}memberfields (uid) VALUES ('$uid')"); $db->query("UPDATE {$tablepre}crons SET lastrun='0', nextrun='".($timestamp + 3600)."'"); if($testdata) { install_testdata($username, $uid); } foreach($request_data as $k => $v) { $variable = addslashes($k); $type = $v['type']; if(isset($v['parameter']['settings'])) { $v_settings = rawurlencode(serialize($v['parameter']['settings'])); $v['url'] = preg_replace('/&settings=.+?([&|$])/', '&settings='.$v_settings.'\1', $v['url'].'&'); } if(isset($v['parameter']['jstemplate'])) { $v_jstemplate = rawurlencode($v['parameter']['jstemplate']); $v['url'] = preg_replace('/&jstemplate=.+?([&|$])/', '&jstemplate='.$v_jstemplate.'\1', $v['url'].'&'); } $value = addslashes(serialize($v)); $db->query("REPLACE INTO {$tablepre}request (variable, value, type) VALUES ('$variable', '$value', '$type')"); } if(is_writeable(ROOT_PATH.'./config.inc.php')) { $configfile = @file_get_contents(ROOT_PATH.'./config.inc.php'); $configfile = trim($configfile); $configfile = substr($configfile, -2) == '?>' ? substr($configfile, 0, -2) : $configfile; $configfile = preg_replace("/[$]forumfounders\s*\=\s*[\"'].*?[\"'];/is", "\$forumfounders = '$uid';", $configfile); @file_put_contents(ROOT_PATH.'./config.inc.php', $configfile); } foreach($optionlist as $optionid => $option) { $db->query("INSERT INTO {$tablepre}typeoptions VALUES ('$optionid', '$option[classid]', '$option[displayorder]', '$option[title]', '', '$option[identifier]', '$option[type]', '', '".addslashes(serialize($option['rules']))."');"); } $db->query("ALTER TABLE {$tablepre}typeoptions AUTO_INCREMENT=3001"); upg_newbietask(); $yearmonth = date('Ym_', time()); loginit($yearmonth.'ratelog'); loginit($yearmonth.'illegallog'); loginit($yearmonth.'modslog'); loginit($yearmonth.'cplog'); loginit($yearmonth.'errorlog'); loginit($yearmonth.'banlog'); dir_clear(ROOT_PATH.'./forumdata/templates'); dir_clear(ROOT_PATH.'./forumdata/cache'); dir_clear(ROOT_PATH.'./forumdata/threadcaches'); dir_clear(ROOT_PATH.'./uc_client/data'); dir_clear(ROOT_PATH.'./uc_client/data/cache'); touch($lockfile); VIEW_OFF && show_msg('initdbresult_succ'); if(!VIEW_OFF) { echo ''."\r\n"; show_footer(); } } if(VIEW_OFF) { show_msg('missing_parameter', '', 0); } else { show_form($form_db_init_items, $error_msg); } } elseif($method == 'ext_info') { @include CONFIG; $db = new dbstuff; $db->connect($dbhost, $dbuser, $dbpw, $dbname, DBCHARSET); $skip = getgpc('skip'); if(empty($skip)) { upg_comsenz_stats(); } @touch($lockfile); if(VIEW_OFF) { show_msg('ext_info_succ'); } else { show_header(); echo '
'; echo '
'.lang('install_succeed').'
'; echo ''.lang('auto_redirect').''; echo '
'; show_footer(); } } elseif($method == 'install_check') { if(file_exists($lockfile)) { show_msg('installstate_succ'); } else { show_msg('lock_file_not_touch', $lockfile, 0); } } elseif($method == 'tablepre_check') { $dbinfo = getgpc('dbinfo'); extract($dbinfo); if(check_db($dbhost, $dbuser, $dbpw, $dbname, $tablepre)) { show_msg('tablepre_not_exists', 0); } else { show_msg('tablepre_exists', $tablepre, 0); } }

weiwei325 发表于 2012-3-25 21:46:07 | 显示全部楼层
手插口袋,谁都不爱 。   

帮顶
仙府之缘最新章节 www.imseekyou.com
回复

使用道具 举报

12153556 发表于 2012-3-25 21:57:05 | 显示全部楼层
DIY的数据导入了吗?
回复

使用道具 举报

 楼主| hosea 发表于 2012-3-27 20:16:08 | 显示全部楼层
12153556 发表于 2012-3-25 21:57
DIY的数据导入了吗?

在哪里导入?
回复

使用道具 举报

 楼主| hosea 发表于 2012-3-27 20:20:44 | 显示全部楼层
12153556 发表于 2012-3-25 21:57
DIY的数据导入了吗?

在哪里导入?
回复

使用道具 举报

电影牛人 发表于 2012-3-31 15:59:35 | 显示全部楼层
值得细看。佩服。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-10 12:33 , Processed in 0.107754 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表