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.

Assign the result of a multiple-selection form submission to a hidden form in EmpireCMS.

Assign the result of a multiple-selection form submission to a hidden form in EmpireCMS. Program Notes Empire cms

In EmpireCMS, if you need to implement a multiple-selection feature—such as a multi-region search—you must concatenate all the forms generated after the multi-region selection and then pass them to the `keyboard` field. For this purpose, the following code can be used: HTML code snippet: <label class="area-box-listhover"> <input class="inputcheckb...>
👁 165
Empire cms limits the input multi-selection in the specified box in the form to single selection

Empire cms limits the input multi-selection in the specified box in the form to single selection Program Notes Empire cms

In Empire CMS, when performing a search, the form name can only be set to "keyboard"; therefore, when conducting a multi-condition search with multiple search fields, the single-select field may encounter issues. As a result, an alternative approach must be adopted to resolve this issue. The HTML code is as follows: <label class="area-box-listhover"> <input class="input...>
👁 172
After clicking to submit the form in Empire CMS, use js to combine the URL and redirect it

After clicking to submit the form in Empire CMS, use js to combine the URL and redirect it Program Notes Empire cms Language Notes JavaScript

Many times, the search link is too long and carries many parameters. We want to make pseudo-static modifications and also hope that the link can be accessed a second time. Original html code: 🔒 Hidden content: You can view it after logging in &lt;form class="form-search" id="q-form" method="get"&gt; &lt;div class="input-…
👁 302
Empire CMS Related Search Functionality Extension (implemented using Baidu)

Empire CMS Related Search Functionality Extension (implemented using Baidu) Program Notes Empire cms

For example, retrieve a set of relevant keywords based on the title, then activate the search function; clicking on this will redirect you to the EmpireCMS search page – provided that your EmpireCMS search functionality has been enhanced to support fuzzy search! PHP code to fetch Baidu dropdown suggestions 🔒 Hidden content: Members can view the function `function getBaiduSuggestion($title) { $title = urlencode($title);}`
👁 326
EmpireCMS search functionality – POST and GET parameters

EmpireCMS search functionality – POST and GET parameters Program Notes Empire cms

Example of variable name explanation: Search Form Submission URL – POST method: /e/search/index.php <form name= "searchform" method= "post" action= "/e/search/index.php"> – GET method: /e/search/?searchget=1/e/searc...
👁 380
EmpireCMS retrieves database articles based on an ID.

EmpireCMS retrieves database articles based on an ID. Program Notes Empire cms

Query articles from the `news` table using the provided article ID: $id=(int)$_GET['id']; $r=$empire->fetch1("select * from {$dbtbpre}ecms_news where id=$id"}); $classid=(int)$r['classid']; Backup query code,...
👁 207
EmpireCMS – Batch extract main text content into summary; Summary extraction

EmpireCMS – Batch extract main text content into summary; Summary extraction Program Notes Empire cms

Code: <?php define('EmpireCMSAdmin', '1'); require('../e/class/connect.php'); require('../e/class/db_sql.php'); require('../e/class/functions.php'); //...
👁 202
WordPress Data Migration Empire – Article Migration Code

WordPress Data Migration Empire – Article Migration Code Program Notes Empire cms

Continuing from the code in the previous article; below is the code for redirecting the page: 🔒 Hidden content: Members can view <?php require("../config.php"); $dbname2 = 'www_azhenxi_com'; $dbname = 'ecms_site'; $u = empty($_GET['n'])?0: $_GE...
👁 332
EmpireCMS retrieves the column name and link for a specified ID.

EmpireCMS retrieves the column name and link for a specified ID. Program Notes Empire cms

1. Calling category name: <?=$class_r[栏目ID]['classname']?&gt;示例:&lt;?=$class_r[1]['classname']?> – This allows the category name with ID 1 to be displayed correctly. 2. Calling category link: <=?=$class_r[Category ID]['cla...
👁 389
The Empire cms addslashes function

The Empire cms addslashes function Program Notes Empire cms

The `addslashes` function in EmpireCMS is a PHP function used to escape special characters within strings. These special characters include single quotes, double quotes, backslashes, and the NULL character. Escaping these characters helps prevent unexpected results or security vulnerabilities when executing SQL queries or other database operations. Below is an example of the `addslashes` function in EmpireCMS: `function addslashes...`
👁 239
1 2 3 4 5 10