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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[DST][Rockoy 出品] Discuz! 5.5.0 -- 0324 -> 0724 手工升级方法[7.26'3:36]

[复制链接]
Rockoy 发表于 2007-7-26 03:19:04 | 显示全部楼层 |阅读模式
发点牢骚:刚把小女生的论坛弄的差不多,这可到好,dz又升级了~还得重新弄,么有办法,只能一个文件一个文件的修改了,下面把我手动升级发给大家,希望对大家有所帮助!同时,谢谢你的支持!(另外PS:婚恋中心等我回家的马上搞,最近在外比较忙。。。。。)

Discuz! 5.X 系列论坛重要更新,请注意及时修补
此次更新为重要安全更新
由于 Discuz! 5.X 系列程序对用户提交数据未作严格校验,可能导致用户利用此问题越权获取论坛内容和重要信息,并可能直接威胁到论坛安全。
为保证您或者您的朋友的论坛数据安全,我们建议您立即升级至 Discuz! 5.5 20070724 版本,或转告您的朋友进行升级,以免因此而遭受攻击。
详细说明:
https://discuz.dismall.com/redire ... o=lastpost#lastpost
说明和注意
修改文件时请谨慎小心!
看清楚代码之后再弄!
切勿出错!记得要做好备份!
另外,适量而行!
不是每个文件都要做修改!
你要看你原来的文件有没有做过修改!
如果有就修改,没修改就覆盖!
(FTP中请看文件的上传日期来对比一下是否有必要做修改!)

所要修改的文件列表:
红色为修改,蓝色覆盖即可,绿色为新文件!
\admin 目录
------ checktools.inc.php
------ database.inc.php
------ discuzfiles.md5
------ forums.inc.php
------ global.func.php
------ groups.inc.php
------ home.inc.php
------ logs.inc.php
------ magics.inc.php
------ members.inc.php
------ menu.inc.php
------ qihoo.inc.php
------ quickqueries.inc.php
------ settings.inc.php
------ supesite.inc.php
------ tools.inc.php

\api 目录
------ tradeapi.php
------ tradenotify.php

\archiver 目录
----- \include\thread.inc.php
----- index.php

\include 目录
----- \crons\pushthreads_weekly.inc.php
----- \crons\threadexpiries_hourly.inc.php
----- \magic\magic_del.inc.php
----- \magic\magic_renew.inc.php
----- attachment.func.php
----- cache.func.php
----- common.inc.php
----- cron.func.php
----- discuzcode.func.php
----- editpost.inc.php
----- global.func.php
----- magic.func.php
----- misc.func.php
----- moderation.inc.php
----- newthread.inc.php
----- pmprompt.inc.php
----- post.func.php
----- printable.inc.php
----- space.func.php

\templates 目录
----- \default\activity_applylist.htm
----- \default\admincp.lang.php
----- \default\forumdisplay.htm
----- \default\leftmenu.htm
----- \default\memberlist.htm
----- \default\post_attachments.htm
----- \default\post_editpost.htm
----- \default\post_newthread.htm
----- \default\rate.htm
----- \default\supesite_footer.htm
----- \default\supesite_header.htm
----- \default\supesite_pmprompt.htm
----- \default\supesite_viewthread.htm
----- \default\supesite_viewthread_activity.htm
----- \default\supesite_viewthread_passwd.htm
----- \default\supesite_viewthread_poll.htm
----- \default\supesite_viewthread_trade.htm
----- \default\templates.lang.php
----- \default\viewpro.htm
----- \default\viewpro_classic.htm
----- \default\viewthread.htm
----- \default\viewthread_activity.htm
----- \default\viewthread_inframe.htm NEW
----- \default\viewthread_poll.htm
----- \default\viewthread_relatedthread.htm  NEW

\wap 目录
----- \include\register.inc.php
----- \include\search.inc.php
----- index.php

\ 根目录
----- admincp.php
----- attachment.php
----- discuz_version.php
----- forumdisplay.php
----- index.php
----- leftmenu.php
----- magic.php
----- member.php
----- memcp.php
----- misc.php
----- my.php
----- post.php
----- register.php
----- relatethread.php
----- robots.txt
----- rss.php
----- space.php
----- topicadmin.php
----- viewthread.php

导航
1楼为 介绍相关 说明注意 修改列表
2楼为 admin目录修改
3楼为 include目录修改
4楼为 templates目录修改
5楼为 wap目录和根目录修改
为了让大家更清楚的看到所要修改的文件在哪里,特意这样子!希望对您有所帮助!

[ 本帖最后由 Rockoy 于 2007-7-26 09:43 编辑 ]

评分

5

查看全部评分

 楼主| Rockoy 发表于 2007-7-26 03:21:24 | 显示全部楼层
\admin 目录

database.inc.php


  1.                                         cpmsg('database_export_multivol_redirect', "admincp.php?action=export&type=".rawurlencode($type)."&saveto=".rawurlencode(server)."&filename=".rawurlencode($filename)."&method=".rawurlencode(multivol)."&sizelimit=".rawurlencode($sizelimit)."&volume=".rawurlencode($volume)."&tableid=".rawurlencode($tableid)."&startfrom=".rawurlencode($startrow)."&extendins=".rawurlencode($extendins)."&sqlcharset=".rawurlencode($sqlcharset)."&sqlcompat=".rawurlencode($sqlcompat)."&exportsubmit=yes&usehex=$usehex&usezip=$usezip");
复制代码

替换为
  1.                                         unset($sqldump, $zip, $content);
  2.                                         cpmsg('database_export_multivol_redirect', "admincp.php?action=export&type=".rawurlencode($type)."&saveto=server&filename=".rawurlencode($filename)."&method=multivol&sizelimit=".rawurlencode($sizelimit)."&volume=".rawurlencode($volume)."&tableid=".rawurlencode($tableid)."&startfrom=".rawurlencode($startrow)."&extendins=".rawurlencode($extendins)."&sqlcharset=".rawurlencode($sqlcharset)."&sqlcompat=".rawurlencode($sqlcompat)."&exportsubmit=yes&usehex=$usehex&usezip=$usezip");
复制代码



  1.                                                 cpmsg('database_export_multivol_succeed');
  2.                                         }
复制代码

下面添加
  1.                                         unset($sqldump, $zip, $content);
复制代码



  1.                                         @touch('./forumdata/'.$backupdir.'/index.htm');
复制代码

替换为
  1.                                         fclose(fopen('./forumdata/'.$backupdir.'/index.htm', 'a'));
复制代码



  1.                                         @touch('./forumdata/'.$backupdir.'/index.htm');
复制代码

替换为
  1.                                         fclose(fopen('./forumdata/'.$backupdir.'/index.htm', 'a'));
复制代码



  1.                                         @touch('./forumdata/'.$backupdir.'/index.htm');
复制代码

替换为
  1.                                         fclose(fopen('./forumdata/'.$backupdir.'/index.htm', 'a'));
复制代码



  1. $filename = $backupfilename.'.zip';
复制代码

下面添加
  1.                                         unset($sqldump, $zip, $content);
复制代码



  1.                                         @touch('./forumdata/'.$backupdir.'/index.htm');
复制代码

替换为
  1.                                         fclose(fopen('./forumdata/'.$backupdir.'/index.htm', 'a'));
复制代码



  1. $readerror = 0;
复制代码

下面添加
  1.                 $datafile = '';
复制代码



  1. unset($sqldump);
复制代码

下面添加
  1.                         $supetablepredot = strpos($supe['tablepre'], '.');
  2.                         $supe['dbname'] =  $supetablepredot !== FALSE ? substr($supe['tablepre'], 0, $supetablepredot) : '';
复制代码



  1. $sql = syntablestruct(trim($sql), $db->version() > '4.1', $dbcharset);
复制代码

下面添加
  1.                                 //debug 判断是否为SUPESITE多库备份的方式
  2.                                 if(substr($sql, 0, 11) == 'INSERT INTO') {
  3.                                         $sqldbname = substr($sql, 12, 20);
  4.                                         $dotpos = strpos($sqldbname, '.');
  5.                                         if($dotpos !== FALSE) {
  6.                                                 if(empty($supe['dbmode'])) {
  7.                                                         $sql = 'INSERT INTO `'.$supe['dbname'].'`.'.substr($sql, 13 + $dotpos);
  8.                                                 } else {
  9.                                                         supe_dbconnect();
  10.                                                 }
  11.                                         }
  12.                                 }
复制代码



  1.                 $db->query("DELETE FROM {$tablepre}subscriptions", 'UNBUFFERED');
  2.                 $db->query("UPDATE {$tablepre}memberfields SET authstr=''", 'UNBUFFERED');
复制代码

替换为
  1.                 //$db->query("DELETE FROM {$tablepre}subscriptions", 'UNBUFFERED');
  2.                 //$db->query("UPDATE {$tablepre}memberfields SET authstr=''", 'UNBUFFERED');
复制代码



  1. global $db;
复制代码

下面添加
  1.         $arr = explode('.', $tablepre);
  2.         $dbname = $arr[1] ? $arr[0] : '';
  3.         $sqladd = $dbname ? " FROM $dbname LIKE '$arr[1]%'" : "LIKE '$tablepre%'";
复制代码



  1.         $query = $db->query("SHOW TABLE STATUS $sqladd");
复制代码

替换为
  1.         $query = $db->query("SHOW TABLE STATUS LIKE '$tablepre%'");
复制代码



  1. while($table = $db->fetch_array($query)) {
复制代码

下面添加
  1.                 $table['Name'] = ($dbname ? "$dbname." : '').$table['Name'];
复制代码

global.func.php

  1. $create = $db->fetch_row($createtable);
复制代码

下面添加
  1.                 //debug 判断是否在不同数据库
  2.                 if(strpos($table, '.') !== FALSE) {
  3.                         $tablename = substr($table, strpos($table, '.') + 1);
  4.                         $create[1] = str_replace("CREATE TABLE $tablename", 'CREATE TABLE '.$table, $create[1]);
  5.                 }
复制代码



  1.                 $dbversion = $db->result($db->query("SELECT VERSION()"), 0);
  2.                 $members = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}members"), 0);
  3.                 $threads = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}threads"), 0);
  4.                 $posts = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}posts"), 0);
  5.                 $msns = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}memberfields WHERE msn!=''"), 0);
  6.                 echo '<script language="JavaScript" src="http://customer.discuz.net/news.php?version='.rawurlencode(DISCUZ_VERSION).'&release='.rawurlencode(DISCUZ_RELEASE).'&php='.PHP_VERSION.'&mysql='.$dbversion.'&charset='.rawurlencode($charset).'&bbname='.rawurlencode($bbname).'&members='.$members.'&threads='.$threads.'&posts='.$posts.'&msn='.$msns.'&md5hash='.md5(preg_replace("/http:\/\/(.+?)\/.*/i", "\\1", $_SERVER['HTTP_REFERER']).$_SERVER['HTTP_USER_AGENT'].DISCUZ_VERSION.DISCUZ_RELEASE.$bbname.$members.$threads.$posts).'"></script>';





复制代码

替换为
  1.                 $locktime = @filemtime(DISCUZ_ROOT.'./forumdata/updatetime.lock');
  2.                 if(empty($locktime) || ($timestamp - $locktime > 3600 * 4)) {
  3.                         @touch(DISCUZ_ROOT.'./forumdata/updatetime.lock');
  4.                         $dbversion = $db->result($db->query("SELECT VERSION()"), 0);
  5.                         $members = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}members"), 0);
  6.                         $threads = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}threads"), 0);
  7.                         $posts = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}posts"), 0);
  8.                         $msns = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}memberfields WHERE msn!=''"), 0);
  9.                 } else {
  10.                         $dbversion = $members = $threads = $posts = $msns = 0;
  11.                 }
  12.                 echo '<script language="JavaScript" src="http://customer.discuz.net/news.php?version='.rawurlencode(DISCUZ_VERSION).'&release='.rawurlencode(DISCUZ_RELEASE).'&php='.PHP_VERSION.'&mysql='.$dbversion.'&charset='.rawurlencode($charset).'&bbname='.rawurlencode($bbname).'&members='.$members.'&threads='.$threads.'&posts='.$posts.'&msn='.$msns.'news=1&md5hash='.md5(preg_replace("/http:\/\/(.+?)\/.*/i", "\\1", $_SERVER['HTTP_REFERER']).$_SERVER['HTTP_USER_AGENT'].DISCUZ_VERSION.DISCUZ_RELEASE.$bbname.$members.$threads.$posts).'"></script>';
复制代码


