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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[9.22更新,增加文字底色][原创]10种自定义参数标题醒目高亮

[复制链接]
 楼主| lu5266 发表于 2005-10-8 13:09:58 | 显示全部楼层
原帖由 shutiao 于 2005-10-8 13:06 发表
数据库我先升级过了,后来又回复了



现在呢?????
回复

使用道具 举报

shutiao 发表于 2005-10-8 13:10:34 | 显示全部楼层
都好了,不过还是不行啊
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-8 13:12:26 | 显示全部楼层
原帖由 shutiao 于 2005-10-8 13:10 发表
都好了,不过还是不行啊


http://shutiao.vicp.net/bbs/forumdisplay.php?fid=1&page=0

可以啊
回复

使用道具 举报

shutiao 发表于 2005-10-8 14:36:42 | 显示全部楼层
哈 ,好了。谢谢楼主,好人啊!
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-8 19:06:12 | 显示全部楼层
原帖由 shutiao 于 2005-10-8 14:36 发表
哈 ,好了。谢谢楼主,好人啊!

不客气的说
回复

使用道具 举报

hyelan 发表于 2005-10-10 18:33:43 | 显示全部楼层

标题醒目高亮问题!

为什么我安装以后,标题变成类似<font style="color: #7f00ff; font-weight: bold;font-style: italic;text-decoration: underline;">[转帖]11111111111111111</font>
这个样子了啊,555~~~~我查了许多次也查不出错误的

附件为我的topicadmin.php  forumdisplay.php  viewthread.htm

我的地址为:http://60.30.240.252:88/hyelan/bbs/

