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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

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

[复制链接]
 楼主| lu5266 发表于 2005-9-23 20:06:28 | 显示全部楼层
原帖由 virus8000 于 2005-9-23 19:06 发表
搞定


哈哈
回复

使用道具 举报

oytktk 发表于 2005-9-23 23:51:43 | 显示全部楼层
这个继续顶~
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-24 07:39:38 | 显示全部楼层
原帖由 oytktk 于 2005-9-23 23:51 发表
这个继续顶~

回复

使用道具 举报

ak4777 发表于 2005-9-26 06:08:03 | 显示全部楼层
看看我哪儿错了?
TOPADMIN.PHP
PHP Parse error: parse error in www\bbs\topicadmin.php on line 284

<?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) ");
        accesscheck($query);
        $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');
                        }


                        $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){
                        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) {
                        $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++;
                        }
                        //删贴扣钱开始
                        $postmoney = 5;  //删除一贴所扣钱数,可自行修改
                        updatemoney('-', $uids, $postmoney);
            //删贴扣钱结束

                        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)");
                        if ($forum['type'] == 'sub') {
                                updateforumcount($fup['fid']);
                        }

                        updateforumcount($fid);

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

                }elseif($operation == 'close' && $allowclose){
                        $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;
                                        $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");
                }
                //删贴扣钱开始
                        $postmoney = 5;  //删除一贴所扣钱数,可自行修改
                        updatemoney('-', $uids, $postmoney);
           //删贴扣钱结束
                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++;
                }
                //删贴扣钱开始
                        $postmoney = 5;  //删除一贴所扣钱数,可自行修改
                        updatemoney('-', $uids, $postmoney);
         //删贴扣钱结束

                updatemember('-', $uids, $deletedcredits);

                $db->query("DELETE FROM $table_threads WHERE tid='$tid'");
                $db->query("DELETE FROM $table_posts WHERE tid='$tid'");
                $db->query("DELETE FROM $table_polls 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');
                }
        }
}

?>
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-26 07:39:49 | 显示全部楼层
加错了位置啊

