采用帝國cms制作會(huì)員系統(tǒng)的時(shí)候經(jīng)常會(huì)需要在各個(gè)頁面靈活的調(diào)用會(huì)員信息及對應(yīng)欄目列表信息,本文講述了帝國CMS實(shí)現(xiàn)內(nèi)容頁調(diào)用當(dāng)前會(huì)員信息及文章信息的方法,具體步驟如下:
一、調(diào)用會(huì)員信息:
把以下代碼加到內(nèi)容頁模板里即可
<?php$userr=sys_ShowMemberInfo(0,'');?>注冊時(shí)間:<?=$userr[registertime]==null?"":date('m-d',$userr[registertime])?>會(huì)員積分:<?=$userr[userfen]?>分上傳小說:<?=$empire->gettotal("select count(*) as total from phome_ecms_download where userid='$navinfor[userid]' and ismember=1")?>本<?=$userr[groupname]?>二、調(diào)用文章列表信息(會(huì)員投稿文章):
調(diào)用當(dāng)前會(huì)員投稿的文章(5條):
<?php$sql=$empire->query("select * from phome_ecms_download where userid='$navinfor[userid]' and ismember=1 order by newstime asc limit 5");while($r=$empire->fetch($sql)){$titleurl=sys_ReturnBqTitleLink($r);//鏈接?>" target="_blank" title="<?=$r[title]?>" ><?=esub($r[title],40)?> <?php}?>
新聞熱點(diǎn)
疑難解答
圖片精選