新增自定義列表頁:
查詢SQL語句:
統(tǒng)計記錄: select count(*) as total from [!db.pre!]enewsmember
查詢記錄: select u.*,ui.* from [!db.pre!]enewsmember u LEFT JOIN [!db.pre!]enewsmemberadd ui ON u.userid=ui.userid where u.checked=1 order by u.userfen desc /*這個是按積分最多排列,自己可以改一下看按什么排列*/
使用列表模板:選一個列表模板
列表模板LIST.VAR里的會員信息調用代碼:(勾選使用程序代碼)
—————————————————————————————————————————————
$uid=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid={$r[userid]}");
$usql=$empire->fetch1("select * from {$dbtbpre}enewsmember where userid = {$r['userid']}");
$ntsql=$empire->fetch1("select count(*) as newstotal from {$dbtbpre}ecms_download where userid={$r['userid']}"); /*投稿數查詢*/
$userpic=$uid['userpic']?$uid['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';/*會員頭像*/
$jifen=$usql['userfen'];/*積分*/
$tg=$ntsql[newstotal]; /*統(tǒng)計會員投稿數*/
$listtemp='
<li class="userl">
<a href="/u/1" class="pic"><img src="'.$userpic.'" width="55" height="55" alt="admin"></a>
<p><a href="/u/1" target="_blank">admin</a></p>
<p class="xm"><b>積分:</b>'.$jifen.' </p>
<p><b>書籍:</b>'.$tg.'本</p>
</li>';
—————————————————————————————————————————————