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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

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

[复制链接]
kk8899 发表于 2005-10-5 07:05:38 | 显示全部楼层
:victory:
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-5 09:46:26 | 显示全部楼层
原帖由 kk8899 于 2005-10-5 07:05 发表
:victory:

回复

使用道具 举报

shutiao 发表于 2005-10-8 12:23:22 | 显示全部楼层
没有安装成功!楼主帮我看看
topicadmin.php
<?php

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

require './include/common.php';
require_once DISCUZ_ROOT.'./include/post.php';

$discuz_action = 151;

$tid   = $tid ? $tid :'';
$page  = intval($page);
$fpage = intval($fpage);

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

if($forum['type'] == 'forum') {
        $navigation = "&raquo; <a href=\"forumdisplay.php?fid=$fid&page=$fpage\">$forum[name]</a> &raquo; <a href=\"viewthread.php?tid=$tid\">$thread[subject]</a> ";
        $navtitle = ' - '.strip_tags($forum['name']).' - '.$thread['subject'];
} else {
        $query = $db->query("SELECT name, fid, moderator FROM $table_forums WHERE fid='$forum[fup]'");
        $fup = $db->fetch_array($query);
        $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> ";
        $navtitle = ' - '.strip_tags($fup['name']).' - '.strip_tags($forum['name']).' - '.$thread['subject'];
}

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

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

if($action == 'moderate') {
        if(!is_array($moderate) || !count($moderate)) {
                showmessage('admin_moderate_nothread');
        }elseif(!$operation){
                showmessage('admin_moderate_nooperation');
        }
        $tids = implode_ids($moderate);
        $query = $db->query("SELECT * FROM $table_threads WHERE tid IN($tids) ");
        if(!submitcheck('moderatesubmit')){
                $threadlist = array();
                while($thread = $db->fetch_array($query)) {
                        if($thread['fid'] == $fid){
                                $thread['lastposterenc'] = rawurlencode($thread['lastposter']);
                                if($thread['attachment']) {
                                        require_once DISCUZ_ROOT.'./include/attachment.php';
                                        $thread['attachment'] = attachtype($thread['attachment']).' ';
                                } else {
                                        $thread['attachment'] = '';
                                }
                                $thread[subject] = cutstr($thread[subject],77);
                                $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
                                $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);
                                $threadlist[] = $thread;
                        }
                }
               
                if(!$threadlist) showmessage('admin_moderate_nothread');

                if($operation == 'move') {
                        require_once DISCUZ_ROOT.'./include/forum.php';
                        $forumselect = forumselect();
                }
                include template('topicadmin_moderate');
       
        }else{
       
                if($operation == 'move' && $allowmove) {
                        if(!$moveto) {
                                showmessage('admin_move_invalid');
                        }

                        accesscheck($query);

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

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

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

                }elseif($operation == 'stick' && $allowtop){
                        accesscheck($query);
                        if($level < 0 || $level > 3) {
                                showmessage('undefined_action');
                        }
                        $db->query("UPDATE $table_threads SET displayorder='$level' WHERE tid IN ($tids)");
                        modlog();
                        showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");

                }elseif($operation == 'delete' && $allowdelpost) {
                        accesscheck($query);
                        $uids = $comma = '';
                        $haveattach = 0;
                        $query = $db->query("SELECT authorid ,aid FROM $table_posts WHERE tid IN ($tids)");
                        while($post = $db->fetch_array($query)) {
                                $uids .= "$comma$post[authorid]";
                                $comma = ',';
                                if ($post['aid']) $haveattach++;
                        }
                        updatemember('-', $uids, $deletedcredits);

                        if ($haveattach){
                                $query = $db->query("SELECT attachment FROM $table_attachments WHERE tid IN ($tids)");
                                while($attach = $db->fetch_array($query)) {
                                        @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
                                }
                                $db->query("DELETE FROM $table_attachments WHERE tid IN ($tids)");
                        }
                       
                        $db->query("DELETE FROM $table_threads WHERE tid IN ($tids)");
                        $db->query("DELETE FROM $table_polls WHERE tid IN ($tids)");
                        $db->query("DELETE FROM $table_posts WHERE tid IN ($tids)");

                        updateforumcount($fid);

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

                }elseif($operation == 'close' && $allowclose){
                        accesscheck($query);
                        $close = $type ? 1 : 0;
                        $db->query("UPDATE $table_threads SET closed='$close' WHERE tid in($tids)");
                        modlog();
                        showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");

                }elseif($operation == 'digest' && $allowdigest){
                        if($level < 0 || $level > 3) {
                                showmessage('undefined_action', NULL, 'HALTED');
                        }
                        while($thread = $db->fetch_array($query)) {
                                if ($thread['fid'] == $fid && $thread['digest']<>$level){
                                        $digest_mark=($level-intval($thread['digest']))*$digestcredits;
                                        $dgpost_mark=($level-intval($thread['digest']))*$prestigedg;
$db->query("UPDATE $table_members SET prestige=prestige".($dgpost_mark >= 0 ? '+' : '')."$dgpost_mark WHERE uid='$thread[authorid]'");
                                        $db->query("UPDATE $table_threads SET digest='$level' WHERE tid='$thread[tid]'");
                                        if($digest_mark && $discuz_uid != $thread[authorid]) {
                                                $db->query("UPDATE $table_members SET credit=credit".($digest_mark > 0 ? '+' : '')."$digest_mark WHERE uid='$thread[authorid]'");
                                        }
                                }
                        }
                        modlog();
                        showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");
                }else{
                        showmessage('admin_nopermission', NULL, 'HALTED');
                }
        }

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

        if(!is_array($delete) || !count($delete)) {
                showmessage('admin_delpost_invalid');
        }

        if(!submitcheck('delpostsubmit')) {

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

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

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

        } else {

                $pids = implode_ids( $delete );

                $uids = $comma = '';
                $actionpost = $totalpost = $aids = 0;
                $query = $db->query("SELECT pid, authorid, aid FROM $table_posts WHERE tid='$tid'");
                $totalpost = $db->num_rows($query);
                while($post = $db->fetch_array($query)) {
                        if (in_array($post[pid], $delete)){
                                $uids .= "$comma$post[authorid]";
                                $comma = ',';
                                $actionpost ++;
                                if ($post['aid']) $aids .=','.$post[pid];
                        }
                }

                if ($actionpost < 1) {
                        showmessage('admin_delpost_invalid');
                }elseif($actionpost <> count($delete)){
                        showmessage('admin_moderate_accesserror', NULL, 'HALTED');
                }elseif($actionpost >= $totalpost ){
                        header("Location: {$boardurl}topicadmin.php?action=delete&fid=$fid&tid=$tid&page=$page&fpage=$fpage");
                }
               
                updatemember('-', $uids, $deletedcredits);

                if ($aids){
                        require_once DISCUZ_ROOT.'./include/attachment.php';
                        $query = $db->query("SELECT pid, attachment, filetype FROM $table_attachments WHERE pid IN ($aids)");
                        while($attach = $db->fetch_array($query)) {
                                        @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
                        }
                        $db->query("DELETE FROM $table_attachments WHERE pid IN ($aids)");
                        updatethread_type($tid , $thread['attachment']);
                }

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

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

        }

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

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

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

        } else {

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

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

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

        }

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

