摘要:
新增自定义列表页:
查询SQL语句:统计记录: 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.us
新增自定义列表页:
查询SQL语句:
统计记录: 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]; /*统计会员投稿数*/
$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>';
---------------------------------------------------------------------------------------------------------------------------------------