if(!in_array($action,array('banuser','delatc','shield','remind','commend'))){
Showmsg('undefined_action');
}
引用if(!in_array($action,array('banuser','delatc','shield','remind','commend'))){
Showmsg('undefined_action');
}
引用if(!in_array($action,array
('banuser','delatc','shield','remind','commend','alreadyread','cancelread'))){
Showmsg('undefined_action');
}
引用if($action=="banuser" && $SYSTEM['banuser']){
$admincheck=1;
} elseif($action=="delatc" && $SYSTEM['modother']){
$admincheck=1;
引用if(($action=="banuser" || $action=="alreadyread" || $action=="cancelread") &&
$SYSTEM['banuser']){
$admincheck=1;
} elseif($action=="delatc" && $SYSTEM['modother']){
$admincheck=1;
引用if(!$admincheck){
Showmsg('mawhole_right');
}
引用//版主已阅
function refreshto1($URL,$content,$statime=1){
global $db_ifjump;
$URL=str_replace('=','=',$URL);
if($db_ifjump && $statime>0){
ob_end_clean();
global $tplpath,$fid,$imgpath,$db_obstart,$db_bbsname,$skin,$B_url;
$index_name =& $db_bbsname;
$index_url =& $B_url;
$db_obstart == 1 && function_exists('ob_gzhandler') ? ob_start
('ob_gzhandler') : ob_start();
if(file_exists(R_P."data/style/$skin.php") && strpos($skin,'..')===false){
include_once Pcv(R_P."data/style/$skin.php");
}else{
include_once(R_P."data/style/wind.php");
}
@extract($GLOBALS, EXTR_SKIP);
require_once GetLang('refreshto');
$lang[$content] && $content=$lang[$content];
@require PrintEot('refreshto');
exit;
} else{
ObHeader($URL);
}
}
if($action=="alreadyread"){
$userdb=$db->get_one("SELECT ifread,readtype,lou FROM pw_threads WHERE
tid='$tid'");
!$userdb && Showmsg('illegal_tid');
if($userdb['readtype']!='2'){
$lou=$_GET["lou"];
$lou<=$userdb['lou'] && $lou=$userdb['lou'];
if($userdb['ifread']){
$readperson=explode("|",$userdb['ifread']);
if(!in_array($windid,$readperson)){
$nowread=$userdb['ifread'].'&'.$windid;
}else{
$nowread=$userdb['ifread'];
}
}else{
$nowread=$windid;
}
$db->update("UPDATE pw_threads SET ifread='$nowread',lou='$lou',readtype='1'
WHERE tid='$tid'");
refreshto1("thread.php?fid=$fid",'operate_success');
}else{
Showmsg('已有管理人员阅到更后面的楼层,故此次操作无效!');
}
}elseif($action=="cancelread"){
$userdb=$db->get_one("SELECT ifread,readtype FROM pw_threads WHERE
tid='$tid'");
!$userdb && Showmsg('illegal_tid');
!$userdb['ifread'] && Showmsg('该贴尚未有版主阅读!');
$db->update("UPDATE pw_threads SET ifread='',lou='0' WHERE tid='$tid'");
refreshto1("thread.php?fid=$fid",'operate_success');
}
//版主已阅
引用if($admincheck || $_G['markable']){print <<<EOT
引用if($admincheck || ($groupid!=5 && $SYSTEM['banuser'])){
$lou=$read[lou];
print <<<EOT
-->
[<a href='masingle.php?
action=alreadyread&fid=$fid&tid=$tid&windid=$windid&lou=$lou' title="添加审阅标
志"><font color=#C5001E>阅</font></a>|<a href='masingle.php?
action=cancelread&fid=$fid&tid=$tid&windid=$windid&lou=$lou' title="取消审阅标
志"><font color=#C5001E>消</font></a>]
<!--
EOT;
}
引用if($thread['ifupload'])
引用if($thread['ifread']){
$thread['titleread']="";
$alreadyread='阅';
$alreadyread1='至';
$alreadyreadlou='楼';
$ifread=$thread['ifread'];
$lou=$thread['lou'];
if($lou==0){
$thread['titleread']="["."<font color=#C5001E>".$alreadyread."</font>"."]";
}else{
$thread['titleread']="["."<font
color=#CC5C73>".$alreadyread.$alreadyread1.$lou.$alreadyreadlou."</font>"."]";
}
}
引用$thread[titleadd]
引用<span title="$thread[ifread] 已阅至$thread[lou]楼"><font color=gray>$thread
[titleread]</font></span>