elseif($action == 'xm_highlight' && $allowhighlight) {
        if(!submitcheck('xm_highlightsubmit')) {
      
                $xm_hl_string=explode(',',$thread['xm_hl']);
               
                for($i = 1; $i <=10; $i++) {
                        $xu_check[$i] =$i==$xm_hl_string[0] ?  'checked' : NULL;
                                                                        
           }

          if($xm_hl_string[0]){            
           switch($xm_hl_string[0]){
           
           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];
                   break;                                    
           
           case 2:
                   $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];                  
                   break;
                              
           case 3:
                   $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];                           
                   break;           
           
           case 4:
                   $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];                     
                   break;           
                     
           case 5:
                   $xm_id_51=$xm_hl_string[1];$xm_id_52=$xm_hl_string[2];               
                   break;   
           
           case 6:
                   $xm_id_61=$xm_hl_string[1];$xm_id_62=$xm_hl_string[2];$xm_id_63=$xm_hl_string[3];                             
                   break;
           case 7:
                   $xm_id_71=$xm_hl_string[1];$xm_id_72=$xm_hl_string[2];$xm_id_73=$xm_hl_string[3];                             
                   break;
           case 8:
                   $xm_id_81=$xm_hl_string[1];$xm_id_82=$xm_hl_string[2];$xm_id_83=$xm_hl_string[3];                             
                   break;
           case 9:
                   $xm_id_91=$xm_hl_string[1];$xm_id_92=$xm_hl_string[2];                             
                   break;                                                           
                     
           default: break;         
              }
           
           }
        include template('topicadmin_xm_highlight');

        } else {

                $xm_hl_str = '';
               
                if($xm_hl_id==1){$xm_hl_str=$xm_hl_id.','.$font_color.','.$font_size.','.$font_style.','.$font_underline;
               
                }
               
                else if($xm_hl_id==2){$xm_hl_str=$xm_hl_id.','.$text_color1.','.$text_color2.','.$speed_1.','.$pause_1;
               
                }
               
                else if($xm_hl_id==3){ $xm_hl_str=$xm_hl_id.','.$textoffset1.','.$textoffset2.','.$speed_2.','.$pause_2;
               
                }
               
                else if($xm_hl_id==4){ $xm_hl_str=$xm_hl_id.','.$textcolor.','.$textsize1.','.$speed_3.','.$pause_3;
               
                }
               
                else if($xm_hl_id==5){ $xm_hl_str=$xm_hl_id.','.$sider_color.','.$text_color;
                 
                }
               
                else if($xm_hl_id==6){ $xm_hl_str=$xm_hl_id.','.$start_color.','.$start_n.','.$end_color;
                 
                }
                else if($xm_hl_id==7){ $xm_hl_str=$xm_hl_id.','.$glow_color1.','.$glow_pow.','.$glow_color2;
                 
                }
                else if($xm_hl_id==8){ $xm_hl_str=$xm_hl_id.','.$shadow_color1.','.$shadow_view.','.$shadow_color2;
                 
                }
                else if($xm_hl_id==9){ $xm_hl_str=$xm_hl_id.','.$bg_color.','.$face_color;
                 
                }                                                        
                else if($xm_hl_id==10){ $xm_hl_str=$xm_hl_id;
                 
                }                        
               
                else if($xm_hl_id==11){ $xm_hl_str='';
               
                }        
                        
                else showmessage('undefined_action');
               
               
                if(strlen($xm_hl_str)>25){ $xm_hl_str=substr($xm_hl_str,0, 25);}
               
               
                $db->query("UPDATE $table_threads SET xm_hl='$xm_hl_str' WHERE tid='$tid'");

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

}

