⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mawhole.php

📁 很好的一套PHP树形论坛程序
💻 PHP
📖 第 1 页 / 共 3 页
字号:
				$db->update("UPDATE pw_memberdata SET digests=digests+1 WHERE uid='$rt[authorid]'");
				customcredit($rt['authorid'],$creditset,'Digest');
				$logdb[] = array(
					'type'      => 'digest',
					'username1' => $rt['author'],
					'username2' => $windid,
					'field1'    => $fid,
					'field2'    => '',
					'field3'    => '',
					'descrip'   => 'digest_descrip',
					'timestamp' => $timestamp,
					'ip'        => $onlineip,
					'digest'	=> $digest,
					'affect'    => "{$db_rvrcname}:+{$add_rvrc},{$db_moneyname}:+{$add_money}",
					'tid'		=> $rt['tid'],
					'digest'	=> $digest,
					'subject'	=> substrs($rt['subject'],28),
					'forum'		=> $forum[$fid]['name'],
					'reason'	=> $atc_content
				);
			} elseif($rt['digest'] && !$digest){
				if($ifmsg){
					$msgdb[] = array(
						$rt['author'],
						$winduid,
						'undigest_title',
						$timestamp,
						'undigest_content',
						'',
						$windid,
						'fid'		=> $fid,
						'tid'		=> $rt['tid'],
						'subject'	=> $rt['subject'],
						'postdate'	=> get_date($rt['postdate']),
						'forum'		=> $forum[$fid]['name'],
						'affect'    => "{$db_rvrcname}:-{$del_rvrc},{$db_moneyname}:-{$del_money}",
						'admindate'	=> get_date($timestamp),
						'reason'	=> $atc_content
					);
				}
				dtchange($rt['authorid'],-$creditset['rvrc']['Undigest'],0,-$creditset['money']['Undigest']);
				$db->update("UPDATE pw_memberdata SET digests=digests-1 WHERE uid='$rt[authorid]'");
				customcredit($rt['authorid'],$creditset,'Undigest');
				$logdb[] = array(
					'type'      => 'digest',
					'username1' => $rt['author'],
					'username2' => $windid,
					'field1'    => $fid,
					'field2'    => '',
					'field3'    => '',
					'descrip'   => 'undigest_descrip',
					'timestamp' => $timestamp,
					'ip'        => $onlineip,
					'affect'    => "{$db_rvrcname}:-{$del_rvrc},{$db_moneyname}:-{$del_money}",
					'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 digest='$digest' WHERE tid IN($selids)");
		refreshto("index.php?fid=$fid",'operate_success');
	}
} elseif($action=="lock"){
	if(empty($_POST['step'])){
		if(is_numeric($seltid)){
			$rt = $db->get_one("SELECT fid,locked FROM pw_threads WHERE tid='$seltid'");
			if($fid != $rt['fid']){
				Showmsg('admin_forum_right');
			}
			${'lock_'.$rt['locked']} = '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');
		$msgdb = $logdb = array();
		$query = $db->query("SELECT tid,fid,postdate,author,authorid,subject,locked FROM pw_threads WHERE tid IN($selids)");
		while($rt=$db->fetch_array($query)){
			if($fid != $rt['fid']){
				Showmsg('admin_forum_right');
			}
			if(!$rt['locked'] && $locked){
				if($locked==2){
					P_unlink(R_P."$htmdir/$fid/".date('ym',$rt['postdate'])."/$tid.html");
				}
				if($ifmsg){
					$msgdb[] = array(
						$rt['author'],
						$winduid,
						'lock_title',
						$timestamp,
						'lock_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'      => 'locked',
					'username1' => $rt['author'],
					'username2' => $windid,
					'field1'    => $fid,
					'field2'    => '',
					'field3'    => '',
					'descrip'   => 'lock_descrip',
					'timestamp' => $timestamp,
					'ip'        => $onlineip,
					'tid'		=> $rt['tid'],
					'subject'	=> substrs($rt['subject'],28),
					'forum'		=> $forum[$fid]['name'],
					'reason'	=> $atc_content
				);
			} elseif($rt['locked'] && !$locked){
				if($ifmsg){
					$msgdb[] = array(
						$rt['author'],
						$winduid,
						'unlock_title',
						$timestamp,
						'unlock_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'      => 'locked',
					'username1' => $rt['author'],
					'username2' => $windid,
					'field1'    => $fid,
					'field2'    => '',
					'field3'    => '',
					'descrip'   => 'unlock_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 locked='$locked' WHERE tid IN($selids)");
		refreshto("index.php?fid=$fid",'operate_success');
	}
} elseif($action=="pushtopic"){
	if(empty($_POST['step'])){
		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');
		$msgdb = $logdb = array();
		$query = $db->query("SELECT tid,fid,postdate,author,authorid,subject FROM pw_threads WHERE tid IN($selids)");
		while($rt=$db->fetch_array($query)){
			if($fid != $rt['fid']){
				Showmsg('admin_forum_right');
			}
			if($ifmsg){
				$msgdb[] = array(
					$rt['author'],
					$winduid,
					'push_title',
					$timestamp,
					'push_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'      => 'push',
				'username1' => $rt['author'],
				'username2' => $windid,
				'field1'    => $fid,
				'field2'    => '',
				'field3'    => '',
				'descrip'   => 'push_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 lastpost='$timestamp' WHERE tid IN($selids)");
		refreshto("index.php?fid=$fid",'operate_success');
	}
} elseif($action=="edit"){
	if(empty($_POST['step'])){
		if(is_numeric($seltid)){
			$rt=$db->get_one("SELECT fid,titlefont,author FROM pw_threads WHERE tid='$seltid'");
			if($fid!=$rt['fid']){
				Showmsg('admin_forum_right');
			}
			$titledetail=explode("~",$rt['titlefont']);
			$titlecolor=$titledetail[0];
			$titlecolor ? $ifchecked[$titlecolor]='checked' : $ifchecked['none']='checked';
			if($titledetail[1]=='1')$ifchecked[1]='checked';
			if($titledetail[2]=='1')$ifchecked[2]='checked';
			if($titledetail[3]=='1')$ifchecked[3]='checked';
			if($titledetail[4]=='1')$ifchecked[4]='checked';
			if($titledetail[5]=='1')$ifchecked[5]='checked';
			if($titledetail[6]=='1')$ifchecked[6]='checked';
			if($titledetail[7]=='1')$ifchecked[7]='checked';
			if($titledetail[8]=='1')$ifchecked[8]='checked';
			if($titledetail[9]=='1')$ifchecked[9]='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');
		$msgdb = $logdb = array();
		$query = $db->query("SELECT tid,fid,postdate,author,authorid,subject FROM pw_threads WHERE tid IN($selids)");
		while($rt=$db->fetch_array($query)){
			if($fid != $rt['fid']){
				Showmsg('admin_forum_right');
			}
			if($ifmsg){
				$msgdb[] = array(
					$rt['author'],
					$winduid,
					(!$title1&&!$title2&&!$title3&&!$title4) ? 'unhighlight_title' : 'highlight_title',
					$timestamp,
					(!$title1&&!$title2&&!$title3&&!$title4) ? 'unhighlight_content' : 'highlight_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'      => 'highlight',
				'username1' => $rt['author'],
				'username2' => $windid,
				'field1'    => $fid,
				'field2'    => '',
				'field3'    => '',
				'descrip'   => (!$title1&&!$title2&&!$title3&&!$title4)?'unhighlight_descrip':'highlight_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);
		}
		$titlefont = Char_cv("$title1~$title2~$title3~$title4~$title5~$title6~$title7~$title8~$title9~$title10~");
		$db->update("UPDATE pw_threads SET titlefont='$titlefont' WHERE tid IN($selids)");
		refreshto("index.php?fid=$fid",'operate_success');
	}
}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -