Home > CMS Tutorial > Empire CMS > 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
Release: 2019-11-28 13:36:36
forward
2103 people have browsed it

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
}
?>
Copy after login

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!

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