//=====八种自定义参数标题醒目+任意颜色高亮==end==By lu5266=====================
elseif($action == 'digest' && $allowdigest) {
        if(!submitcheck('digestsubmit')) {

                include template('topicadmin_digest');

        } else {

                if($level < 0 || $level > 3) {
                        showmessage('undefined_action', NULL, 'HALTED');
                }
                $digest_mark=($level-intval($thread['digest']))*$digestcredits;

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

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

        }

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

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

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

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

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

                include template('topicadmin_delete');

        } else {

                $uids = $comma = '';
                $query = $db->query("SELECT authorid,aid FROM $table_posts WHERE tid='$tid'");
                $aids = 0;
                while($post = $db->fetch_array($query)) {
                        $uids .= "$comma$post[authorid]";
                        $comma = ',';
                        if ($post['aid']) $aids++;
                }
                updatemember('-', $uids, $deletedcredits);

                $db->query("DELETE FROM $table_threads WHERE tid='$tid'");
                $db->query("DELETE FROM $table_posts WHERE tid='$tid'");
               
                if ($aids){
                        $query = $db->query("SELECT attachment FROM $table_attachments WHERE tid='$tid'");
                        while($attach = $db->fetch_array($query)) {
                                @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
                        }
                        $db->query("DELETE FROM $table_attachments WHERE tid='$tid'");
                }
               
                updateforumcount($fid);
                if ($forum['type'] == 'sub') {
                        updateforumcount($fup['fid']);
                }

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

        }

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

        if(!submitcheck('closesubmit')) {

                include template('topicadmin_openclose');

        } else {
                $openclose = $thread['closed'] ? 0 : 1;
                $db->query("UPDATE $table_threads SET closed='$openclose' WHERE tid='$tid' AND fid='$fid'");
                modlog();
                showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$fpage");
        }

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

        if(!submitcheck('movesubmit')) {

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

                $forumselect = forumselect();
                include template('topicadmin_move');

        } else {

                if(!$moveto) {
                        showmessage('admin_move_invalid');
                }

                $displayorderadd = !$adminglobal ? ", displayorder='0'" : NULL;
                if($type == 'normal') {
                        $db->query("UPDATE $table_threads SET fid='$moveto' $displayorderadd WHERE tid='$tid' AND fid='$fid'");
                        $db->query("UPDATE $table_posts SET fid='$moveto' WHERE tid='$tid' AND fid='$fid'");
                } else {
                        $db->query("INSERT INTO $table_threads (fid, creditsrequire, iconid, author, authorid, subject, dateline, lastpost, lastposter, views, replies, displayorder, digest, closed, poll, attachment)
                                VALUES ('$thread[fid]', '$thread[creditsrequire]', '$thread[iconid]', '".addslashes($thread['author'])."', '$thread[authorid]', '$thread[subject]', '$thread[dateline]', '$thread[lastpost]', '$thread[lastposter]', '0', '0', '0', '0', '$thread[tid]', '0', '0')");

                        $db->query("UPDATE $table_threads SET fid='$moveto' $displayorderadd WHERE tid='$tid' AND fid='$fid'");
                        $db->query("UPDATE $table_posts SET fid='$moveto' WHERE tid='$tid' AND fid='$fid'");
                }

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

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

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

        if(!submitcheck('topsubmit')) {

                include template('topicadmin_topuntop');

        } else {

                if($level < 0 || $level > 3) {
                        showmessage('undefined_action');
                }
                $db->query("UPDATE $table_threads SET displayorder='$level' WHERE tid='$tid' AND fid='$fid'");

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

        }

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

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

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

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

        include template('topicadmin_getip');

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

        if(!submitcheck('bumpsubmit')) {

                include template('topicadmin_bump');

        } else {

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

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

        }

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

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


                $replies = $thread['replies'];
                if($replies <= 0) {
                        showmessage('admin_split_invalid');
                }

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

                include template('topicadmin_split');

        } else {

                if(!trim($subject)) {
                        showmessage('admin_split_subject_invalid');
                }
                $subject = $subject ? dhtmlspecialchars(censor(trim($subject))) :'';

                $pids = implode_ids( $split );

                if($pids) {

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

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

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

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

                        updatethreadcount($tid);
                        updatethreadcount($newtid);
                        updateforumcount($fid);

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

                } else {
                        showmessage('admin_split_new_invalid');
                }
        }

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

        if(!submitcheck('mergesubmit')) {

                include template('topicadmin_merge');

        } else {

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

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

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

                $db->query("UPDATE $table_attachments SET tid='$tid' WHERE tid='$othertid'");
                $db->query("DELETE FROM $table_threads WHERE tid='$othertid'");
                $db->query("UPDATE $table_threads SET views=views+$other[views], replies=replies+$other[replies] WHERE tid='$tid'");
               
                if($fid == $other['fid']) {
                        $db->query("UPDATE $table_forums SET threads=threads-1 WHERE fid='$fid' $fupadd");
                } else {
                        $db->query("UPDATE $table_forums SET threads=threads-1, posts=posts-$postsmerged WHERE fid='$other[fid]'");
                        $db->query("UPDATE $table_forums SET posts=$posts+$postsmerged WHERE fid='$fid' $fupadd");
                }

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

        }

} else {

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

}

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

        if(!$action) {
                $action = $GLOBALS['action'];
        }
        if (!$thread['tid']) $thread['tid']=intval($GLOBALS['tid']);
        if ($action == 'moderate'){
                $action .='_'.$operation;
                $thread[subject] = $tids;
                $thread[tid] = 0;
        }
        @$fp = fopen(DISCUZ_ROOT.'./forumdata/modslog.php', 'a');
        @flock($fp, 2);
        @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");
        @fclose($fp);
}