groups.inc.php

  1. } elseif($action == 'usergroups') {
复制代码

下面添加
  1.         if($do == 'viewsgroup') {
  2.                 $query = $db->query("SELECT COUNT(*) FROM {$tablepre}members WHERE groupid='$sgroupid'");
  3.                 $num = $db->result($query, 0);
  4.                 $query = $db->query("SELECT uid, username FROM {$tablepre}members WHERE groupid='$sgroupid' LIMIT 80");
  5.                 $sgroups = '';
  6.                 while($member = $db->fetch_array($query)) {
  7.                         $sgroups .= '<span style="display: block; float: left; width: 7em; overflow: hidden; margin: 2px; height: 1.5em;"><a href="viewpro.php?uid='.$member['uid'].'" target="_blank">'.$member['username'].'</a></span> ';
  8.                 }
  9.                 $sgroups .= '<div align="right" style="clear: both;"><br>'.$lang['jswizard_stats_members'].': '.$num.($num > 80 ? ' &nbsp; <a href="admincp.php?action=members&searchsubmit=yes&usergroupid[]='.$sgroupid.'" target="main">'.$lang['more'].'&raquo;</a>' : '').' &nbsp; </div>';
  10.                 echo '<html><head>';
  11.                 echo '<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'">';
  12.                 echo '<link rel="stylesheet" type="text/css" id="css" href="forumdata/cache/style_'.STYLEID.'.css">';
  13.                 echo '</head><body class="altbg2">';
  14.                 echo $sgroups;
  15.                 echo '</body></html>';
  16.                 exit;
  17.         }
复制代码



  1.                         foreach($sgroups as $sgroup) {
  2.                                 $sgroupid = $sgroup['groupid'];
  3.                                 $query = $db->query("SELECT COUNT(*) FROM {$tablepre}members WHERE groupid='$sgroupid'");
  4.                                 $smembernum[$sgroupid] = $db->result($query, 0);
  5.                                 $query = $db->query("SELECT uid, username, groupid FROM {$tablepre}members WHERE groupid='$sgroupid' LIMIT 50");
  6.                                 while($member = $db->fetch_array($query)) {
  7.                                         $smembers[$member['groupid']][] = '<span><a href="viewpro.php?uid='.$member['uid'].'" target="_blank">'.$member['username'].'</a></span>';
  8.                                 }
  9.                         }
复制代码

删除掉!


  1.                                 $specialgroup .= "<tr align="center" valign="top"><td class="altbg1"><input class="checkbox" type="checkbox" name="delete[$group[groupid]]" value="$group[groupid]"></td>\n".
复制代码

替换为成
  1.                                 $specialgroup .= "<tr align="center" valign="top">
  2.                                         <td class="altbg1"><input class="checkbox" type="checkbox" name="delete[$group[groupid]]" value="$group[groupid]"></td>\n".
复制代码



  1.                                         "<td class="altbg1"><span class="smalltxt">$specifiedusers</span></td>\n".
  2.                                         "<td class="altbg2"><span class="smalltxt">".$smembernum[$group['groupid']]."</span></td>\n".
复制代码

删除掉!


  1.                                         "<td class="altbg2" nowrap><a href="admincp.php?action=usergroups&edit=$group[groupid]">[$lang[detail]]</a></td></tr>\n";

复制代码

替换为成
  1.                                         "<td class="altbg2" nowrap><a href="###" onclick="showsgroup($group[groupid])">[$lang[view]]</a></td>\n".
  2.                                         "<td class="altbg1" nowrap><a href="admincp.php?action=usergroups&edit=$group[groupid]">[$lang[detail]]</a></td></tr>\n";
  3.                                 $specialgroup .= "<tbody><tr><td colspan="7" id="sgroup_$group[groupid]" style="display: none"></td></tr></tbody>";
复制代码



  1. shownav('menu_usergroups');
  2.                         showtips('usergroups_tips');

  3. ?>
复制代码

下面添加
  1. <script>
  2. //private
  3. function setframeheight(obj) {
  4.         obj.height = obj.contentDocument ? obj.contentDocument.body.scrollHeight + 30 : obj.Document.body.scrollHeight;
  5. }

  6. function showsgroup(sgroupid) {
  7.         var sgroupframe = $('sgroup_' + sgroupid);
  8.         if(sgroupframe.innerHTML) {
  9.                 sgroupframe.style.display = sgroupframe.style.display == '' ? 'none' : '';
  10.         } else {
  11.                 sgroupframe.style.display = '';
  12.                 var url = "admincp.php?action=usergroups&do=viewsgroup&sgroupid=" + sgroupid;
  13.                 sgroupframe.innerHTML = '<iframe width="100%" align="center" height="30" onload="setframeheight(this)" frameborder="0" scrolling="no" src="'+url+'"></iframe>';
  14.         }
  15. }
  16. </script>
复制代码



  1. <tr class="header"><td colspan="8"><?=$lang['usergroups_special']?> - <?=$lang['usergroups_detail']?></td></tr>
  2. <tr class="category" align="center"><td width="48"><input class="checkbox" type="checkbox" name="chkall" class="category" onclick="checkall(this.form)"><?=$lang['del']?></td>
  3. <td nowrap><?=$lang['usergroups_title']?></td><td><?=$lang['usergroups_specified_members']?></td><td nowrap><?=$lang['members']?><td nowrap><?=$lang['usergroups_stars']?></td><td nowrap><?=$lang['usergroups_color']?></td><td nowrap><?=$lang['usergroups_avatar']?></td><td nowrap><?=$lang['edit']?></td></tr>
复制代码

替换为成
  1. <tr class="header"><td colspan="7"><?=$lang['usergroups_special']?> - <?=$lang['usergroups_detail']?></td></tr>
  2. <tr class="category" align="center">
  3. <td width="48"><input class="checkbox" type="checkbox" name="chkall" class="category" onclick="checkall(this.form)"><?=$lang['del']?></td>
  4. <td nowrap width="20%"><?=$lang['usergroups_title']?></td>
  5. <td nowrap width="20%"><?=$lang['usergroups_stars']?></td>
  6. <td nowrap width="15%"><?=$lang['usergroups_color']?></td>
  7. <td nowrap width="15%"><?=$lang['usergroups_avatar']?></td>
  8. <td nowrap width="10%"><?=$lang['view']?></td>
  9. <td nowrap width="10%"><?=$lang['edit']?></td></tr>
复制代码



  1. <td>&nbsp;</td>
  2. <td>&nbsp;</td>
复制代码

删除掉!
(一共两处)


  1. <td><input type="text" size="12" name="groupavatarnewadd[]"></td>
  2. <td>&nbsp;</td>
复制代码

下面添加
  1. <td>&nbsp;</td>
复制代码

(一共两处)


  1. <tr align="center" class="altbg1"><td><?=$lang['add_new']?></td>
复制代码

替换为成
  1. <tr align="center" class="altbg1">
  2. <td><?=$lang['add_new']?></td>
复制代码


members.inc.php

  1.                 $defaultgroupid = $defaultgrouptitle = $groupselect = '';
  2.                 $query = $db->query("SELECT groupid, grouptitle, creditshigher FROM {$tablepre}usergroups WHERE type='member' AND creditshigher='0' OR (groupid NOT IN ('5', '6', '7', '$defaultgroupid') AND radminid<>'1' AND type<>'member') ORDER BY type DESC, (creditshigher<>'0' || creditslower<>'0'), creditslower");
复制代码

替换为成
  1.                 $groupselect = '';
  2.                 $query = $db->query("SELECT groupid, type, grouptitle, creditshigher FROM {$tablepre}usergroups WHERE type='member' AND creditshigher='0' OR (groupid NOT IN ('5', '6', '7') AND radminid<>'1' AND type<>'member') ORDER BY type DESC, (creditshigher<>'0' || creditslower<>'0'), creditslower");
复制代码



  1.                                 $defaultgroupid = $data['groupid'];
  2.                                 $defaultgrouptitle = $data['grouptitle'];
复制代码

替换为成
  1.                                 $groupselect .= "<option value="$group[groupid]" selected>$group[grouptitle]</option>\n";
  2.                         } else {
  3.                                 $groupselect .= "<option value="$group[groupid]">$group[grouptitle]</option>\n";
复制代码



  1.                         $groupselect .= "<option value="$group[groupid]">$group[grouptitle]</option>\n";
复制代码

删除掉!


  1.                 updatecache('settings');
复制代码

删除掉!


  1. <tr><td class="altbg1"><?=$lang['usergroup']?>:</td>
  2. <td align="right" class="altbg2"><select name="newgroupid">
  3. <option value="<?=$defaultgroupid?>" selected><?=$defaultgrouptitle?></option>
  4. <?=$groupselect?></select></td></tr>
复制代码

替换为成
  1. <tr>
  2. <td class="altbg1"><?=$lang['usergroup']?>:</td>
  3. <td align="right" class="altbg2"><select name="newgroupid"><?=$groupselect?></select></td>
  4. </tr>
复制代码



  1. <td align="right" class="altbg2"><input class="checkbox" type="checkbox" name="emailnotify" value="yes" checked></td></tr>
复制代码

替换为成
  1. <td align="right" class="altbg2"><input class="checkbox" type="checkbox" name="emailnotify" value="yes"></td></tr>
复制代码



  1.                 }

  2.                 if(strlen($newusername) > 15) {
复制代码

替换为成
  1.                 } elseif(strlen($newusername) > 15) {

复制代码



  1.                 if($uidupperlimit != '' && $uidlowerlimit != '') {
  2.                         $lastuid = 0;
  3.                         $query = $db->query("SELECT * FROM {$tablepre}members WHERE uid BETWEEN '$uidlowerlimit' AND '$uidupperlimit' ORDER BY uid");


复制代码

替换为成
  1.                 $uidupperlimit = intval($uidupperlimit);
  2.                 $uidlowerlimit = intval($uidlowerlimit);

  3.                 if($uidlowerlimit && $uidupperlimit >= $uidlowerlimit) {
  4.                         $uid = $uidlowerlimit;
  5.                         $query = $db->query("SELECT uid FROM {$tablepre}members WHERE uid BETWEEN '$uidlowerlimit' AND '$uidupperlimit' ORDER BY uid");
复制代码



  1.                                 if($lastuid && $member['uid'] - $lastuid > 1) {
  2.                                         $uid = $lastuid + 1;
  3.                                         break;
复制代码

替换为成
  1.                                 if($member['uid'] > $uid) {
  2.                                         break;
  3.                                 } else {
  4.                                         $uid ++;
复制代码



  1.                                 $lastuid = $member['uid'];
复制代码

删除掉!


  1.                         if($uid) {
复制代码

替换为成
  1.                         if($uid <= $uidupperlimit) {
复制代码



  1.                 $newadminid = $group['type'] == 'special' ? -1 : (in_array($group['radminid'], array(1, 2, 3)) ? $group['radminid'] : 0);
复制代码

替换为
  1.                 $newadminid = in_array($group['radminid'], array(1, 2, 3)) ? $group['radminid'] : ($group['type'] == 'special' ? -1 : 0);
复制代码



  1.                                 $credit = intval($credit);
  2.                                 $value = intval($value);
  3.                                 if($value != 0 && $credit > 0 && $credit < 9) {
复制代码

替换为
  1.                                 $credit = intval(substr($credit, 10));
  2.                                 if($value != '' && $credit > 0 && $credit < 9) {
  3.                                         $value = intval($value);
复制代码

(一共两处!)


  1. $conditions .= $postshigher != '' ? " AND posts>'$postshigher'" : '';
  2.                 $conditions .= $postslower != '' ? " AND posts<'$postslower'" : '';
复制代码

下面添加
  1.                 $conditions .= $higher['credits'] != '' ? " AND credits>'$higher[credits]'" : '';
  2.                 $conditions .= $lower['credits'] != '' ? " AND credits<'$lower[credits]'" : '';
复制代码



  1.                         $uids = '0';
复制代码

替换为成
  1.                         $uids = $comma = '';
复制代码



  1.                                 $uids .= ','.$member['uid'];
复制代码

替换为成
  1.                                 $uids .= $comma.$member['uid'];
  2.                                 $comma = ',';
复制代码



  1. $extraincludepost .= '<br><br><input type="checkbox" name="includepost" value="1" class="checkbox">'.$lang['members_delete_post'];
复制代码

下面添加
  1.                         if((empty($membernum) || empty($uids))) {
  2.                                 cpmsg('members_no_find_deluser');
  3.                         }
复制代码



  1.                                 if($membernum) {
  2.                                         cpmsg('members_delete_confirm', "admincp.php?action=members&deletesubmit=yes&confirmed=yes".$conditionurladd, 'form', $extra.$extraincludepost);
  3.                                 } else {
  4.                                         cpmsg('members_no_find_deluser');
  5.                                 }
复制代码

替换为
  1.                                 cpmsg('members_delete_confirm', "admincp.php?action=members&deletesubmit=yes&confirmed=yes".$conditionurladd, 'form', $extra.$extraincludepost);
复制代码



  1.                                         if((empty($membernum) || empty($uids))) {
  2.                                                 cpmsg('members_no_find_deluser');
  3.                                         } else {
  4.                                                 $query = $db->query("DELETE FROM {$tablepre}members WHERE uid IN ($uids)");
  5.                                                 $numdeleted = $db->affected_rows();
  6.                                                 $db->query("DELETE FROM {$tablepre}access WHERE uid IN ($uids)", 'UNBUFFERED');
  7.                                                 $db->query("DELETE FROM {$tablepre}memberfields WHERE uid IN ($uids)", 'UNBUFFERED');
  8.                                                 $db->query("DELETE FROM {$tablepre}buddys WHERE uid IN ($uids) OR buddyid IN ($uids)", 'UNBUFFERED');
  9.                                                 $db->query("DELETE FROM {$tablepre}favorites WHERE uid IN ($uids)", 'UNBUFFERED');
  10.                                                 $db->query("DELETE FROM {$tablepre}moderators WHERE uid IN ($uids)", 'UNBUFFERED');
  11.                                                 $db->query("DELETE FROM {$tablepre}pms WHERE msgfromid IN ($uids) OR msgtoid IN ($uids)", 'UNBUFFERED');
  12.                                                 $db->query("DELETE FROM {$tablepre}subscriptions WHERE uid IN ($uids)", 'UNBUFFERED');
  13.                                                 cpmsg('members_delete_succeed');
  14.                                         }
复制代码

替换为
  1.                                         $query = $db->query("DELETE FROM {$tablepre}members WHERE uid IN ($uids)");
  2.                                         $numdeleted = $db->affected_rows();
  3.                                         $db->query("DELETE FROM {$tablepre}access WHERE uid IN ($uids)", 'UNBUFFERED');
  4.                                         $db->query("DELETE FROM {$tablepre}memberfields WHERE uid IN ($uids)", 'UNBUFFERED');
  5.                                         $db->query("DELETE FROM {$tablepre}buddys WHERE uid IN ($uids) OR buddyid IN ($uids)",'UNBUFFERED');
  6.                                         $db->query("DELETE FROM {$tablepre}favorites WHERE uid IN ($uids)", 'UNBUFFERED');
  7.                                         $db->query("DELETE FROM {$tablepre}moderators WHERE uid IN ($uids)", 'UNBUFFERED');
  8.                                         $db->query("DELETE FROM {$tablepre}pms WHERE msgfromid IN ($uids) OR msgtoid IN ($uids)", 'UNBUFFERED');
  9.                                         $db->query("DELETE FROM {$tablepre}subscriptions WHERE uid IN ($uids)", 'UNBUFFERED');
  10.                                         cpmsg('members_delete_succeed');



复制代码



  1.                         $query = $db->query("SELECT uid FROM {$tablepre}members WHERE username='$usernameold'");
复制代码

替换为
  1.                         $query = $db->query("SELECT uid FROM {$tablepre}members WHERE username='$usernamenew'");
复制代码



  1.                 shownav('members_edit');
复制代码

替换为
  1.                 shownav('members_edit_profilefields');
复制代码

评分

1

查看全部评分

回复

使用道具 举报

 楼主| Rockoy 发表于 2007-7-26 03:23:11 | 显示全部楼层
\include 目录

cache.func.php

  1. define('DISCUZ_KERNEL_RELEASE', '20070324');
复制代码

替换为成
  1. define('DISCUZ_KERNEL_RELEASE', '20070724');
复制代码



  1. function arrayeval($array, $level = 0) {
复制代码

下面添加

  1.         if(is_array($array) && function_exists('var_export')) {
  2.                 return var_export($array, true);
  3.         }
复制代码



  1. writetocache($script, $cachenames);
复制代码

替换为成
  1.                         $cachedata = '';
  2.                         if($cachename && !is_array($cachename) && $script <> $cachename) {
  3.                                 $_DCACHE = array();
  4.                                 @include(DISCUZ_ROOT.'./forumdata/cache/cache_'.$script.'.php');
  5.                                 if($_DCACHE && isset($_DCACHE[$cachename])) {
  6.                                         foreach ($_DCACHE as $key => $val) {
  7.                                                 $cachedata .= ($key == $cachename) ? getcachearray($cachename, $script) : getcachevars(array("_DCACHE['$key']" => $val));
  8.                                         }
  9.                                 }
  10.                         }
  11.                         writetocache($script, $cachenames, $cachedata);
复制代码



  1.                 $query = $db->query("SELECT * FROM {$tablepre}stylevars");
复制代码

替换为成
  1.                 $defaultstyleid = $_DCACHE['settings']['styleid'] ? $_DCACHE['settings']['styleid'] : $GLOBALS['styleid'];
  2.                 $query = $db->query("SELECT sv.* FROM {$tablepre}stylevars sv LEFT JOIN {$tablepre}styles s ON s.styleid = sv.styleid AND (s.available=1 OR s.styleid='$defaultstyleid')");
复制代码



  1.                 $query = $db->query("SELECT s.*, t.directory AS tpldir FROM {$tablepre}styles s LEFT JOIN {$tablepre}templates t ON s.templateid=t.templateid");
复制代码

替换为成
  1.                 $query = $db->query("SELECT s.*, t.directory AS tpldir FROM {$tablepre}styles s LEFT JOIN {$tablepre}templates t ON s.templateid=t.templateid WHERE s.available=1 OR s.styleid='$defaultstyleid'");
复制代码



  1. } elseif($setting['variable'] == 'attachdir') {
复制代码

下面添加
  1. $setting['value'] = preg_replace("/\.asp|\\0/i", '0', $setting['value']);
复制代码



  1.                                 if(!isset($data['supe']['attachurl']) && isset($supe['tablepre'])) {
复制代码

替换为
  1.                                 if((!isset($data['supe']['attachurl']) || !isset($data['supe']['tpldir'])) && isset($supe['tablepre'])) {
复制代码



  1.                                         $query = $supe['db']->query("SELECT * FROM {$supe[tablepre]}settings WHERE variable IN ('attachmentdir', 'attachmenturl')");
复制代码

替换为
  1.                                         $query = $supe['db']->query("SELECT * FROM {$supe[tablepre]}settings WHERE variable IN ('attachmentdir', 'attachmenturl', 'template')");
复制代码



  1. $data['supe']['attachurl'] = $supe_settings['attachmenturl'];
复制代码

下面添加
  1.                                         $data['supe']['tpldir'] = $supe_settings['template'];
复制代码



  1. if(!$data['supe']['dbmode']) {
  2.                                         unset($data['supe']['dbhost'], $data['supe']['dbuser'], $data['supe']['dbpw'], $data['supe']['dbname']);
  3.                                 }
复制代码

下面添加
  1.                                 if($data['supe']['siteurl']{strlen($data['supe']['siteurl'])-1} != '/') {
  2.                                         $data['supe']['siteurl'] .= '/';
  3.                                 }
复制代码



  1. $data['redirectadvs'] = $globaladvs['redirect'] ? $globaladvs['redirect'] : array();
复制代码

下面添加
  1.                         if($data['qihoo_relatedthreads'] = unserialize($data['qihoo_relatedthreads'])) {
  2.                                 $data['qihoo_relate_bbsnum'] = intval($data['qihoo_relatedthreads']['bbsnum']);
  3.                                 if($data['qihoo_relatedthreads']['webnum']) {
  4.                                         $data['qihoo_relate_webnum'] = intval($data['qihoo_relatedthreads']['webnum']);
  5.                                         $data['qihoo_relate_banurl'] = $data['qihoo_relatedthreads']['banurl'] ? '/('.str_replace("\r\n", '|', $data['qihoo_relatedthreads']['banurl']).')/i' : '';
  6.                                         if(is_array($data['qihoo_relatedthreads']['type'])) {
  7.                                                 $data['qihoo_relate_type'] = implode('|', $data['qihoo_relatedthreads']['type']);
  8.                                         }
  9.                                 }
  10.                                 $data['qihoo_relate_position'] = intval($data['qihoo_relatedthreads']['position']);
  11.                                 $data['qihoo_relate_order'] = intval($data['qihoo_relatedthreads']['order']);
  12.                                 $data['qihoo_relate_validity'] = intval($data['qihoo_relatedthreads']['validity']);
  13.                         }

  14.                         unset($data['qihoo_relatedthreads']);
复制代码



  1.                                         $replace = '\''.str_replace('{RANDOM}', '_\'.random(6).\'', str_replace('{MD5}', '_\'.md5("\\1").\'', $bbcode['replacement'])).'\'';
复制代码

替换为
  1.                                         $replace = '\''.str_replace('{RANDOM}', '_\'.random(6).\'', str_replace('{MD5}', '_\'.md5(\'\\1\').\'', $bbcode['replacement'])).'\'';
复制代码



common.inc.php

  1. define('SYS_DEBUG', FALSE);
复制代码

删除掉!


  1. require_once DISCUZ_ROOT.'./include/global.func.php';
复制代码

上面添加
  1. if (isset($_REQUEST['GLOBALS']) OR isset($_FILES['GLOBALS'])) {
  2.         exit('Request tainting attempted.');
  3. }
复制代码



  1. isset($_REQUEST['GLOBALS']) && exit('Access Error');
复制代码

删除掉!


  1. $charset = $dbcharset = $forumfounders = $metakeywords = $extrahead = '';
  2. $plugins = $hooks = $admincp = array();
复制代码

替换为
  1. $charset = $dbcharset = $forumfounders = $metakeywords = $extrahead = $seodescription = '';
  2. $plugins = $hooks = $admincp = $jsmenu = $forum = $thread = $language = $actioncode = $modactioncode = $lang = array();
复制代码



  1. unset($prelength, $_request, $_key, $_value);
复制代码

替换为
  1. unset($prelength, $_request, $_key, $_value, $_request, $protected);

  2. $inajax = !empty($inajax);
复制代码



  1. $boardurl = 'http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api|archiver|wap)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/';
复制代码

替换为
  1. $boardurl = htmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api|archiver|wap)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/');
复制代码



  1. $dbhost = $dbuser = $dbpw = $dbname = $pconnect = NULL;
复制代码

替换为
  1. $dbuser = $dbpw = $dbname = $pconnect = NULL;
复制代码



  1. $statstatus && require_once DISCUZ_ROOT.'./include/counter.inc.php';
复制代码

替换为
  1. $statstatus && !$inajax && require_once DISCUZ_ROOT.'./include/counter.inc.php';
复制代码



  1. $extra = isset($extra) && @preg_match("/^[&=;a-z0-9]+$/i", $extra) ? $extra : '';
复制代码

下面添加
  1. $tpp = intval(empty($_DSESSION['tpp']) ? $topicperpage : $_DSESSION['tpp']);
  2. $ppp = intval(empty($_DSESSION['ppp']) ? $postperpage : $_DSESSION['ppp']);
复制代码



  1. if(!in_array($adminid, array(1, 2, 3))) {
复制代码

上面添加

  1. $tpp = intval(empty($_DSESSION['tpp']) ? $topicperpage : $_DSESSION['tpp']);
  2. $ppp = intval(empty($_DSESSION['ppp']) ? $postperpage : $_DSESSION['ppp']);
复制代码



cron.func.php

  1.         $query = $db->query("SELECT * FROM {$tablepre}crons WHERE ".($cronid ? "cronid='$cronid'" : "available>'0' AND nextrun<='$timestamp'")." LIMIT 1");
复制代码

替换为
  1.         $query = $db->query("SELECT * FROM {$tablepre}crons WHERE ".($cronid ? "cronid='$cronid'" : "available>'0' AND nextrun<='$timestamp'")." ORDER BY nextrun LIMIT 1");
复制代码



  1. $lockfile = DISCUZ_ROOT.'./forumdata/runcron_'.$cron['cronid'].'.lock';
复制代码

下面添加
  1.                 $cron['filename'] = str_replace(array('..', '/', '\\'), '', $cron['filename']);
  2.                 $cronfile = DISCUZ_ROOT.'./include/crons/'.$cron['filename'];
复制代码



  1.                 @set_time_limit(1000);
  2.                 @ignore_user_abort(TRUE);
复制代码

下面添加
  1.                 $cron['filename'] = str_replace(array('..', '/', '\\'), array('', '', ''), $cron['filename']);
复制代码



  1.                 if(!include_once DISCUZ_ROOT.($cronfile = "./include/crons/$cron[filename]")) {
  2.                         errorlog('CRON', $cron['name']." : Cron script($cronfile) not found or syntax error", 0);
复制代码

替换为成
  1.                 if(!@include $cronfile) {
  2.                         errorlog('CRON', $cron['name'].' : Cron script('.$cron['filename'].') not found or syntax error', 0);
复制代码



  1.                 require_once DISCUZ_ROOT.'./include/cache.func.php';
  2.                 $query = $db->query("SELECT nextrun FROM {$tablepre}crons WHERE available>'0' ORDER BY nextrun LIMIT 1");
  3.                 $_DCACHE['settings']['cronnextrun'] = $db->result($query, 0);
  4.                 updatesettings();
  5.                 @unlink($lockfile);

  6.         }
  7. }
复制代码

替换为成
  1.                 @unlink($lockfile);
  2.         }

  3.         require_once DISCUZ_ROOT.'./include/cache.func.php';
  4.         $query = $db->query("SELECT nextrun FROM {$tablepre}crons WHERE available>'0' ORDER BY nextrun LIMIT 1");
  5.         $_DCACHE['settings']['cronnextrun'] = $db->result($query, 0);
  6.         updatesettings();
  7. }
复制代码



  1.         if(empty($cron)) return false;
复制代码

替换为成
  1.         if(empty($cron)) return FALSE;
复制代码



  1. $db->query("UPDATE {$tablepre}crons SET lastrun='$timestamp', nextrun='$nextrun' WHERE cronid='$cron[cronid]'");
复制代码

下面添加
  1.         return TRUE;
复制代码



discuzcode.func.php

  1.         global $language, $attachrefcheck, $thumbstatus, $extcredits, $creditstrans, $ftp;
复制代码

替换为
  1.         global $language, $attachrefcheck, $thumbstatus, $extcredits, $creditstrans, $ftp, $exthtml;
复制代码



  1.                         $replacement .= '<div style="display:none" id="attach_'.$attach['aid'].'" onmouseover="showMenu(this.id, 0, 1)"><img src="'.IMGDIR.'/attachimg.gif" border="0"></div><div title="menu" class="t_attach" id="attach_'.$attach['aid'].'_menu" style="display: none">'.
复制代码

替换为
  1.                         $replacement .= '<span style="display:none" id="attach_'.$attach['aid'].'" onmouseover="showMenu(this.id, 0, 1)"><img src="'.IMGDIR.'/attachimg.gif" border="0"></span>';

  2.                         $exthtml .= '<div title="menu" class="t_attach" id="attach_'.$attach['aid'].'_menu" style="display: none">'.
复制代码



  1.                         $replacement .= $attach['attachicon'].' <span style="white-space:nowrap" id="attach_'.$attach['aid'].'" onmouseover="showMenu(this.id)"><a href="attachment.php?aid='.$attach['aid'].'" target="_blank" class="bold">'.$attach['filename'].'</a> ('.$attach['attachsize'].')</span>'.
  2.                                 '<div title="menu" class="t_attach" id="attach_'.$attach['aid'].'_menu" style="display: none">'.$attach['attachicon'].' <a href="attachment.php?aid='.$attach['aid'].'" target="_blank" class="bold">'.$attach['filename'].'</a> ('.$attach['attachsize'].')<br>'.
复制代码

替换为
  1.                         $replacement .= $attach['attachicon'].' <span style="white-space:nowrap" id="attach_'.$attach['aid'].'" onmouseover="showMenu(this.id)"><a href="attachment.php?aid='.$attach['aid'].'" target="_blank" class="bold">'.$attach['filename'].'</a> ('.$attach['attachsize'].')</span>';

  2.                         $exthtml .= '<div title="menu" class="t_attach" id="attach_'.$attach['aid'].'_menu" style="display: none">'.$attach['attachicon'].' <a href="attachment.php?aid='.$attach['aid'].'" target="_blank" class="bold">'.$attach['filename'].'</a> ('.$attach['attachsize'].')<br>'.
复制代码



  1.                 $replacement .= ($attach['price'] ? $language['price'].': '.$extcredits[$creditstrans]['title'].' '.$attach['price'].' '.$extcredits[$creditstrans]['unit'].' &nbsp;<a href="misc.php?action=viewattachpayments&amp;aid='.$aid.'" target="_blank">['.$language['pay_view'].']</a>'.
复制代码

替换为
  1.                 $exthtml .= ($attach['price'] ? $language['price'].': '.$extcredits[$creditstrans]['title'].' '.$attach['price'].' '.$extcredits[$creditstrans]['unit'].' &nbsp;<a href="misc.php?action=viewattachpayments&amp;aid='.$aid.'" target="_blank">['.$language['pay_view'].']</a>'.
复制代码



  1. function parsetable($width, $bgcolor, $message) {
复制代码

下面添加
  1.         if(!in_array(substr($message, 0, 4), array('[tr]', '<tr>'))) {
  2.                 return $message;
  3.         }
复制代码



  1.                                 "/\[url\]\s*(www.|https?:\/\/|ftp:\/\/|gopher:\/\/|news:\/\/|telnet:\/\/|rtsp:\/\/|mms:\/\/|callto:\/\/|bctp:\/\/|ed2k:\/\/){1}([^\["']+?)\s*\[\/url\]/ie",
复制代码

替换为
  1.                                 "/\[url\]\s*(www.|https?:\/\/|ftp:\/\/|gopher:\/\/|news:\/\/|telnet:\/\/|rtsp:\/\/|mms:\/\/|callto:\/\/|bctp:\/\/|ed2k:\/\/|thunder:\/\/|synacast:\/\/){1}([^\["']+?)\s*\[\/url\]/ie",
复制代码



  1.                                 "/\[color=([^\[\<]+?)\]/i",
复制代码

替换为
  1.                                 "/\[color=([#\w]+?)\]/i",
复制代码



  1.                                 "/\[align=([^\[\<]+?)\]/i",
  2.                                 "/\[float=([^\[\<]+?)\]/i"
复制代码

替换为
  1.                                 "/\[align=(left|center|right)\]/i",
  2.                                 "/\[float=(left|right)\]/i"
复制代码



  1.                                 "<font face="\\1">",
复制代码

替换为
  1.                                 "<font face="\\1 ">",
复制代码



  1.                                         "bbcodeurl('\\1', '<img src="%s" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'%s\');}" onmousewheel="return imgzoom(this);" alt="" />')",
复制代码

替换为
  1.                                         "bbcodeurl('\\1', '<img src="%s" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />')",
复制代码



  1.                 $randomstr .= chr(mt_rand(0, 59)).chr(mt_rand(63, 126));
复制代码

替换为
  1.                 $randomstr .= chr(mt_rand(32, 59)).chr(mt_rand(63, 126));
复制代码



editpost.inc.php

  1. if((!$forum['ismoderator'] || !$alloweditpost || (in_array($orig['adminid'], array(1, 2, 3)) && $adminid > $orig['adminid'])) && !($forum['alloweditpost'] && $isorigauthor)) {
复制代码

替换为
  1. if(empty($orig)) {
  2.         showmessage('undefined_action');
  3. } elseif((!$forum['ismoderator'] || !$alloweditpost || (in_array($orig['adminid'], array(1, 2, 3)) && $adminid > $orig['adminid'])) && !($forum['alloweditpost'] && $isorigauthor)) {
复制代码



  1.                 } elseif($thread['special'] == 4 && ($allowpostactivity || $thread['authorid'] == $discuz_uid)) {
复制代码

替换为
  1.                 } elseif($thread['special'] == 4) {
复制代码



  1.                                 list($attach['width']) = @getimagesize($attach['url'].'/'.$attach['attachment']);
  2.                                 $attach['width'] = !$attach['width'] || $attach['width'] > $thumbwidth ? $thumbwidth : $attach['width'];
复制代码

替换为
  1.                                 list($attach['width'], $attach['height']) = @getimagesize($attach['url'].'/'.$attach['attachment']);
  2.                                 $x_ratio = $attach['width'] ? $thumbwidth / $attach['width'] : 0;
  3.                                 $y_ratio = $attach['height'] ? $thumbheight / $attach['height'] : 0;
  4.                                 if(($x_ratio * $attach['height']) < $thumbheight) {
  5.                                         $attach['width'] = $thumbwidth;
  6.                                 } else {
  7.                                         $attach['width'] = ceil($y_ratio * $attach['width']);
  8.                                 }
复制代码



  1.                         $readperm = $allowsetreadperm ? $readperm : ($isorigauthor ? 0 : 'readperm');
复制代码

替换为
  1.                         $readperm = $allowsetreadperm ? intval($readperm) : ($isorigauthor ? 0 : 'readperm');
复制代码



  1.                         if(($alloweditpoll || $thread['authorid'] == $discuz_uid) && $thread['special'] == 1 && !empty($polls)) {
复制代码

替换为
  1.                         if($thread['special'] == 1 && ($alloweditpoll || $isorigauthor) && !empty($polls)) {
复制代码



  1. $pollarray['maxchoices'] = $maxchoices;
  2.                                                 }
  3.                                         }
复制代码

下面添加
  1.                                         $expiration = intval($expiration);
复制代码



  1.                                 if(!$forum['ismoderator'] && $thread['authorid'] == $discuz_uid) {
复制代码

替换为
  1.                                 if(!$forum['ismoderator']) {
复制代码



  1.                                                 $subject = $thread['subject'];
复制代码

替换为
  1.                                                 $subject = addslashes($thread['subject']);
复制代码



  1.                         } elseif($thread['special'] == 4 && ($allowpostactivity || $thread['authorid'] == $discuz_uid)) {
复制代码

替换为
  1.                         } elseif($thread['special'] == 4 && $allowpostactivity) {
复制代码



  1.                                 } elseif(strtotime($starttimefrom[$activitytime]) === -1 || strtotime($starttimefrom[$activitytime]) === FALSE) {
复制代码

替换为
  1.                                 } elseif(strtotime($starttimefrom[$activitytime]) === -1 || @strtotime($starttimefrom[$activitytime]) === FALSE) {
复制代码



  1.                                 } elseif(strtotime($starttimefrom[$activitytime]) < $timestamp) {
复制代码

替换为
  1.                                 } elseif(@strtotime($starttimefrom[$activitytime]) < $timestamp) {
复制代码



  1.                                 } elseif($activitytime && ((strtotime($starttimefrom) > strtotime($starttimeto) || !$starttimeto))) {
复制代码

替换为
  1.                                 } elseif($activitytime && ((@strtotime($starttimefrom) > @strtotime($starttimeto) || !$starttimeto))) {
复制代码



  1.                                 } elseif(trim($activityexpiration) && (strtotime($activityexpiration) === -1 || strtotime($activityexpiration) === FALSE)) {
复制代码

替换为
  1.                                 } elseif(trim($activityexpiration) && (@strtotime($activityexpiration) === -1 || @strtotime($activityexpiration) === FALSE)) {
复制代码



  1.                                 $activity['starttimefrom'] = strtotime($starttimefrom[$activitytime]);
  2.                                 $activity['starttimeto'] = $activitytime ? strtotime($starttimeto) : 0;
复制代码

替换为
  1.                                 $activity['starttimefrom'] = @strtotime($starttimefrom[$activitytime]);
  2.                                 $activity['starttimeto'] = $activitytime ? @strtotime($starttimeto) : 0;
复制代码



  1.                                         $activity['expiration'] = strtotime($activityexpiration);
复制代码

替换为
  1.                                         $activity['expiration'] = @strtotime($activityexpiration);
复制代码



  1.                 while($attach = $db->fetch_array($query)) {
  2.                         $attachpermadd = $allowsetattachperm && $attach['readperm'] != $attachpermnew[$attach['aid']] ? ", readperm='{$attachpermnew[$attach['aid']]}'" : '' ;
  3.                         $attachpricenew[$attach['aid']] = intval($attachpricenew[$attach['aid']]);
  4.                         $attachpriceadd = $maxprice && $attach['price'] != $attachpricenew[$attach['aid']] && $attachpricenew[$attach['aid']] <= $maxprice ? ", price='{$attachpricenew[$attach['aid']]}'" : '' ;

  5.                         $attachdescnew[$attach['aid']] = cutstr(dhtmlspecialchars($attachdescnew[$attach['aid']]), 100);
复制代码

替换为
  1.                 $attachdescnew = is_array($attachdescnew) ? $attachdescnew : array();
  2.                 $attachpermnew = is_array($attachpermnew) ? $attachpermnew : array();
  3.                 $attachpricenew = is_array($attachpricenew) ? $attachpricenew : array();

  4.                 while($attach = $db->fetch_array($query)) {

  5.                         $attachpermnew[$attach['aid']] = intval($attachpermnew[$attach['aid']]);
  6.                         $attachpermadd = $allowsetattachperm && $attach['readperm'] != $attachpermnew[$attach['aid']] ? ", readperm='{$attachpermnew[$attach['aid']]}'" : '' ;

  7.                         $attachpricenew[$attach['aid']] = intval($attachpricenew[$attach['aid']]);
  8.                         $attachpriceadd = $maxprice && $attach['price'] != $attachpricenew[$attach['aid']] && $attachpricenew[$attach['aid']] <= $maxprice ? ", price='{$attachpricenew[$attach['aid']]}'" : '' ;

  9.                         $attachdescnew[$attach['aid']] = cutstr(dhtmlspecialchars($attachdescnew[$attach['aid']]), 95);
复制代码



  1.                 if(!empty($uattachments)) {
复制代码

替换为
  1.                 if($uattachment && !empty($uattachments)) {
复制代码



  1.                                 $db->query("DELETE FROM {$tablepre}attachments WHERE aid IN ($deleteaids)");
复制代码

替换为
  1.                                 $db->query("DELETE FROM {$tablepre}attachments WHERE aid IN ($deleteaids) AND pid='$pid'");
复制代码



  1.                         $db->query("DELETE FROM {$tablepre}threadsmod WHERE tid='$tid'", 'UNBUFFERED');
  2.                         $db->query("DELETE FROM {$tablepre}relatedthreads WHERE tid='$tid'", 'UNBUFFERED');
  3.                         $db->query("DELETE FROM {$tablepre}threads WHERE tid='$tid'", 'UNBUFFERED');
  4.                         $db->query("DELETE FROM {$tablepre}polloptions WHERE tid='$tid'");
  5.                         $db->query("DELETE FROM {$tablepre}polls WHERE tid='$tid'", 'UNBUFFERED');
  6.                         $db->query("DELETE FROM {$tablepre}mythreads WHERE tid='$tid'", 'UNBUFFERED');
复制代码

替换为
  1.                         $tablearray = array('threadsmod','relatedthreads','threads','polloptions','polls','mythreads');
  2.                         foreach ($tablearray as $table) {
  3.                                 $db->query("DELETE FROM {$tablepre}$table WHERE tid='$tid'", 'UNBUFFERED');
  4.                         }

复制代码



  1. $query = $db->query("SELECT author, dateline FROM {$tablepre}posts WHERE tid='$tid' AND invisible='0' ORDER BY dateline DESC LIMIT 1");
  2.                         $lastpost = $db->fetch_array($query);
  3.                         $lastpost['author'] = addslashes($lastpost['author']);
复制代码

替换为
  1. $query = $db->query("SELECT author, dateline, anonymous FROM {$tablepre}posts WHERE tid='$tid' AND invisible='0' ORDER BY dateline DESC LIMIT 1");
  2.                         $lastpost = $db->fetch_array($query);
  3.                         $lastpost['author'] = !$lastpost['anonymous'] ? addslashes($lastpost['author']) : '';
复制代码



global.func.php

  1.                         if($addcredits * $coef < 0 && $GLOBALS['extcredits'.$id] - $addcredits < $extcredits[$id]['lowerlimit']) {
复制代码

替换为
  1.                         if($addcredits * $coef < 0 && ($GLOBALS['extcredits'.$id] < $extcredits[$id]['lowerlimit'] || (($GLOBALS['extcredits'.$id] - $addcredits) < $extcredits[$id]['lowerlimit']))) {
复制代码



  1. function formhash() {
  2.         global $discuz_user, $discuz_uid, $discuz_pw, $timestamp, $discuz_auth_key;
  3.         return substr(md5(substr($timestamp, 0, -7).$discuz_user.$discuz_uid.$discuz_pw.$discuz_auth_key), 8, 8);
  4. }
复制代码

替换为
  1. function formhash($specialadd = '') {
  2.         global $discuz_user, $discuz_uid, $discuz_pw, $timestamp, $discuz_auth_key;
  3.         $hashadd = defined('IN_ADMINCP') ? 'Only For Discuz! Admin Control Panel' : '';
  4.         return substr(md5(substr($timestamp, 0, -7).$discuz_user.$discuz_uid.$discuz_pw.$discuz_auth_key.$hashadd.$specialadd), 8, 8);
  5. }
复制代码



  1. $updatearray[] = "credits='$credits'";
复制代码

下面添加
  1.                         $member['credits'] = $credits;
复制代码



  1.                         if(($periodbegin > $periodend && ($now >= $periodbegin || $now < $periodend)) || ($oeriodbegin < $periodend && $now >= $periodbegin && $now < $periodend)) {
复制代码

替换为
  1.                         if(($periodbegin > $periodend && ($now >= $periodbegin || $now < $periodend)) || ($periodbegin < $periodend && $now >= $periodbegin && $now < $periodend)) {
复制代码



  1.         header("Content-type: application/xml");
复制代码

替换为
  1.         header("Content-type: application/xml; charset=$charset");
  2.         //header('Content-Type: text/html; charset='.$charset);
复制代码



  1. global $supe, $db;
复制代码

下面添加
  1.         if(empty($supe['status'])) {
  2.                 return;
  3.         }
复制代码



misc.func.php

  1.         global $dateformat, $timeformat, $timeoffset, $ppp, $colorarray;
复制代码

替换为
  1.         global $dateformat, $timeformat, $timeoffset, $ppp, $colorarray, $_DCACHE;
复制代码



  1.                         $db->query("UPDATE $tablepre$table SET $viewscol=$viewscol+$views WHERE $idcol IN (0$ids)", 'UNBUFFERED');
复制代码

替换为
  1.                         $db->query("UPDATE LOW_PRIORITY $tablepre$table SET $viewscol=$viewscol+'$views' WHERE $idcol IN (0$ids)", 'UNBUFFERED');
复制代码



newthread.inc.php

  1. checklowerlimit($postcredits);
复制代码

替换为
  1. if($url && $qihoo_relate_webnum) {
  2.         if($data = @implode('', file("http://search.qihoo.com/sint/content.html?surl=$url&ocs=$charset&ics=$charset"))) {
  3.                 $parser = xml_parser_create();
  4.                 xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
  5.                 xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
  6.                 xml_parse_into_struct($parser, $data, $values, $index);
  7.                 xml_parser_free($parser);

  8.                 if(PHP_VERSION > '5' && $charset != 'utf-8') {
  9.                         require_once DISCUZ_ROOT.'./include/chinese.class.php';
  10.                         $chs = new Chinese('utf-8', $charset);
  11.                 }

  12.                 $subject = !empty($chs) ? $chs->convert($values[$index['title'][0]]['value']) : $values[$index['title'][0]]['value'];
  13.                 $message = !empty($chs) ? $chs->convert($values[$index['content'][0]]['value']) : $values[$index['content'][0]]['value'];
  14.                 $message = str_replace('<br>', "\n", $message);
  15.         }
  16. }
复制代码



  1. if(isset($poll)) {
  2.         $special = 1;
  3. } elseif(isset($trade)) {
  4.         $special = 2;
  5. } elseif(isset($reward)) {
  6.         $special = 3;
  7. } elseif(isset($activity)) {
  8.         $special = 4;
  9. } else {
  10.         $special = 0;
  11. }
复制代码

替换为
  1. checklowerlimit($postcredits);

  2. if(isset($poll) && $allowpostpoll) {
  3.         $special = 1;
  4. } elseif(isset($trade) && $allowposttrade) {
  5.         $special = 2;
  6. } elseif(isset($reward) && $allowpostreward) {
  7.         $special = 3;
  8. } elseif(isset($activity) && $allowpostactivity) {
  9.         $special = 4;
  10. } else {
  11.         $special = 0;
  12. }
复制代码



  1.                         if(!trim($value)) {
复制代码

替换为
  1.                         if(!$value = trim($value)) {
复制代码



  1.                 } elseif(count($polloptions) == 1) {
复制代码

替换为
  1.                 } elseif(count($polloptions) < 2) {
复制代码



  1.                 if(!$rewardprice) {
复制代码

替换为
  1.                 if($rewardprice < 1) {
复制代码



  1.         } elseif($special == 4 && $allowpostactivity) {
复制代码

替换为
  1.         } elseif($special == 4) {
复制代码



  1.                 } elseif(strtotime($starttimefrom[$activitytime]) === -1 || strtotime($starttimefrom[$activitytime]) === FALSE) {
复制代码

替换为
  1.                 } elseif(@strtotime($starttimefrom[$activitytime]) === -1 || @strtotime($starttimefrom[$activitytime]) === FALSE) {
复制代码



  1.                 } elseif(strtotime($starttimefrom[$activitytime]) < $timestamp) {
复制代码

替换为
  1.                 } elseif(@strtotime($starttimefrom[$activitytime]) < $timestamp) {
复制代码



  1.                 } elseif($activitytime && ((strtotime($starttimefrom) > strtotime($starttimeto) || !$starttimeto))) {
复制代码

替换为
  1.                 } elseif($activitytime && ((@strtotime($starttimefrom) > @strtotime($starttimeto) || !$starttimeto))) {
复制代码



  1.                 } elseif(trim($activityexpiration) && (strtotime($activityexpiration) === -1 || strtotime($activityexpiration) === FALSE)) {
复制代码

替换为
  1.                 } elseif(trim($activityexpiration) && (@strtotime($activityexpiration) === -1 || @strtotime($activityexpiration) === FALSE)) {
复制代码



  1.                 $activity['starttimefrom'] = strtotime($starttimefrom[$activitytime]);
  2.                 $activity['starttimeto'] = $activitytime ? strtotime($starttimeto) : 0;
复制代码

替换为
  1.                 $activity['starttimefrom'] = @strtotime($starttimefrom[$activitytime]);
  2.                 $activity['starttimeto'] = $activitytime ? @strtotime($starttimeto) : 0;
复制代码



  1.                         $activity['expiration'] = strtotime($activityexpiration);
复制代码

替换为
  1.                         $activity['expiration'] = @strtotime($activityexpiration);
复制代码



  1.                 $query = $supe['db']->query("UPDATE {$supe[tablepre]}groups SET lastpost='$timestamp' WHERE gid='$sgid'");
复制代码

替换为
  1.                 $query = $supe['db']->query("UPDATE {$supe[tablepre]}groups SET lastpost='$timestamp' WHERE gid='$sgid'", 'SILENT');
复制代码



  1.                         showmessage('post_newthread_succeed', "viewthread.php?tid=$tid&extra=$extra");
复制代码

替换为
  1.                         showmessage('post_newthread_succeed', "viewthread.php?tid=$tid&extra=$extra".(!empty($frombbs) ? "&frombbs=$frombbs" : ''));
复制代码



post.func.php

  1. $attachments = $attacharray = array();
复制代码

下面添加
  1.         static $safeext  = array('jpg', 'jpeg', 'gif', 'png', 'swf', 'bmp', 'txt', 'zip', 'rar', 'doc', 'mp3');
  2.         static $imgext  = array('jpg', 'gif', 'png', 'bmp');
复制代码



  1.                 $attach['ext'] = $extension = strtolower(fileext($attach['name']));

  2.                 if(substr($attach['type'], 0, 5) == 'image') {
  3.                         $attach['isimage'] = 1;
  4.                 } else {
  5.                         $attach['isimage'] = 0;
  6.                 }
复制代码

替换为
  1.                 $attach['ext'] = strtolower(fileext($attach['name']));
  2.                 $extension = in_array($attach['ext'], $safeext) ? $attach['ext'] : 'attach';

  3.                 if(in_array($attach['ext'], $imgext)) {
  4.                         $attach['isimage'] = 1;
  5.                 }else{
  6.                         $attach['isimage'] = 0;
  7.                 }
复制代码



  1.                         $attach['name'] = 'abbr_'.md5($attach['name']).'.'.$extension;
复制代码

替换为
  1.                         $attach['name'] = 'abbr_'.md5($attach['name']).'.'.$attach['ext'];
复制代码



  1.                 $target = $attachdir.'/'.stripslashes($attach['attachment']);
复制代码

替换为
  1.                 if(in_array($attachinfo['mime'], array('image/jpeg', 'image/gif', 'image/png'))) {

  2.                                         if($thumbstatus) {
复制代码



  1.                                 if(in_array($attachinfo['mime'], array('image/jpeg', 'image/gif', 'image/png'))) {
复制代码

替换为
  1.                                 $imagecreatefromfunc = $imagefunc = '';
  2.                                 switch($attachinfo['mime']) {
  3.                                         case 'image/jpeg':
  4.                                                 $imagecreatefromfunc = function_exists('imagecreatefromjpeg') ? 'imagecreatefromjpeg' : '';
  5.                                                 $imagefunc = function_exists('imagejpeg') ? 'imagejpeg' : '';
  6.                                                 break;
  7.                                         case 'image/gif':
  8.                                                 $imagecreatefromfunc = function_exists('imagecreatefromgif') ? 'imagecreatefromgif' : '';
  9.                                                 $imagefunc = function_exists('imagegif') ? 'imagegif' : '';
  10.                                                 break;
  11.                                         case 'image/png':
  12.                                                 $imagecreatefromfunc = function_exists('imagecreatefrompng') ? 'imagecreatefrompng' : '';
  13.                                                 $imagefunc = function_exists('imagepng') ? 'imagepng' : '';
  14.                                                 break;
  15.                                 }
  16.                                 if($imagecreatefromfunc && $imagefunc) {

  17.                                         if($thumbstatus && function_exists('imagecreatetruecolor') && function_exists('imagecopyresampled') && function_exists('imagejpeg')) {
复制代码



  1.                                                         switch($attachinfo['mime']) {
  2.                                                                 case 'image/jpeg':
  3.                                                                         $attach_photo = imageCreateFromJPEG($target);
  4.                                                                         break;
  5.                                                                 case 'image/gif':
  6.                                                                         $attach_photo = imageCreateFromGIF($target);
  7.                                                                         break;
  8.                                                                 case 'image/png':
  9.                                                                         $attach_photo = imageCreateFromPNG($target);
  10.                                                                         break;
  11.                                                         }
复制代码

替换为
  1.                                                         $attach_photo = $imagecreatefromfunc($target);
复制代码



  1.                                         if($watermarkstatus) {
  2.                                                 $watermarkinfo        = @getimagesize($watermark_file);
  3.                                                 $watermark_logo = $watermarktype ? imageCreateFromPNG($watermark_file) : imageCreateFromGIF($watermark_file);
复制代码

替换为

  1.                                         if($watermarkstatus && function_exists('imagecopy') && function_exists('imagealphablending') && function_exists('imagecopymerge')) {
  2.                                                 $watermarkinfo        = @getimagesize($watermark_file);
  3.                                                 $watermark_logo        = $watermarktype ? @imageCreateFromPNG($watermark_file) : @imageCreateFromGIF($watermark_file);
复制代码



  1.                                                 if(is_readable($watermark_file) && $wmwidth > 10 && $wmheight > 10 && !$animatedgif) {
  2.                                                         switch($attachinfo['mime']) {
  3.                                                                 case 'image/jpeg':
  4.                                                                         $dst_photo = imageCreateFromJPEG($target);
  5.                                                                         break;
  6.                                                                 case 'image/gif':
  7.                                                                         $dst_photo = imageCreateFromGIF($target);
  8.                                                                         break;
  9.                                                                 case 'image/png':
  10.                                                                         $dst_photo = imageCreateFromPNG($target);
  11.                                                                         break;
  12.                                                         }
复制代码

替换为
  1.                                                 if(is_readable($watermark_file) && $wmwidth > 10 && $wmheight > 10 && !$animatedgif && $watermark_logo) {
  2.                                                         $dst_photo = @$imagecreatefromfunc($target);
复制代码



  1.                                                         switch($attachinfo['mime']) {
  2.                                                                 case 'image/jpeg':
  3.                                                                         imageJPEG($dst_photo, $target, $watermarkquality);
  4.                                                                         break;
  5.                                                                 case 'image/gif':
  6.                                                                         imageGIF($dst_photo, $target);
  7.                                                                         break;
  8.                                                                 case 'image/png':
  9.                                                                         imagePNG($dst_photo, $target);
  10.                                                                         break;
复制代码

替换为
  1.                                                         if($attachinfo['mime'] == 'image/jpeg') {
  2.                                                                 $imagefunc($dst_photo, $target, $watermarkquality);
  3.                                                         } else {
  4.                                                                 $imagefunc($dst_photo, $target);
复制代码

评分

1

查看全部评分

回复

使用道具 举报

 楼主| Rockoy 发表于 2007-7-26 03:24:30 | 显示全部楼层
\templates 目录

admincp.lang.php

  1. 'menu_qihoo_topics' => '专题设置',
复制代码

下面添加
  1. 'menu_qihoo_relatedthreads' => '相关主题设置',
复制代码



  1.         'supe_dbmode' => '是否使用单独的数据库:',
  2.         'supe_dbmode_comment' => '如果选择是,SupeSite 将使用与论坛不同的数据库服务器,请务必正确填写数据库服务器配置信息。',
复制代码

替换为
  1.         'supe_dbmode' => '是否使用独立的数据库服务器:',
  2.         'supe_dbmode_comment' => '如果选择是,SupeSite 将使用与论坛不同的数据库服务器,请务必正确填写数据库服务器配置信息。<br>注意,这和不同数据库不是一个概念!',
复制代码



  1.         'supe_tablepre_comment' => '该值在您安装完 SupeSite 后会被初始化,在您 SupeSite 表前缀改变的情况下, 修改此项, 一般情况请不要改动。<br>例如: supe_ ',
复制代码

替换为
  1.         'supe_tablepre_comment' => '该值在您安装完 SupeSite 后会被初始化,在您 SupeSite 表前缀改变的情况下, 修改此项,一般情况请不要改动。<br>如果在相同的数据库,请设置为: supe_ 这样的格式( supe_ 为表前缀);<br>如果在不同的数据库,请设置为: supesite.supe_ 这样的格式( supesite 为数据库名)',
复制代码



  1.         'supe_dbsettings' => '数据库设置',
复制代码

替换为
  1.         'supe_dbsettings' => 'SupeSite 独立数据库设置',
复制代码



  1. 'magics_config' => '道具基本设置:',
复制代码

下面添加
  1. 'magics_identifier' => '标识',
复制代码



  1. 'members_edit_profilefield' => '用户栏目',
复制代码

下面添加
  1. 'members_edit_profilefields' => '用户栏目定制',
复制代码



  1.         'qihoo_relatedthreads' => '显示相关主题数量:',
  2.         'qihoo_relatedthreads_comment' => '利用搜索技术可以实现智能匹配相关主题的功能,如果存在与当前浏览主题内容相关的其他主题,将在页面下方显示这些相关内容。默认值为 5,建议在不超过 10 的范围内取值,0 为不显示相关主题并关闭此功能',
复制代码

替换为
  1.         'qihoo_relatedthreads' => '显示站内相关主题数量:',
  2.         'qihoo_relatedthreads_comment' => '利用搜索技术可以实现智能匹配相关主题的功能,如果存在与当前浏览主题内容相关的其他主题,将在页面下方显示这些相关内容。默认值为 3,建议在不超过 10 的范围内取值,0 为不显示相关主题并关闭此功能',
  3.         'qihoo_relatedthreads_web' => '显示站外相关主题数量:',
  4.         'qihoo_relatedthreads_web_comment' => '利用搜索技术可以实现智能匹配相关主题的功能,如果存在与当前浏览主题内容相关的站外主题,将在页面下方显示这些相关内容,点击后将以套帧的方式在新窗口打开。默认值为 2,建议在不超过 10 的范围内取值,0 为不显示相关主题并关闭此功能',
复制代码



  1.         'qihoo_validity' => '相关主题更新时间(天):',
  2.         'qihoo_validity_comment' => '设置相关主题数据的缓存更新时间,更新时间越长,消耗资源越低,但结果实时性越差。本设置只在开启了相关主题功能时有效',
复制代码

替换为
  1.         'qihoo_relatedthreads_validity' => '相关主题更新时间(天):',
  2.         'qihoo_relatedthreads_validity_comment' => '设置相关主题数据的缓存更新时间,更新时间越长,消耗资源越低,但结果实时性越差。本设置只在开启了相关主题功能时有效',
  3.         'qihoo_relatedthreads_type' => '显示站外相关主题类型:',
  4.         'qihoo_relatedthreads_type_comment' => '站外相关主题类型,设置相应的类型将只显示对应类型的站外相关主题,类型包括博客文章、资讯、论坛帖子',
  5.         'qihoo_relatedthreads_type_blog' => '博客主题',
  6.         'qihoo_relatedthreads_type_news' => '资讯主题',
  7.         'qihoo_relatedthreads_type_bbs' => '论坛主题',
  8.         'qihoo_relatedthreads_banurl' => '站外相关主题过滤地址:',
  9.         'qihoo_relatedthreads_banurl_comment' => '填写要过滤的站外相关主题的网站地址,过滤后如果出现改地址下的相关主题,系统将自动过滤。例如[url]http://www.abc.com[/url],每个域名一行,不支持通配符,留空则为不过滤',
复制代码



  1. 'cplog_action_forumrules' => '论坛规则'
复制代码

替换为
  1.         'cplog_action_forumrules' => '论坛规则',

  2.         'xml_http_building_link' => '请等待,正在建立连接...',
  3.         'xml_http_sending' => '请等待,正在发送数据...',
  4.         'xml_http_loading' => '请等待,正在接受数据...',
  5.         'xml_http_load_failed' => '通信失败,请刷新重新尝试!',
  6.         'xml_http_data_in_processed' => '通信成功,数据正在处理中...'
复制代码



forumdisplay.htm

  1.         <div id="newspecialheader" class="right" onmouseover="showMenu(this.id)"><a <!--{if !$forum['allowspecialonly']}-->href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"<!--{/if}-->><img src="{IMGDIR}/newtopic.gif" border="0" class="absmiddle" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" class="absmiddle" alt="" /></a></div>
复制代码

替换为
  1.         <div id="newspecialheader" class="right" onmouseover="showMenu(this.id)"><a <!--{if !$forum['allowspecialonly']}-->href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"<!--{/if}-->><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a></div>
复制代码



  1.         <div id="newspecialfooter" class="right" onmouseover="showMenu(this.id)"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a></div>
复制代码

替换为
  1.         <div id="newspecialfooter" class="right" onmouseover="showMenu(this.id)"><a <!--{if !$forum['allowspecialonly']}-->href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"<!--{/if}-->><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a></div>
复制代码



memberlist.htm

  1. <td width="6%" align="center">{lang uid}</td>
  2. <td width="5%" align="center"><a href="member.php?action=list&order=gender">{lang gender}</a></td>
复制代码

下面添加
  1. <td width="6%" align="center">{lang homepage}</td>
  2. <td width="16%" align="center">{lang location}</td>
复制代码



  1.         <td align="center" nowrap height="25"><a href="space.php?uid=$member[uid]" class="bold">$member[username]</a><!--{if $member['nickname']}--><br>($member[nickname])<!--{/if}--></td>
复制代码

替换为
  1.         <td align="center" nowrap height="25"><a href="space.php?uid=$member[uid]" class="bold">$member[username]</a></td>
复制代码



  1.         <td align="center"><!--{if $member['site']}--><a href="http://$member[site]" target="_blank">{lang visit_home}</a><!--{else}-->&nbsp;<!--{/if}--></td>
  2.         <td align="center"><!--{if $member['location']}-->$member[location]<!--{else}-->&nbsp;<!--{/if}--></td>
复制代码

删除掉!


  1.         <a href="member.php?action=list&order=credits">{lang credits}</a> -
  2.         <a href="member.php?action=list&order=username">{lang username}</a> -
  3.         <a href="member.php?action=list&order=gender">{lang gender}</a> -
  4.         <a href="member.php?action=list&order=regdate">{lang regdate}</a> -
  5.         <a href="member.php?action=list&type=admins">{lang admin_status}</a>
  6.         <!--{if $maxbdays}--> - <a href="member.php?action=list&type=birthdays">{lang todays_birthdays}</a><!--{/if}-->
  7.         </td></tr></form>
  8. <!--{/if}-->
复制代码

替换为
  1.         <a href="member.php?action=list&order=regdate">{lang regdate}</a> -
  2.         <a href="member.php?action=list&order=username">{lang username}</a> -
  3.         <a href="member.php?action=list&order=credits">{lang credits}</a> -
  4.         <a href="member.php?action=list&order=gender">{lang gender}</a> -
  5.         <a href="member.php?action=list&type=admins">{lang admin_status}</a>
  6.         </td></tr></form>
  7. <!--{/if}-->
复制代码



templates.lang.php

  1.         'taobao' => '淘宝旺旺',
复制代码

替换为
  1.         'taobao' => '阿里旺旺',
复制代码



  1. 'qihoo_afford' => '本功能由奇虎搜索实现',
复制代码

下面添加
  1.         'qihoo_postthread' => '点击转帖该主题',
  2.         'qihoo_webrelthread' => '站外',
复制代码



  1.         'my_activities_stop_stauts' => '征集截至',
  2.         'my_activities_stop_stauts_yes' => '已截至',
  3.         'my_activities_stop_stauts_no' => '未截至',
复制代码

替换为
  1.         'my_activities_stop_stauts' => '征集截止',
  2.         'my_activities_stop_stauts_yes' => '已截止',
  3.         'my_activities_stop_stauts_no' => '未截止',
复制代码



viewpro_classic.htm

  1. <table border="0" cellspacing="0" cellpadding="6" width="98%">
  2. <tr><td width="70%">

  3. <table border="0" cellspacing="0" cellpadding="{TABLESPACE}" width="98%" style="table-layout: fixed">
复制代码

替换为
  1. <table border="0" align="center" cellspacing="0" cellpadding="6" width="98%">
  2. <tr><td>

  3. <table border="0" cellspacing="0" cellpadding="{TABLESPACE}" width="98%">
  4. <
复制代码



  1. </td><td width="30%" height="100%" valign="top">
复制代码

替换为
  1. </td><td width="35%" height="100%" valign="top">
复制代码



  1. <tr><td width="25%" class="altbg1">{lang homepage}:</td><td width="80%" class="altbg2">
  2. <table cellspacing="0" cellpadding="0" border="0" width="100%" style="table-layout: fixed">
  3. <tr><td><a href="$member[site]" target="_blank">$member[site]&nbsp;</a></td></tr></table></td></tr>
  4. <tr><td class="altbg1">Email:</td><td width="80%" class="altbg2"><!--{if $member['showemail']}-->$member[email]<!--{else}-->&nbsp;<!--{/if}--></td></tr>
  5. <tr><td class="altbg1">QQ:</td><td width="80%" class="altbg2"><!--{if $member['qq']}--><a href="http://wpa.qq.com/msgrd?V=1&Uin=$member[qq]&Site=$bbname&Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:$member[qq]:4"  border="0" alt="QQ" />$member[qq]</a><!--{else}-->&nbsp;<!--{/if}--></td></tr>
  6. <tr><td class="altbg1">ICQ:</td><td width="80%" class="altbg2">$member[icq]&nbsp;</td></tr>
  7. <tr><td class="altbg1">Yahoo:</td><td width="80%" class="altbg2">$member[yahoo]&nbsp;</td></tr>
  8. <tr><td class="altbg1">MSN:</td><td width="80%" class="altbg2">$member[msn]&nbsp;</td></tr>
  9. <tr><td class="altbg1">{lang taobao}:</td><td width="80%" class="altbg2"><!--{if $member['taobao']}--><script type="text/javascript">document.write('<a target="_blank" href="http://amos1.taobao.com/msg.ww?v=2&uid='+encodeURIComponent('$member[taobaoas]')+'&s=2"><img src="http://amos1.taobao.com/online.ww?v=2&uid='+encodeURIComponent('$member[taobaoas]')+'&s=2" alt="{lang taobao}" border="0" />$member[taobao]</a>&nbsp;');</script><!--{else}-->&nbsp;<!--{/if}--></td></tr>
  10. <tr><td class="altbg1">{lang alipay}:</td><td width="80%" class="altbg2"><!--{if $member['alipay']}--><a href="https://www.alipay.com/payto:$member[alipay]?partner=20880020258585430156" target="_blank">$member[alipay]</a><!--{else}-->&nbsp;<!--{/if}--></td></tr>
复制代码

替换为
  1. <tr><td class="altbg1">{lang homepage}:</td><td class="altbg2"><a href="$member[site]" target="_blank">$member[site]&nbsp;</a></td></tr>
  2. <tr><td class="altbg1">Email:</td><td class="altbg2"><!--{if $member['showemail']}-->$member[email]<!--{else}-->&nbsp;<!--{/if}--></td></tr>
  3. <tr><td class="altbg1">QQ:</td><td class="altbg2"><!--{if $member['qq']}--><a href="http://wpa.qq.com/msgrd?V=1&Uin=$member[qq]&Site=$bbname&Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:$member[qq]:4"  border="0" alt="QQ" />$member[qq]</a><!--{else}-->&nbsp;<!--{/if}--></td></tr>
  4. <tr><td class="altbg1">ICQ:</td><td class="altbg2">$member[icq]&nbsp;</td></tr>
  5. <tr><td class="altbg1">Yahoo:</td><td class="altbg2">$member[yahoo]&nbsp;</td></tr>
  6. <tr><td class="altbg1">MSN:</td><td class="altbg2">$member[msn]&nbsp;</td></tr>
  7. <tr><td class="altbg1">{lang taobao}:</td><td class="altbg2"><!--{if $member['taobao']}--><script type="text/javascript">document.write('<a target="_blank" href="http://amos1.taobao.com/msg.ww?v=2&uid='+encodeURIComponent('$member[taobaoas]')+'&s=2"><img src="http://amos1.taobao.com/online.ww?v=2&uid='+encodeURIComponent('$member[taobaoas]')+'&s=2" alt="{lang taobao}" border="0" />$member[taobao]</a>&nbsp;');</script><!--{else}-->&nbsp;<!--{/if}--></td></tr>
  8. <tr><td class="altbg1">{lang alipay}:</td><td class="altbg2"><!--{if $member['alipay']}--><a href="https://www.alipay.com/payto:$member[alipay]?partner=20880020258585430156" target="_blank">$member[alipay]</a><!--{else}-->&nbsp;<!--{/if}--></td></tr>
复制代码



viewthread.htm

  1.         <!--{if $supe['status'] && $xspacestatus && $thread['authorid'] == $discuz_uid}-->
  2.                 <!--{if !$thread['itemid']}-->
  3.                         | <a href="$supe[siteurl]/spacecp.php?action=spaceblogs&amp;op=add&amp;tid=$tid" target="_blank">{lang supe_join_xspace}</a>
  4.                 <!--{else}-->
  5.                         | <a href="$supe[siteurl]/index.php?action/viewspace/itemid/$thread[itemid]/fromdiscuz/$supe_fromdiscuz" target="_blank">{lang supe_view_in_xspace}</a>
  6.                 <!--{/if}-->
  7.                 | <a href="$supe[siteurl]/spacecp.php?action=spacenews&op=add&tid=$tid" target="_blank">{lang supe_resource_add}</a>
  8.         <!--{elseif $spacestatus && $thread['authorid'] && ($thread['authorid'] == $discuz_uid || $forum['ismoderator'])}-->
复制代码

替换为
  1.         <!--{if $supe['status']}-->
  2.                 <!--{if $xspacestatus && $thread['authorid'] == $discuz_uid}-->
  3.                         <!--{if !$thread['itemid']}-->
  4.                                 | <a href="$supe[siteurl]/spacecp.php?action=spaceblogs&amp;op=add&amp;tid=$tid" target="_blank">{lang supe_join_xspace}</a>
  5.                         <!--{else}-->
  6.                                 | <a href="$supe[siteurl]/index.php?action/viewspace/itemid/$thread[itemid]/fromdiscuz/$supe_fromdiscuz" target="_blank">{lang supe_view_in_xspace}</a>
  7.                         <!--{/if}-->
  8.                 <!--{/if}-->
  9.                 <!--{if $discuz_uid}-->
  10.                         | <a href="$supe[siteurl]/spacecp.php?action=spacenews&op=add&tid=$tid" target="_blank">{lang supe_resource_add}</a>
  11.                 <!--{/if}-->
  12.         <!--{/if}-->
  13.         <!--{if !($supe['status'] && $xspacestatus && $thread['authorid'] == $discuz_uid) && $spacestatus && $thread['authorid'] && ($thread['authorid'] == $discuz_uid || $forum['ismoderator'])}-->
复制代码



  1.                 <br style="clear: both"><font style="color: {TABLETEXT}; font: {FONTSIZE} {FONT}">
复制代码

替换为
  1.                 <br><font style="color: {TABLETEXT}; font: {FONTSIZE} {FONT}">
复制代码



  1.                 <!--{if $relatedthreadlist && !$qihoo_location && $post['number'] == 1}-->
  2.                         <br><fieldset><legend>{lang qihoo_relatedthreads}</legend><br>
  3.                         <!--{loop $relatedthreadlist $key $threads}-->
  4.                                 <a href="viewthread.php?tid=$threads[tid]" target="_blank">$threads[title]</a><br>
复制代码

替换为
  1.                 <!--{if $relatedthreadlist && !$qihoo_relate_position && $post['number'] == 1}-->
  2.                         <br><fieldset style="padding:10px"><legend>{lang qihoo_relatedthreads}</legend>
  3.                         <!--{loop $relatedthreadlist $key $threads}--><br><li>
  4.                                 <!--{if !$threads['insite']}-->
  5.                                 [{lang qihoo_webrelthread}] <a href="viewthread.php?url=$threads[tid]&amp;statsdata=$fid||$tid" target="_blank">$threads[title]</a>
  6.                                 <!--{else}-->
  7.                                 <a href="viewthread.php?tid=$threads[tid]&amp;statsdata=$fid||$tid" target="_blank">$threads[title]</a>
  8.                                 <!--{/if}-->
  9.                                 </li><br>
复制代码



  1.         <div id="newspecialfooter" class="right" onmouseover="showMenu(this.id)"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a></div>
复制代码

替换为
  1.         <div id="newspecialfooter" class="right" onmouseover="showMenu(this.id)"><a <!--{if !$forum['allowspecialonly']}-->href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"<!--{/if}-->><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a></div>
复制代码



  1. <!--{if $relatedthreadlist && $qihoo_location}-->
  2.         <div class="maintable"><div class="spaceborder" style="width: {TABLEWIDTH}">
  3.         <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
  4.         <tr class="header"><td colSpan=6><table cellspacing="0" cellpadding="0" border="0" width="100%" class="smalltxt" style="table-layout: fixed; word-wrap: break-word">
  5.         <tr style="color: {HEADERTEXT}"><td class="bold" width="60%">{lang qihoo_relatedthreads}</td>
  6.         <td width="40%" align="right" nowrap><a href="http://www.qihoo.com" target="_blank">{lang qihoo_afford}</a>&nbsp;&nbsp;<a href="http://search.qihoo.com/usearch.html?kw=$searchkeywords&amp;relate=$thread['subjectenc']&amp;sort=rdate&amp;site=discuzall&amp;site=$site" target="_blank">{lang thread_more_related_threads}</a>
  7.         &nbsp;<a href="###" onclick="toggle_collapse('relatedthreads');"><img id="relatedthreads_img" src="{IMGDIR}/{$relatedthreads['img']}" border="0" alt="" /></td></tr></table></td></tr>
  8.         <tbody id="relatedthreads" style="$relatedthreads['style']">
  9.         <tr class="category">
  10.         <td width="45%" align="center">{lang subject}</td>
  11.         <td width="14%" align="center">{lang forum}</td>
  12.         <td width="14%" align="center">{lang author}</td>
  13.         <td width="6%" align="center">{lang replies}</td>
  14.         <td width="6%" align="center">{lang views}</td>
  15.         <td width="15%" align="center">{lang lastpost}</td>
  16.         </tr>
  17.         <!--{loop $relatedthreadlist $key $threads}-->
  18.                 <tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
  19.                 <td><a href="viewthread.php?tid=$threads[tid]" target="_blank">$threads[title]</a></td>
  20.                 <td align="center"><a href="forumdisplay.php?fid=$threads[fid]" target="_blank">$_DCACHE[forum][fid][name]</a></td>
  21.                 <td align="center"><a href="space.php?username={echo rawurlencode($threads[author])}" target="_blank">$threads[author]</a><br>$threads[pdate]</td>
  22.                 <td align="center">$threads[rnum]</td>
  23.                 <td align="center">$threads[vnum]</td>
  24.                 <td align="center">$threads[rdate]</td>
  25.                 </tr>
  26.         <!--{/loop}-->
  27.         </tbody>
  28.         </table></div><br></div>
复制代码

替换为
  1. <!--{if $relatedthreadlist && $qihoo_relate_position}-->
  2.         {template viewthread_relatedthread}
复制代码



  1. <script type="text/javascript" src="relatethread.php?tid=$tid&amp;subjectenc=$thread[subjectenc]&amp;verifykey=$verifykey"></script>
  2. <!--{/if}-->
复制代码

下面添加
  1. <!--{if $qihoo_relate_bbsnum || $qihoo_relate_webnum}-->
  2.         <img style="display:none;" src="http://pvstat.qihoo.com/dimana.gif?_pdt=discuz&_pg=s100812&_r=$randnum&_dim_k=orgthread&_dim_v={eval echo urlencode($boardurl);}||{$statsdata}||0" width=1 height=1>
  3.         <img style="display:none;" src="http://pvstat.qihoo.com/dimana.gif?_pdt=discuz&_pg=s100812&_r=$randnum&_dim_k=relthread&_dim_v={$statskeywords}||{$statsurl}" width=1 height=1>
  4. <!--{/if}-->
复制代码



viewthread_poll.htm

  1.                         for (var i = 0; i < poll.elements.length; i++) {
  2.                                 var e = poll.elements[i];
复制代码

替换为
  1.                         for (var i = 0; i < $('poll').elements.length; i++) {
  2.                                 var e = $('poll').elements[i];
复制代码

(一共两处!)


  1. <form name="poll" method="post" action="misc.php?action=votepoll&fid=$fid&tid=$tid">
复制代码

替换为
  1. <form id="poll" name="poll" method="post" action="misc.php?action=votepoll&fid=$fid&tid=$tid">
复制代码

评分

1

查看全部评分

回复

使用道具 举报

 楼主| Rockoy 发表于 2007-7-26 03:25:33 | 显示全部楼层
\wap 目录

\include\register.inc.php

  1. $groupinfo['groupid'] = $db->result($query, 0);
复制代码

替换为
  1. $groupinfo = $db->fetch_array($query);
复制代码



  1.         $db->query("INSERT INTO {$tablepre}members (username, password, secques, gender, adminid, groupid, regip, regdate, lastvisit, lastactivity, posts, credits, extcredits1, extcredits2, extcredits3, extcredits4, extcredits5, extcredits6, extcredits7, extcredits8, email, bday, sigstatus, tpp, ppp, styleid, dateformat, timeformat, pmsound, showemail, newsletter, invisible, timeoffset)
  2.                 VALUES ('$username', '$password', '$secques', '$gendernew', '0', '$groupinfo[groupid]', '$onlineip', '$timestamp', '$timestamp', '$timestamp', '0', $initcredits, '$email', '$bday', '$sigstatus', '$tppnew', '$pppnew', '$styleidnew', '$dateformatnew', '$timeformatnew', '$pmsoundnew', '$showemail', '$newsletter', '$invisiblenew', '$timeoffsetnew')");
复制代码

替换为
  1.         $db->query("INSERT INTO {$tablepre}members (username, password, secques, gender, adminid, groupid, regip, regdate, lastvisit, lastactivity, posts, credits, extcredits1, extcredits2, extcredits3, extcredits4, extcredits5, extcredits6, extcredits7, extcredits8, email, bday, sigstatus, tpp, ppp)
  2.                 VALUES ('$username', '$password', '', '', '0', '$groupinfo[groupid]', '$onlineip', '$timestamp', '$timestamp', '$timestamp', '0', $initcredits, '$email', '', '', '20', '20')");
复制代码



  1. $discuz_userss = stripslashes($discuz_user);
  2.         $discuz_pw = $password;
复制代码

下面添加
  1.         $discuz_secques = $secques;
复制代码




-------------------------------------------------------
=======================================================





\ 根目录

admincp.php

  1.                 } elseif($action == 'qihoo_config' || $action == 'qihoo_topics') {
复制代码

替换为
  1.                 } elseif($action == 'qihoo_config' || $action == 'qihoo_relatedthreads' || $action == 'qihoo_topics') {
复制代码



forumdisplay.php

  1. if($forum['redirect']) {
  2.         dheader("Location: $forum[redirect]");
  3. }

  4. if(isset($showoldetails)) {
  5.         switch($showoldetails) {
  6.                 case 'no': dsetcookie('onlineforum', 0, 86400 * 365); break;
  7.                 case 'yes': dsetcookie('onlineforum', 1, 86400 * 365); break;
  8.         }
  9. } else {
  10.         $showoldetails = false;
  11. }

  12. if(!$forum['fid'] || $forum['type'] == 'group') {
  13.         showmessage('forum_nonexistence', NULL, 'HALTED');
  14. }
复制代码

替换为
  1. if($forum['redirect']) {
  2.         dheader("Location: $forum[redirect]");
  3. } elseif($forum['type'] == 'group') {
  4.         dheader("Location: {$indexname}?gid=$fid");
  5. } elseif(empty($forum['fid'])) {
  6.         showmessage('forum_nonexistence', NULL, 'HALTED');
  7. }

  8. $showoldetails = isset($showoldetails) ? $showoldetails : '';
  9. switch($showoldetails) {
  10.         case 'no': dsetcookie('onlineforum', 0, 86400 * 365); break;
  11.         case 'yes': dsetcookie('onlineforum', 1, 86400 * 365); break;
  12. }
复制代码



  1. $rssstatus && $rsshead = '<link rel="alternate" type="application/rss+xml" title="'.$bbname.' - '.$navtitle.'" href="'.$boardurl.'rss.php?fid='.$fid.'&auth='.$rssauth.'">';
复制代码

替换为
  1. $rsshead = $rssstatus ? ('<link rel="alternate" type="application/rss+xml" title="'.$bbname.' - '.$navtitle.'" href="'.$boardurl.'rss.php?fid='.$fid.'&amp;auth='.$rssauth."" />\n") : '';
复制代码



  1. $visitedforums = $visitedforums ? visitedforums() : '';
  2. $forumselect = $forummenu = '';
复制代码

下面添加
  1. if($forumjump && empty($jsmenu[1])) {
  2.         $forumselect = forumselect();
  3. }
复制代码



index.php

  1. define('CACHE_FILE', $indexcache['filename']);
复制代码

下面添加
  1.                 $styleid = $_DCACHE['settings']['styleid'];
复制代码



  1. $rssstatus && $rsshead = '<link rel="alternate" type="application/rss+xml" title="'.$bbname.'" href="'.$boardurl.'rss.php?auth='.$rssauth.'">';
  2. $searchboxstatus = substr(sprintf('%03b', $qihoo_searchbox), -1, 1);
复制代码

替换为
  1. $rsshead = $rssstatus ? ('<link rel="alternate" type="application/rss+xml" title="'.$bbname.'" href="'.$boardurl.'rss.php?auth='.$rssauth."" />\n") : '';
  2. $searchboxstatus = $qihoo_searchbox & 1;
复制代码



  1. $invisiblecount = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}sessions WHERE invisible = '1'"), 0);
复制代码

下面添加
  1.                         }

  2.                         if($onlinenum < $membercount) {
  3.                                 $onlinenum = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}sessions"), 0);
  4.                                 dsetcookie('onlineusernum', intval($onlinenum), 300);
复制代码



leftmenu.php

  1. $forumdata = $forumlist = array();
  2. while($forumdata = $db->fetch_array($query)) {
  3.         if(!$forumdata['viewperm'] || ($forumdata['viewperm'] && forumperm($forumdata['viewperm'])) || !empty($forumdata['allowview']) || (isset($forumdata['users']) && strstr($forumdata['users'], "\t$discuz_uid\t"))) {
  4.                 $forumdata['name'] = addslashes($forumdata['name']);
  5.                 $forumlist[] = $forumdata;
  6.         }
  7. }
复制代码

替换为
  1. $forumdata = $forumlist = $haschild = array();
  2. while($forumdata = $db->fetch_array($query)) {
  3.         if(!$forumdata['viewperm'] || ($forumdata['viewperm'] && forumperm($forumdata['viewperm'])) || !empty($forumdata['allowview']) || (isset($forumdata['users']) && strstr($forumdata['users'], "\t$discuz_uid\t"))) {
  4.                 $forumdata['name'] = addslashes($forumdata['name']);
  5.                 $forumdata['type'] != 'group' && $haschild[$forumdata['fup']] = true;
  6.                 $forumlist[] = $forumdata;
  7.         }
  8. }
复制代码



member.php

  1.                         } elseif($order == 'username' || $order == 'regdate') {
复制代码

替换为
  1.                         } elseif($order == 'username') {
复制代码



  1.                         $sql = !empty($srchmem) ? " WHERE BINARY username LIKE '%".str_replace('_', '\_', $srchmem)."%' OR username='$srchmem'" : '';
复制代码

替换为
  1.                         $sql = !empty($srchmem) ? " WHERE username LIKE '".str_replace(array('_', '%'), array('\_', '\%'), $srchmem)."%'" : '';
复制代码



  1. $group['maxsizeperday'] = $group['maxsizeperday'] / 1000;
复制代码

下面添加
  1.         $group['maxbiosize'] = $group['maxbiosize'] ? $group['maxbiosize'] : 200;
复制代码



memcp.php

  1.                         showmessage('credits_addfunds_succeed', 'https://www.alipay.com/cooperate/gateway.do?'.$urlstr.'sign='.$sign.'&sign_type=MD5');
复制代码

替换为
  1.                         showmessage('credits_addfunds_succeed', 'http://www.alipay.com/redir.do?id=307&site=allbbs&target='.rawurlencode('https://www.alipay.com/cooperate/gateway.do?'.$urlstr.'sign='.$sign.'&sign_type=MD5'));
复制代码



  1. $db->query("UPDATE {$tablepre}memberspaces SET description= '".dhtmlspecialchars($spacedescription)."', layout='$spacelayout', side='$spaceside', style='$spacestyle' WHERE uid='$discuz_uid'");
复制代码

下面添加
  1.                 $db->query("DELETE FROM {$tablepre}spacecaches WHERE uid='$uid'");
复制代码



misc.php

  1. $query = $db->query("SELECT * FROM {$tablepre}ratelog WHERE pid='$pid' ORDER BY dateline");
  2.                 while($ratelog = $db->fetch_array($query)) {
复制代码

下面添加
  1.                         $ratelog['dbdateline'] = $ratelog['dateline'];
复制代码



  1. while($ratelog = $db->fetch_array($query)) {
  2.                                 if(in_array($ratelog['uid'].' '.$ratelog['extcredits'], $logidarray)) {
  3.                                         $rate += $ratelog['score'] = -$ratelog['score'];
  4.                                         $ratetimes += ceil(max(abs($rating['min']), abs($rating['max'])) / 5);
  5.                                         updatecredits($post['authorid'], array($ratelog['extcredits'] => $ratelog['score']));
  6.                                         $db->query("DELETE FROM {$tablepre}ratelog WHERE pid='$pid' AND uid='$ratelog[uid]' AND extcredits='$ratelog[extcredits]'", 'UNBUFFERED');
  7.                                         $logs[] = dhtmlspecialchars("$timestamp\t$discuz_userss\t$adminid\t$post[author]\t$id\t$ratelog[score]\t$tid\t$thread[subject]\t$reason\tD");
  8.                                         if($sendreasonpm) {
复制代码

替换为
  1. while($ratelog = $db->fetch_array($query)) {
  2.                                 if(in_array($ratelog['uid'].' '.$ratelog['extcredits'].' '.$ratelog['dateline'], $logidarray)) {
  3.                                         $rate += $ratelog['score'] = -$ratelog['score'];
  4.                                         $ratetimes += ceil(max(abs($rating['min']), abs($rating['max'])) / 5);
  5.                                         updatecredits($post['authorid'], array($ratelog['extcredits'] => $ratelog['score']));
  6.                                         $db->query("DELETE FROM {$tablepre}ratelog WHERE pid='$pid' AND uid='$ratelog[uid]' AND extcredits='$ratelog[extcredits]' AND dateline='$ratelog[dateline]'", 'UNBUFFERED');
  7.                                         $logs[] = dhtmlspecialchars("$timestamp\t$discuz_userss\t$adminid\t$post[author]\t$ratelog[extcredits]\t$ratelog[score]\t$tid\t$thread[subject]\t$reason\tD");
  8.                                         if($sendreasonpm) {
复制代码



post.php


  1. $maxprice = isset($extcredits[$creditstrans]) ? $maxprice : 0;
  2. if(!empty($tid) && !empty($fid)) {
  3.         $query = $db->query("SELECT * FROM {$tablepre}threads WHERE tid='$tid'".($auditstatuson ? '' : " AND displayorder>='0'"));
  4.         $thread = $db->fetch_array($query);
  5.         $fid = $thread['fid'];
  6.         $navigation = "&raquo; <a href="viewthread.php?tid=$tid">$thread[subject]</a>";
  7.         $navtitle = $thread['subject'].' - ';

  8.         if($thread['readperm'] && $thread['readperm'] > $readaccess && !$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
  9.                 showmessage('thread_nopermission', NULL, 'NOPERM');
  10.         }
  11. }
复制代码

替换为
  1. $maxprice = isset($extcredits[$creditstrans]) ? $maxprice : 0;
  2. if($action == 'edit' || $action == 'reply') {
  3.         $query = $db->query("SELECT * FROM {$tablepre}threads WHERE tid='$tid'".($auditstatuson ? '' : " AND displayorder>='0'"));
  4.         if($thread = $db->fetch_array($query)) {

  5.                 $navigation = "&raquo; <a href="viewthread.php?tid=$tid">$thread[subject]</a>";
  6.                 $navtitle = $thread['subject'].' - ';

  7.                 if($thread['readperm'] && $thread['readperm'] > $readaccess && !$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
  8.                         showmessage('thread_nopermission', NULL, 'NOPERM');
  9.                 }

  10.                 $fid = $thread['fid'];
  11.                 $special = $thread['special'];

  12.         } else {
  13.                 showmessage('thread_nonexistence');
  14.         }
  15. }
复制代码



  1. $iscircle = $supe['status'] && $supe['circlestatus'] && $forum['status'] == 2;
复制代码

替换为
  1. if($iscircle = $supe['status'] && $supe['circlestatus'] && $forum['status'] == 2) {
  2.         unset($forum['threadtypes']);
  3. }
复制代码



  1. $allowposttrade = $allowpost && $allowposttrade && substr(sprintf('%04b', $forum['allowpostspecial']), -2, 1);
复制代码

替换为
  1. $allowposttrade = $allowpost && $ec_id && $allowposttrade && substr(sprintf('%04b', $forum['allowpostspecial']), -2, 1);
复制代码



register.php

  1.         $username = trim($username);
复制代码

替换为成
  1.         $username = addslashes(trim(stripslashes($username)));
复制代码



relatethread.php

  1. if(!$_DCACHE['settings']['qihoo_status'] || !$_DCACHE['settings']['qihoo_relatedthreads']) {
  2.         exit;
复制代码

替换为成
  1. if(!$_DCACHE['settings']['qihoo_relate_bbsnum'] || !$_DCACHE['settings']['qihoo_relate_webnum']) {
  2.         exit();
复制代码



  1.         exit;
  2. }

  3. switch($_DCACHE['settings']['qihoo_relatedsort']) {
  4.         case '0': $relate = 'score'; break;
  5.         case '1': $relate = 'pdate'; break;
  6.         case '2': $relate = 'rdate'; break;
  7. }

  8. $data = @implode('', file("http://search.qihoo.com/sint/discuz.html?title=$subjectenc&ics=$charset&ocs=$charset&site=$site&sort=$relate"));

  9. if($data) {
  10.         $qihoo_validity = $_DCACHE['settings']['qihoo_validity'];
  11.         $qihoo_relatedthreads =  $_DCACHE['settings']['qihoo_relatedthreads'];
复制代码

替换为
  1.         exit();
  2. }
  3. switch($_DCACHE['settings']['qihoo_relate_order']) {
  4.         case '0': $relate = 'score'; break;
  5.         case '1': $relate = 'pdate'; break;
  6.         case '2': $relate = 'rdate'; break;
  7. }
  8. $tshow = $_DCACHE['settings']['qihoo_relate_position'] ? 'mid' : 'bot';
  9. $intnum = intval($_DCACHE['settings']['qihoo_relate_bbsnum']);
  10. $extnum = intval($_DCACHE['settings']['qihoo_relate_webnum']);
  11. $exttype = $_DCACHE['settings']['qihoo_relate_type'];
  12. $data = @implode('', file("http://search.qihoo.com/sint/related.html?title=$subjectenc&ics=$charset&ocs=$charset&site=$site&sort=$relate&tshow=$tshow&intnum=$intnum&extnum=$extnum&exttype=$exttype"));

  13. if($data) {
  14.         $qihoo_validity = $_DCACHE['settings']['qihoo_relate_validity'];
  15.         $qihoo_relate_bbsnum = $_DCACHE['settings']['qihoo_relate_bbsnum'];
  16.         $qihoo_relate_webnum = $_DCACHE['settings']['qihoo_relate_webnum'];
  17.         $qihoo_relate_banurl = $_DCACHE['settings']['qihoo_relate_banurl'];
复制代码



  1.         $xmldata = array('chanl', 'fid', 'title', 'tid', 'author', 'pdate', 'rdate', 'rnum', 'vnum');
  2.         $relatedthreadlist = $keywords = array();

  3.         foreach($index as $tag => $valuearray) {
  4.                 if(in_array($tag, $xmldata)) {
  5.                         foreach($valuearray as $key => $value) {
  6.                                 if($qihoo_relatedthreads > $key) {
  7.                                         $relatedthreadlist[$key][$tag] = !empty($chs) ? $chs->convert(trim($values[$value]['value'])) : trim($values[$value]['value']);
  8.                                         $relatedthreadlist[$key]['fid'] = !$values[$index['fid'][$key]]['value'] ? preg_replace("/(.+?)\/forum\-(\d+)\-(\d+)\.html/", "\\2", trim($values[$index['curl'][$key]]['value'])) : trim($values[$index['fid'][$key]]['value']);
  9.                                         $relatedthreadlist[$key]['tid'] = !$values[$index['tid'][$key]]['value'] ? preg_replace("/(.+?)\/thread\-(\d+)\-(\d+)-(\d+)\.html/", "\\2", trim($values[$index['surl'][$key]]['value'])) : trim($values[$index['tid'][$key]]['value']);
  10.                                 }
  11.                         }
复制代码

替换为
  1.         $xmldata = array('chanl', 'fid', 'title', 'tid', 'author', 'pdate', 'rdate', 'rnum', 'vnum', 'insite');
  2.         $relatedthreadlist = $keywords = array();
  3.         foreach($index as $tag => $valuearray) {
  4.                 if(in_array($tag, $xmldata)) {
  5.                         foreach($valuearray as $key => $value) {
  6.                                 if($values[$index['title'][$key]]['value']) {
  7.                                         $relatedthreadlist[$key][$tag] = !empty($chs) ? $chs->convert(trim($values[$value]['value'])) : trim($values[$value]['value']);
  8.                                         $relatedthreadlist[$key]['fid'] = !$values[$index['fid'][$key]]['value'] ? preg_replace("/(.+?)\/forum\-(\d+)\-(\d+)\.html/", "\\2", trim($values[$index['curl'][$key]]['value'])) : trim($values[$index['fid'][$key]]['value']);
  9.                                         $relatedthreadlist[$key]['tid'] = !$values[$index['tid'][$key]]['value'] ? preg_replace("/(.+?)\/thread\-(\d+)\-(\d+)-(\d+)\.html/", "\\2", trim($values[$index['surl'][$key]]['value'])) : trim($values[$index['tid'][$key]]['value']);
  10.                                 }
  11.                         }
复制代码



  1.         $keywords = $keywords[0] ? implode("\t", $keywords) : '';
  2.         $relatedthreads = $relatedthreadlist ? addslashes(serialize($relatedthreadlist)) : '';
  3.         $svalid = $svalid > $qihoo_validity * 86400 ? $svalid : $qihoo_validity * 86400;
  4.         $expiration = $timestamp + $svalid;
复制代码

替换为
  1.         $threadlist = array();
  2.         if($relatedthreadlist) {
  3.                 foreach($relatedthreadlist as $key => $relatedthread) {
  4.                         if($relatedthread['insite'] == 1) {
  5.                                 $threadlist['bbsthread'][] = $relatedthread;
  6.                         } elseif($qihoo_relate_webnum) {
  7.                                 if(($qihoo_relate_banurl && !preg_match($qihoo_relate_banurl, $relatedthread['tid'])) || !$qihoo_relate_banurl) {
  8.                                         $threadlist['webthread'][] = $relatedthread;
  9.                                 }
  10.                         }
  11.                 }
  12.                 $threadlist['bbsthread'] = $threadlist['bbsthread'] ? array_slice($threadlist['bbsthread'], 0, $qihoo_relate_bbsnum) : array();
  13.                 $threadlist['webthread'] = $threadlist['webthread'] ? array_slice($threadlist['webthread'], 0, $qihoo_relate_webnum) : array();
  14.                 $relatedthreadlist = array_merge($threadlist['bbsthread'], $threadlist['webthread']);
  15.         }

  16.         $keywords = $keywords[0] ? implode("\t", $keywords) : '';
  17.         $relatedthreads = $relatedthreadlist ? addslashes(serialize($relatedthreadlist)) : '';
  18.         $expiration = $svalid > $qihoo_validity * 86400 ? $timestamp + $svalid : $timestamp + $qihoo_validity * 86400;
复制代码



topicadmin.php

  1.         if($supe['circlestatus'] && $discuz_uid && $action == 'moderate' && $operation == 'delete' && supe_submitcheck()) {
复制代码

替换为
  1.         if($supe['circlestatus'] && $discuz_uid && $action == 'moderate' && $operation == 'delete' && supe_submitcheck(1)) {
复制代码



viewthread.php

  1.         $start_limit = $numpost = ($page - 1) * $ppp;
  2.         if($start_limit > $thread['replies']) {
  3.                 $start_limit = $numpost = 0;
  4.                 $page = 1;
  5.         }
复制代码

替换为
  1.         $totalpage = ceil(($thread['replies'] + 1) / $ppp);
  2.         $page > $totalpage && $page = $totalpage;

  3.         $pagebydesc = $page > 50 && $page > ($totalpage / 2) ? TRUE : FALSE;

  4.         if($pagebydesc) {
  5.                 $firstpagesize = ($thread['replies'] + 1) % $ppp;
  6.                 $ppp2 = $page == $totalpage && $firstpagesize ? $firstpagesize : $ppp;
  7.                 $realpage = $totalpage - $page + 1;
  8.                 $start_limit = max(0, ($realpage - 2) * $ppp + $firstpagesize);
  9.                 $numpost = ($page - 1) * $ppp;
  10.                 $pageadd =  "ORDER BY dateline DESC LIMIT $start_limit, $ppp2";
  11.         } else {
  12.                 $start_limit = $numpost = ($page - 1) * $ppp;
  13.                 if($start_limit > $thread['replies']) {
  14.                         $start_limit = $numpost = 0;
  15.                         $page = 1;
  16.                 }
  17.                 $pageadd =  "ORDER BY dateline LIMIT $start_limit, $ppp";
  18.         }
复制代码



  1.                 WHERE p.tid='$tid' AND p.invisible='0' ORDER BY dateline LIMIT $start_limit, $ppp");
复制代码

替换为
  1.                 WHERE p.tid='$tid' AND p.invisible='0' $pageadd");
复制代码



  1.                 $post['number'] = ++$numpost;
复制代码

替换为
  1.                 if($pagebydesc) {
  2.                         $post['number'] = $numpost + $ppp2--;
  3.                 } else {
  4.                         $post['number'] = ++$numpost;
  5.                 }
复制代码



  1. $postlist[$post['pid']] = $post;

  2.         }
复制代码

替换为
  1. $postlist[$post['pid']] = $post;
  2.         }

  3.         if($pagebydesc) {
  4.                 $postlist = array_reverse($postlist, TRUE);
  5.         }
复制代码



  1.         include template($iscircle ? 'supesite_viewthread' : 'viewthread');
复制代码

替换为
  1.         include template($iscircle && empty($frombbs) ? 'supesite_viewthread' : 'viewthread');
复制代码

评分

2

查看全部评分

回复

使用道具 举报

 楼主| Rockoy 发表于 2007-7-26 03:31:36 | 显示全部楼层
哎呀妈呀累死我了~
先坐个沙发吧
累死我了
回复

使用道具 举报

SilentHunter 发表于 2007-7-26 03:34:56 | 显示全部楼层
不是沙发的沙发
回复

使用道具 举报

SilentHunter 发表于 2007-7-26 03:37:12 | 显示全部楼层

回复 #6 Rockoy 的帖子

B4你
回复

使用道具 举报

⒈薪 发表于 2007-7-26 03:37:36 | 显示全部楼层
:) :) :)
回复

使用道具 举报

 楼主| Rockoy 发表于 2007-7-26 03:37:45 | 显示全部楼层
累死我了,赶紧给我加分

评分

1

查看全部评分

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-23 23:24 , Processed in 0.083588 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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