加前了一个括号


  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. $discuz_action = 151;

  20. $tid   = $tid ? $tid :'';
  21. $page  = intval($page);
  22. $fpage = intval($fpage);

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

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

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

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

  41. if($action == 'moderate') {
  42.         if(!is_array($moderate) || !count($moderate)) {
  43.                 showmessage('admin_moderate_nothread');
  44.         }elseif(!$operation){
  45.                 showmessage('admin_moderate_nooperation');
  46.         }
  47.         $tids = implode_ids($moderate);
  48.         $query = $db->query("SELECT * FROM $table_threads WHERE tid IN($tids) ");
  49.         accesscheck($query);
  50.         $query = $db->query("SELECT * FROM $table_threads WHERE tid IN($tids) ");
  51.         if(!submitcheck('moderatesubmit')){
  52.                 $threadlist = array();
  53.                 while($thread = $db->fetch_array($query)) {
  54.                         if($thread['fid'] == $fid){
  55.                                 $thread['lastposterenc'] = rawurlencode($thread['lastposter']);
  56.                                 if($thread['attachment']) {
  57.                                         require_once DISCUZ_ROOT.'./include/attachment.php';
  58.                                         $thread['attachment'] = attachtype($thread['attachment']).' ';
  59.                                 } else {
  60.                                         $thread['attachment'] = '';
  61.                                 }
  62.                                 $thread[subject] = cutstr($thread[subject],77);
  63.                                 $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
  64.                                 $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);
  65.                                 $threadlist[] = $thread;
  66.                         }
  67.                 }
  68.                
  69.                 if(!$threadlist) showmessage('admin_moderate_nothread');

  70.                 if($operation == 'move') {
  71.                         require_once DISCUZ_ROOT.'./include/forum.php';
  72.                         $forumselect = forumselect();
  73.                 }
  74.                 include template('topicadmin_moderate');
  75.         
  76.         }else{
  77.         
  78.                 if($operation == 'move' && $allowmove) {
  79.                         if(!$moveto) {
  80.                                 showmessage('admin_move_invalid');
  81.                         }


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

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

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

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

  101.                 }elseif($operation == 'delete' && $allowdelpost) {
  102.                         $uids = $comma = '';
  103.                         $haveattach = 0;
  104.                         $query = $db->query("SELECT authorid ,aid FROM $table_posts WHERE tid IN ($tids)");
  105.                         while($post = $db->fetch_array($query)) {
  106.                                 $uids .= "$comma$post[authorid]";
  107.                                 $comma = ',';
  108.                                 if ($post['aid']) $haveattach++;
  109.                         }
  110.                         //删贴扣钱开始
  111.                         $postmoney = 5;  //删除一贴所扣钱数,可自行修改
  112.                         updatemoney('-', $uids, $postmoney);
  113.             //删贴扣钱结束

  114.                         updatemember('-', $uids, $deletedcredits);

  115.                         if ($haveattach){
  116.                                 $query = $db->query("SELECT attachment FROM $table_attachments WHERE tid IN ($tids)");
  117.                                 while($attach = $db->fetch_array($query)) {
  118.                                         @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
  119.                                 }
  120.                                 $db->query("DELETE FROM $table_attachments WHERE tid IN ($tids)");
  121.                         }
  122.                         
  123.                         $db->query("DELETE FROM $table_threads WHERE tid IN ($tids)");
  124.                         $db->query("DELETE FROM $table_polls WHERE tid IN ($tids)");
  125.                         $db->query("DELETE FROM $table_posts WHERE tid IN ($tids)");
  126.                         if ($forum['type'] == 'sub') {
  127.                                 updateforumcount($fup['fid']);
  128.                         }

  129.                         updateforumcount($fid);

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

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

  137.                 }elseif($operation == 'digest' && $allowdigest){
  138.                         if($level < 0 || $level > 3) {
  139.                                 showmessage('undefined_action', NULL, 'HALTED');
  140.                         }
  141.                         while($thread = $db->fetch_array($query)) {
  142.                                 if ($thread['fid'] == $fid && $thread['digest']<>$level){
  143.                                         $digest_mark=($level-intval($thread['digest']))*$digestcredits;
  144.                                         $db->query("UPDATE $table_threads SET digest='$level' WHERE tid='$thread[tid]'");
  145.                                         if($digest_mark && $discuz_uid != $thread[authorid]) {
  146.                                                 $db->query("UPDATE $table_members SET credit=credit".($digest_mark > 0 ? '+' : '')."$digest_mark WHERE uid='$thread[authorid]'");
  147.                                         }
  148.                                 }
  149.                         }
  150.                         modlog();
  151.                         showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");
  152.                 }else{
  153.                         showmessage('admin_nopermission', NULL, 'HALTED');
  154.                 }
  155.         }

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

  157.         if(!is_array($delete) || !count($delete)) {
  158.                 showmessage('admin_delpost_invalid');
  159.         }

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

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

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

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

  172.         } else {

  173.                 $pids = implode_ids( $delete );

  174.                 $uids = $comma = '';
  175.                 $actionpost = $totalpost = $aids = 0;
  176.                 $query = $db->query("SELECT pid, authorid, aid FROM $table_posts WHERE tid='$tid'");
  177.                 $totalpost = $db->num_rows($query);
  178.                 while($post = $db->fetch_array($query)) {
  179.                         if (in_array($post[pid], $delete)){
  180.                                 $uids .= "$comma$post[authorid]";
  181.                                 $comma = ',';
  182.                                 $actionpost ++;
  183.                                 if ($post['aid']) $aids .=','.$post[pid];
  184.                         }
  185.                 }

  186.                 if ($actionpost < 1) {
  187.                         showmessage('admin_delpost_invalid');
  188.                 }elseif($actionpost <> count($delete)){
  189.                         showmessage('admin_moderate_accesserror', NULL, 'HALTED');
  190.                 }elseif($actionpost >= $totalpost ){
  191.                         header("Location: {$boardurl}topicadmin.php?action=delete&fid=$fid&tid=$tid&page=$page&fpage=$fpage");
  192.                 }
  193.                 //删贴扣钱开始
  194.                         $postmoney = 5;  //删除一贴所扣钱数,可自行修改
  195.                         updatemoney('-', $uids, $postmoney);
  196.            //删贴扣钱结束
  197.                 updatemember('-', $uids, $deletedcredits);

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

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

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

  212.         }

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

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

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

  223.         } else {

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

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

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

  235.         }
  236.         
  237. }

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


  239. elseif($action == 'xm_highlight' && $allowhighlight) {
  240.         if(!submitcheck('xm_highlightsubmit')) {
  241.       
  242.                 $xm_hl_string=explode(',',$thread['xm_hl']);
  243.                
  244.                 for($i = 1; $i <=10; $i++) {
  245.                         $xu_check[$i] =$i==$xm_hl_string[0] ?  'checked' : NULL;
  246.                                                                         
  247.            }

  248.           if($xm_hl_string[0]){            
  249.            switch($xm_hl_string[0]){
  250.            
  251.            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];
  252.                    break;                                    
  253.            
  254.            case 2:
  255.                    $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];                  
  256.                    break;
  257.                               
  258.            case 3:
  259.                    $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];                           
  260.                    break;           
  261.            
  262.            case 4:
  263.                    $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];                     
  264.                    break;           
  265.                      
  266.            case 5:
  267.                    $xm_id_51=$xm_hl_string[1];$xm_id_52=$xm_hl_string[2];               
  268.                    break;   
  269.            
  270.            case 6:
  271.                    $xm_id_61=$xm_hl_string[1];$xm_id_62=$xm_hl_string[2];$xm_id_63=$xm_hl_string[3];                             
  272.                    break;
  273.            case 7:
  274.                    $xm_id_71=$xm_hl_string[1];$xm_id_72=$xm_hl_string[2];$xm_id_73=$xm_hl_string[3];                             
  275.                    break;
  276.            case 8:
  277.                    $xm_id_81=$xm_hl_string[1];$xm_id_82=$xm_hl_string[2];$xm_id_83=$xm_hl_string[3];                             
  278.                    break;
  279.            case 9:
  280.                    $xm_id_91=$xm_hl_string[1];$xm_id_92=$xm_hl_string[2];                             
  281.                    break;                                                           
  282.                      
  283.            default: break;         
  284.               }
  285.            
  286.            }
  287.         include template('topicadmin_xm_highlight');

  288.         } else {

  289.                 $xm_hl_str = '';
  290.                
  291.                 if($xm_hl_id==1){$xm_hl_str=$xm_hl_id.','.$font_color.','.$font_size.','.$font_style.','.$font_underline;
  292.                
  293.                 }
  294.                
  295.                 else if($xm_hl_id==2){$xm_hl_str=$xm_hl_id.','.$text_color1.','.$text_color2.','.$speed_1.','.$pause_1;
  296.                
  297.                 }
  298.                
  299.                 else if($xm_hl_id==3){ $xm_hl_str=$xm_hl_id.','.$textoffset1.','.$textoffset2.','.$speed_2.','.$pause_2;
  300.                
  301.                 }
  302.                
  303.                 else if($xm_hl_id==4){ $xm_hl_str=$xm_hl_id.','.$textcolor.','.$textsize1.','.$speed_3.','.$pause_3;
  304.                
  305.                 }
  306.                
  307.                 else if($xm_hl_id==5){ $xm_hl_str=$xm_hl_id.','.$sider_color.','.$text_color;
  308.                  
  309.                 }
  310.                
  311.                 else if($xm_hl_id==6){ $xm_hl_str=$xm_hl_id.','.$start_color.','.$start_n.','.$end_color;
  312.                  
  313.                 }
  314.                 else if($xm_hl_id==7){ $xm_hl_str=$xm_hl_id.','.$glow_color1.','.$glow_pow.','.$glow_color2;
  315.                  
  316.                 }
  317.                 else if($xm_hl_id==8){ $xm_hl_str=$xm_hl_id.','.$shadow_color1.','.$shadow_view.','.$shadow_color2;
  318.                  
  319.                 }
  320.                 else if($xm_hl_id==9){ $xm_hl_str=$xm_hl_id.','.$bg_color.','.$face_color;
  321.                  
  322.                 }                                                        
  323.                 else if($xm_hl_id==10){ $xm_hl_str=$xm_hl_id;
  324.                  
  325.                 }                        
  326.                
  327.                 else if($xm_hl_id==11){ $xm_hl_str='';
  328.                
  329.                 }        
  330.                         
  331.                 else showmessage('undefined_action');
  332.                
  333.                
  334.                 if(strlen($xm_hl_str)>25){ $xm_hl_str=substr($xm_hl_str,0, 25);}
  335.                
  336.                
  337.                 $db->query("UPDATE $table_threads SET xm_hl='$xm_hl_str' WHERE tid='$tid'");

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

  342. }

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

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

  346.                 include template('topicadmin_digest');

  347.         } else {

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

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

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

  358.         }

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

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

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

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

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

  368.                 include template('topicadmin_delete');

  369.         } else {

  370.                 $uids = $comma = '';
  371.                 $query = $db->query("SELECT authorid,aid FROM $table_posts WHERE tid='$tid'");
  372.                 $aids = 0;
  373.                 while($post = $db->fetch_array($query)) {
  374.                         $uids .= "$comma$post[authorid]";
  375.                         $comma = ',';
  376.                         if ($post['aid']) $aids++;
  377.                 }
  378.                 //删贴扣钱开始
  379.                         $postmoney = 5;  //删除一贴所扣钱数,可自行修改
  380.                         updatemoney('-', $uids, $postmoney);
  381.          //删贴扣钱结束

  382.                 updatemember('-', $uids, $deletedcredits);

  383.                 $db->query("DELETE FROM $table_threads WHERE tid='$tid'");
  384.                 $db->query("DELETE FROM $table_posts WHERE tid='$tid'");
  385.                 $db->query("DELETE FROM $table_polls WHERE tid='$tid'");
  386.                
  387.                 if ($aids){
  388.                         $query = $db->query("SELECT attachment FROM $table_attachments WHERE tid='$tid'");
  389.                         while($attach = $db->fetch_array($query)) {
  390.                                 @unlink(DISCUZ_ROOT.'./'.$attachdir.'/'.$attach['attachment']);
  391.                         }
  392.                         $db->query("DELETE FROM $table_attachments WHERE tid='$tid'");
  393.                 }
  394.                
  395.                 updateforumcount($fid);
  396.                 if ($forum['type'] == 'sub') {
  397.                         updateforumcount($fup['fid']);
  398.                 }

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

  401.         }

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

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

  404.                 include template('topicadmin_openclose');

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

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

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

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

  414.                 $forumselect = forumselect();
  415.                 include template('topicadmin_move');

  416.         } else {

  417.                 if(!$moveto) {
  418.                         showmessage('admin_move_invalid');
  419.                 }

  420.                 $displayorderadd = !$adminglobal ? ", displayorder='0'" : NULL;
  421.                 if($type == 'normal') {
  422.                         $db->query("UPDATE $table_threads SET fid='$moveto' $displayorderadd WHERE tid='$tid' AND fid='$fid'");
  423.                         $db->query("UPDATE $table_posts SET fid='$moveto' WHERE tid='$tid' AND fid='$fid'");
  424.                 } else {
  425.                         $db->query("INSERT INTO $table_threads (fid, creditsrequire, iconid, author, authorid, subject, dateline, lastpost, lastposter, views, replies, displayorder, digest, closed, poll, attachment)
  426.                                 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')");

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

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

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

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

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

  442.                 include template('topicadmin_topuntop');

  443.         } else {

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

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

  450.         }

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

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

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

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

  462.         include template('topicadmin_getip');

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

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

  465.                 include template('topicadmin_bump');

  466.         } else {

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

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

  474.         }

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

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


  478.                 $replies = $thread['replies'];
  479.                 if($replies <= 0) {
  480.                         showmessage('admin_split_invalid');
  481.                 }

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

  488.                 include template('topicadmin_split');

  489.         } else {

  490.                 if(!trim($subject)) {
  491.                         showmessage('admin_split_subject_invalid');
  492.                 }
  493.                 $subject = $subject ? dhtmlspecialchars(censor(trim($subject))) :'';

  494.                 $pids = implode_ids( $split );

  495.                 if($pids) {

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

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

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

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

  506.                         updatethreadcount($tid);
  507.                         updatethreadcount($newtid);
  508.                         updateforumcount($fid);

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

  511.                 } else {
  512.                         showmessage('admin_split_new_invalid');
  513.                 }
  514.         }

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

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

  517.                 include template('topicadmin_merge');

  518.         } else {

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

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

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

  530.                 $db->query("UPDATE $table_attachments SET tid='$tid' WHERE tid='$othertid'");
  531.                 $db->query("DELETE FROM $table_threads WHERE tid='$othertid'");
  532.                 $db->query("UPDATE $table_threads SET views=views+$other[views], replies=replies+$other[replies] WHERE tid='$tid'");
  533.                
  534.                 if($fid == $other['fid']) {
  535.                         $db->query("UPDATE $table_forums SET threads=threads-1 WHERE fid='$fid' $fupadd");
  536.                 } else {
  537.                         $db->query("UPDATE $table_forums SET threads=threads-1, posts=posts-$postsmerged WHERE fid='$other[fid]'");
  538.                         $db->query("UPDATE $table_forums SET posts=$posts+$postsmerged WHERE fid='$fid' $fupadd");
  539.                 }

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

  542.         }

  543. } else {

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

  545. }

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

  548.         if(!$action) {
  549.                 $action = $GLOBALS['action'];
  550.         }
  551.         if (!$thread['tid']) $thread['tid']=intval($GLOBALS['tid']);
  552.         if ($action == 'moderate'){
  553.                 $action .='_'.$operation;
  554.                 $thread[subject] = $tids;
  555.                 $thread[tid] = 0;
  556.         }
  557.         @$fp = fopen(DISCUZ_ROOT.'./forumdata/modslog.php', 'a');
  558.         @flock($fp, 2);
  559.         @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");
  560.         @fclose($fp);
  561. }

  562. function accesscheck($query) {
  563.         global $db,$fid;
  564.         while($thread = $db->fetch_array($query)) {
  565.                 if($thread['fid'] <> $fid){
  566.                         showmessage('admin_moderate_accesserror', NULL, 'HALTED');
  567.                 }
  568.         }
  569. }

  570. ?>