function accesscheck($query) {
        global $db,$fid;
        while($thread = $db->fetch_array($query)) {
                if($thread['fid'] <> $fid){
                        showmessage('admin_moderate_accesserror', NULL, 'HALTED');
                }
        }
}

?>


forumdisplay.php
<?php

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

define('CURRSCRIPT',  'forumdisplay');

require './include/common.php';
require DISCUZ_ROOT.'./include/forum.php';

$discuz_action = 2;

if(isset($showoldetails)) {
        switch ($showoldetails) {
                case 'no': setcookie('onlinedetail', 0, $timestamp + 86400 * 365, $cookiepath, $cookiedomain); break;
                case 'yes': setcookie('onlinedetail', 1, $timestamp + 86400 * 365, $cookiepath, $cookiedomain); break;
        }
} else {
        $showoldetails = false;
}

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

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

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

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

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

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

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

$subexists = 0;
foreach($_DCACHE['forums'] as $sub) {
        if($sub['type'] == 'sub' && $sub['fup'] == $fid && ($accessmasks || !$hideprivate || !$sub['viewperm'] || strstr($sub['viewperm'], "\t$groupid\t") || strstr($sub['users'], "\t$discuz_uid\t"))) {
                $sublist = array();
                $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
                                                LEFT JOIN $table_access a ON a.uid='$discuz_uid' AND a.fid=f.fid
                                                WHERE fup='$fid' AND status='1' AND type='sub' ORDER BY f.displayorder"
                                        : "SELECT fid, fup, type, icon, name, description, moderator, threads, posts, lastpost, viewperm FROM $table_forums WHERE fup='$fid' AND status='1' AND type='sub' ORDER BY displayorder";
                $query = $db->query($sql);
                while($sub = $db->fetch_array($query)) {
                        if(forum($sub)) {
                                $sublist[] = $sub;
                                $subexists = 1;
                        }
                }
                break;
        }
}

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

$announcement_list = array();
if($page == 1  && $_DCACHE['announcements_forum']) {
        foreach($_DCACHE['announcements_forum'] as $ann) {
                $ann['authorencode'] = rawurlencode($ann['author']);
                $ann['starttime'] = gmdate("$dateformat $timeformat", $ann['starttime'] + ($timeoffset * 3600));
                $announcement_list[] = $ann ;
        }
}       