麻烦能帮我看看吗?



  1. <?php

  2. /*
  3. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. :: [DISCUZ!]  Crossday Discuz! Board                                    ::
  5. :: (c) 2001-2005 Comsenz Technology Ltd (www.discuz.com)                ::
  6. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  7. :: Author:  Crossday (tech@discuz.com) Cnteacher (cnteacher@discuz.com) ::
  8. :: Version: 2.5F   2004/10/01 05:15                                     ::
  9. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  10. */
  11. //fix:  BY pk0909
  12. /*
  13. 1 对分割后的主题缺少html转义处理
  14. 2 跳转的url参数问题
  15. 3 批量删除主题时,没有删除对应附件
  16. */

  17. require './include/common.php';
  18. require_once DISCUZ_ROOT.'./include/post.php';
  19. require $discuz_root.'./include/discuzcode.php';
  20. //全局定义短信内容之一
  21. $msg_2="

  22. 如有疑问,请查看[url=http://www.i-sx.net/rules.php]社区守则[/url]以及各版块置顶的管理规则,或[url=http://www.i-sx.net/post.php?action=newthread&fid=15]向管理员反映[/url]。";

  23. //全局定义短信内容之一
  24. $jfkarmaoptions = '';
  25. $jf=$jfmaxkarmarate = "10";   //积分最高或最低限额设定

  26.                 $jfoffset = ceil($jfmaxkarmarate / 10);
  27.                 for($jfvote = - $jfmaxkarmarate + $jfoffset; $jfvote <= $jfmaxkarmarate; $jfvote += $jfoffset) {
  28.                         $jfvotenum = $jfvote > 0 ? '+'.$jfvote : $jfvote;
  29.                         if ($jfvote=="-1"){$selected="selected";}
  30.                         $jfkarmaoptions .= $jfvote ? "<option value="$jfvote" $selected>$jfvotenum</option>\n" : NULL;
  31.                 $selected="";
  32.                 }
  33.         unset($jfvote, $jfvotenum, $jfoffset);


  34. $lbkarmaoptions = '';
  35. $lb=$lbmaxkarmarate = "30";  //社区币最高或最低限额设定

  36.                 $lboffset = ceil($lbmaxkarmarate / 30);
  37.                 for($lbvote = - $lbmaxkarmarate + $lboffset; $lbvote <= $lbmaxkarmarate; $lbvote += $lboffset) {
  38.                         $lbvotenum = $lbvote > 0 ? '+'.$lbvote : $lbvote;
  39.                         if ($lbvote== "-1"){$selected="selected";}
  40.                         $lbkarmaoptions .= $lbvote ? "<option value="$lbvote" $selected>$lbvotenum</option>\n" : NULL;
  41.         $selected="";        }
  42.         unset($lbvote, $lbvotenum, $lboffset);



  43. ////操作原因,分值判断

  44. function ctrl_msg(){
  45.         global $title,$content,$docredit,$domoney,$msg,$jf,$lb;
  46.         $title = dhtmlspecialchars(censor(trim($title)));
  47.         $content = dhtmlspecialchars(censor(trim($content)));
  48.         $docredit = dhtmlspecialchars(censor(trim($docredit)));
  49.         $domoney = dhtmlspecialchars(censor(trim($domoney)));
  50.         $msg = trim(censor(parseurl($msg)));
  51.         if($title =="" and $content ==""){showmessage('admin_ctrl_invalid');}
  52.         if ($docredit >$jf or $docredit < -$jf or $domoney >$lb or $domoney < -$lb){showmessage('admin_ctrl2_invalid');}
  53. }
  54. ////操作原因,分值判断





  55. $discuz_action = 151;

  56. $tid   = $tid ? $tid :'';
  57. $page  = intval($page);
  58. $fpage = intval($fpage);

  59. if($tid) {
  60.         $query = $db->query("SELECT * FROM $table_threads WHERE tid='$tid'");
  61.         $thread = $db->fetch_array($query);
  62.         $thread['subject'] .= $action == 'delthread' ? ", etc." : NULL;
  63. }

  64. if($forum['type'] == 'forum') {
  65.         $navigation = "&raquo; <a href="forumdisplay.php?fid=$fid&page=$fpage">$forum[name]</a> &raquo; <a href="viewthread.php?tid=$tid">$thread[subject]</a> ";
  66.         $navtitle = ' - '.strip_tags($forum['name']).' - '.$thread['subject'];
  67. } else {
  68.         $query = $db->query("SELECT name, fid, moderator FROM $table_forums WHERE fid='$forum[fup]'");
  69.         $fup = $db->fetch_array($query);
  70.         $navigation = "&raquo; <a href="forumdisplay.php?fid=$fup[fid]">$fup[name]</a> &raquo; <a href="forumdisplay.php?fid=$fid&page=$fpage">$forum[name]</a> &raquo; <a href="viewthread.php?tid=$tid">$thread[subject]</a> ";
  71.         $navtitle = ' - '.strip_tags($fup['name']).' - '.strip_tags($forum['name']).' - '.$thread['subject'];
  72. }

  73. if(!$discuz_user || !$discuz_pw || !modcheck($discuz_user)) {
  74.         showmessage('admin_nopermission', NULL, 'HALTED');
  75. }

  76. $fupadd = $fup ? "OR (fid='$fup[fid]' && type<>'group')" : NULL;

  77. if($action == 'moderate') {
  78.         if(!is_array($moderate) || !count($moderate)) {
  79.                 showmessage('admin_moderate_nothread');
  80.         }elseif(!$operation){
  81.                 showmessage('admin_moderate_nooperation');
  82.         }
  83.         $tids = implode_ids($moderate);
  84.         $query = $db->query("SELECT * FROM $table_threads WHERE tid IN($tids) ");
  85.         accesscheck($query);
  86.         $query = $db->query("SELECT * FROM $table_threads WHERE tid IN($tids) ");

  87.         if(!submitcheck('moderatesubmit')){
  88.                 $threadlist = array();
  89.                 while($thread = $db->fetch_array($query)) {
  90.                         if($thread['fid'] == $fid){
  91.                                 $thread['lastposterenc'] = rawurlencode($thread['lastposter']);
  92.                                 if($thread['attachment']) {
  93.                                         require_once DISCUZ_ROOT.'./include/attachment.php';
  94.                                         $thread['attachment'] = attachtype($thread['attachment']).' ';
  95.                                 } else {
  96.                                         $thread['attachment'] = '';
  97.                                 }
  98.                                 $thread[subject] = cutstr($thread[subject],77);
  99.                                 $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
  100.                                 $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);
  101.                                 $threadlist[] = $thread;
  102.                         }
  103.                 }
  104.                
  105.                 if(!$threadlist) showmessage('admin_moderate_nothread');

  106.                 if($operation == 'move') {
  107.                         require_once DISCUZ_ROOT.'./include/forum.php';
  108.                         $forumselect = forumselect();
  109.                 }
  110.                 include template('topicadmin_moderate');
  111.        
  112.         }else{
  113.        
  114.                 if($operation == 'move' && $allowmove) {
  115.                         if(!$moveto) {
  116.                                 showmessage('admin_move_invalid');
  117.                         }

  118.                        
  119. ctrl_msg();   //调用函数


  120.         $query= $db->query("SELECT name FROM $table_forums WHERE fid=$fid");
  121.         while($result = $db->fetch_array($query))
  122.         {
  123.             $czfirstfn = $result['name'];
  124.         }
  125.          
  126.         $query= $db->query("SELECT name FROM $table_forums WHERE fid=$moveto");
  127.         while($result = $db->fetch_array($query))
  128.         {
  129.             $czsecondfn = $result['name'];
  130.         }
  131. //帖子操作短信通知 hack by xiori 2005-3-18


  132. if($ynmsg==1)
  133.         {
  134. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  135. $czsubject="移动主题短消息通知";
  136. if($content !=""){$title=$content;}
  137. if ($msg !=""){
  138.         $msg="

  139. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  140.         }
  141.         while($memberid = $db->fetch_array($query)) {

  142. if ($updateur != "1") {
  143. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,且进行了 积分$docredit, 论坛币$domoney 的操作!";
  144. }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,没有对您的分值进行操作!";
  145. }

  146. $msg_3="\n\n你的贴子由\n\n $czfirstfn  版块\n\n移到\n\n $czsecondfn  版块";
  147. $msgtext=$msg_1.$msg.$msg_3.$msg_2;
  148.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  149.                                 VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  150.                 if ($updateur != "1") {
  151. $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  152.      }
  153.                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");       

  154.         }
  155.        
  156. } else{
  157. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  158.         while($memberid = $db->fetch_array($query)) {
  159. if ($updateur != "1") {
  160.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  161. }
  162.         }
  163. }
  164. //帖子操作短信通知 hack by xiori 2005-3-18

  165.                         $displayorderadd = !$adminglobal ? ", displayorder='0'" : NULL;

  166.                         $db->query("UPDATE $table_threads SET fid='$moveto' $displayorderadd WHERE tid IN($tids)");
  167.                         $db->query("UPDATE $table_posts SET fid='$moveto' WHERE tid IN($tids) ");

  168.                         if ($forum['type'] == 'sub') {
  169.                                 $query= $db->query("SELECT fup FROM $table_forums WHERE fid='$fid' LIMIT 1");
  170.                                 $fup = $db->result($query, 0);
  171.                                 updateforumcount($fup);
  172.                         }
  173.                         modlog();
  174.                         updateforumcount($moveto);
  175.                         updateforumcount($fid);
  176.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");

  177.                 }elseif($operation == 'stick' && $allowtop){
  178.                        
  179.                         ctrl_msg();   //调用函数
  180.                         if($level < 0 || $level > 3) {
  181.                                 showmessage('undefined_action');
  182.                         }
  183. //帖子操作短信通知 hack by xiori 2005-3-18


  184. if($ynmsg==1)
  185.         {
  186. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  187. if($content !=""){$title=$content;}
  188. if ($msg !=""){
  189.         $msg="

  190. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  191.         }
  192.         while($memberid = $db->fetch_array($query)) {

  193. if($level=="0"){if ($updateur != "1") {
  194. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除置顶,且进行了 积分$docredit, 论坛币$domoney 的操作!";
  195. $action_m="解除置顶";
  196.         }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除置顶,没有对您的分值进行操作!";
  197. $action_m="解除置顶";}
  198. }else{if ($updateur != "1") {
  199. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被置顶,且进行了 积分$docredit, 论坛币$domoney 的操作!";
  200. $action_m="置顶";}else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被置顶,没有对您的分值进行操作!";
  201. $action_m="置顶";}}

  202. $msgtext=$msg_1.$msg.$msg_2;
  203. $czsubject=$action_m."主题短消息通知";

  204.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  205.                                 VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  206.         if ($updateur != "1") {
  207.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  208.      }
  209.                                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");       

  210.         }
  211.        
  212. } else{
  213. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  214.         while($memberid = $db->fetch_array($query)) {
  215. if ($updateur != "1") {
  216.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  217. }
  218.         }
  219. }
  220. //帖子操作短信通知 hack by xiori 2005-3-18



  221.                         $db->query("UPDATE $table_threads SET displayorder='$level' WHERE tid IN ($tids)");
  222.                         modlog();
  223.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");

  224.                 }elseif($operation == 'delete' && $allowdelpost) {
  225.                        
  226. ctrl_msg();   //调用函数

  227.                 $uids = $comma = '';
  228.                         $haveattach = 0;
  229.                         $query = $db->query("SELECT authorid ,aid FROM $table_posts WHERE tid IN ($tids)");
  230.                         while($post = $db->fetch_array($query)) {
  231.                                 $uids .= "$comma$post[authorid]";
  232.                                 $comma = ',';
  233.                                 if ($post['aid']) $haveattach++;
  234.                         }
  235.                         updatemember('-', $uids, '0');
  236.             
  237.                         if ($haveattach){
  238.                                 $query = $db->query("SELECT attachment FROM $table_attachments WHERE tid IN ($tids)");
  239.                                 while($attach = $db->fetch_array($query)) {
  240.                                         @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
  241.                                 }
  242.                                 $db->query("DELETE FROM $table_attachments WHERE tid IN ($tids)");
  243.                         }
  244.                        
  245. //帖子操作短信通知 hack by xiori 2005-3-18


  246. if($ynmsg==1)
  247.         {
  248. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  249. if($content !=""){$title=$content;}
  250. if ($msg !=""){
  251.         $msg="

  252. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  253.         }
  254.         while($memberid = $db->fetch_array($query)) {

  255. if ($updateur != "1") {
  256. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被删除,且进行了 积分$docredit, 论坛币$domoney 的操作!";
  257. }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被删除,没有对您的分值进行操作!";
  258. }

  259. $msgtext=$msg_1.$msg.$msg_2;
  260. $czsubject=$action_m."主题短消息通知";
  261.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  262.                                 VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  263.         if ($updateur != "1") {
  264.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  265.      }
  266.                                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");       

  267.         }
  268.        
  269. } else{
  270. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  271.         while($memberid = $db->fetch_array($query)) {
  272. if ($updateur != "1") {
  273.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  274. }
  275.         }
  276. }
  277. //帖子操作短信通知 hack by xiori 2005-3-18

  278.                         $db->query("DELETE FROM $table_threads WHERE tid IN ($tids)");
  279.                         $db->query("DELETE FROM $table_polls WHERE tid IN ($tids)");
  280.                         $db->query("DELETE FROM $table_posts WHERE tid IN ($tids)");
  281.                 if ($forum['type'] == 'sub') {
  282.         updateforumcount($fup['fid']);
  283. }

  284.                         updateforumcount($fid);

  285.                         modlog();
  286.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");

  287.                 }elseif($operation == 'close' && $allowclose){
  288.                        
  289.                         ctrl_msg();   //调用函数
  290.                         $close = $type ? 1 : 0;
  291. //帖子操作短信通知 hack by xiori 2005-3-18


  292. if($ynmsg==1)
  293.         {
  294. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  295. if($content !=""){$title=$content;}
  296. if ($msg !=""){
  297.         $msg="

  298. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  299.         }
  300.         while($memberid = $db->fetch_array($query)) {

  301. if($type=="0"){
  302. if ($updateur != "1") {
  303. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="解除锁定";
  304. }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,没有对您的分值进行操作!";$action_m="解除锁定";
  305. }
  306. }else{if ($updateur != "1") {
  307. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="锁定";
  308. }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,没有对您的分值进行操作!";$action_m="锁定";
  309. }}


  310. $msgtext=$msg_1.$msg.$msg_2;
  311. $czsubject=$action_m."主题短消息通知";

  312.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  313.                                 VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  314.         if ($updateur != "1") {
  315.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  316.      }
  317.                                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");       

  318.         }
  319.        
  320. } else{
  321. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
  322.         while($memberid = $db->fetch_array($query)) {
  323. if ($updateur != "1") {
  324.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  325. }
  326.         }
  327. }
  328. //帖子操作短信通知 hack by xiori 2005-3-18
  329.                         $db->query("UPDATE $table_threads SET closed='$close' WHERE tid in($tids)");
  330.                         modlog();
  331.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");

  332.                 }
  333. /*取消批量加入精华                       
  334.                 elseif($operation == 'digest' && $allowdigest){
  335.                         if($level < 0 || $level > 3) {
  336.                                 showmessage('undefined_action', NULL, 'HALTED');
  337.                         }
  338.                         while($thread = $db->fetch_array($query)) {
  339.                                 if ($thread['fid'] == $fid && $thread['digest']<>$level){
  340.                                         $digest_mark=($level-intval($thread['digest']))*$digestcredits;
  341.                                         $db->query("UPDATE $table_threads SET digest='$level' WHERE tid='$thread[tid]'");
  342.                                         if($digest_mark && $discuz_uid != $thread[authorid]) {
  343.                                                 $db->query("UPDATE $table_members SET credit=credit".($digest_mark > 0 ? '+' : '')."$digest_mark WHERE uid='$thread[authorid]'");
  344.                                         }
  345.                                 }
  346.                         }
  347.                         modlog();
  348.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");
  349.                 }
  350.                
  351. 取消批量加入精华 */               
  352.                 else{
  353.                         showmessage('admin_nopermission', NULL, 'HALTED');
  354.                 }
  355.         }

  356. } elseif($action == 'delpost' && $allowdelpost) {

  357.         if(!is_array($delete) || !count($delete)) {
  358.                 showmessage('admin_delpost_invalid');
  359.         }

  360.         if(!submitcheck('delpostsubmit')) {

  361.                 $query = $db->query("SELECT COUNT(*) FROM $table_posts WHERE tid='$tid'");
  362.                 if(count($delete) < $db->result($query, 0)) {

  363.                         $deleteid = '';
  364.                         foreach($delete as $id) {
  365.                                 $deleteid .= '<input type="hidden" name="delete[]" value="'.$id.'">';
  366.                         }

  367.                         include template('topicadmin_delpost');
  368.                        
  369.                 } else {
  370.                         header("Location: {$boardurl}topicadmin.php?action=delete&fid=$fid&tid=$tid&page=$page&fpage=$fpage");
  371.                 }

  372.         } else {

  373.                 $pids = implode_ids( $delete );
  374.                 ctrl_msg();   //调用函数

  375.                 $uids = $comma = '';
  376.                 $actionpost = $totalpost = $aids = 0;
  377.                 $query = $db->query("SELECT pid, authorid, aid FROM $table_posts WHERE tid='$tid'");
  378.                 $totalpost = $db->num_rows($query);
  379.                 while($post = $db->fetch_array($query)) {
  380.                         if (in_array($post[pid], $delete)){
  381.                                 $uids .= "$comma$post[authorid]";
  382.                                 $comma = ',';
  383.                                 $actionpost ++;
  384.                                 if ($post['aid']) $aids .=','.$post[pid];
  385.                         }
  386.                 }

  387.                 if ($actionpost < 1) {
  388.                         showmessage('admin_delpost_invalid');
  389.                 }elseif($actionpost <> count($delete)){
  390.                         showmessage('admin_moderate_accesserror', NULL, 'HALTED');
  391.                 }elseif($actionpost >= $totalpost ){
  392.                         header("Location: {$boardurl}topicadmin.php?action=delete&fid=$fid&tid=$tid&page=$page&fpage=$fpage");
  393.                 }
  394.                
  395.                 updatemember('-', $uids, '0');

  396. //帖子操作短信通知 hack by xiori 2005-3-18


  397. if($ynmsg==1)
  398.         {
  399. $query = $db->query("SELECT authorid, subject FROM $table_posts WHERE pid IN ($pids)");
  400. $czsubject="删除帖子短消息通知";
  401. if($content !=""){$title=$content;}
  402. if ($msg !=""){
  403.         $msg="

  404. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  405.         }
  406.         while($memberid = $db->fetch_array($query)) {

  407. if ($updateur != "1") {
  408. $msg_1="您在帖子“".$temsubject."”的回贴因[b] ".$title." [/b]而被删除,且进行了 积分$docredit, 论坛币$domoney 的操作!";
  409. }else{$msg_1="您在帖子“".$temsubject."”的回贴因[b] ".$title." [/b]而被删除,没有对您的分值进行操作!";
  410. }

  411. $msgtext=$msg_1.$msg.$msg_2;
  412.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  413.                                 VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  414.                 if ($updateur != "1") {
  415. $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  416.      }
  417.                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");       

  418.         }
  419.        
  420. } else{
  421. $query = $db->query("SELECT authorid FROM $table_posts WHERE pid IN ($pids)");
  422.         while($memberid = $db->fetch_array($query)) {
  423. if ($updateur != "1") {
  424.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  425. }
  426.         }
  427. }
  428. //帖子操作短信通知 hack by xiori 2005-3-18
  429.                 if ($aids){
  430.                         require_once DISCUZ_ROOT.'./include/attachment.php';
  431.                         $query = $db->query("SELECT pid, attachment, filetype FROM $table_attachments WHERE pid IN ($aids)");
  432.                         while($attach = $db->fetch_array($query)) {
  433.                                         @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
  434.                         }
  435.                         $db->query("DELETE FROM $table_attachments WHERE pid IN ($aids)");
  436.                         updatethread_type($tid , $thread['attachment']);
  437.                 }

  438.                 $db->query("DELETE FROM $table_posts WHERE pid IN ($pids)");
  439.                 updatethreadcount($tid);
  440.                 updateforumcount($fid);

  441.                 modlog();
  442.                 showmessage('admin_succeed', "viewthread.php?tid=$tid&page=$page&fpage=$fpage");

  443.         }

  444. } elseif($action == 'highlight' && $allowhighlight) {
  445.         if(!submitcheck('highlightsubmit')) {

  446.                 $string = sprintf('%02d', $thread['highlight']);
  447.                 $stylestr = sprintf('%03b', $string[0]);

  448.                 for($i = 1; $i <= 3; $i++) {
  449.                         $stylecheck[$i] = $stylestr[$i - 1] ? 'checked' : NULL;
  450.                 }
  451.                 $colorcheck = array($string[1] => 'checked');
  452.                
  453.                 include template('topicadmin_highlight');

  454.         } else {

  455.                 $stylebin = '';
  456.                 for($i = 1; $i <= 3; $i++) {
  457.                         $stylebin .= empty($highlight_style[$i]) ? '0' : '1';
  458.                 }
  459.                 $highlight_style = bindec($stylebin);

  460.                 if($highlight_style < 0 || $highlight_style > 7 || $highlight_color < 0 || $highlight_color > 8) {
  461.                         showmessage('undefined_action', NULL, 'HALTED');
  462.                 }
  463.                 $db->query("UPDATE $table_threads SET highlight='$highlight_style$highlight_color' WHERE tid='$tid'");

  464.                 modlog();
  465.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");

  466.         }

  467. }

  468. //=====八种自定义参数标题醒目+任意颜色高亮==start==By www.5466.ik8.com==============

  469. elseif($action == 'xm_highlight' && $allowhighlight) {
  470.         if(!submitcheck('xm_highlightsubmit')) {
  471.       
  472.                 $xm_hl_string=explode(',',$thread['xm_hl']);
  473.                
  474.                 for($i = 1; $i <=10; $i++) {
  475.                         $xu_check[$i] =$i==$xm_hl_string[0] ?  'checked' : NULL;
  476.                                                                         
  477.            }

  478.           if($xm_hl_string[0]){            
  479.            switch($xm_hl_string[0]){
  480.            
  481.            case 1: $xm_id_11=$xm_hl_string[1];$xm_id_12=$xm_hl_string[2];$xm_id_13=$xm_hl_string[3];$xm_id_14=$xm_hl_string[4];
  482.                    break;                                    
  483.            
  484.            case 2:
  485.                    $xm_id_21=$xm_hl_string[1];$xm_id_22=$xm_hl_string[2];$xm_id_23=$xm_hl_string[3];$xm_id_24=$xm_hl_string[4];                  
  486.                    break;
  487.                               
  488.            case 3:
  489.                    $xm_id_31=$xm_hl_string[1];$xm_id_32=$xm_hl_string[2];$xm_id_33=$xm_hl_string[3];$xm_id_34=$xm_hl_string[4];                           
  490.                    break;           
  491.            
  492.            case 4:
  493.                    $xm_id_41=$xm_hl_string[1];$xm_id_42=$xm_hl_string[2];$xm_id_43=$xm_hl_string[3];$xm_id_44=$xm_hl_string[4];                     
  494.                    break;           
  495.                      
  496.            case 5:
  497.                    $xm_id_51=$xm_hl_string[1];$xm_id_52=$xm_hl_string[2];               
  498.                    break;   
  499.            
  500.            case 6:
  501.                    $xm_id_61=$xm_hl_string[1];$xm_id_62=$xm_hl_string[2];$xm_id_63=$xm_hl_string[3];                             
  502.                    break;
  503.            case 7:
  504.                    $xm_id_71=$xm_hl_string[1];$xm_id_72=$xm_hl_string[2];$xm_id_73=$xm_hl_string[3];                             
  505.                    break;
  506.            case 8:
  507.                    $xm_id_81=$xm_hl_string[1];$xm_id_82=$xm_hl_string[2];$xm_id_83=$xm_hl_string[3];                             
  508.                    break;
  509.            case 9:
  510.                    $xm_id_91=$xm_hl_string[1];$xm_id_92=$xm_hl_string[2];                             
  511.                    break;                                                           
  512.                      
  513.            default: break;         
  514.               }
  515.            
  516.            }
  517.         include template('topicadmin_xm_highlight');

  518.         } else {

  519.                 $xm_hl_str = '';
  520.                
  521.                 if($xm_hl_id==1){$xm_hl_str=$xm_hl_id.','.$font_color.','.$font_size.','.$font_style.','.$font_underline;
  522.                
  523.                 }
  524.                
  525.                 else if($xm_hl_id==2){$xm_hl_str=$xm_hl_id.','.$text_color1.','.$text_color2.','.$speed_1.','.$pause_1;
  526.                
  527.                 }
  528.                
  529.                 else if($xm_hl_id==3){ $xm_hl_str=$xm_hl_id.','.$textoffset1.','.$textoffset2.','.$speed_2.','.$pause_2;
  530.                
  531.                 }
  532.                
  533.                 else if($xm_hl_id==4){ $xm_hl_str=$xm_hl_id.','.$textcolor.','.$textsize1.','.$speed_3.','.$pause_3;
  534.                
  535.                 }
  536.                
  537.                 else if($xm_hl_id==5){ $xm_hl_str=$xm_hl_id.','.$sider_color.','.$text_color;
  538.                  
  539.                 }
  540.                
  541.                 else if($xm_hl_id==6){ $xm_hl_str=$xm_hl_id.','.$start_color.','.$start_n.','.$end_color;
  542.                  
  543.                 }
  544.                 else if($xm_hl_id==7){ $xm_hl_str=$xm_hl_id.','.$glow_color1.','.$glow_pow.','.$glow_color2;
  545.                  
  546.                 }
  547.                 else if($xm_hl_id==8){ $xm_hl_str=$xm_hl_id.','.$shadow_color1.','.$shadow_view.','.$shadow_color2;
  548.                  
  549.                 }
  550.                 else if($xm_hl_id==9){ $xm_hl_str=$xm_hl_id.','.$bg_color.','.$face_color;
  551.                  
  552.                 }                                                        
  553.                 else if($xm_hl_id==10){ $xm_hl_str=$xm_hl_id;
  554.                  
  555.                 }                        
  556.                
  557.                 else if($xm_hl_id==11){ $xm_hl_str='';
  558.                
  559.                 }        
  560.                         
  561.                 else showmessage('undefined_action');
  562.                
  563.                
  564.                 if(strlen($xm_hl_str)>25){ $xm_hl_str=substr($xm_hl_str,0, 25);}
  565.                
  566.                
  567.                 $db->query("UPDATE $table_threads SET xm_hl='$xm_hl_str' WHERE tid='$tid'");

  568.                 modlog();
  569.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");
  570.    
  571.         }

  572. }

  573. //=====八种自定义参数标题醒目+任意颜色高亮==end==By lu5266=====================

  574. elseif($action == 'digest' && $allowdigest) {
  575.         if(!submitcheck('digestsubmit')) {

  576.                 include template('topicadmin_digest');

  577.         } else {

  578.                 if($level < 0 || $level > 3) {
  579.                         showmessage('undefined_action', NULL, 'HALTED');
  580.                 }

  581.                 $db->query("UPDATE $table_threads SET digest='$level' WHERE tid='$tid'");

  582.                         ctrl_msg();   //调用函数
  583. //帖子操作短信通知 hack by xiori 2005-3-18


  584. if($ynmsg==1)
  585.         {
  586. if($content !=""){$title=$content;}
  587. if ($msg !=""){
  588.         $msg="

  589. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  590.         }

  591. if($level > 0){
  592. if ($updateur != "1") {
  593. $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被加入了精华,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="加入精华";
  594. }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被加入精华,没有对您的分值进行操作!";$action_m="加入精华";
  595. }
  596. }else{if ($updateur != "1") {
  597. $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除精华,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="解除精华";
  598. }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除精华,没有对您的分值进行操作!";$action_m="解除精华";
  599. }}


  600. $msgtext=$msg_1.$msg.$msg_2;
  601. $czsubject=$action_m."短消息通知";

  602.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  603.                                 VALUES('$discuz_user', '$discuz_uid', '$thread[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  604.        
  605.         if ($updateur != "1") {
  606.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");   
  607.      }
  608.                                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$thread[authorid]'");       

  609.        
  610.        
  611. } else{
  612. if ($updateur != "1") {
  613.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");  
  614. }
  615.         }

  616. //帖子操作短信通知 hack by xiori 2005-3-18

  617. /*        禁止根据精华级别进行加积分


  618.                 $digest_mark=($level-intval($thread['digest']))*$digestcredits;

  619.                 if($digest_mark && $discuz_uid != $thread['authorid'] ) {
  620.                         $db->query("UPDATE $table_members SET credit=credit".($digest_mark > 0 ? '+' : '')."$digest_mark WHERE uid='$thread[authorid]'");
  621.                 }
  622. */
  623.                 modlog();
  624.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");

  625.         }

  626. } elseif($action == 'recount') {

  627.         $query = $db->query("SELECT COUNT(*) FROM $table_posts WHERE tid='$tid'");
  628.         $replies = $db->result($query, 0) - 1;

  629.         $query  = $db->query("SELECT author, dateline FROM $table_posts WHERE tid='$tid' ORDER BY dateline DESC LIMIT 1");
  630.         $post = $db->fetch_array($query);

  631.         $db->query("UPDATE $table_threads SET replies='$replies', lastpost='$post[dateline]', lastposter='".addslashes($post['author'])."' WHERE tid='$tid'");
  632.         showmessage('admin_succeed', "viewthread.php?tid=$tid&fpage=$fpage");

  633. } elseif($action == 'delete'  && $allowdelpost) {
  634.         if(!submitcheck('deletesubmit')) {

  635.                 include template('topicadmin_delete');

  636.         } else {
  637.                         ctrl_msg();   //调用函数

  638.                 $uids = $comma = '';
  639.                 $query = $db->query("SELECT authorid,aid FROM $table_posts WHERE tid='$tid'");
  640.                 $aids = 0;
  641.                 while($post = $db->fetch_array($query)) {
  642.                         $uids .= "$comma$post[authorid]";
  643.                         $comma = ',';
  644.                         if ($post['aid']) $aids++;
  645.                 }
  646.                 updatemember('-', $uids, '0');



  647. if($ynmsg==1)
  648.         {
  649. $czsubject="删除主题短消息通知";
  650. if($content !=""){$title=$content;}
  651. if ($msg !=""){
  652.         $msg="

  653. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  654.         }
  655. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid'");
  656.         while($memberidz = $db->fetch_array($query)) {
  657. if ($updateur != "1") {
  658. $msg_1="您发表的帖子“".$memberidz[subject]."“因[b] ".$title." [/b]而被删除,且进行了 积分$docredit, 论坛币$domoney 的操作!";
  659. }else{$msg_1="您发表的帖子“".$memberidz[subject]."“因[b] ".$title." [/b]而被删除,没有对您的分值进行操作!";
  660. }

  661. $msgtext=$msg_1.$msg.$msg_2;
  662.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  663.                                 VALUES('$discuz_user', '$discuz_uid', '$memberidz[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  664.                                         $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberidz[authorid]'");                }
  665.   

  666. $query = $db->query("SELECT authorid, subject FROM $table_posts WHERE tid='$tid'");

  667.         while($memberid = $db->fetch_array($query)) {

  668. if ($updateur != "1") {
  669.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  670.      }
  671.         }
  672.        
  673. } else{
  674. $query = $db->query("SELECT authorid, subject FROM $table_posts WHERE tid='$tid'");
  675.         while($memberid = $db->fetch_array($query)) {
  676. if ($updateur != "1") {
  677.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  678. }
  679.         }
  680. }
  681. //帖子操作短信通知 hack by xiori 2005-3-18



  682.                 $db->query("DELETE FROM $table_threads WHERE tid='$tid'");
  683.                 $db->query("DELETE FROM $table_posts WHERE tid='$tid'");
  684.                 $db->query("DELETE FROM $table_polls WHERE tid='$tid'");
  685.                 if ($aids){
  686.                         $query = $db->query("SELECT attachment FROM $table_attachments WHERE tid='$tid'");
  687.                         while($attach = $db->fetch_array($query)) {
  688.                                 @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
  689.                         }
  690.                         $db->query("DELETE FROM $table_attachments WHERE tid='$tid'");
  691.                 }
  692.                
  693.                 updateforumcount($fid);
  694.                 if ($forum['type'] == 'sub') {
  695.                         updateforumcount($fup['fid']);
  696.                 }

  697.                 modlog();
  698.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");

  699.         }

  700. } elseif($action == 'close' && $allowclose) {

  701.         if(!submitcheck('closesubmit')) {

  702.                 include template('topicadmin_openclose');

  703.         } else {
  704.                 ctrl_msg();   //调用函数
  705.                 $openclose = $thread['closed'] ? 0 : 1;
  706.                 $db->query("UPDATE $table_threads SET closed='$openclose' WHERE tid='$tid' AND fid='$fid'");

  707. //帖子操作短信通知 hack by xiori 2005-3-18


  708. if($ynmsg==1)
  709.         {
  710. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
  711. if($content !=""){$title=$content;}
  712. if ($msg !=""){
  713.         $msg="

  714. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  715.         }
  716.         while($memberid = $db->fetch_array($query)) {

  717. if($type=="0"){
  718. if ($updateur != "1") {
  719. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="解除锁定";
  720. }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,没有对您的分值进行操作!";$action_m="解除锁定";
  721. }
  722. }else{if ($updateur != "1") {
  723. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="锁定";
  724. }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,没有对您的分值进行操作!";$action_m="锁定";
  725. }}


  726. $msgtext=$msg_1.$msg.$msg_2;
  727. $czsubject=$action_m."主题短消息通知";

  728.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  729.                                 VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  730.         if ($updateur != "1") {
  731.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  732.      }
  733.                                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");       

  734.         }
  735.        
  736. } else{
  737. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
  738.         while($memberid = $db->fetch_array($query)) {
  739. if ($updateur != "1") {
  740.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  741. }
  742.         }
  743. }
  744. //帖子操作短信通知 hack by xiori 2005-3-18



  745.                 modlog();
  746.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");
  747.         }

  748. } elseif($action == 'move'  && $allowmove) {

  749.         if(!submitcheck('movesubmit')) {

  750.                 require_once DISCUZ_ROOT.'./include/forum.php';

  751.                 $forumselect = forumselect();
  752.                 include template('topicadmin_move');

  753.         } else {

  754.                 if(!$moveto) {
  755.                         showmessage('admin_move_invalid');
  756.                 }


  757.                 $displayorderadd = !$adminglobal ? ", displayorder='0'" : NULL;

  758. ctrl_msg();   //调用函数


  759.         $query= $db->query("SELECT name FROM $table_forums WHERE fid=$fid");
  760.         while($result = $db->fetch_array($query))
  761.         {
  762.             $czfirstfn = $result['name'];
  763.         }
  764.          
  765.         $query= $db->query("SELECT name FROM $table_forums WHERE fid=$moveto");
  766.         while($result = $db->fetch_array($query))
  767.         {
  768.             $czsecondfn = $result['name'];
  769.         }
  770. //帖子操作短信通知 hack by xiori 2005-3-18


  771. if($ynmsg==1)
  772.         {
  773. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
  774. $czsubject="移动主题短消息通知";
  775. if($content !=""){$title=$content;}
  776. if ($msg !=""){
  777.         $msg="

  778. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  779.         }
  780.         while($memberid = $db->fetch_array($query)) {

  781. if ($updateur != "1") {
  782. $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,且进行了 积分$docredit, 论坛币$domoney 的操作!";
  783. }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,没有对您的分值进行操作!";
  784. }

  785. $msg_3="\n\n你的贴子由\n\n $czfirstfn  版块\n\n移到\n\n $czsecondfn  版块";
  786. $msgtext=$msg_1.$msg.$msg_3.$msg_2;
  787.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  788.                                 VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  789.                 if ($updateur != "1") {
  790. $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");   
  791.      }
  792.                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");       

  793.         }
  794.        
  795. } else{
  796. $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
  797.         while($memberid = $db->fetch_array($query)) {
  798. if ($updateur != "1") {
  799.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");  
  800. }
  801.         }
  802. }
  803. //帖子操作短信通知 hack by xiori 2005-3-18




  804.                 if($type == 'normal') {
  805.                         $db->query("UPDATE $table_threads SET fid='$moveto' $displayorderadd WHERE tid='$tid' AND fid='$fid'");
  806.                         $db->query("UPDATE $table_posts SET fid='$moveto' WHERE tid='$tid' AND fid='$fid'");
  807.                 }

  808.                 if ($forum['type'] == 'sub') {
  809.                         $query= $db->query("SELECT fup FROM $table_forums WHERE fid='$fid' LIMIT 1");
  810.                         $fup = $db->result($query, 0);
  811.                         updateforumcount($fup);
  812.                 }

  813.                 modlog();
  814.                 updateforumcount($moveto);
  815.                 updateforumcount($fid);
  816.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");
  817.         }

  818. } elseif($action == 'top' && $allowtop) {

  819.         if(!submitcheck('topsubmit')) {

  820.                 include template('topicadmin_topuntop');

  821.         } else {

  822.                 if($level < 0 || $level > 3) {
  823.                         showmessage('undefined_action');
  824.                 }
  825. ctrl_msg();   //调用函数
  826. //帖子操作短信通知 hack by xiori 2005-3-18


  827. if($ynmsg==1)
  828.         {
  829. if($content !=""){$title=$content;}
  830. if ($msg !=""){
  831.         $msg="

  832. 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
  833.         }

  834. if($level > 0){
  835. if ($updateur != "1") {
  836. $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被置顶,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="置顶";
  837. }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被置顶,没有对您的分值进行操作!";$action_m="置顶";
  838. }
  839. }else{if ($updateur != "1") {
  840. $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除置顶,且进行了 积分$docredit, 论坛币$domoney 的操作!";$action_m="解除置顶";
  841. }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除置顶,没有对您的分值进行操作!";$action_m="解除置顶";
  842. }}


  843. $msgtext=$msg_1.$msg.$msg_2;
  844. $czsubject=$action_m."短消息通知";

  845.         $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  846.                                 VALUES('$discuz_user', '$discuz_uid', '$thread[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
  847.        
  848.         if ($updateur != "1") {
  849.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");   
  850.      }
  851.                                 $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$thread[authorid]'");       

  852.        
  853.        
  854. } else{
  855. if ($updateur != "1") {
  856.                                 $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");  
  857. }
  858.         }

  859. //帖子操作短信通知 hack by xiori 2005-3-18
  860.                 $db->query("UPDATE $table_threads SET displayorder='$level' WHERE tid='$tid' AND fid='$fid'");

  861.                 modlog();
  862.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");

  863.         }

  864. } elseif($action == 'getip' && $allowviewip) {

  865.         require_once DISCUZ_ROOT.'./include/misc.php';

  866.         $query = $db->query("SELECT m.adminid, p.useip FROM $table_posts p
  867.                                 LEFT JOIN $table_members m ON m.uid=p.authorid
  868.                                 WHERE pid='$pid' AND tid='$tid'");
  869.         if(!$member = $db->fetch_array($query)) {
  870.                 showmessage('thread_nonexistence', NULL, 'HALTED');
  871.         } elseif(($member['adminid'] == 1 && $adminid > 1) || ($member['adminid'] == 2 && $adminid > 2)) {
  872.                 showmessage('admin_getip_nopermission', NULL, 'HALTED');
  873.         }

  874.         $member['iplocation'] = convertip($member['useip']);

  875.         include template('topicadmin_getip');

  876. } elseif($action == 'bump') {

  877.         if(!submitcheck('bumpsubmit')) {

  878.                 include template('topicadmin_bump');

  879.         } else {

  880.                 $query = $db->query("SELECT subject, lastposter, lastpost FROM $table_threads WHERE tid='$tid' LIMIT 1");
  881.                 $thread = $db->fetch_array($query);
  882.                 $thread[lastposter] = addslashes($thread['lastposter']);
  883.                 $db->query("UPDATE $table_threads SET lastpost='$timestamp' WHERE tid='$tid' AND fid='$fid'");
  884.                 $db->query("UPDATE $table_forums SET lastpost='$thread[subject]\t$timestamp\t$thread[lastposter]' WHERE fid='$fid' $fupadd");

  885.                 modlog();
  886.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");

  887.         }

  888. } elseif($action == 'split' && $allowsplit) {

  889. require_once DISCUZ_ROOT.'./include/discuzcode.php';
  890.       if(!submitcheck('splitsubmit')) {

  891.                 $replies = $thread['replies'];
  892.                 if($replies <= 0) {
  893.                         showmessage('admin_split_invalid');
  894.                 }

  895.                 $postlist = array();
  896.                 $query = $db->query("SELECT * FROM $table_posts WHERE tid='$tid' ORDER BY dateline");
  897.                 while($post = $db->fetch_array($query)) {
  898.                         $post['message'] = postify($post['message'], $post['smileyoff'], $post['bbcodeoff']);
  899.                         $postlist[] = $post;
  900.                 }

  901.                 include template('topicadmin_split');

  902.         } else {

  903.                 if(!trim($subject)) {
  904.                         showmessage('admin_split_subject_invalid');
  905.                 }
  906.                 $subject = $subject ? dhtmlspecialchars(censor(trim($subject))) :'';

  907.                 $pids = implode_ids( $split );

  908.                 if($pids) {

  909.                         $db->query("INSERT INTO $table_threads (fid, subject) VALUES ('$fid', '$subject')");
  910.                         $newtid = $db->insert_id();

  911.                         $db->query("UPDATE $table_posts SET tid='$newtid' WHERE pid IN ($pids)");
  912.                         $db->query("UPDATE $table_attachments SET tid='$newtid' WHERE pid IN ($pids)");

  913.                         $query = $db->query("SELECT author, authorid, dateline FROM $table_posts WHERE tid='$tid' ORDER BY dateline ASC LIMIT 1");
  914.                         $fpost = $db->fetch_array($query);
  915.                         $db->query("UPDATE $table_threads SET author='$fpost[author]', authorid='$fpost[authorid]', dateline='$fpost[dateline]' WHERE tid='$tid'");

  916.                         $query = $db->query("SELECT author, authorid, dateline FROM $table_posts WHERE tid='$newtid' ORDER BY dateline ASC LIMIT 1");
  917.                         $fpost = $db->fetch_array($query);
  918.                         $db->query("UPDATE $table_threads SET author='$fpost[author]', authorid='$fpost[authorid]', dateline='$fpost[dateline]' WHERE tid='$newtid'");

  919.                         updatethreadcount($tid);
  920.                         updatethreadcount($newtid);
  921.                         updateforumcount($fid);

  922.                         modlog();
  923.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");

  924.                 } else {
  925.                         showmessage('admin_split_new_invalid');
  926.                 }
  927.         }

  928. } elseif($action == 'merge' && $allowmerge) {

  929.         if(!submitcheck('mergesubmit')) {

  930.                 include template('topicadmin_merge');

  931.         } else {

  932.                 $query = $db->query("SELECT fid, views, replies FROM $table_threads WHERE tid='$othertid'");
  933.                 if(!$other = $db->fetch_array($query)) {
  934.                         showmessage('admin_merge_nonexistence');
  935.                 }
  936.                 if(!$adminglobal && $other['fid'] != $forum['fid']) {
  937.                         showmessage('admin_merge_invalid');
  938.                 }

  939.                 $other['views'] = intval($other['views']);
  940.                 $other['replies']++;

  941.                 $db->query("UPDATE $table_posts SET tid='$tid' WHERE tid='$othertid'");
  942.                 $postsmerged = $db->affected_rows();

  943.                 $db->query("UPDATE $table_attachments SET tid='$tid' WHERE tid='$othertid'");
  944.                 $db->query("DELETE FROM $table_threads WHERE tid='$othertid'");
  945.                 $db->query("UPDATE $table_threads SET views=views+$other[views], replies=replies+$other[replies] WHERE tid='$tid'");
  946.                
  947.                 if($fid == $other['fid']) {
  948.                         $db->query("UPDATE $table_forums SET threads=threads-1 WHERE fid='$fid' $fupadd");
  949.                 } else {
  950.                         $db->query("UPDATE $table_forums SET threads=threads-1, posts=posts-$postsmerged WHERE fid='$other[fid]'");
  951.                         $db->query("UPDATE $table_forums SET posts=$posts+$postsmerged WHERE fid='$fid' $fupadd");
  952.                 }

  953.                 modlog();
  954.                 showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");

  955.         }

  956. }elseif($action == 'seeip' && $allowviewip) {

  957.         require_once DISCUZ_ROOT.'./include/misc.php';

  958.         if(!$isadmin) {
  959.                 showmessage('admin_getip_nopermission', NULL, 'HALTED');
  960.         }
  961.         $member['useip']=$useip;
  962.         $member['iplocation'] = convertip($member['useip']);

  963.         include template('topicadmin_getip');

  964. } else {

  965.         showmessage('admin_nopermission', NULL, 'HALTED');

  966. }

  967. function modlog($action = '') {
  968.         global $discuz_user, $groupid, $adminid, $onlineip, $timestamp, $forum, $thread, $operation, $tids;

  969.         if(!$action) {
  970.                 $action = $GLOBALS['action'];
  971.         }
  972.         if (!$thread['tid']) $thread['tid']=intval($GLOBALS['tid']);
  973.         if ($action == 'moderate'){
  974.                 $action .='_'.$operation;
  975.                 $thread[subject] = $tids;
  976.                 $thread[tid] = 0;
  977.         }
  978.         @$fp = fopen(DISCUZ_ROOT.'./forumdata/modslog.php', 'a');
  979.         @flock($fp, 2);
  980.         @fwrite($fp, "$timestamp\t$discuz_user\t$groupid\t$onlineip\t$forum[fid]\t$forum[name]\t$thread[tid]\t$thread[subject]\t$action\n");
  981.         @fclose($fp);
  982. }

  983. function accesscheck($query) {
  984.         global $db,$fid;
  985.         while($thread = $db->fetch_array($query)) {
  986.                 if($thread['fid'] <> $fid){
  987.                         showmessage('admin_moderate_accesserror', NULL, 'HALTED');
  988.                 }
  989.         }
  990. }

  991. ?>



复制代码

[ 本帖最后由 hyelan 于 2005-10-10 18:39 编辑 ]
回复

使用道具 举报

hyelan 发表于 2005-10-10 18:35:09 | 显示全部楼层

forumdisplay.php 和 viewthread.htm


  1. <?php

  2. /*
  3. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. :: [DISCUZ!]  Crossday Discuz! Board                                    ::
  5. :: (c) 2001-2005 Comsenz Technology Ltd (www.discuz.com)                ::
  6. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  7. :: Author:  Crossday (tech@discuz.com) Cnteacher (cnteacher@discuz.com) ::
  8. :: Version: 2.5F   2004/10/01 05:15                                     ::
  9. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  10. */
  11. //fix:  BY pk0909
  12. /*
  13. 1 公告作者连接问题
  14. 2 accessmask的问题
  15. */

  16. define('CURRSCRIPT',  'forumdisplay');

  17. require './include/common.php';
  18. require DISCUZ_ROOT.'./include/forum.php';
  19. require_once DISCUZ_ROOT.'./include/discuzcode.php';

  20. $discuz_action = 2;

  21. if(isset($showoldetails)) {
  22.         switch ($showoldetails) {
  23.                 case 'no': setcookie('onlinedetail', 0, $timestamp + 86400 * 365, $cookiepath, $cookiedomain); break;
  24.                 case 'yes': setcookie('onlinedetail', 1, $timestamp + 86400 * 365, $cookiepath, $cookiedomain); break;
  25.         }
  26. } else {
  27.         $showoldetails = false;
  28. }

  29. if(!$forum['fid'] || $forum['type'] == 'group' || ($adminid<>1 && !$forum[status])) {
  30.         showmessage('forum_nonexistence', NULL, 'HALTED');
  31. }

  32. if($forum['type'] == 'forum') {
  33.         $navigation = "&raquo; $forum[name]";
  34.         $navtitle = ' - '.strip_tags($forum['name']);
  35. } else {
  36.         $forumup = $_DCACHE['forums'][$forum['fup']]['name'];
  37.         $navigation = "&raquo; <a href="forumdisplay.php?fid=$forum[fup]">$forumup</a> &raquo; $forum[name]";
  38.         $navtitle = ' - '.strip_tags($forumup).' - '.strip_tags($forum['name']);
  39. }

  40. if($forum['password'] && $action == 'pwverify') {
  41.         if($pw != $forum['password']) {
  42.                 showmessage('forum_passwd_incorrect', NULL, 'HALTED');
  43.         } else {
  44.                 setcookie("fidpw$fid", $pw, 0, $cookiepath, $cookiedomain);
  45.                 showmessage('forum_passwd_correct', "forumdisplay.php?fid=$fid");
  46.         }
  47. }

  48. if($forum['viewperm'] && !strstr($forum['viewperm'], "\t$groupid\t") && !$forum['allowview']) {
  49.         showmessage('forum_nopermission', NULL, 'HALTED');
  50. }

  51. if(!empty($forum['password']) && $forum['password'] != $_COOKIE["fidpw$fid"]) {
  52.         include template('forumdisplay_passwd');
  53.         exit();
  54. }

  55. $ismoderator = modcheck($discuz_user);
  56. $moderatedby = moddisplay($forum['moderator'], 'forumdisplay');

  57. $postcredits = $forum['postcredits'] != -1 ? $forum['postcredits'] : $postcredits;
  58. $replycredits = $forum['replycredits'] != -1 ? $forum['replycredits'] : $replycredits;

  59. $subexists = 0;
  60. foreach($_DCACHE['forums'] as $sub) {
  61.         if($sub['type'] == 'sub' && $sub['fup'] == $fid && ($accessmasks || !$hideprivate || !$sub['viewperm'] || strstr($sub['viewperm'], "\t$groupid\t") || strstr($sub['users'], "\t$discuz_uid\t"))) {
  62.                 $sublist = array();
  63.                 $sql = $accessmasks        ? "SELECT f.fid, f.fup, f.type, f.icon, f.name, f.description, f.moderator, f.threads, f.posts, f.lastpost, f.viewperm, a.allowview FROM $table_forums f
  64.                                                 LEFT JOIN $table_access a ON a.uid='$discuz_uid' AND a.fid=f.fid
  65.                                                 WHERE fup='$fid' AND status='1' AND type='sub' ORDER BY f.displayorder"
  66.                                         : "SELECT fid, fup, type, icon, name, description, moderator, threads, color, posts, lastpost, viewperm FROM $table_forums WHERE fup='$fid' AND status='1' AND type='sub' ORDER BY displayorder";
  67.                 $query = $db->query($sql);
  68.                 while($sub = $db->fetch_array($query)) {
  69.                         if(forum($sub)) {
  70.                                 $sublist[] = $sub;
  71.                                 $subexists = 1;
  72.                         }
  73.                 }
  74.                 break;
  75.         }
  76. }

  77. $page = intval($page) ? intval($page) : 1;
  78. $start_limit = ($page - 1) * $tpp;

  79. $announcement_list = array();
  80. if($page == 1  && $_DCACHE['announcements_forum']) {
  81.         foreach($_DCACHE['announcements_forum'] as $ann) {
  82.                 $ann['authorencode'] = rawurlencode($ann['author']);
  83.                 $ann['starttime'] = gmdate("$dateformat $timeformat", $ann['starttime'] + ($timeoffset * 3600));
  84.                 $announcement_list[] = $ann ;
  85.         }
  86. }       

  87. $forumdisplayadd = $filteradd = '';
  88. if(!empty($filter)) {
  89.         if(is_numeric($filter)) {
  90.                 $forumdisplayadd .= "&filter=$filter";
  91.                 $filteradd = "AND lastpost>='".($timestamp - $filter)."'";
  92.         } elseif($filter == 'digest') {
  93.                 $forumdisplayadd .= "&filter=digest";
  94.                 $filteradd = "AND digest>'0'";
  95.         }
  96. } else {
  97.         $filter = '';
  98. }

  99. $ascdesc == 'ASC' ? $forumdisplayadd .= "&ascdesc=$ascdesc" : $ascdesc = 'DESC';


  100. if($whosonlinestatus == 2 || $whosonlinestatus == 3) {
  101.         $whosonlinestatus = 0;
  102.         $onlineinfo = explode("\t", $onlinerecord);
  103.         $detailstatus = ((!isset($_COOKIE['onlinedetail']) && $onlineinfo[0] < 500) || ($_COOKIE['onlinedetail'] || $showoldetails == 'yes')) && $showoldetails != 'no';

  104.         if($detailstatus) {
  105.                 updatesession();
  106.                 @include language('actions');

  107.                 $whosonline = array();
  108.                 $forumname = strip_tags($forum['name']);
  109.                 $query = $db->query("SELECT uid, groupid, username, invisible, lastactivity, action FROM $table_sessions WHERE uid>'0' AND fid='$fid' AND invisible='0'");
  110.                 if($db->num_rows($query)) {
  111.                         $whosonlinestatus = 1;
  112.                         while($online = $db->fetch_array($query)) {
  113.                                 $online['icon'] = isset($_DCACHE['onlinelist'][$online['groupid']]) ? $_DCACHE['onlinelist'][$online['groupid']] : $_DCACHE['onlinelist'][0];
  114.                                 $online['action'] = $actioncode[$online['action']];
  115.                                 $online['lastactivity'] = gmdate($timeformat, $online['lastactivity'] + ($timeoffset * 3600));
  116.                                 $whosonline[] = $online;     
  117.                         }
  118.                 }
  119.                 unset($online);
  120.         }
  121. } else {
  122.         $whosonlinestatus = 0;
  123. }

  124. if($discuz_uid && $newpm) {
  125.         require DISCUZ_ROOT.'./include/pmprompt.php';
  126. }

  127. if(!empty($filter)) {
  128.         $query = $db->query("SELECT COUNT(*) FROM $table_threads WHERE fid='$fid' $filteradd");
  129.         $threadcount = $db->result($query, 0);
  130. } else {
  131.         $threadcount = $forum['threads'];
  132. }

  133. $multipage = multi($threadcount, $tpp, $page, "forumdisplay.php?fid=$fid$forumdisplayadd");

  134. $separatepos = 0;
  135. $threadlist = array();
  136. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  137. $query = $db->query("SELECT  t.* FROM $table_threads t USE INDEX(displayorder)
  138.                         WHERE t.fid='$fid' $filteradd
  139.                         ORDER BY t.displayorder DESC, t.lastpost $ascdesc
  140.                         LIMIT $start_limit, $tpp ");

  141. while($thread = $db->fetch_array($query)) {
  142.         $thread['icon'] = isset($_DCACHE['icons'][$thread['iconid']]) ? '<img src="'.SMDIR.'/'.$_DCACHE['icons'][$thread['iconid']].'" align="absmiddle">' : '&nbsp;';
  143.         $thread['lastposterenc'] = rawurlencode($thread['lastposter']);

  144.         $postsnum = $thread['replies'] + 1;
  145.         if($postsnum  > $ppp) {
  146.                 $pagelinks = '';
  147.                 $topicpages = ceil($postsnum / $ppp);
  148.                 for ($i = 1; $i <= $topicpages; $i++) {
  149.                         $pagelinks .= "<a href="viewthread.php?tid=$thread[tid]&page=$i&fpage=$page">$i</a> ";
  150.                         if($i == 6) {
  151.                                 $i = $topicpages + 1;
  152.                         }
  153.                 }
  154.                 if($topicpages > 6) {
  155.                         $pagelinks .= " .. <a href="viewthread.php?tid=$thread[tid]&page=$topicpages&fpage=$page">$topicpages</a> ";
  156.                 }
  157.                 $thread['multipage'] = '&nbsp; &nbsp;( <img src="'.IMGDIR.'/multipage.gif" align="absmiddle" boader="0"> '.$pagelinks.')';
  158.         } else {
  159.                 $thread['multipage'] = '';
  160.         }

  161.         if($thread['highlight']) {
  162.                 $string = sprintf('%02d', $thread['highlight']);
  163.                 $stylestr = sprintf('%03b', $string[0]);

  164.                 $thread['highlight'] = 'style="';
  165.                 $thread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  166.                 $thread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  167.                 $thread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  168.                 $thread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  169.                 $thread['highlight'] .= '"';
  170.         } else {
  171.                 $thread['highlight'] = '';
  172.         }

  173. //=====八种自定义参数标题醒目+任意颜色高亮==start==By www.5466.ik8.com==============


  174.    
  175.    if($thread['xm_hl']) {
  176.         
  177.            $xm_hl_string=explode(',',$thread['xm_hl']);
  178.            
  179.            switch($xm_hl_string[0]){
  180.            
  181.            case 1:
  182.                   $xm_hl_style  = '<font style="';
  183.                   $xm_hl_style .= $xm_hl_string[1] ? 'color: #'.$xm_hl_string[1].'; ' : '';        
  184.                       $xm_hl_style .= $xm_hl_string[2] ? 'font-weight: bold;' : '';
  185.                       $xm_hl_style .= $xm_hl_string[3] ? 'font-style: italic;' : '';
  186.                       $xm_hl_style .= $xm_hl_string[4] ? 'text-decoration: underline;' : '';               
  187.                       $xm_hl_style .= '">';
  188.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  189.                       break;
  190.            case 2:
  191.                   $xm_hl_style  = '<font textcolor1="#'.$xm_hl_string[1].'"  textbkcolor1="transparent" textcolor2="#'.$xm_hl_string[2];
  192.                   $xm_hl_style .='" textbkcolor2="transparent" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
  193.                   $xm_hl_style .='" style="behavior:url(include/z_FlashText.htc);color:#c000c0;background-color:transparent">';
  194.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  195.                       break;
  196.            case 3:
  197.                   $xm_hl_style  = '<font textoffset1="'.$xm_hl_string[1].'" textoffset2="'.$xm_hl_string[2];
  198.                   $xm_hl_style .='" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
  199.                   $xm_hl_style .='" style="behavior:url(include/z_WaveText.htc);color:#FF5500;background-color:transparent">';
  200.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  201.                       break;                     
  202.            case 4:
  203.                   $xm_hl_style  = '<font textcolor="#'.$xm_hl_string[1].'" basesize="12" textsize1="'.$xm_hl_string[2];
  204.                   $xm_hl_style .='" textsize2="14" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
  205.                   $xm_hl_style .='" style="behavior:url(include/z_ResizeText.htc);color:#993300;background-color:transparent;">';
  206.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  207.                       break;                           
  208.            case 5:
  209.                   $xm_hl_style  = '<span style=\'border:solid 1px #'.$xm_hl_string[1].';border-left-width:5px;border-left-color:#'.$xm_hl_string[1];
  210.                   $xm_hl_style .=';background:#ffffff;padding:1px 5px 2px 5px;font-size: 8pt\'><font color="#'.$xm_hl_string[2];
  211.                   $xm_hl_style .='">';
  212.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font></span>';
  213.                       break;
  214.            case 6:
  215.                   $start_str=substr($thread[subject],0,$xm_hl_string[2]);
  216.                   $end_str=substr($thread[subject],$xm_hl_string[2]);
  217.                   if($xm_hl_string[3])
  218.                   $thread[subject]  = '<font color="'.$xm_hl_string[1].'">'.$start_str.'</font><font color="'.$xm_hl_string[3].'">'.$end_str.'</font>';                     
  219.               else
  220.               $thread[subject]  = '<font color="'.$xm_hl_string[1].'">'.$start_str.'</font>'.$end_str;
  221.               break;
  222.            case 7:
  223.                   $xm_hl_style  = '<font style="filter: glow(color=#'.$xm_hl_string[1].',strength='.$xm_hl_string[2];
  224.                   $xm_hl_style .='); height:20px; color: #'.$xm_hl_string[3];
  225.                   $xm_hl_style .='">';
  226.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  227.                       break;
  228.            case 8:
  229.                   $xm_hl_style  = '<font style="filter: shadow(color=#'.$xm_hl_string[1].',direction='.$xm_hl_string[2];
  230.                   $xm_hl_style .='); height:20px; color: #'.$xm_hl_string[3];
  231.                   $xm_hl_style .='">';
  232.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  233.                       break;
  234.            case 9:
  235.                   $xm_hl_style  = '<font style="background-color: #'.$xm_hl_string[1].';" color="#'.$xm_hl_string[2].'"><b>';
  236.                   $thread[subject]=$xm_hl_style.$thread[subject].'</b></font>';
  237.                       break;                                            
  238.            case 10:                  
  239.                       $thread[subject]='<span style="behavior:url(./include/rainbow.htc)">'.$thread[subject].'</span>';
  240.                       break;              
  241.          default:  $thread[subject]=$thread[subject];   
  242.                    }   
  243.         
  244.         
  245.         }
  246. //=====八种自定义参数标题醒目+任意颜色高亮==end==By lu5266=====================


  247.         if($thread['closed']) {
  248.                 $thread['new'] = 0;
  249.                 if($thread['closed'] > 1) {
  250.                         $thread['moved'] = $thread['tid'];
  251.                         $thread['tid'] = $thread['closed'];
  252.                         $thread['replies'] = '-';
  253.                         $thread['views'] = '-';
  254.                 } else {
  255.                         $thread['moved'] = 0;
  256.                 }
  257.                 $thread['folder'] = 'lock_folder.gif';
  258.         } else {
  259.                 $thread['folder'] = 'folder.gif';
  260.                 if($lastvisit < $thread['lastpost'] && !strstr($_COOKIE['oldtopics'], "\t$thread[tid]\t")) {
  261.                         $thread['new'] = 1;
  262.                         $thread['folder'] = 'red_'.$thread['folder'];
  263.                 } else {
  264.                         $thread['new'] = 0;
  265.                 }
  266.                 if($thread['replies'] > $thread['views']) {
  267.                         $thread['views'] = $thread['replies'];
  268.                 }
  269.                 if($thread['replies'] >= $hottopic) {
  270.                         $thread['folder'] = 'hot_'.$thread['folder'];
  271.                 }
  272.         }

  273.         if($thread['attachment']) {
  274.                 require_once DISCUZ_ROOT.'./include/attachment.php';
  275.                 $thread['attachment'] = attachtype($thread['attachment']).' ';
  276.         } else {
  277.                 $thread['attachment'] = '';
  278.         }
  279.         //$thread[subject] = cutstr($thread[subject],77);
  280.        //==========标题使用DZ代码===================================by lu5266==========
  281.         $thread[subject] = postify($thread[subject],1,0,0,0,1,0);
  282.         //==========标题使用DZ代码===================================by lu5266==========
  283.         $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
  284.         $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);
  285.         $thread['flower']=$thread['flower']>0?$thread['flower']="<img border=0 title='鲜花数:".$thread['flower']."' src='images/common/flower.gif' align=absmiddle>":'';
  286.         $thread['egg']=$thread['egg']>0?$thread['egg']="<img border=0 title='鸡蛋数:".$thread['egg']."' src='images/common/eggs.gif' align=absmiddle>":'';

  287.         if($thread['displayorder'] > 0) {
  288.                 $separatepos++;
  289.         }
  290.         $threadlist[] = $thread;

  291. }

  292. $check[$filter] = 'selected="selected"';
  293. $ascdesc == 'ASC' ? $check['asc'] = 'selected="selected"' : $check['desc'] = 'selected="selected"';

  294. $forumselect = $forumjump ? forumselect() : NULL;

  295. $usesigcheck = $signature ? 'checked' : NULL;
  296. $allowpost = (!$forum['postperm'] && $allowpost) || ($forum['postperm'] && strstr($forum['postperm'], "\t$groupid\t")) || $forum['allowpost'];

  297. include template('forumdisplay');

  298. ?>
复制代码



  1. {template header}
  2. <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" style="table-layout: fixed">
  3. <tr><td class="nav" width="90%" align="left" nowrap>&nbsp;<a href="index.php">$bbname</a> $navigation</td>
  4. <td align="right" width="10%">&nbsp;<a href="#bottom"><img src="{IMGDIR}/arrow_dw.gif" border="0" align="absmiddle"></a></td>
  5. </tr></table><br>

  6. <!--{if $polloptions}-->
  7.         {template viewthread_poll}
  8. <!--{/if}-->

  9. <!--{if $newpmexists}-->
  10.         {template pmprompt}
  11. <!--{/if}-->

  12. <form name="delpost" method="post" action="topicadmin.php?action=delpost&fid=$fid&tid=$tid&page=$page">
  13. <input type="hidden" name="formhash" value="{FORMHASH}">
  14. <input type="hidden" name="fpage" value="$fpage">
  15. <table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
  16. <tr><td class="multi">$multipage
  17. <!--{if $thread['creditsrequire']}--> &nbsp; {lang creditsrequire_view} {lang credit_title} <span class="bold">$thread[creditsrequire]</span> {lang credit_unit}<!--{/if}-->
  18. </td><td align="right">
  19. <!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
  20. <!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
  21. <!--{if $allowpostreply}--><a href="post.php?action=reply&fid=$fid&tid=$tid"><img src="{IMGDIR}/reply.gif" border="0"></a><!--{/if}-->

  22. </td></tr></table>

  23. <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center">
  24. <tr><td bgcolor="{BORDERCOLOR}">

  25. <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
  26. <tr class="header"><td width="21%">{lang author}:</td>

  27. <td><table cellspacing="0" cellpadding="0" border="0" width="100%"  style="table-layout: fixed; word-wrap: break-word">
  28. <tr style="color: {HEADERTEXT}"><td class="bold">{lang subject}: $thread[subject]</td>
  29. <td align="right" width="200" nowrap>
  30. <!--{if $highlightstatus}--><a href="viewthread.php?tid=$tid&page=$page" style="color: {HEADERTEXT};font-weight: normal">{lang disable_highlight}</a> | <!--{/if}-->
  31. <a href="redirect.php?fid=$fid&tid=$tid&goto=nextoldset" style="color: {HEADERTEXT};font-weight: normal">{lang last_thread}</a> |
  32. <a href="redirect.php?fid=$fid&tid=$tid&goto=nextnewset" style="color: {HEADERTEXT};font-weight: normal">{lang next_thread}</a></td>
  33. </tr></table></td>

  34. </tr>

  35. <!--{loop $postlist $postkey $post}-->
  36.         <!--{eval $postpid=$post[pid]}-->
  37.         $post[newpostanchor]
  38.         <tr bgcolor="$post[thisbg]">
  39.         <td valign="top" width="21%"><a name="pid$post[pid]"></a>
  40.         <!--{if $ismoderator && $allowviewip}--><a href="topicadmin.php?action=getip&fid=$fid&tid=$tid&pid=$post[pid]"><img src="{IMGDIR}/ip.gif" border="0" align="right" alt="{lang admin_getip}"></a><!--{/if}-->
  41.         <!--{if $post['authorid']}-->
  42.                 <span class="bold">$post[author]</span><img src="./images/common/money$post[bankstatus].gif" border="0" align=absmiddle><br><span class="smalltxt">
  43.                 <!--{if $post['username']}-->$post[authortitle]<!--{else}-->{lang member_deleted}<!--{/if}-->
  44.         <!--{else}-->
  45.                 <span class="bold">{lang guest}</span> <span class="smalltxt">$post[useip]</span><br><span class="smalltxt">{lang unregistered}
  46.         <!--{/if}-->
  47.         <br>{eval showstars($post['stars']);}<br><!--olinetime by nienlife-->{eval showonline($post['onlinehour'],$post['onlinemin']);}<br><!--end-->$post[customstatus]<br><br>
  48.         <!--{if $post['avatar']}-->
  49.                 <table width="95%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed">
  50.                 <tr><td align="center">$post[avatar]</td></tr></table><br>
  51.         <!--{else}-->
  52.                 <br><br>
  53.         <!--{/if}-->
  54. <!----------------------------------------------------------------
  55.     User's Digest Counting 1.51 By Polo!
  56.     Added Next Line
  57.    ---------------------------------------------------------------->

  58.         <!--{if $post[userdigests]}-->{lang thread_digest} $post[userdigests]<br><!--{/if}-->

  59. <!---------------------------------------------------------------->



  60.        
  61. {lang credit_title} $post[credit]<br>
  62.         {lang postnum} $post[postnum]<br>
  63.                                 现金 $post[money]<br>
  64. 存款 $post[bank]<!--{if $isadmin}-->+$post[bankmimi]<!--{/if}--><br>

  65.         <!--{if $post[flowers]}-->
  66.         鲜花 $post[flowers]<br>
  67.         <!--{/if}-->
  68.         <!--{if $post[eggs]}-->
  69.         鸡蛋 $post[eggs]<br>
  70.         <!--{/if}-->
  71.         {lang regtime} $post[regdate]
  72.         <!--{if $post['location']}--><br>{lang location} $post[location]<!--{/if}--><br>
  73.         <!--{if $vtonlinestatus && $post['authorid']}-->
  74.                 <!--{if $timestamp - $post['lastactivity'] <= 10800}-->
  75.                         {lang online_status} <b>{lang online}</b>
  76.                 <!--{else}-->
  77.                         {lang online_status} {lang offline}
  78.                 <!--{/if}-->
  79.         <!--{/if}-->
  80.         </span>
  81.         </td>
  82.         <td width="79%" height="100%" valign="top">
  83.         <table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; word-wrap: break-word">
  84.         <tr><td valign="top">
  85.         <!--{if $postkey == $topiccount-1}--><a name="#lastpost"></a><!--{/if}-->
  86.         <span class="bold"><span class="smalltxt">$post[karma]
  87.         {if $post['postcount'] == 1} <font color=red>楼 主</font>
  88. {else}第 <font color=red>{eval $posttmp=$post['postcount']-1} $posttmp</font> 楼{/if}
  89. </span>&nbsp;$post[subject]</span>{$post[flower]}{$post[egg]}<br><br>
  90.         $post[message]
  91.         <br><br>
  92.             
  93. <!--{if $attachelist[$post[pid]]}-->
  94.         <!--{eval $attacount = 0; }-->
  95.         <blockquote><!--{loop $attachelist[$post[pid]] $vkey $attach}-->
  96.                         {lang attachment} <!--{echo ++$attacount }--> : $attach[attachicon] <a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]&download=1" target="_blank">$attach[filename]</a> ($attach['dateline'],&nbsp;$attach[attachsize]
  97.                         <!--{if $attach[creditsrequire]}-->, {lang creditsrequire_attach}{lang credit_title} $attach[creditsrequire] {lang credit_unit}<!--{/if}-->
  98.                         <!--{if $attach[downloads]}-->,{lang downloads}: $attach[downloads]<!--{/if}--> )
  99.                 <!--{if $attach['attachimg']}-->
  100.                         <br><br><!--{if !$attachimgcheck}-->
  101.                                 <img src="$attachurl/$attach[attachment]" border="0" onload="if(this.width>screen.width*0.5) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(this.resized) window.open(this.src);">
  102.                         <!--{else}-->
  103.                                 <a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]" target="_blank"><img src="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';"></a>

  104.                         <!--{/if}-->
  105.                 <!--{/if}-->
  106.         <br><!--{/loop}--></blockquote>
  107. <!--{/if}-->

  108.         <!--{if $post['signature']}--><br></td></tr><tr>
  109.                   <td align="left" valign="bottom"><img src="images/common/sigline.gif"><br>
  110.                     $post[signature]<!--{/if}-->
  111.         </td></tr></table>
  112.         </td></tr>
  113.         <tr bgcolor="$post[thisbg]"><td valign="middle" class="smalltxt">
  114.         <!--{if $ismoderator && $allowdelpost && $post['postcount'] > 1}--><input type="checkbox" name="delete[]" value="$post[pid]"><!--{/if}-->
  115.         <img src="{IMGDIR}/lastpost.gif" align="absmiddle">
  116.         $post[dateline]</td><td valign="middle">
  117.         <table width="100%" border="0" cellspacing="0" cellpadding="0">
  118.         <tr class="smalltxt"><td align="left">
  119.         <!--{if $post['username']}-->
  120.                 <a href="viewpro.php?uid=$post[authorid]"><img src="{IMGDIR}/profile.gif" border="0" alt="{lang view_profile}"></a>&nbsp;
  121.                 <!--{if $post['showemail']}--><a href="mailto:$post[email]"><img src="{IMGDIR}/email.gif" border="0" alt="{lang send_mail}"></a>&nbsp;<!--{/if}-->
  122.                 <!--{if $post['site']}--><a href="$post[site]" target="_blank"><img src="{IMGDIR}/site.gif" border="0" alt="{lang visit_home}"></a>&nbsp;<!--{/if}-->
  123.                 <a href="pm.php?action=send&uid=$post[authorid]" target="_blank"><img src="{IMGDIR}/pm.gif" border="0" alt="{lang send_pm}"></a>&nbsp;
  124.                 <!--{if $post['oicq']}--><a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=$post[oicq]" target="_blank"><img src="{IMGDIR}/oicq.gif" alt="QQ" border="0"></a>&nbsp;<!--{/if}-->
  125.         <a href="plugins.php?p=flegg&action=flower&pid={$post[pid]}"><img title="给本篇作者送鲜花!" border=0 src="images/common/flower.gif" align=absmiddle></a>
  126.         <a href="plugins.php?p=flegg&action=eggs&pid={$post[pid]}"><img title="给本篇作者扔鸡蛋!" border=0 src="images/common/eggs.gif" align=absmiddle></a>
  127.                 <!--{/if}-->
  128.         </td><td align="right">
  129.         &nbsp;<a href="post.php?action=edit&fid=$fid&tid=$tid&pid=$post[pid]&page=$page"><img src="{IMGDIR}/edit.gif" border="0" alt="{lang edit_post}"></a>
  130.         <!--{if !$thread['closed'] || $ismoderator}-->&nbsp;<a href="post.php?action=reply&fid=$fid&tid=$tid&repquote=$post[pid]"><img src="{IMGDIR}/quote.gif" border="0" alt="{lang reply_quote}"></a><!--{/if}-->
  131.         <!--{if $discuz_uid && $reportpost}-->&nbsp;<a href="misc.php?action=report&fid=$fid&tid=$tid&pid=$post[pid]&page=$page"><img src="{IMGDIR}/report.gif" border="0" alt="{lang report_to_moderator}"></a><!--{/if}-->
  132.         <!--{if $allowkarma && $maxkarmarate}-->
  133.                 &nbsp;<select name="fid" onchange="if(this.options[this.selectedIndex].value != '') {
  134.                 window.location=('misc.php?action=karma&tid=$tid&pid=$post[pid]&score='+this.options[this.selectedIndex].value+'&sid=$sid') }" align="absmiddle">
  135.                 <option value="">{lang rate}</option>
  136.                 <option value="">----</option>
  137.                 $karmaoptions
  138.                 </select>
  139.         <!--{/if}-->

  140.         </td></tr></table>
  141.         </td></tr>
  142. <!--{/loop}-->
  143. </table></td></tr></table>

  144. <table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
  145. <tr>
  146. <td class="multi" valign="top">$multipage</td><td align="right"><br>
  147. <!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
  148. <!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
  149. <!--{if $allowpostreply}--><a href="post.php?action=reply&fid=$fid&tid=$tid"><img src="{IMGDIR}/reply.gif" border="0"></a><!--{/if}-->
  150. </td></tr></table></form>
  151. <!--{if $readuseron}-->
  152.         <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder"  bgcolor="{BORDERCOLOR}">
  153.         <tr class="header"><td width="100%">正在阅读本贴的会员</font></a></td></tr>
  154.         <tbody id="onlinestatus" style="$collapse[onlinestatus]"><tr><td bgcolor="{ALTBG2}" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
  155.         <table cellspacing="0" cellpadding="0" border="0" width="98%" align="center">
  156.         <tr><td nowrap>
  157.                 <!--{if $readsome }-->
  158.         <!--{loop $whosonline $key $online}-->
  159.                 <!--{if $key % 7 == 0}--></td></tr><tr><td width="15%" nowrap><!--{else}--></td><td width="15%" nowrap><!--{/if}-->
  160.                 <a href="viewpro.php?username=$online[username]">$online[username]</a>
  161.         <!--{/loop}-->
  162.                 <!--{else}-->
  163.                 只有游客正在浏览本贴!
  164.                 <!--{/if}-->
  165.         </td></tr></table></td></tr><tr class="catend"><td> </td></tr></tbody></table>
  166.         <br>
  167. <!--{/if}-->

  168. <!--{if $fastpost && $allowpostreply}-->
  169.         <script language="JavaScript">
  170.         var postminchars = $minpostsize;
  171.         var postmaxchars = $maxpostsize;
  172.         var disablepostctrl = $disablepostctrl;
  173.         function validate(theform) {
  174.                 if (theform.message.value == "" && theform.subject.value == "") {
  175.                         alert("{lang post_subject_and_message_isnull}");
  176.                         return false;
  177.                 }
  178.                 if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
  179.                         alert("{lang post_message_length_invalid}\n\n{lang post_currlength}: "+theform.message.value.length+" {lang bytes}\n{lang board_allowed}: "+postminchars+" {lang to} "+postmaxchars+" {lang bytes}");
  180.                         return false;
  181.                 }                       
  182.                 theform.replysubmit.disabled = true;
  183.                 return true;
  184.         }
  185.         </script>
  186.         <form method="post" name="input" action="post.php?action=reply&fid=$fid&tid=$tid&replysubmit=yes" onSubmit="return validate(this)">
  187.         <input type="hidden" name="formhash" value="{FORMHASH}">
  188.         <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" bgcolor="{BORDERCOLOR}"><tr><td>
  189.         <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
  190.         <tr><td colspan="2" class="header">{lang post_fastreply}</td></tr>
  191.         <tr>
  192.         <td width="18%" bgcolor="{ALTBG1}">{lang subject}:</td>
  193.         <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><input type="text" name="subject" size="80" value="" tabindex="1">
  194.               &nbsp; [{lang optional}]</td>
  195.         </tr>
  196.         <tr>
  197.         <td width="18%" bgcolor="{ALTBG1}" valign="top">{lang options}:<br><span class="smalltxt">
  198.         <input type="checkbox" name="parseurloff" value="1">&nbsp;{lang disable} {lang post_parseurl}<br>
  199.         <input type="checkbox" name="smileyoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=messages#6" target="_blank">{lang post_smilies}</a><br>
  200.         <input type="checkbox" name="bbcodeoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=misc#1" target="_blank">{lang post_discuzcode}</a><br>
  201.         <input type="checkbox" name="usesig" value="1" $usesigcheck>&nbsp;{lang post_show_sig}<br>
  202.         <input type="checkbox" name="emailnotify" value="1">&nbsp;{lang post_email_notify}</span>
  203.         </td>
  204.         <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><textarea rows="7" cols="90" name="message" onKeyDown="javascript: ctlent();" tabindex="2"></textarea><br>
  205.         <input type="submit" name="replysubmit" value="{lang post_topicsubmit}" tabindex="3">&nbsp;&nbsp;&nbsp;
  206.         <input type="submit" name="previewpost" value="{lang post_previewpost}" tabindex="4">&nbsp;&nbsp;&nbsp;
  207.         <input type="reset" name="topicsreset" value="{lang post_topicreset}" tabindex="5">&nbsp; &nbsp;{lang post_submit_hotkey}</td>
  208.         </tr></table></td></tr></table></form>
  209. <!--{/if}-->

  210. <br><table width="310" cellspacing="0" cellpadding="0" align="center">
  211. <td align="center" bgcolor="{BORDERCOLOR}" width="30%">
  212. <table border="0" cellspacing="{BORDERWIDTH}" width="100%">
  213. <tr><td bgcolor="{ALTBG2}" align="center" class="smalltxt" nowrap>
  214. <a href="viewthread.php?fid=$fid&tid=$tid&action=printable" target="_blank">{lang thread_printable}</a> |
  215. <a href="misc.php?action=emailfriend&tid=$tid">{lang thread_email_friend}</a> |
  216. <a href="memcp.php?action=subscriptions&subadd=$tid">{lang thread_subscribe}</a> |
  217. <a href="memcp.php?action=favorites&favadd=$tid">{lang thread_favorite}</a>
  218. </td></tr></table></td></tr></table><br>

  219. <br><br><table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
  220. <tr class="mediumtxt"><td align="left" class="smalltxt">

  221. <!--{if $forumjump}-->
  222.         <span class="bold">{lang forum_jump}:</span>
  223.         <select onchange="if(this.options[this.selectedIndex].value != '') {
  224.         window.location=('forumdisplay.php?fid='+this.options[this.selectedIndex].value+'&sid=$sid') }">
  225.         $forumselect
  226.         </select>
  227. <!--{/if}-->

  228. &nbsp;</td><td align="right" class="smalltxt">

  229. <!--{if $ismoderator}-->
  230.         <span class="bold">{lang admin_modoptions}:</span>
  231.         <select name="action" id="action" onchange="if(this.options[this.selectedIndex].value != '') { if(this.options[this.selectedIndex].value != 'delpost') {
  232.         window.location=('topicadmin.php?tid=$tid&fid=$fid&action='+this.options[this.selectedIndex].value+'&fpage=$fpage&page=$page&sid=$sid');
  233.         } else { this.document.delpost.submit(); } }">
  234.         <option value="" selected>{lang admin_modoptions}</option>
  235.         <!--{if $allowdelpost}-->
  236.         <option value="delpost">{lang admin_delpost}</option>
  237.         <option value="delete">{lang admin_delthread}</option>
  238.         <!--{/if}-->
  239.         <!--{if $allowclose}-->
  240.         <option value="close"><!--{if $thread['closed']}-->{lang admin_open}<!--{else}-->{lang admin_close}<!--{/if}--></option>
  241.         <!--{/if}-->
  242.         <!--{if $allowmove}-->
  243.         <option value="move">{lang admin_move}</option>
  244.         <!--{/if}-->
  245.         <!--{if $allowhighlight}-->
  246.         <option value="highlight">{lang admin_highlight}</option>
  247.        
  248.         <option value="xm_highlight">醒目高亮显示</option>
  249.        
  250.         <!--{/if}-->
  251.         <!--{if $allowdigest}-->
  252.         <option value="digest"><!--{if $thread['digest']}-->{lang admin_digest_remove}<!--{else}-->{lang admin_digest_add}<!--{/if}--></option>
  253.         <!--{/if}-->
  254.         <!--{if $allowtop}-->
  255.         <option value="top"><!--{if $thread['displayorder']}-->{lang admin_unstick}<!--{else}-->{lang admin_stick}<!--{/if}--></option>
  256.         <!--{/if}-->
  257.         <!--{if $allowsplit}-->
  258.         <option value="split">{lang admin_split}</option>
  259.         <!--{/if}-->
  260.         <!--{if $allowmerge}-->
  261.         <option value="merge">{lang admin_merge}</option>
  262.         <!--{/if}-->
  263.         <option value="bump">{lang admin_bump}</option>

  264.         <option value="recount">{lang admin_recount}</option>
  265.         </select>
  266. <!--{/if}-->

  267. </td>
  268. </tr></table><br><br>
  269. {template footer}
