Home  >  Article  >  CMS Tutorial  >  How to use Empire CMS to determine whether a member is logged in

How to use Empire CMS to determine whether a member is logged in

silencement
silencementforward
2019-11-28 13:36:361983browse

How to use Empire CMS to determine whether a member is logged in

The example in this article describes the method of Empire CMS to determine whether a member is logged in. Some content can only be viewed after logging in, and cannot be viewed without logging in. At this time, you can refer to the code:

The code is as follows:

<?php
include("e/class/connect.php");
$lguserid=intval(getcvar(&#39;mluserid&#39;));//登陆用户ID
$lgusername=RepPostVar(getcvar(&#39;mlusername&#39;));//登陆用户
$lggroupid=intval(getcvar(&#39;mlgroupid&#39;));//会员组ID
if($lggroupid) //登陆会员显示菜单
{
?>
//登陆后可以看到的内容。如:欢迎登录……
<?php
}
else //游客显示菜单
{
?>
//没有登陆时可以看到的内容。如:我要注册
<?php
}
?>

Recommended to study "Empire cms tutorial"

Note: You need to set the page to .php before you can use it.

I hope this article will be helpful to everyone’s Imperial CMS website building.

The above is the detailed content of How to use Empire CMS to determine whether a member is logged in. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:www.word666.com. If there is any infringement, please contact admin@php.cn delete