$forumdisplayadd = $filteradd = '';
if(!empty($filter)) {
        if(is_numeric($filter)) {
                $forumdisplayadd .= "&filter=$filter";
                $filteradd = "AND lastpost>='".($timestamp - $filter)."'";
        } elseif($filter == 'digest') {
                $forumdisplayadd .= "&filter=digest";
                $filteradd = "AND digest>'0'";
        }
} else {
        $filter = '';
}

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


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

        if($detailstatus) {
                updatesession();
                @include language('actions');

                $whosonline = array();
                $forumname = strip_tags($forum['name']);
                $query = $db->query("SELECT uid, groupid, username, invisible, lastactivity, action FROM $table_sessions WHERE uid>'0' AND fid='$fid' AND invisible='0'");
                if($db->num_rows($query)) {
                        $whosonlinestatus = 1;
                        while($online = $db->fetch_array($query)) {
                                $online['icon'] = isset($_DCACHE['onlinelist'][$online['groupid']]) ? $_DCACHE['onlinelist'][$online['groupid']] : $_DCACHE['onlinelist'][0];
                                $online['action'] = $actioncode[$online['action']];
                                $online['lastactivity'] = gmdate($timeformat, $online['lastactivity'] + ($timeoffset * 3600));
                                $whosonline[] = $online;     
                        }
                }
                unset($online);
        }
} else {
        $whosonlinestatus = 0;
}

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

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

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

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

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

        $postsnum = $thread['replies'] + 1;
        if($postsnum  > $ppp) {
                $pagelinks = '';
                $topicpages = ceil($postsnum / $ppp);
                for ($i = 1; $i <= $topicpages; $i++) {
                        $pagelinks .= "<a href=\"viewthread.php?tid=$thread[tid]&page=$i&fpage=$page\">$i</a> ";
                        if($i == 6) {
                                $i = $topicpages + 1;
                        }
                }
                if($topicpages > 6) {
                        $pagelinks .= " .. <a href=\"viewthread.php?tid=$thread[tid]&page=$topicpages&fpage=$page\">$topicpages</a> ";
                }
                $thread['multipage'] = '&nbsp; &nbsp;( <img src="'.IMGDIR.'/multipage.gif" align="absmiddle" boader="0"> '.$pagelinks.')';
        } else {
                $thread['multipage'] = '';
        }

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

                $thread['highlight'] = 'style="';
                $thread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $thread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $thread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $thread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $thread['highlight'] .= '"';
        } else {
                $thread['highlight'] = '';
        }
//=====八种自定义参数标题醒目+任意颜色高亮==start==By www.5466.ik8.com==============


   
   if($thread['xm_hl']) {
        
           $xm_hl_string=explode(',',$thread['xm_hl']);
           
           switch($xm_hl_string[0]){
           
           case 1:
                  $xm_hl_style  = '<font style="';
                  $xm_hl_style .= $xm_hl_string[1] ? 'color: #'.$xm_hl_string[1].'; ' : '';        
                      $xm_hl_style .= $xm_hl_string[2] ? 'font-weight: bold;' : '';
                      $xm_hl_style .= $xm_hl_string[3] ? 'font-style: italic;' : '';
                      $xm_hl_style .= $xm_hl_string[4] ? 'text-decoration: underline;' : '';               
                      $xm_hl_style .= '">';
                      $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
                      break;
           case 2:
                  $xm_hl_style  = '<font textcolor1="#'.$xm_hl_string[1].'"  textbkcolor1="transparent" textcolor2="#'.$xm_hl_string[2];
                  $xm_hl_style .='" textbkcolor2="transparent" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
                  $xm_hl_style .='" style="behavior:url(include/z_FlashText.htc);color:#c000c0;background-color:transparent">';
                      $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
                      break;
           case 3:
                  $xm_hl_style  = '<font textoffset1="'.$xm_hl_string[1].'" textoffset2="'.$xm_hl_string[2];
                  $xm_hl_style .='" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
                  $xm_hl_style .='" style="behavior:url(include/z_WaveText.htc);color:#FF5500;background-color:transparent">';
                      $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
                      break;                     
           case 4:
                  $xm_hl_style  = '<font textcolor="#'.$xm_hl_string[1].'" basesize="12" textsize1="'.$xm_hl_string[2];
                  $xm_hl_style .='" textsize2="14" speed="'.$xm_hl_string[3].'" letters1="1" letters2="1" pause="'.$xm_hl_string[4];
                  $xm_hl_style .='" style="behavior:url(include/z_ResizeText.htc);color:#993300;background-color:transparent;">';
                      $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
                      break;                           
           case 5:
                  $xm_hl_style  = '<span style=\'border:solid 1px #'.$xm_hl_string[1].';border-left-width:5px;border-left-color:#'.$xm_hl_string[1];
                  $xm_hl_style .=';background:#ffffff;padding:1px 5px 2px 5px;font-size: 8pt\'><font color="#'.$xm_hl_string[2];
                  $xm_hl_style .='">';
                      $thread[subject]=$xm_hl_style.$thread[subject].'</font></span>';
                      break;
           case 6:
                  $start_str=substr($thread[subject],0,$xm_hl_string[2]);
                  $end_str=substr($thread[subject],$xm_hl_string[2]);
                  if($xm_hl_string[3])
                  $thread[subject]  = '<font color="'.$xm_hl_string[1].'">'.$start_str.'</font><font color="'.$xm_hl_string[3].'">'.$end_str.'</font>';                     
              else
              $thread[subject]  = '<font color="'.$xm_hl_string[1].'">'.$start_str.'</font>'.$end_str;
              break;
           case 7:
                  $xm_hl_style  = '<font style="filter: glow(color=#'.$xm_hl_string[1].',strength='.$xm_hl_string[2];
                  $xm_hl_style .='); height:20px; color: #'.$xm_hl_string[3];
                  $xm_hl_style .='">';
                      $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
                      break;
           case 8:
                  $xm_hl_style  = '<font style="filter: shadow(color=#'.$xm_hl_string[1].',direction='.$xm_hl_string[2];
                  $xm_hl_style .='); height:20px; color: #'.$xm_hl_string[3];
                  $xm_hl_style .='">';
                      $thread[subject]=$xm_hl_style.$thread[subject].'</font>';
                      break;
           case 9:
                  $xm_hl_style  = '<font style="background-color: #'.$xm_hl_string[1].';" color="#'.$xm_hl_string[2].'"><b>';
                  $thread[subject]=$xm_hl_style.$thread[subject].'</b></font>';
                      break;                                            
           case 10:                  
                      $thread[subject]='<span style="behavior:url(./include/rainbow.htc)">'.$thread[subject].'</span>';
                      break;              
         default:  $thread[subject]=$thread[subject];   
                   }   
        
        
        }
