帝国cms会员控制面板中调用好友的实现代码
在帝国cms会员控制面板中调用好友的方法代码如下:
帝国SQl语句
<?php $fsql=$empire->query("select fid,fname,fsay from {$dbtbpre}enewshy where userid='$user[userid]' order by fid desc limit 6"); while($fr=$empire->fetch($fsql)) { $fur=$empire->fetch1("select userid from {$user_tablename} where {$user_username}='$fr[fname]' limit 1"); $fuaddr=$empire->fetch1("select userpic from {$dbtbpre}enewsmemberadd where userid='$fur[userid]' limit 1"); ?> <li> <div class="user48"><a href="<?="$public_r[newsurl]"?>e/space/?userid=<?=$fur[userid]?>" target="_blank"><img src="<?=$fuaddr[userpic]?$fuaddr[userpic]:'../../data/images/nouserpic.gif'?>" width="48" height="48" /></a></div> <p><a href="<?="$public_r[newsurl]"?>e/space/?userid=<?=$fur[userid]?>" target="_blank" title="<?=$fr[fname]?>"><?=$fr[fname]?></a></p> </li> <? } ?>
帝国cms在当前栏目页下面调用相关栏目别名的栏目
帝国cms在当面栏目的列表模板里面调用相关栏目别名的栏目,用帝国sql语句,代码如下:
select classid,classname,bname from phome_enewsclass where bname like ‘%”.$class_r[$GLOBALS[navclassid]][‘bname’].”%’ order by myorder asc limit 8
好了这篇文章就介绍到这了
赞