📄 mawhole.php
字号:
$winduid,
'move_title',
$timestamp,
'move_content',
'N',
$windid,
'fid' => $fid,
'tid' => $tid,
'tofid' => $to_id,
'subject' => $subject,
'postdate' => get_date($postdate),
'forum' => $forum[$fid]['name'],
'toforum' => $toname,
'admindate' => get_date($timestamp),
'reason' => $atc_content
);
}
$logdb[] = array(
'type' => 'move',
'username1' => $author,
'username2' => $windid,
'field1' => $fid,
'field2' => '',
'field3' => '',
'descrip' => 'move_descrip',
'timestamp' => $timestamp,
'ip' => $onlineip,
'tid' => $tid,
'subject' => substrs($subject,28),
'tofid' => $to_id,
'toforum' => $toname,
'forum' => $forum[$fid]['name'],
'reason' => $atc_content
);
}
foreach($msgdb as $key=>$val){
writenewmsg($val,1);
}
foreach($logdb as $key=>$val){
writelog($val);
}
$db->update("UPDATE pw_threads SET fid='$to_id' WHERE tid IN($mids)");
$db->update("UPDATE pw_posts SET fid='$to_id' WHERE tid IN($mids)");
updateforum($fid);
updateforum($to_id);
if($updatetop){
updatetop();
}
P_unlink(D_P.'data/bbscache/c_cache.php');
refreshto("index.php?fid=$fid",'operate_success');
}
} elseif ($action == "copy"){
if (empty($_POST['step'])){
$forumadd = '';
$query = $db->query("SELECT fid,name,allowvisit FROM pw_forums WHERE f_type='hidden'");
if ($query){
while ($rt = $db->fetch_array($query)){
if (strpos($rt['allowvisit'],','.$groupid.',') !== false){
$forumadd .= "<option value='$rt[fid]'> |- $rt[name]</option>";
}
}
}
@include_once(D_P.'data/bbscache/forumcache.php');
require_once PrintEot('mawhole');
footer();
} else {
if($forum[$to_id]['type'] == 'category'){
Showmsg('mawhole_error');
}
count($tidarray) > 500 && Showmsg('mawhole_count');
$selids = '';
foreach($tidarray as $k => $v){
if(is_numeric($v)){
$selids .= $selids ? ','.$v : $v;
}
}
!$selids && Showmsg('mawhole_nodata');
$updatetop = 0;
$ufid = $fid;
$query = $db->query("SELECT * FROM pw_threads t LEFT JOIN pw_tmsgs tm ON tm.tid=t.tid WHERE t.tid IN($selids)");
while($rt=$db->fetch_array($query)){
Add_S($rt);
@extract($rt);
$ufid != $fid && Showmsg('admin_forum_right');
$topped > 0 && $updatetop = 1;
$toname = addslashes($forum[$to_id]['name']);
if($ifmsg){
$msgdb[] =array(
$author,
$winduid,
'copy_title',
$timestamp,
'copy_content',
'N',
$windid,
'fid' => $fid,
'tid' => $tid,
'tofid' => $to_id,
'subject' => $subject,
'postdate' => get_date($postdate),
'forum' => $forum[$fid]['name'],
'toforum' => $toname,
'admindate' => get_date($timestamp),
'reason' => $atc_content
);
}
$logdb[] = array(
'type' => 'copy',
'username1' => $author,
'username2' => $windid,
'field1' => $fid,
'field2' => '',
'field3' => '',
'descrip' => 'copy_descrip',
'timestamp' => $timestamp,
'ip' => $onlineip,
'tid' => $tid,
'subject' => substrs($subject,28),
'tofid' => $to_id,
'toforum' => $toname,
'forum' => $forum[$fid]['name'],
'reason' => $atc_content
);
if($pollid){
$rs = $db->get_one("SELECT voteopts FROM pw_polls WHERE pollid='$pollid'");
$voteopts = addslashes($rs['voteopts']);
$db->update("INSERT INTO pw_polls (voteopts) VALUES('$voteopts')");
$newpollid = $db->insert_id();
} else{
$newpollid = 0;
}
$db->update("INSERT INTO pw_threads (fid,icon,titlefont,author,authorid,subject,ifcheck, postdate,lastpost,lastposter,hits,replies,topped,locked,digest,ifupload,pollid,ifmail) VALUES('$to_id','$icon','$titlefont','$author','$authorid','$subject','$ifcheck','$postdate','$lastpost','$lastposter','$hits','$replies','$topped','$locked','$digest','$ifupload','$newpollid','$ifmail')");
$newtid = $db->insert_id();
$aid = str_replace("'","\'",$aid);
$db->update("INSERT INTO pw_tmsgs (tid,aid,userip,ifsign,buy,ipfrom,ifconvert,content) VALUES('$newtid','$aid','$userip','$ifsign','$buy','$ipfrom','$ifconvert','$content')");
$query2 = $db->query("SELECT * FROM pw_posts WHERE tid='$tid'");
while($rt=$db->fetch_array($query2)){
Add_S($rt);
@extract($rt);
$db->update("INSERT INTO pw_posts (fid,tid,aid,author,authorid,icon,postdate,subject,userip,ifsign,alterinfo,ipfrom,ifconvert,ifcheck,content) VALUES ('$to_id','$newtid','$aid','$author','$authorid','$icon','$postdate','$subject','$userip','$ifsign','$alterinfo','$ipfrom','$ifconvert','$ifcheck','$content')");
}
}
foreach($msgdb as $key=>$val){
writenewmsg($val,1);
}
foreach($logdb as $key=>$val){
writelog($val);
}
updateforum($to_id);
if($updatetop){
updatetop();
}
refreshto("index.php?fid=$fid",'operate_success');
}
} elseif($action=="headtopic"){
if(empty($_POST['step'])){
if(is_numeric($seltid)){
$rt = $db->get_one("SELECT fid,topped FROM pw_threads WHERE tid='$seltid'");
if($fid != $rt['fid']){
Showmsg('admin_forum_right');
}
${'topped_'.$rt['topped']} = 'checked';
}
require_once PrintEot('mawhole');footer();
} else{
if($topped > 1 && ($groupid == 5 || $SYSTEM['topped'] < $topped)){
Showmsg('masigle_top');
}
count($tidarray) > 500 && Showmsg('mawhole_count');
$selids = '';
foreach($tidarray as $k => $v){
if(is_numeric($v)){
$selids .= $selids ? ','.$v : $v;
}
}
!$selids && Showmsg('mawhole_nodata');
$msgdb = $logdb = array();
$query = $db->query("SELECT tid,fid,postdate,author,authorid,subject,topped FROM pw_threads WHERE tid IN($selids)");
while($rt=$db->fetch_array($query)){
if($rt['topped'] > 1 && ($groupid == 5 || $SYSTEM['topped'] < $rt['topped'])){
Showmsg('masigle_top');
}
if($fid != $rt['fid']){
Showmsg('admin_forum_right');
}
if($topped && $topped!=$rt['topped']){
if($ifmsg){
$msgdb[] = array(
$rt['author'],
$winduid,
'top_title',
$timestamp,
'top_content',
'',
$windid,
'fid' => $fid,
'tid' => $rt['tid'],
'subject' => $rt['subject'],
'postdate' => get_date($rt['postdate']),
'forum' => $forum[$fid]['name'],
'admindate' => get_date($timestamp),
'reason' => $atc_content
);
}
$logdb[] = array(
'type' => 'topped',
'username1' => $rt['author'],
'username2' => $windid,
'field1' => $fid,
'field2' => '',
'field3' => '',
'descrip' => 'topped_descrip',
'timestamp' => $timestamp,
'ip' => $onlineip,
'topped' => $topped,
'tid' => $rt['tid'],
'subject' => substrs($rt['subject'],28),
'forum' => $forum[$fid]['name'],
'reason' => $atc_content
);
}elseif($rt['topped'] && !$topped){
if($ifmsg){
$msgdb[] = array(
$rt['author'],
$winduid,
'untop_title',
$timestamp,
'untop_content',
'',
$windid,
'fid' => $fid,
'tid' => $rt['tid'],
'subject' => $rt['subject'],
'postdate' => get_date($rt['postdate']),
'forum' => $forum[$fid]['name'],
'admindate' => get_date($timestamp),
'reason' => $atc_content
);
}
$logdb[] = array(
'type' => 'topped',
'username1' => $rt['author'],
'username2' => $windid,
'field1' => $fid,
'field2' => '',
'field3' => '',
'descrip' => 'untopped_descrip',
'timestamp' => $timestamp,
'ip' => $onlineip,
'tid' => $rt['tid'],
'subject' => substrs($rt['subject'],28),
'forum' => $forum[$fid]['name'],
'reason' => $atc_content
);
}
}
foreach($msgdb as $key=>$val){
writenewmsg($val,1);
}
foreach($logdb as $key=>$val){
writelog($val);
}
$db->update("UPDATE pw_threads SET topped='$topped' WHERE tid IN($selids)");
updatetop();
refreshto("index.php?fid=$fid",'operate_success');
}
} elseif($action=="digest"){
if(empty($_POST['step'])){
if(is_numeric($seltid)){
$rt = $db->get_one("SELECT fid,digest FROM pw_threads WHERE tid='$seltid'");
if($fid != $rt['fid']){
Showmsg('admin_forum_right');
}
${'digest_'.$rt['digest']} = 'checked';
}
require_once PrintEot('mawhole');footer();
} else{
count($tidarray) > 500 && Showmsg('mawhole_count');
$selids = '';
foreach($tidarray as $k => $v){
if(is_numeric($v)){
$selids .= $selids ? ','.$v : $v;
}
}
!$selids && Showmsg('mawhole_nodata');
include_once(D_P.'data/bbscache/creditdb.php');
$creditset = get_creditset($foruminfo['creditset'],$db_creditset);
$add_rvrc = floor($creditset['rvrc']['Digest']/10);
$add_money = $creditset['money']['Digest'];
$del_rvrc = floor($creditset['rvrc']['Undigest']/10);
$del_money = $creditset['money']['Undigest'];
$msgdb = $logdb = array();
$query = $db->query("SELECT tid,fid,postdate,author,authorid,subject,digest FROM pw_threads WHERE tid IN($selids)");
while($rt=$db->fetch_array($query)){
if($fid != $rt['fid']){
Showmsg('admin_forum_right');
}
if(!$rt['digest'] && $digest){
if($ifmsg){
$msgdb[] = array(
$rt['author'],
$winduid,
'digest_title',
$timestamp,
'digest_content',
'',
$windid,
'fid' => $fid,
'tid' => $rt['tid'],
'subject' => $rt['subject'],
'postdate' => get_date($rt['postdate']),
'forum' => $forum[$fid]['name'],
'affect' => "{$db_rvrcname}:+{$add_rvrc},{$db_moneyname}:+{$add_money}",
'admindate' => get_date($timestamp),
'reason' => $atc_content
);
}
dtchange($rt['authorid'],$creditset['rvrc']['Digest'],0,$creditset['money']['Digest']);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -