phpcms首页调用会员头像及金钱、积分等信息,并按照积分点数排列
phpcms首页调用会员头像及金钱、积分等信息,并按照积分点数排列
<div class="box"><h5>最新会员</h5><div class="col-auto"></div>{pc:get sql="SELECT * FROM v9_member order by point desc" num="5" return="data"}{loop $data $r}<img src='{php echo get_memberavatar($r[userid],1,45)}' onerror="this.src='statics/images/member/nophoto.gif'" width="41" height="35"/>{$r[nickname]} 金钱 {$r[amount]} 元,信用指数:{$r[point]} 点<br>{/loop}{/pc}</div>
同样的道理举一反三,可在首页调用企业会员的logo、积分、金钱,甚至自定义字段(已把积分改为信用指数,也可自己随意改)
<div class="box"><h5>推荐诚信企业</h5><div class="col-auto"></div>{pc:get sql="SELECT * FROM v9_member a,v9_yp_company b where a.userid=b.userid order by point desc" num="5" return="data"}{loop $data $r}<img src='{thumb($r[logo],90)}' onerror="this.src='statics/images/member/nophoto.gif'" width="90" />{$r[companyname]} <b>信用指数:<font color=red>{$r[point]}</font>点</b><br>{/loop}{/pc}
</div>