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]}&nbsp;金钱 {$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]}&nbsp;<b>信用指数:<font color=red>{$r[point]}</font></b><br>
      {/loop}
      {/pc}  
 </div>

 

posted @ 2013-12-14 11:06  rightzhao  阅读(1660)  评论(0编辑  收藏  举报