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('mluserid'));//登陆用户ID $lgusername=RepPostVar(getcvar('mlusername'));//登陆用户 $lggroupid=intval(getcvar('mlgroupid'));//会员组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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