复制代码
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-10 22:34:26 | 显示全部楼层
forumdisplay.php


  1. <?php

  2. /*
  3. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. :: [DISCUZ!]  Crossday Discuz! Board                                    ::
  5. :: (c) 2001-2005 Comsenz Technology Ltd (www.discuz.com)                ::
  6. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  7. :: Author:  Crossday (tech@discuz.com) Cnteacher (cnteacher@discuz.com) ::
  8. :: Version: 2.5F   2004/10/01 05:15                                     ::
  9. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  10. */
  11. //fix:  BY pk0909
  12. /*
  13. 1 公告作者连接问题
  14. 2 accessmask的问题
  15. */

  16. define('CURRSCRIPT',  'forumdisplay');

  17. require './include/common.php';
  18. require DISCUZ_ROOT.'./include/forum.php';
  19. require_once DISCUZ_ROOT.'./include/discuzcode.php';

  20. $discuz_action = 2;

  21. if(isset($showoldetails)) {
  22.         switch ($showoldetails) {
  23.                 case 'no': setcookie('onlinedetail', 0, $timestamp + 86400 * 365, $cookiepath, $cookiedomain); break;
  24.                 case 'yes': setcookie('onlinedetail', 1, $timestamp + 86400 * 365, $cookiepath, $cookiedomain); break;
  25.         }
  26. } else {
  27.         $showoldetails = false;
  28. }

  29. if(!$forum['fid'] || $forum['type'] == 'group' || ($adminid<>1 && !$forum[status])) {
  30.         showmessage('forum_nonexistence', NULL, 'HALTED');
  31. }

  32. if($forum['type'] == 'forum') {
  33.         $navigation = "&raquo; $forum[name]";
  34.         $navtitle = ' - '.strip_tags($forum['name']);
  35. } else {
  36.         $forumup = $_DCACHE['forums'][$forum['fup']]['name'];
  37.         $navigation = "&raquo; <a href="forumdisplay.php?fid=$forum[fup]">$forumup</a> &raquo; $forum[name]";
  38.         $navtitle = ' - '.strip_tags($forumup).' - '.strip_tags($forum['name']);
  39. }

  40. if($forum['password'] && $action == 'pwverify') {
  41.         if($pw != $forum['password']) {
  42.                 showmessage('forum_passwd_incorrect', NULL, 'HALTED');
  43.         } else {
  44.                 setcookie("fidpw$fid", $pw, 0, $cookiepath, $cookiedomain);
  45.                 showmessage('forum_passwd_correct', "forumdisplay.php?fid=$fid");
  46.         }
  47. }

  48. if($forum['viewperm'] && !strstr($forum['viewperm'], "\t$groupid\t") && !$forum['allowview']) {
  49.         showmessage('forum_nopermission', NULL, 'HALTED');
  50. }

  51. if(!empty($forum['password']) && $forum['password'] != $_COOKIE["fidpw$fid"]) {
  52.         include template('forumdisplay_passwd');
  53.         exit();
  54. }

  55. $ismoderator = modcheck($discuz_user);
  56. $moderatedby = moddisplay($forum['moderator'], 'forumdisplay');

  57. $postcredits = $forum['postcredits'] != -1 ? $forum['postcredits'] : $postcredits;
  58. $replycredits = $forum['replycredits'] != -1 ? $forum['replycredits'] : $replycredits;

  59. $subexists = 0;
  60. foreach($_DCACHE['forums'] as $sub) {
  61.         if($sub['type'] == 'sub' && $sub['fup'] == $fid && ($accessmasks || !$hideprivate || !$sub['viewperm'] || strstr($sub['viewperm'], "\t$groupid\t") || strstr($sub['users'], "\t$discuz_uid\t"))) {
  62.                 $sublist = array();
  63.                 $sql = $accessmasks        ? "SELECT f.fid, f.fup, f.type, f.icon, f.name, f.description, f.moderator, f.threads, f.posts, f.lastpost, f.viewperm, a.allowview FROM $table_forums f
  64.                                                 LEFT JOIN $table_access a ON a.uid='$discuz_uid' AND a.fid=f.fid
  65.                                                 WHERE fup='$fid' AND status='1' AND type='sub' ORDER BY f.displayorder"
  66.                                         : "SELECT fid, fup, type, icon, name, description, moderator, threads, color, posts, lastpost, viewperm FROM $table_forums WHERE fup='$fid' AND status='1' AND type='sub' ORDER BY displayorder";
  67.                 $query = $db->query($sql);
  68.                 while($sub = $db->fetch_array($query)) {
  69.                         if(forum($sub)) {
  70.                                 $sublist[] = $sub;
  71.                                 $subexists = 1;
  72.                         }
  73.                 }
  74.                 break;
  75.         }
  76. }

  77. $page = intval($page) ? intval($page) : 1;
  78. $start_limit = ($page - 1) * $tpp;

  79. $announcement_list = array();
  80. if($page == 1  && $_DCACHE['announcements_forum']) {
  81.         foreach($_DCACHE['announcements_forum'] as $ann) {
  82.                 $ann['authorencode'] = rawurlencode($ann['author']);
  83.                 $ann['starttime'] = gmdate("$dateformat $timeformat", $ann['starttime'] + ($timeoffset * 3600));
  84.                 $announcement_list[] = $ann ;
  85.         }
  86. }        

  87. $forumdisplayadd = $filteradd = '';
  88. if(!empty($filter)) {
  89.         if(is_numeric($filter)) {
  90.                 $forumdisplayadd .= "&filter=$filter";
  91.                 $filteradd = "AND lastpost>='".($timestamp - $filter)."'";
  92.         } elseif($filter == 'digest') {
  93.                 $forumdisplayadd .= "&filter=digest";
  94.                 $filteradd = "AND digest>'0'";
  95.         }
  96. } else {
  97.         $filter = '';
  98. }

  99. $ascdesc == 'ASC' ? $forumdisplayadd .= "&ascdesc=$ascdesc" : $ascdesc = 'DESC';


  100. if($whosonlinestatus == 2 || $whosonlinestatus == 3) {
  101.         $whosonlinestatus = 0;
  102.         $onlineinfo = explode("\t", $onlinerecord);
  103.         $detailstatus = ((!isset($_COOKIE['onlinedetail']) && $onlineinfo[0] < 500) || ($_COOKIE['onlinedetail'] || $showoldetails == 'yes')) && $showoldetails != 'no';

  104.         if($detailstatus) {
  105.                 updatesession();
  106.                 @include language('actions');

  107.                 $whosonline = array();
  108.                 $forumname = strip_tags($forum['name']);
  109.                 $query = $db->query("SELECT uid, groupid, username, invisible, lastactivity, action FROM $table_sessions WHERE uid>'0' AND fid='$fid' AND invisible='0'");
  110.                 if($db->num_rows($query)) {
  111.                         $whosonlinestatus = 1;
  112.                         while($online = $db->fetch_array($query)) {
  113.                                 $online['icon'] = isset($_DCACHE['onlinelist'][$online['groupid']]) ? $_DCACHE['onlinelist'][$online['groupid']] : $_DCACHE['onlinelist'][0];
  114.                                 $online['action'] = $actioncode[$online['action']];
  115.                                 $online['lastactivity'] = gmdate($timeformat, $online['lastactivity'] + ($timeoffset * 3600));
  116.                                 $whosonline[] = $online;     
  117.                         }
  118.                 }
  119.                 unset($online);
  120.         }
  121. } else {
  122.         $whosonlinestatus = 0;
  123. }

  124. if($discuz_uid && $newpm) {
  125.         require DISCUZ_ROOT.'./include/pmprompt.php';
  126. }

  127. if(!empty($filter)) {
  128.         $query = $db->query("SELECT COUNT(*) FROM $table_threads WHERE fid='$fid' $filteradd");
  129.         $threadcount = $db->result($query, 0);
  130. } else {
  131.         $threadcount = $forum['threads'];
  132. }

  133. $multipage = multi($threadcount, $tpp, $page, "forumdisplay.php?fid=$fid$forumdisplayadd");

  134. $separatepos = 0;
  135. $threadlist = array();
  136. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  137. $query = $db->query("SELECT  t.* FROM $table_threads t USE INDEX(displayorder)
  138.                         WHERE t.fid='$fid' $filteradd
  139.                         ORDER BY t.displayorder DESC, t.lastpost $ascdesc
  140.                         LIMIT $start_limit, $tpp ");

  141. while($thread = $db->fetch_array($query)) {
  142.         $thread['icon'] = isset($_DCACHE['icons'][$thread['iconid']]) ? '<img src="'.SMDIR.'/'.$_DCACHE['icons'][$thread['iconid']].'" align="absmiddle">' : '&nbsp;';
  143.         $thread['lastposterenc'] = rawurlencode($thread['lastposter']);

  144.         $postsnum = $thread['replies'] + 1;
  145.         if($postsnum  > $ppp) {
  146.                 $pagelinks = '';
  147.                 $topicpages = ceil($postsnum / $ppp);
  148.                 for ($i = 1; $i <= $topicpages; $i++) {
  149.                         $pagelinks .= "<a href="viewthread.php?tid=$thread[tid]&page=$i&fpage=$page">$i</a> ";
  150.                         if($i == 6) {
  151.                                 $i = $topicpages + 1;
  152.                         }
  153.                 }
  154.                 if($topicpages > 6) {
  155.                         $pagelinks .= " .. <a href="viewthread.php?tid=$thread[tid]&page=$topicpages&fpage=$page">$topicpages</a> ";
  156.                 }
  157.                 $thread['multipage'] = '&nbsp; &nbsp;( <img src="'.IMGDIR.'/multipage.gif" align="absmiddle" boader="0"> '.$pagelinks.')';
  158.         } else {
  159.                 $thread['multipage'] = '';
  160.         }

  161.         if($thread['highlight']) {
  162.                 $string = sprintf('%02d', $thread['highlight']);
  163.                 $stylestr = sprintf('%03b', $string[0]);

  164.                 $thread['highlight'] = 'style="';
  165.                 $thread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  166.                 $thread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  167.                 $thread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  168.                 $thread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  169.                 $thread['highlight'] .= '"';
  170.         } else {
  171.                 $thread['highlight'] = '';
  172.         }


  173. //=====标题用标签==start==By www.5466.ik8.com==============

  174.         $thread[subject] = cutstr($thread[subject],77);
  175.         $thread[subject] = postify($thread[subject],1,0,0,0,1,0);       

  176. //=====八种自定义参数标题醒目+任意颜色高亮==start==By www.5466.ik8.com==============


  177.    
  178.    if($thread['xm_hl']) {
  179.         
  180.            $xm_hl_string=explode(',',$thread['xm_hl']);
  181.            
  182.            switch($xm_hl_string[0]){
  183.            
  184.            case 1:
  185.                   $xm_hl_style  = '<font style="';
  186.                   $xm_hl_style .= $xm_hl_string[1] ? 'color: #'.$xm_hl_string[1].'; ' : '';        
  187.                       $xm_hl_style .= $xm_hl_string[2] ? 'font-weight: bold;' : '';
  188.                       $xm_hl_style .= $xm_hl_string[3] ? 'font-style: italic;' : '';
  189.                       $xm_hl_style .= $xm_hl_string[4] ? 'text-decoration: underline;' : '';               
  190.                       $xm_hl_style .= '">';
  191.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  192.                       break;
  193.            case 2:
  194.                   $xm_hl_style  = '<font textcolor1="#'.$xm_hl_string[1].'"  textbkcolor1="transparent" textcolor2="#'.$xm_hl_string[2];
  195.                   $xm_hl_style .='" textbkcolor2="transparent" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
  196.                   $xm_hl_style .='" style="behavior:url(include/z_FlashText.htc);color:#c000c0;background-color:transparent">';
  197.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  198.                       break;
  199.            case 3:
  200.                   $xm_hl_style  = '<font textoffset1="'.$xm_hl_string[1].'" textoffset2="'.$xm_hl_string[2];
  201.                   $xm_hl_style .='" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
  202.                   $xm_hl_style .='" style="behavior:url(include/z_WaveText.htc);color:#FF5500;background-color:transparent">';
  203.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  204.                       break;                     
  205.            case 4:
  206.                   $xm_hl_style  = '<font textcolor="#'.$xm_hl_string[1].'" basesize="12" textsize1="'.$xm_hl_string[2];
  207.                   $xm_hl_style .='" textsize2="14" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
  208.                   $xm_hl_style .='" style="behavior:url(include/z_ResizeText.htc);color:#993300;background-color:transparent;">';
  209.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  210.                       break;                           
  211.            case 5:
  212.                   $xm_hl_style  = '<span style=\'border:solid 1px #'.$xm_hl_string[1].';border-left-width:5px;border-left-color:#'.$xm_hl_string[1];
  213.                   $xm_hl_style .=';background:#ffffff;padding:1px 5px 2px 5px;font-size: 8pt\'><font color="#'.$xm_hl_string[2];
  214.                   $xm_hl_style .='">';
  215.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font></span>';
  216.                       break;
  217.            case 6:
  218.                   $start_str=substr($thread[subject],0,$xm_hl_string[2]);
  219.                   $end_str=substr($thread[subject],$xm_hl_string[2]);
  220.                   if($xm_hl_string[3])
  221.                   $thread[subject]  = '<font color="'.$xm_hl_string[1].'">'.$start_str.'</font><font color="'.$xm_hl_string[3].'">'.$end_str.'</font>';                     
  222.               else
  223.               $thread[subject]  = '<font color="'.$xm_hl_string[1].'">'.$start_str.'</font>'.$end_str;
  224.               break;
  225.            case 7:
  226.                   $xm_hl_style  = '<font style="filter: glow(color=#'.$xm_hl_string[1].',strength='.$xm_hl_string[2];
  227.                   $xm_hl_style .='); height:20px; color: #'.$xm_hl_string[3];
  228.                   $xm_hl_style .='">';
  229.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  230.                       break;
  231.            case 8:
  232.                   $xm_hl_style  = '<font style="filter: shadow(color=#'.$xm_hl_string[1].',direction='.$xm_hl_string[2];
  233.                   $xm_hl_style .='); height:20px; color: #'.$xm_hl_string[3];
  234.                   $xm_hl_style .='">';
  235.                       $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
  236.                       break;
  237.            case 9:
  238.                   $xm_hl_style  = '<font style="background-color: #'.$xm_hl_string[1].';" color="#'.$xm_hl_string[2].'"><b>';
  239.                   $thread[subject]=$xm_hl_style.$thread[subject].'</b></font>';
  240.                       break;                                            
  241.            case 10:                  
  242.                       $thread[subject]='<span style="behavior:url(./include/rainbow.htc)">'.$thread[subject].'</span>';
  243.                       break;              
  244.          default:  $thread[subject]=$thread[subject];   
  245.                    }   
  246.         
  247.         
  248.         }
  249. //=====八种自定义参数标题醒目+任意颜色高亮==end==By lu5266=====================


  250.         if($thread['closed']) {
  251.                 $thread['new'] = 0;
  252.                 if($thread['closed'] > 1) {
  253.                         $thread['moved'] = $thread['tid'];
  254.                         $thread['tid'] = $thread['closed'];
  255.                         $thread['replies'] = '-';
  256.                         $thread['views'] = '-';
  257.                 } else {
  258.                         $thread['moved'] = 0;
  259.                 }
  260.                 $thread['folder'] = 'lock_folder.gif';
  261.         } else {
  262.                 $thread['folder'] = 'folder.gif';
  263.                 if($lastvisit < $thread['lastpost'] && !strstr($_COOKIE['oldtopics'], "\t$thread[tid]\t")) {
  264.                         $thread['new'] = 1;
  265.                         $thread['folder'] = 'red_'.$thread['folder'];
  266.                 } else {
  267.                         $thread['new'] = 0;
  268.                 }
  269.                 if($thread['replies'] > $thread['views']) {
  270.                         $thread['views'] = $thread['replies'];
  271.                 }
  272.                 if($thread['replies'] >= $hottopic) {
  273.                         $thread['folder'] = 'hot_'.$thread['folder'];
  274.                 }
  275.         }

  276.         if($thread['attachment']) {
  277.                 require_once DISCUZ_ROOT.'./include/attachment.php';
  278.                 $thread['attachment'] = attachtype($thread['attachment']).' ';
  279.         } else {
  280.                 $thread['attachment'] = '';
  281.         }
  282.         //$thread[subject] = cutstr($thread[subject],77);
  283.         $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
  284.         $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);
  285.         $thread['flower']=$thread['flower']>0?$thread['flower']="<img border=0 title='鲜花数:".$thread['flower']."' src='images/common/flower.gif' align=absmiddle>":'';
  286.         $thread['egg']=$thread['egg']>0?$thread['egg']="<img border=0 title='鸡蛋数:".$thread['egg']."' src='images/common/eggs.gif' align=absmiddle>":'';

  287.         if($thread['displayorder'] > 0) {
  288.                 $separatepos++;
  289.         }
  290.         $threadlist[] = $thread;

  291. }

  292. $check[$filter] = 'selected="selected"';
  293. $ascdesc == 'ASC' ? $check['asc'] = 'selected="selected"' : $check['desc'] = 'selected="selected"';

  294. $forumselect = $forumjump ? forumselect() : NULL;

  295. $usesigcheck = $signature ? 'checked' : NULL;
  296. $allowpost = (!$forum['postperm'] && $allowpost) || ($forum['postperm'] && strstr($forum['postperm'], "\t$groupid\t")) || $forum['allowpost'];

  297. include template('forumdisplay');

  298. ?>
复制代码
回复

使用道具 举报

hyelan 发表于 2005-10-11 09:09:17 | 显示全部楼层

呵呵,谢谢lu5266 大人!

终于可以了,呵呵,高兴ing...
顺便问一下,为什么要这样更改啊?是不是没有解释高亮的代码?
lu5266 大人教教偶下次遇到类似问题要从那里入手解决好吗?
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-11 10:51:51 | 显示全部楼层
原帖由 hyelan 于 2005-10-11 09:09 发表
终于可以了,呵呵,高兴ing...
顺便问一下,为什么要这样更改啊?是不是没有解释高亮的代码?
lu5266 大人教教偶下次遇到类似问题要从那里入手解决好吗?

不是的

怎么说呢

你好象同时安装了我的插件

好象有点冲突

因为安装的先后问题

所以有点冲突

以后应该不会出现类似问题的
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-29 23:52 , Processed in 0.154561 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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