}
     $converted = 1;
 }
 $sql2 = "SELECT tid,subject from " . DB::table('forum_thread') . " where tid >= {$start} and tid <= {$end} AND displayorder = 0 {$sqlplus}";
 $query2 = DB::query($sql2);
 while ($row2 = DB::fetch($query2)) {
     $tid = $row2['tid'];
     $subject = $row2['subject'];
     $subject = preg_replace($array_find, $array_replace, addslashes($subject));
     if ($subject != addslashes($row2['subject'])) {
         DB::query("UPDATE " . DB::table('forum_thread') . " SET subject = '{$subject}' WHERE tid = {$tid}");
     }
     $converted = 1;
 }
 //edit 2011/7/25 11:04:55
 toolssetsetting('bbsltime', "{$_G['timestamp']}|{$discuz_user}|{$counter}|{$convertedrows}|{$mod}|{$threads_banned}");
 if ($converted || $end < $maxid) {
     $nextlink = "action=plugins&cp=censor_scanbbs&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}&start={$end}&maxid={$maxid}&threads_mod={$threads_mod}&threads_banned={$threads_banned}&posts_mod={$posts_mod}&convertedrows={$convertedrows}&wordstart={$wordstart}&wordmaxid={$wordmaxid}&posttableid={$posttableid}&bbsscansubmit=yes";
     cpmsg($toolslang[censor_scanstart], $nextlink, 'loading', array('start' => $start, 'end' => $end, 'wordstart' => $wordstart, 'wordend' => $wordend, 'posttableid' => $posttableid));
 } elseif ($wordend < $wordmaxid) {
     $nextlink = "action=plugins&cp=censor_scanbbs&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}&start=0&maxid={$maxid}&threads_mod={$threads_mod}&threads_banned={$threads_banned}&posts_mod={$posts_mod}&convertedrows={$convertedrows}&wordstart={$wordend}&wordmaxid={$wordmaxid}&posttableid={$posttableid}&bbsscansubmit=yes";
     cpmsg($toolslang[censor_scanstart], $nextlink, 'loading', array('start' => $start, 'end' => $end, 'wordstart' => $wordstart, 'wordend' => $wordend, 'posttableid' => $posttableid));
 } elseif ($posttableid > 0 && ($end >= $maxid || $wordend >= $wordmaxid)) {
     $posttableid2 = $posttableid - 1;
     $nextlink = "action=plugins&cp=censor_scanbbs&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}&start=0&threads_mod={$threads_mod}&threads_banned={$threads_banned}&posts_mod={$posts_mod}&convertedrows={$convertedrows}&posttableid={$posttableid2}&bbsscansubmit=yes";
     cpmsg($toolslang[censor_jumpposttable], $nextlink, 'loading', array('id' => $posttableid));
 } elseif ($end >= $maxid || $wordend >= $wordmaxid) {
     $mod = $posts_mod + $threads_mod;
     $counter = $convertedrows + $mod + $threads_banned;
     $discuz_user = $_G['member']['username'];
     cpmsg($toolslang[censor_scanresult], "action=plugins&cp=censor_scanbbs&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}&a=scanbbs", 'succeed', array('count' => $counter));
예제 #2
0
    $sql2 = "SELECT tid,subject from ".DB::table('forum_thread')." where tid >= $start and tid <= $end AND displayorder = 0 $sqlplus";
    $query2 = DB::query($sql2);
    while($row2 = DB::fetch($query2)) {
    	$tid = $row2['tid'];
    	$subject = $row2['subject'];
    	$subject = preg_replace($array_find,$array_replace,addslashes($subject));
    	if($subject != addslashes($row2['subject'])) {
    		DB::query("UPDATE ".DB::table('forum_thread')." SET subject = '$subject' WHERE tid = $tid");
    	}
    	$converted = 1;
    }
    $discuz_user = $_G['uid'];
	$mod = $posts_mod + $threads_mod;
	$counter = $convertedrows + $mod + $threads_banned;
    toolssetsetting('bbsltime',"$_G[timestamp]|$discuz_user|$counter|$convertedrows|$mod|$threads_banned");
    if($converted  || $end < $maxid) {
    	$nextlink = "action=plugins&cp=scan_bbsinfo&pmod=safe&operation=$operation&do=$do&identifier=$identifier&start=$end&maxid=$maxid&threads_mod=$threads_mod&threads_banned=$threads_banned&posts_mod=$posts_mod&convertedrows=$convertedrows&wordstart=$wordstart&wordmaxid=$wordmaxid&posttableid=$posttableid&bbsscansubmit=yes";
    	cpmsg($toolslang[censor_scanstart], $nextlink, 'loading', array('start' => $start,'end' => $end,'wordstart' => $wordstart,'wordend' => $wordend,'posttableid' => $posttableid));
    } elseif($wordend < $wordmaxid) {
    	$nextlink = "action=plugins&cp=scan_bbsinfo&pmod=safe&operation=$operation&do=$do&identifier=$identifier&start=0&maxid=$maxid&threads_mod=$threads_mod&threads_banned=$threads_banned&posts_mod=$posts_mod&convertedrows=$convertedrows&wordstart=$wordend&wordmaxid=$wordmaxid&posttableid=$posttableid&bbsscansubmit=yes";
    	cpmsg($toolslang[censor_scanstart], $nextlink, 'loading',array('start' => $start,'end' => $end,'wordstart' => $wordstart,'wordend' => $wordend,'posttableid' => $posttableid));
    } elseif(($posttableid > 0) &&($end >= $maxid || $wordend >= $wordmaxid)) {
    	$posttableid2 = $posttableid - 1;
    	$nextlink = "action=plugins&cp=scan_bbsinfo&pmod=safe&operation=$operation&do=$do&identifier=$identifier&start=0&threads_mod=$threads_mod&threads_banned=$threads_banned&posts_mod=$posts_mod&convertedrows=$convertedrows&posttableid=$posttableid2&bbsscansubmit=yes";
    	cpmsg($toolslang[censor_jumpposttable], $nextlink, 'loading',array('id' => $posttableid));
    } elseif($end >= $maxid || $wordend >= $wordmaxid) {
    	cpmsg($toolslang[censor_scanresult], "action=plugins&cp=scan_bbsinfo&pmod=safe&operation=$operation&do=$do&identifier=$identifier", 'succeed',array('count' => $counter));
    }
}
showformheader("plugins&cp=scan_bbsinfo&operation=$operation&do=$do&identifier=$identifier&pmod=safe");