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

📄 viewthread_reward.inc.php

📁 论坛代码网增加免费空间业务
💻 PHP
字号:
<?php

/*
	[Discuz!] (C)2001-2007 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: viewthread_reward.inc.php 12944 2008-03-18 10:11:39Z monkey $
*/

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

$rewardprice = abs($thread['price']);

$limit = $thread['price'] < 0 ? 2 : 1;
$query = $db->query("SELECT p.*, m.uid, m.username, m.groupid, m.adminid, m.regdate, m.lastactivity, m.posts, m.digestposts, m.oltime,
	m.pageviews, m.credits, m.extcredits1, m.extcredits2, m.extcredits3, m.extcredits4, m.extcredits5, m.extcredits6,
	m.extcredits7, m.extcredits8, m.email, m.gender, m.showemail, m.invisible, mf.nickname, mf.site,
	mf.icq, mf.qq, mf.yahoo, mf.msn, mf.taobao, mf.alipay, mf.location, mf.medals,
	mf.sightml AS signature, mf.customstatus, mf.spacename $fieldsadd
	FROM {$tablepre}posts p
	LEFT JOIN {$tablepre}members m ON m.uid=p.authorid
	LEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid
	WHERE p.tid='$tid' ORDER BY dateline LIMIT $limit");

$bapid = 0;$bestpost = array();
while($post = $db->fetch_array($query)) {
	if($post['first'] == 1) {
		$pid = $post['pid'];
	} else {
		$thread['price'] < 0 && $bapid = $post['pid'];
	}
	$postlist[$post['pid']] = viewthread_procpost($post);
}

if($attachpids) {
	require_once DISCUZ_ROOT.'./include/attachment.func.php';
	parseattach($attachpids, $attachtags, $postlist, $showimages);
}

viewthread_parsetags();

$post = $postlist[$pid];
$bapid && $bestpost = $postlist[$bapid];

include template('viewthread_reward');
exit;

?>

⌨️ 快捷键说明

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