Hongmu Notes
Home Program Notes Empire cms

Empire cms

Commonly used and practical Empire CMS codes – a collection of code snippets utilized in Empire CMS, such as those for creating and invoking navigation menus, implementing pagination, and performing various database queries, among others.

Empire CMS search template supports dynamic tag calling

Empire CMS search template supports dynamic tag calling Program Notes Empire cms

Open the /e/search/result/index.php file and search: require("../../class/connect.php"); require("../../class/db_sql.php"); require("../../data/d…
👁 343
Empire Navigation calls advanced php code

Empire Navigation calls advanced php code Program Notes Empire cms

Navigation code: <li class="<?=$GLOBALS[navclassid]?"":"current-menu-item"?>"><a href="[!--news.url--]">Homepage</a></li> <?php $sql=$e…
👁 3652
How to use smart tags to call the friendly links at the bottom of the Empire CMS homepage?

How to use smart tags to call the friendly links at the bottom of the Empire CMS homepage? Program Notes Empire cms

Website reciprocal linking – Dynamic tag invocation: <ul> [e:loop={'select * from [!db.pre!]enewslink order by lid',20,24,0}] <li> <a href="<?=$bqr[lurl]">">...
👁 279
Empire cms7.5 content is randomly retrieved (high efficiency simple version)

Empire cms7.5 content is randomly retrieved (high efficiency simple version) Program Notes Empire cms

High-efficiency function `user_randId($table='news'){ global $dbtbpre,$empire; $filePath = ECMS_PATH. 'e/maxID'.md5($table)`. „.txt"; // File path; if (file_exists($fileP...
👁 679
How to get the parent column id and parent column name of the current column id in empire cms

How to get the parent column id and parent column name of the current column id in empire cms Program Notes Empire cms

Method to retrieve the parent category ID and parent category name for the current category ID using EmpireCMS: <?php if ($class_r[$GLOBALS['navclassid'])[bclassid] == 0) {$classid=$GLOBALS['navclassid']; $classname=$class_r[$classid][c...
👁 212
Empire CMS obtains the system COOKIE variable function getcvar()

Empire CMS obtains the system COOKIE variable function getcvar() Program Notes Empire cms

Get the system COOKIE variable function syntax: getcvar($var,$ecms) Description: $var: is the variable name $ecms: 0 is to set the foreground COOKIE variable, 1 is to set the background COOKIE variable. This parameter can be omitted and defaults to 0. Usage example: getcvar('mlusername'), get the user name of the front-end login member getcvar('loginu...
👁 295
When developing the Empire plug-in, the filter function for input characters

When developing the Empire plug-in, the filter function for input characters Program Notes Empire cms

(1) Numeric variables can be processed with the (int) or intval function, for example: $page=(int)$_GET['page']; or $page=intval($_GET['page']); (2) Numeric variables with decimal points can be processed with the (float) or floatval function, for example: $money=(float)$money; or $...
👁 130
Empire CMS smart label call field collection

Empire CMS smart label call field collection Program Notes Empire cms

Collect and classify all fields that support smart tag calls into Empire CMS smart tags: [e:loop={column ID/topic ID, number of items displayed, operation type, only display pictures with titles, additional SQL conditions, display sorting}] Template code content [/e:loop] Calling time: <?=date('m-d',$bqr[newstime])?> <?=dat…
👁 3748
Empire CMS database statement & SQL statement format

Empire CMS database statement & SQL statement format Program Notes Empire cms

Introduction to Imperial CMS extended SQL program writing, basic examples of Imperial CMS database statements & SQL statement formats: Note: The following examples are based on placing PHP files in the system root directory. Example 1: Connect to MYSQL program. (a.php)<?php require('e/class/connect.php'); //Introduce database configuration files and public function files requ…
👁 351
Empire cms retrieves the latest 10 message board reply messages

Empire cms retrieves the latest 10 message board reply messages Program Notes Empire cms

It could have been called using smart index tags, but I am used to using PHP code, so I wrote it in PHP code. php calls the latest 10 message board replies<?php $sql=$empire->query("select lyid,name,email,`mycall`,lytime,lytext,retext fro…
👁 266
1 8 9 10