复制代码
回复

使用道具 举报

ak4777 发表于 2005-9-26 17:51:33 | 显示全部楼层
谢谢楼主的帮助,请问该如何使用该插件功能,能否详细说明一下!
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-26 17:58:50 | 显示全部楼层
原帖由 ak4777 于 2005-9-26 17:51 发表
谢谢楼主的帮助,请问该如何使用该插件功能,能否详细说明一下!
一楼是说明那里的说明

还有摸板自带了说明


你向平常的高亮那样,进到醒目高亮界面后,看演示和说明,你绝对回怎么用了
回复

使用道具 举报

ak4777 发表于 2005-9-26 18:15:49 | 显示全部楼层
下面的管理没有东西出现,是否我加错了位置了??

其中修改的模板中viewthread.htm文件!

  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>$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.         {lang credit_title} $post[credit]<br>
  55.         {lang postnum} $post[postnum]<br>
  56.      软件 <!--{if $post[audsum]<>0}--> <a href="plugins.php?p=download&acti=softlist&username=$post[author]">$post[audsum]</a><!--{else}-->$post[audsum]<!--{/if}--><br>
  57.      推荐 <!--{if $post[audsum]<>0}--><a href="plugins.php?p=download&acti=softlist&groom=1&username=$post[author]">$post[groomsum]</a><!--{else}-->$post[audsum]<!--{/if}--><br>
  58.         现金 $post[money]<br>
  59.     存款 $post[bank]<!--{if $isadmin}-->+$post[bankmimi]<!--{/if}--><br>
  60.         {lang regtime} $post[regdate]
  61.         <!--{if $post['location']}--><br>{lang location} $post[location]<!--{/if}--><br>
  62.         <!--{if $vtonlinestatus && $post['authorid']}-->
  63.                 <!--{if $timestamp - $post['lastactivity'] <= 10800 && !$post['invisible']}-->
  64.                         {lang online_status} <b>{lang online}</b>
  65.                 <!--{else}-->
  66.                         {lang online_status} {lang offline}
  67.                 <!--{/if}-->
  68.         <!--{/if}-->
  69.         </span>
  70. <br><a href="https://www.alipay.com/payto:$post[email]"><img src="http://www.71755.com/bbs/images/default/payto.gif" border="0" alt="用支付宝求购"></a>

  71.         </td>
  72.         <td width="79%" height="100%" valign="top">
  73.         <table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; word-wrap: break-word">
  74.         <tr><td valign="top">
  75.         <!--{if $postkey == $topiccount-1}--><a name="#lastpost"></a><!--{/if}-->
  76.         <span class="bold"><span class="smalltxt">$post[karma]
  77.         #$post['postcount'] </span>&nbsp;$post[subject]</span><br><br>
  78.         $post[message]
  79.         <br><br>
  80.             
  81. <!--{if $attachelist[$post[pid]]}-->
  82.         <!--{eval $attacount = 0; }-->
  83.         <blockquote><!--{loop $attachelist[$post[pid]] $vkey $attach}-->
  84.                         {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]
  85.                         <!--{if $attach[creditsrequire]}-->, {lang creditsrequire_attach}{lang credit_title} $attach[creditsrequire] {lang credit_unit}<!--{/if}-->
  86.                         <!--{if $attach[downloads]}-->,{lang downloads}: $attach[downloads]<!--{/if}--> )
  87.                 <!--{if $attach['attachimg']}-->
  88.                         <br><br><!--{if !$attachimgcheck}-->
  89.                                 <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);">
  90.                         <!--{else}-->
  91.                                 <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>

  92.                         <!--{/if}-->
  93.                 <!--{/if}-->
  94.         <br><!--{/loop}--></blockquote>
  95. <!--{/if}-->

  96.         <!--{if $post['signature']}--><br></td></tr><tr>
  97.                   <td align="left" valign="bottom"><img src="images/common/sigline.gif"><br>
  98.                     $post[signature]<!--{/if}-->
  99.         </td></tr></table>
  100.         </td></tr>
  101.         <tr bgcolor="$post[thisbg]"><td valign="middle" class="smalltxt">
  102.         <!--{if $ismoderator && $allowdelpost && $post['postcount'] > 1}--><input type="checkbox" name="delete[]" value="$post[pid]"><!--{/if}-->
  103.         <img src="{IMGDIR}/lastpost.gif" align="absmiddle">
  104.         $post[dateline]</td><td valign="middle">
  105.         <table width="100%" border="0" cellspacing="0" cellpadding="0">
  106.         <tr class="smalltxt"><td align="left">
  107.         <!--{if $post['username']}-->
  108.                 <a href="viewpro.php?uid=$post[authorid]"><img src="{IMGDIR}/profile.gif" border="0" alt="{lang view_profile}"></a>&nbsp;
  109.                 <!--{if $post['showemail']}--><a href="mailto:$post[email]"><img src="{IMGDIR}/email.gif" border="0" alt="{lang send_mail}"></a>&nbsp;<!--{/if}-->
  110.                 <!--{if $post['site']}--><a href="$post[site]" target="_blank"><img src="{IMGDIR}/site.gif" border="0" alt="{lang visit_home}"></a>&nbsp;<!--{/if}-->
  111.                 <a href="pm.php?action=send&uid=$post[authorid]" target="_blank"><img src="{IMGDIR}/pm.gif" border="0" alt="{lang send_pm}"></a>&nbsp;
  112.                 <!--{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}-->
  113.                 <!--{/if}-->
  114.         </td><td align="right">
  115.         &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>
  116.         <!--{if (!$thread['closed'] || $ismoderator) && $allowpostreply}-->&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}-->
  117.         <!--{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}-->
  118.         <!--{if $allowkarma && $maxkarmarate}-->
  119.                 &nbsp;<select name="fid" onchange="if(this.options[this.selectedIndex].value != '') {
  120.                 window.location=('misc.php?action=karma&tid=$tid&pid=$post[pid]&score='+this.options[this.selectedIndex].value+'&sid=$sid') }" align="absmiddle">
  121.                 <option value="">{lang rate}</option>
  122.                 <option value="">----</option>
  123.                 $karmaoptions
  124.                 </select>
  125.         <!--{/if}-->

  126.         </td></tr></table>
  127.         </td></tr>
  128. <!--{/loop}-->
  129. </table></td></tr></table>

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

  137. <!--{if $fastpost && $allowpostreply}-->
  138.         <script language="JavaScript">
  139.         var postminchars = $minpostsize;
  140.         var postmaxchars = $maxpostsize;
  141.         var disablepostctrl = $disablepostctrl;
  142.         function validate(theform) {
  143.                 if (theform.message.value == "" && theform.subject.value == "") {
  144.                         alert("{lang post_subject_and_message_isnull}");
  145.                         return false;
  146.                 }
  147.                 if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
  148.                         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}");
  149.                         return false;
  150.                 }                       
  151.                 theform.replysubmit.disabled = true;
  152.                 return true;
  153.         }
  154.         </script>
  155.         <form method="post" name="input" action="post.php?action=reply&fid=$fid&tid=$tid&replysubmit=yes" onSubmit="return validate(this)">
  156.         <input type="hidden" name="formhash" value="{FORMHASH}">
  157.         <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" bgcolor="{BORDERCOLOR}"><tr><td>
  158.         <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
  159.         <tr><td colspan="2" class="header">{lang post_fastreply}</td></tr>
  160.         <tr>
  161.         <td width="18%" bgcolor="{ALTBG1}">{lang subject}:</td>
  162.         <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><input type="text" name="subject" size="80" value="" tabindex="1">
  163.               &nbsp; [{lang optional}]</td>
  164.         </tr>
  165.         <tr>
  166.         <td width="18%" bgcolor="{ALTBG1}" valign="top">{lang options}:<br><span class="smalltxt">
  167.         <input type="checkbox" name="parseurloff" value="1">&nbsp;{lang disable} {lang post_parseurl}<br>
  168.         <input type="checkbox" name="smileyoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=messages#6" target="_blank">{lang post_smilies}</a><br>
  169.         <input type="checkbox" name="bbcodeoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=misc#1" target="_blank">{lang post_discuzcode}</a><br>
  170.         <input type="checkbox" name="usesig" value="1" $usesigcheck>&nbsp;{lang post_show_sig}<br>
  171.         <input type="checkbox" name="emailnotify" value="1">&nbsp;{lang post_email_notify}</span>
  172.         </td>
  173.         <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><textarea rows="7" cols="90" name="message" onKeyDown="javascript: ctlent();" tabindex="2"></textarea><br>
  174.         <input type="submit" name="replysubmit" value="{lang post_topicsubmit}" tabindex="3">&nbsp;&nbsp;&nbsp;
  175.         <input type="submit" name="previewpost" value="{lang post_previewpost}" tabindex="4">&nbsp;&nbsp;&nbsp;
  176.         <input type="reset" name="topicsreset" value="{lang post_topicreset}" tabindex="5">&nbsp; &nbsp;{lang post_submit_hotkey}</td>
  177.         </tr></table></td></tr></table></form>
  178. <!--{/if}-->

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

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

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

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

  198. <!--{if $ismoderator}-->
  199.         <span class="bold">{lang admin_modoptions}:</span>
  200.         <select name="action" id="action" onchange="if(this.options[this.selectedIndex].value != '') { if(this.options[this.selectedIndex].value != 'delpost') {
  201.         window.location=('topicadmin.php?tid=$tid&fid=$fid&action='+this.options[this.selectedIndex].value+'&fpage=$fpage&page=$page&sid=$sid');
  202.         } else { this.document.delpost.submit(); } }">
  203.         <option value="" selected>{lang admin_modoptions}</option>
  204.         <!--{if $allowdelpost}-->
  205.         <option value="delpost">{lang admin_delpost}</option>
  206.         <option value="delete">{lang admin_delthread}</option>
  207.         <!--{/if}-->
  208.         <!--{if $allowclose}-->
  209.         <option value="close"><!--{if $thread['closed']}-->{lang admin_open}<!--{else}-->{lang admin_close}<!--{/if}--></option>
  210.         <!--{/if}-->
  211.         <!--{if $allowmove}-->
  212.         <option value="move">{lang admin_move}</option>
  213.         <!--{/if}-->
  214.         <!--{if $allowhighlight}-->
  215.         <option value="highlight">{lang admin_highlight}</option>
  216.         <option value="xm_highlight">醒目高亮显示</option>
  217.         <!--{/if}-->
  218.         <!--{if $allowdigest}-->
  219.         <option value="digest"><!--{if $thread['digest']}-->{lang admin_digest_remove}<!--{else}-->{lang admin_digest_add}<!--{/if}--></option>
  220.         <!--{/if}-->
  221.         <!--{if $allowtop}-->
  222.         <option value="top"><!--{if $thread['displayorder']}-->{lang admin_unstick}<!--{else}-->{lang admin_stick}<!--{/if}--></option>
  223.         <!--{/if}-->
  224.         <!--{if $allowsplit}-->
  225.         <option value="split">{lang admin_split}</option>
  226.         <!--{/if}-->
  227.         <!--{if $allowmerge}-->
  228.         <option value="merge">{lang admin_merge}</option>
  229.         <!--{/if}-->
  230.         <option value="bump">{lang admin_bump}</option>

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

  234. </td>
  235. </tr></table><br><br>
  236. {template footer}
复制代码
回复

使用道具 举报

ak4777 发表于 2005-9-26 18:21:00 | 显示全部楼层
我是新装的,也按照要求加的,在帖子里没有<option value="xm_highlight">醒目高亮显示</option>
这个栏目,不知何解?请指教~
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-26 18:28:55 | 显示全部楼层
原帖由 ak4777 于 2005-9-26 18:21 发表
我是新装的,也按照要求加的,在帖子里没有<option value="xm_highlight">醒目高亮显示</option>
这个栏目,不知何解?请指教~


什么意思啊?

这个应该是你加上才有的
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-30 20:04 , Processed in 0.369184 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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