//=====八种自定义参数标题醒目+任意颜色高亮==end==By lu5266=====================
        if($thread['closed']) {
                $thread['new'] = 0;
                if($thread['closed'] > 1) {
                        $thread['moved'] = $thread['tid'];
                        $thread['tid'] = $thread['closed'];
                        $thread['replies'] = '-';
                        $thread['views'] = '-';
                } else {
                        $thread['moved'] = 0;
                }
                $thread['folder'] = 'lock_folder.gif';
        } else {
                $thread['folder'] = 'folder.gif';
                if($lastvisit < $thread['lastpost'] && !strstr($_COOKIE['oldtopics'], "\t$thread[tid]\t")) {
                        $thread['new'] = 1;
                        $thread['folder'] = 'red_'.$thread['folder'];
                } else {
                        $thread['new'] = 0;
                }
                if($thread['replies'] > $thread['views']) {
                        $thread['views'] = $thread['replies'];
                }
                if($thread['replies'] >= $hottopic) {
                        $thread['folder'] = 'hot_'.$thread['folder'];
                }
        }

        if($thread['attachment']) {
                require_once DISCUZ_ROOT.'./include/attachment.php';
                $thread['attachment'] = attachtype($thread['attachment']).' ';
        } else {
                $thread['attachment'] = '';
        }
        //$thread[subject] = cutstr($thread[subject],77);
        $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
        $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);

        if($thread['displayorder'] > 0) {
                $separatepos++;
        }
        $threadlist[] = $thread;

}

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

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

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

include template('forumdisplay');

?>
回复

使用道具 举报

shutiao 发表于 2005-10-8 12:24:09 | 显示全部楼层
viewthread.htm
{template header}
<table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" style="table-layout: fixed">
<tr><td class="nav" width="90%" align="left" nowrap>&nbsp;<a href="index.php">$bbname</a> $navigation</td>
<td align="right" width="10%">&nbsp;<a href="#bottom"><img src="{IMGDIR}/arrow_dw.gif" border="0" align="absmiddle"></a></td>
</tr></table><br>

<!--{if $polloptions}-->
        {template viewthread_poll}
<!--{/if}-->

<!--{if $newpmexists}-->
        {template pmprompt}
<!--{/if}-->

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

</td></tr></table>

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

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

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

</tr>

<!--{loop $postlist $postkey $post}-->
        <!--{eval $postpid=$post[pid]}-->
        $post[newpostanchor]
        <tr bgcolor="$post[thisbg]">
        <td valign="top" width="21%"><a name="pid$post[pid]"></a>
        <!--{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}-->
        <!--{if $post['authorid']}-->
                <span class="bold">$post[author]</span><br><span class="smalltxt">
                <!--{if $post['username']}-->$post[authortitle]<!--{else}-->{lang member_deleted}<!--{/if}-->
        <!--{else}-->
                <span class="bold">{lang guest}</span> <span class="smalltxt">$post[useip]</span><br><span class="smalltxt">{lang unregistered}
        <!--{/if}-->
        <br>{eval showstars($post['stars']);}<br>$post[customstatus]<br><br>
        <!--{if $post['avatar']}-->
                <table width="95%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed">
                <tr><td align="center">$post[avatar]</td></tr></table><br>
        <!--{else}-->
                <br><br>
        <!--{/if}-->
        {lang credit_title} $post[credit]<br>
        {lang prestige}: $post['prestige']<br>
    {lang readpope}: $post['readpope']<br>
    {lang sinew}: $post['sinew']<br>
        {lang postnum} $post[postnum]<br>
        {lang regtime} $post[regdate]
        <!--{if $post['location']}--><br>{lang location} $post[location]<!--{/if}--><br>
        <!--{if $vtonlinestatus && $post['authorid']}-->
                <!--{if $timestamp - $post['lastactivity'] <= 10800}-->
                        {lang online_status} <b>{lang online}</b>
                <!--{else}-->
                        {lang online_status} {lang offline}
                <!--{/if}-->
        <!--{/if}-->
        </span>
        </td>
        <td width="79%" height="100%" valign="top">
        <table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; word-wrap: break-word">
        <td width="79%" height="100%" valign="top" aling="left">
        $woselect{$post[words]}
    <hr size=1 noshade color={BGCOLOR}>
        <!--{if $postkey == $topiccount-1}--><a name="#lastpost"></a><!--{/if}-->
        <span class="bold"><span class="smalltxt">$post[karma]
        <!--{if $post['postcount'] == 1}--><font color=red>{lang post_first}</font>
