Home > CMS Tutorial > Empire CMS > Summarize the method of using Empire CMS to call the current member information and article information on the content page

Summarize the method of using Empire CMS to call the current member information and article information on the content page

silencement
Release: 2019-11-29 13:38:23
forward
2465 people have browsed it

Summarize the method of using Empire CMS to call the current member information and article information on the content page

When using Imperial CMS to create a membership system, it is often necessary to flexibly call member information and corresponding column list information on each page. This article describes how Imperial CMS implements content pages to call current member information and The specific steps for article information are as follows:

1. Call member information:

Add the following code to the content page template

The code is as follows:

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

recommends learning "Empire cms Tutorial"

2. Call article list information (articles submitted by members):

Call articles submitted by current members (5 items) ):

The code is as follows:

<?php
$sql=$empire->query("select * from phome_ecms_download where userid=&#39;$navinfor[userid]&#39; and ismember=1 
order by 
newstime asc limit 5");
while($r=$empire->fetch($sql))
{
$titleurl=sys_ReturnBqTitleLink($r);//链接
?>
<li><a href="<?=$titleurl?>" target="_blank" title="<?=$r[title]?>" ><?=esub($r[title],40)?></a></li>
<?php
}
?>
Copy after login

The above is the detailed content of Summarize the method of using Empire CMS to call the current member information and article information on the content page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:www.word666.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template