首页 > CMS > 帝国Empire > 正文

帝国CMS模板实现内容页调用当前会员信息及文章信息的方法

2024-08-28 12:19:07
字体:
来源:转载
供稿:网友

采用帝国cms制作会员系统的时候经常会需要在各个页面灵活的调用会员信息及对应栏目列表信息,本文讲述了帝国CMS实现内容页调用当前会员信息及文章信息的方法,具体步骤如下:

一、调用会员信息:

把以下代码加到内容页模板里即可

<?php$userr=sys_ShowMemberInfo(0,'');?>
注册时间:<?=$userr[registertime]==null?"":date('m-d',$userr[registertime])?>会员积分:<?=$userr[userfen]?>分上传小说:<?=$empire->gettotal("select count(*) as total from phome_ecms_download where userid='$navinfor[userid]' and ismember=1")?>本<?=$userr[groupname]?>

二、调用文章列表信息(会员投稿文章):

调用当前会员投稿的文章(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}?>
    发表评论 共有条评论
    用户名: 密码:
    验证码: 匿名发表