<!--{else}--><font color=red>$post['postcount']</font> {lang post_unit}<!--{/if}--> </span>&nbsp;$post[subject]</span><br><br>
        $post[message]
        <br><br>
            
<!--{if $attachelist[$post[pid]]}-->
        <!--{eval $attacount = 0; }-->
        <blockquote><!--{loop $attachelist[$post[pid]] $vkey $attach}-->
                        {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]
                        <!--{if $attach[creditsrequire]}-->, {lang creditsrequire_attach}{lang credit_title} $attach[creditsrequire] {lang credit_unit}<!--{/if}-->
                        <!--{if $attach[downloads]}-->,{lang downloads}: $attach[downloads]<!--{/if}--> )
                <!--{if $attach['attachimg']}-->
                        <br><br><!--{if !$attachimgcheck}-->
                                <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);">
                        <!--{else}-->
                                <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>

                        <!--{/if}-->
                <!--{/if}-->
        <br><!--{/loop}--></blockquote>
<!--{/if}-->

        <!--{if $post['signature']}--><br></td></tr><tr>
                  <td align="left" valign="bottom"><img src="images/common/sigline.gif"><br>
                    $post[signature]<!--{/if}-->
        </td></tr></table>
        </td></tr>
        <tr bgcolor="$post[thisbg]"><td valign="middle" class="smalltxt">
        <!--{if $ismoderator && $allowdelpost && $post['postcount'] > 1}--><input type="checkbox" name="delete[]" value="$post[pid]"><!--{/if}-->
        <img src="{IMGDIR}/lastpost.gif" align="absmiddle">
        $post[dateline]</td><td valign="middle">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class="smalltxt"><td align="left">
        <!--{if $post['username']}-->
                <a href="viewpro.php?uid=$post[authorid]"><img src="{IMGDIR}/profile.gif" border="0" alt="{lang view_profile}"></a>&nbsp;
                <!--{if $post['showemail']}--><a href="mailtopost[email]"><img src="{IMGDIR}/email.gif" border="0" alt="{lang send_mail}"></a>&nbsp;<!--{/if}-->
                <!--{if $post['site']}--><a href="$post[site]" target="_blank"><img src="{IMGDIR}/site.gif" border="0" alt="{lang visit_home}"></a>&nbsp;<!--{/if}-->
                <a href="pm.php?action=send&uid=$post[authorid]" target="_blank"><img src="{IMGDIR}/pm.gif" border="0" alt="{lang send_pm}"></a>&nbsp;
                <!--{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}-->
                <!--{/if}-->
        </td><td align="right">
        &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>
        <!--{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}-->
        <!--{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}-->
        <!--{if $allowkarma && $maxkarmarate}-->
                &nbsp;<select name="fid" onchange="if(this.options[this.selectedIndex].value != '') {
                window.location=('misc.php?action=karma&tid=$tid&pid=$post[pid]&score='+this.options[this.selectedIndex].value+'&sid=$sid') }" align="absmiddle">
                <option value="">{lang rate}</option>
                <option value="">----</option>
                $karmaoptions
                </select>
        <!--{/if}-->

        </td></tr></table>
        </td></tr>
<!--{/loop}-->
</table></td></tr></table>

<table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="multi" valign="top">$multipage</td><td align="right"><br>
<!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
<!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
<!--{if $allowpostreply}--><a href="post.php?action=reply&fid=$fid&tid=$tid"><img src="{IMGDIR}/reply.gif" border="0"></a><!--{/if}-->
</td></tr></table></form>

<!--{if $fastpost && $allowpostreply}-->
        <script language="JavaScript">
        var postminchars = $minpostsize;
        var postmaxchars = $maxpostsize;
        var disablepostctrl = $disablepostctrl;
        function validate(theform) {
                if (theform.message.value == "" && theform.subject.value == "") {
                        alert("{lang post_subject_and_message_isnull}");
                        return false;
                }
                if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
                        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}");
                        return false;
                }                       
                theform.replysubmit.disabled = true;
                return true;
        }
        </script>
        <form method="post" name="input" action="post.php?action=reply&fid=$fid&tid=$tid&replysubmit=yes" onSubmit="return validate(this)">
        <input type="hidden" name="formhash" value="{FORMHASH}">
        <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" bgcolor="{BORDERCOLOR}"><tr><td>
        <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
        <tr><td colspan="2" class="header">{lang post_fastreply}</td></tr>
        <tr>
        <td width="18%" bgcolor="{ALTBG1}">{lang subject}:</td>
        <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><input type="text" name="subject" size="80" value="" tabindex="1">
              &nbsp; [{lang optional}]</td>
        </tr>
        <tr>
        <td width="18%" bgcolor="{ALTBG1}" valign="top">{lang options}:<br><span class="smalltxt">
        <input type="checkbox" name="parseurloff" value="1">&nbsp;{lang disable} {lang post_parseurl}<br>
        <input type="checkbox" name="smileyoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=messages#6" target="_blank">{lang post_smilies}</a><br>
        <input type="checkbox" name="bbcodeoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=misc#1" target="_blank">{lang post_discuzcode}</a><br>
        <input type="checkbox" name="usesig" value="1" $usesigcheck>&nbsp;{lang post_show_sig}<br>
        <input type="checkbox" name="emailnotify" value="1">&nbsp;{lang post_email_notify}</span>
        </td>
        <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><textarea rows="7" cols="90" name="message" onKeyDown="javascript: ctlent();" tabindex="2"></textarea><br>
        <input type="submit" name="replysubmit" value="{lang post_topicsubmit}" tabindex="3">&nbsp;&nbsp;&nbsp;
        <input type="submit" name="previewpost" value="{lang post_previewpost}" tabindex="4">&nbsp;&nbsp;&nbsp;
        <input type="reset" name="topicsreset" value="{lang post_topicreset}" tabindex="5">&nbsp; &nbsp;{lang post_submit_hotkey}</td>
        </tr></table></td></tr></table></form>
