最后二次开发完成后的效果
帝国CMS调用关注我的列表查询代码
$totalquery="select count(*) as total from {$dbtbpre}enewshy where fname='$username'".$a; $num=$empire->gettotal($totalquery); $query="select * from {$dbtbpre}enewshy where fname='$user[username]'".$a; $query.=" order by fid desc limit $offset,$line"; $sql=$empire->query($query); $returnpage=page1($num,$line,$page_line,$start,$page,$search);
前台展示代码
<?php while($r=$empire->fetch($sql)){ $fuaddr=$empire->fetch1("select userpic,fax from {$dbtbpre}enewsmemberadd where userid='$r[userid]' limit 1"); $fuaddr2=$empire->fetch1("select userfen,username from {$dbtbpre}enewsmember where userid='$r[userid]' limit 1"); ?> <li> <img src="<?=$fuaddr[userpic]?$fuaddr[userpic]:$public_r[newsurl].'e/data/images/nouserpic.gif'?>" width="60" height="60"> <div class="gz_info"> <a class="gz_name" href="../ShowInfo/?username=<?=$fuaddr2[username]?>" target="_blank"><?=$fuaddr2[username]?></a> <span>性别:<?=$fuaddr[fax]?> 积分:<?=$fuaddr2[userfen]?></span> </div> <div class="gz_opera"> <a class="qx_gz" href="/e/member/friend/add/?fcid=0?<?=$fuaddr2[username]?>" target="_blank">添加关注</a> <a class="sendInfo" href="/e/member/msg/AddMsg/?enews=AddMsg" target="_blank">发送短信</a> </div> </li> <?php } ?>
本文转载自:精准像素:11px.cn ,感谢作者分享实用知识