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

📄 setting.php

📁 PHPWind7_RC_UTF8 开源php论坛很不错的
💻 PHP
📖 第 1 页 / 共 2 页
字号:
		$db->update("INSERT INTO pw_argument"			. " SET " . pwSqlSingle(array(				'tpcid'		=> $tid,				'gid'		=> $cyid,				'author'	=> $windid,				'authorid'	=> $winduid,				'postdate'	=> $timestamp,				'lastpost'	=> $timestamp,				'subject'	=> $subject,				'content'	=> $content		)));		if ($tid) {			$db->update("UPDATE pw_argument SET lastpost=".pwEscape($timestamp)."WHERE tid=".pwEscape($tid));		} else {			$tid = $db->insert_id();		}		refreshto("$basename&job=readboard&cyid=$cyid&tid=$tid",'colony_postsuccess');	}} elseif ($job == 'editboard') {	if ($_POST['step'] != 2) {		@extract($db->get_one("SELECT subject,content FROM pw_argument WHERE tid=".pwEscape($tid)));		!$subject && Showmsg('illegal_tid');		require_once PrintHack('home');	} else {		InitGP(array('subject','content'),'P');		(!$subject || !$content) && Showmsg('colony_posterror');		strlen($subject)>50 && Showmsg('colony_subject');		strlen($content)>255 && $content = substrs($content,255,'N');		require_once(R_P.'require/postfunc.php');		$content = autourl($content);		$db->update("UPDATE pw_argument SET ".pwSqlSingle(array('subject'=>$subject,'content'=>$content))."WHERE tid=".pwEscape($tid));		refreshto("$basename&job=readboard&cyid=$cyid&tid=$tid",'colony_postsuccess');	}} elseif ($job == 'delboard') {	@extract($db->get_one("SELECT tpcid,gid,authorid FROM pw_argument WHERE tid=".pwEscape($tid)));	!$authorid && Showmsg('illegal_tid');	if ($cyid != $gid || ($authorid!=$winduid && !$admindb[$winduid] && $groupid!=3)) {		Showmsg('colony_delright');	}	$db->update("DELETE FROM pw_argument WHERE tid=".pwEscape($tid));	if (!$tpcid) {		$db->update("DELETE FROM pw_argument WHERE gid=".pwEscape($gid)."AND tpcid=".pwEscape($tid));		$refreshto = "$basename&job=boardlist&cyid=$gid";	} else {		$refreshto = "$basename&job=readboard&cyid=$gid&tid=$tpcid";	}	refreshto($refreshto,'colony_delsuccess');} elseif ($job == 'readboard') {	@extract($db->get_one("SELECT a.tpcid,a.gid,a.author,a.authorid,a.postdate,a.lastpost,a.subject,a.content,cm.ifadmin FROM pw_argument a LEFT JOIN pw_cmembers cm ON a.authorid=cm.uid WHERE a.tid=".pwEscape($tid)));	(!$subject || $cyid != $gid || $tpcid != 0) && Showmsg('illegal_tid');	require_once PrintHack('home');	$adminimg = $ifadmin==1 ? "<img src=\"$imgpath/$stylepath/group/3.gif\" align=\"absmiddle\"> " : "<img src=\"$imgpath/$stylepath/group/6.gif\" align=\"absmiddle\"> ";	require_once(R_P.'require/bbscode.php');	$havereply = $postdate != $lastpost ? true : false;	$postdate = get_date($postdate);	$content = convert(nl2br($content),$db_windpost);	$count = (int)$count;	$readdb = array();	if ($havereply) {		(int)$page < 1 && $page = 1;		@extract($db->get_one("SELECT COUNT(*) AS count FROM pw_argument WHERE gid=".pwEscape($gid)."AND tpcid=".pwEscape($tid)));		if ($count > $db_perpage) {			require_once(R_P.'require/forum.php');			$pages = numofpage($count,$page,ceil($count/$db_perpage),"$basename&job=readboard&cyid=$gid&tid=$tid&");		} else {			$page = 1;		}		$limit = pwLimit(($page-1)*$db_perpage,$db_perpage);		$query = $db->query("SELECT DISTINCT a.tid,a.tpcid,a.gid,a.author,a.authorid,a.postdate,a.subject,a.content,cm.ifadmin FROM pw_argument a LEFT JOIN pw_cmembers cm ON a.authorid=cm.uid WHERE a.gid=".pwEscape($gid)."AND a.tpcid=".pwEscape($tid)."AND cm.colonyid=".pwEscape($gid)."ORDER BY postdate DESC $limit");		while ($rt = $db->fetch_array($query)) {			$start_limit++;			$rt['lou'] = $start_limit;			$rt['postdate'] = get_date($rt['postdate']);			$rt['content'] = convert(nl2br($rt['content']),$db_windpost);			$rt['adminimg'] = $rt['ifadmin']==1 ? "<img src=\"$imgpath/$stylepath/group/3.gif\" align=\"absmiddle\"> " : "<img src=\"$imgpath/$stylepath/group/6.gif\" align=\"absmiddle\"> ";			$readdb[] = $rt;		}		$db->free_result($query);	}} elseif ($job == 'topboard') {	if (!$admindb[$winduid] && $groupid != 3) {		Showmsg('colony_topright');	}	$selids = array();	InitGP(array('selid'),'P');	if (is_array($selid)) {		foreach ($selid as $value) {			if (is_numeric($value)) {				$selids[] = $value;			}		}		$selids && $selids = pwImplode($selids);	}	!$selids && Showmsg('selid_illegal');	$selids = strpos($selids,',')!==false ? "IN ($selids)" : "= $selids";	if ($_POST['step'] != 2) {		require_once PrintHack('home');		$query = $db->query("SELECT tid,author,authorid,lastpost,subject FROM pw_argument WHERE gid=".pwEscape($cyid)."AND tpcid='0' AND tid $selids ORDER BY lastpost DESC");		while($rt = $db->fetch_array($query)){			$rt['lastpost'] = get_date($rt['lastpost']);			$argudb[] = $rt;		}	} else {		InitGP(array('topped','toppedtime'),'P');		$toppedtime = (int)$toppedtime;		$toppedtime && $toppedtime = $timestamp + 86400*$toppedtime;		$db->update("UPDATE pw_argument SET ".pwSqlSingle(array('topped'=>$topped,'toppedtime'=>$toppedtime))."WHERE tid $selids");		refreshto("$basename&cyid=$cyid&job=boardlist",'colony_topsuccess');	}} elseif ($job == 'honor') {	require_once PrintHack('home');	$honordb = $honor_order = array();	foreach ($memberdb as $key => $value) {		$honor_order[$key] = (int)$value['honor'];	}	array_multisort($honor_order,SORT_DESC,$memberdb);	$num = 0;	foreach ($memberdb as $key => $value) {		if ($num < 10 && $value['ifadmin']!=-1) {			$num++;			$value['order'] = $num;			$honordb[$key] = $value;		}	}	unset($memberdb);} elseif ($job == 'donate') {	if ($_POST['step'] != 2) {		$usermoney = $credit->get($winduid,$cn_moneytype);		require_once PrintHack('home');	} else {		InitGP(array('sendmoney'),'P',2);		$sendmoney < 1 && Showmsg('colony_donateerror');		if (procLock('colony_donate',$winduid)) {			$usermoney = $credit->get($winduid,$cn_moneytype);			$sendmoney > $usermoney && Showmsg('colony_donatefail');			$honor = $sendmoney*1;//荣誉点与金钱的比率			/*			$lockfile = D_P.'data/bbscache/lock_bank.txt';			$fp = fopen($lockfile,'wb+');			flock($fp,LOCK_EX);			*/			$credit->addLog('hack_cydonate',array($cn_moneytype => -$sendmoney),array(				'uid'		=> $winduid,				'username'	=> $windid,				'ip'		=> $onlineip,				'cnname'	=> $alldb['cname']			));			$credit->set($winduid,$cn_moneytype,-$sendmoney);			$db->update("UPDATE pw_colonys SET cmoney=cmoney+".pwEscape($sendmoney)."WHERE id=".pwEscape($cyid));			$db->update("UPDATE pw_cmembers SET honor=honor+".pwEscape($honor)."WHERE uid=".pwEscape($winduid)."AND colonyid=".pwEscape($cyid));			//fclose($fp);			$log = array(				'type'      => 'cy_donate',				'username1' => Char_cv($windid),				'username2' => '',				'field1'    => $sendmoney,				'field2'    => $cyid,				'field3'    => Char_cv($alldb['cname']),				'timestamp' => $timestamp,				'ip'        => $onlineip,				'cname'		=> $alldb['cname'],				'descrip'   => 'donate_descrip',			);			require_once(R_P.'require/writelog.php');			writeforumlog($log);			require_once(R_P.'require/msg.php');			$message = array(				'toUser'	=> $alldb['admin'],				'subject'	=> 'donate_title',				'content'	=> 'donate_content',				'other'		=> array(					'windid'	=> $windid,					'cn_name'	=> $cn_name,					'allcname'	=> $alldb['cname'],					'moneyname'	=> $credit->cType[$cn_moneytype],					'sendmoney'	=> $sendmoney				)			);			pwSendMsg($message);			procUnLock('colony_donate',$winduid);		}		Showmsg('colony_donatesuccess');	}} elseif ($job == 'donatelog') {	require_once PrintHack('home');	(int)$page < 1 && $page = 1;	@extract($db->get_one("SELECT COUNT(*) AS count FROM pw_forumlog WHERE field2=".pwEscape($cyid)."AND type='cy_donate'"));	if ($count > $db_perpage) {		require_once(R_P.'require/forum.php');		$pages = numofpage($count,$page,ceil($count/$db_perpage),"$basename&job=donatelog&cyid=$cyid&");	} else {		$page = 1;	}	$logdb = array();	$query = $db->query("SELECT username1,descrip,timestamp FROM pw_forumlog WHERE field2=".pwEscape($cyid)."AND type='cy_donate' ORDER BY id DESC LIMIT ".($page-1)*$db_perpage.",$db_perpage");	while ($rt = $db->fetch_array($query)) {		$rt['timestamp'] = get_date($rt['timestamp'],"Y-m-d H:i");		$rt['descrip'] = str_replace(array('[b]','[/b]'),array('<b>','</b>'),$rt['descrip']);		$logdb[] = $rt;	}	$db->free_result($query);}require_once PrintHack('setting');footer();?>

⌨️ 快捷键说明

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