<!--{/if}-->

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

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

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

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

<!--{if $ismoderator}-->
        <span class="bold">{lang admin_modoptions}:</span>
        <select name="action" id="action" onchange="if(this.options[this.selectedIndex].value != '') { if(this.options[this.selectedIndex].value != 'delpost') {
        window.location=('topicadmin.php?tid=$tid&fid=$fid&action='+this.options[this.selectedIndex].value+'&fpage=$fpage&page=$page&sid=$sid');
        } else { this.document.delpost.submit(); } }">
        <option value="" selected>{lang admin_modoptions}</option>
        <!--{if $allowdelpost}-->
        <option value="delpost">{lang admin_delpost}</option>
        <option value="delete">{lang admin_delthread}</option>
        <!--{/if}-->
        <!--{if $allowclose}-->
        <option value="close"><!--{if $thread['closed']}-->{lang admin_open}<!--{else}-->{lang admin_close}<!--{/if}--></option>
        <!--{/if}-->
        <!--{if $allowmove}-->
        <option value="move">{lang admin_move}</option>
        <!--{/if}-->
        <!--{if $allowhighlight}-->
        <option value="highlight">{lang admin_highlight}</option>
        <option value="xm_highlight">醒目高亮显示</option>
        <!--{/if}-->
        <!--{if $allowdigest}-->
        <option value="digest"><!--{if $thread['digest']}-->{lang admin_digest_remove}<!--{else}-->{lang admin_digest_add}<!--{/if}--></option>
        <!--{/if}-->
        <!--{if $allowtop}-->
        <option value="top"><!--{if $thread['displayorder']}-->{lang admin_unstick}<!--{else}-->{lang admin_stick}<!--{/if}--></option>
        <!--{/if}-->
        <!--{if $allowsplit}-->
        <option value="split">{lang admin_split}</option>
        <!--{/if}-->
        <!--{if $allowmerge}-->
        <option value="merge">{lang admin_merge}</option>
        <!--{/if}-->
        <option value="bump">{lang admin_bump}</option>

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

</td>
</tr></table><br><br>
{template footer}
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-8 12:38:02 | 显示全部楼层
从文件
没看出什么问题

你升级数据库了没

还有怎么个不成功法?

什么错误???
回复

使用道具 举报

shutiao 发表于 2005-10-8 12:42:54 | 显示全部楼层
什么错误也没有,但是这个功能 也没有。数据库我升级了,其它步骤我也照样做的

[ 本帖最后由 shutiao 于 2005-10-8 12:45 编辑 ]
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-8 12:45:12 | 显示全部楼层
原帖由 shutiao 于 2005-10-8 12:42 发表
什么错误也没有,但是没有这个功能 也没有。数据库我升级了,其它步骤我也照样做的


把你的地址和有超版以上的权限帐号pm给我去测试下
回复

使用道具 举报

shutiao 发表于 2005-10-8 12:57:09 | 显示全部楼层
帐号:测试专用
密码:123456
http://shutiao.vicp.net/bbs/index.php
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-8 13:02:40 | 显示全部楼层
原帖由 shutiao 于 2005-10-8 12:57 发表
帐号:测试专用
密码:123456
http://shutiao.vicp.net/bbs/index.php

  1. Discuz! info: MySQL Query Error

  2. User: 测试专用
  3. Time: 2005-10-8 1:03pm
  4. Script: /bbs/topicadmin.php

  5. SQL: UPDATE cdb_threads SET xm_hl='9,ff0000,FFFFFF' WHERE tid='1'
  6. Error: Unknown column 'xm_hl' in 'field list'


  7. An error report has been dispatched to our administrator.
复制代码


你没升级数据库

[ 本帖最后由 lu5266 于 2005-10-8 13:03 编辑 ]
回复

使用道具 举报

shutiao 发表于 2005-10-8 13:06:25 | 显示全部楼层
数据库我先升级过了,后来又回复了
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-29 23:18 , Processed in 0.130839 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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