Hongmu Notes
Home Program Notes EmpireCMS Filtering Function
Program Notes Empire cms

EmpireCMS Filtering Function

EmpireCMS Filtering Function

The built-in variable filtering function in EmpireCMS is frequently used during secondary development or when creating templates; mastering this function means you won't need to write your own filtering method – saving you a significant amount of code!

(1) Numeric variables can be processed with the (int) or intval function, example:

$page=(int)$_GET['page'];

$page=intval($_GET['page']);

(2) Numeric variables with decimal points can be processed with the (float) or floatval function. Example:

$money=(float)$money;

$money=floatval($money);

(3) Character type processing:

Without spaces or other special symbols, use

RepPostVar()Function Filtering

With spaces or other special symbols use:
RepPostVar2()Function Filtering

To write to the database:

RepPostStr()Function Filtering

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

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…
👁 353
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...
👁 296
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…
👁 3749

Recommended reading

Empire CMS – Paid Video Viewing Responsive Template 031

Empire CMS – Paid Video Viewing Responsive Template 031 Practical Collection empire template

A clean, free-source code package for Empire CMS with paid video viewing options! Multiple access levels are available: free viewing for visitors, login-required viewing for members, VIP member viewing, and paid viewing – four distinct options in total – along with a Member Center! The outdated comment functionality has been removed, and any login-related display issues in the header have been fixed. Preview image included.
👁 273
(Adaptive mobile version) Responsive criminal defense legal information website – PBootCMS template; Legal firm website source code download – 0262

(Adaptive mobile version) Responsive criminal defense legal information website – PBootCMS template; Legal firm website source code download – 0262 Practical Collection pbootcms Template

An adaptive, responsive PbootCMS website template for criminal defense and legal information services designed for mobile devices. Its professional and formal design makes it ideal for law firms and legal consultation platforms to showcase their services. This template helps legal service providers establish an authoritative online presence and attract clients with legal needs. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.c...
👁 29
Responsive Furniture Customization Website Template 0131

Responsive Furniture Customization Website Template 0131 Practical Collection Yiyou template

This set of eyoucms responsive templates is suitable for furniture customization companies. The design style is high-end and modern, and can display the whole house customization furniture, design cases and brand strength. It helps customized furniture brands attract owners online and enhance their brand image. Template display Installation instructions Website backend: /login.php Account: admin Password: admin Related articles Summary of common problems in Eyou CMS installation Eyou CMS (EyouC…
👁 63
Rice and Cereal Planting Base Website Template 1196

Rice and Cereal Planting Base Website Template 1196 Practical Collection Yiyou template

This EyouCMS template is ideal for rice and grain cultivation bases, featuring a natural and fresh design style that effectively showcases grain products, farming environments, agricultural technologies, and brand stories. It helps agricultural enterprises showcase their products online and attract consumers and distributors. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS (...
👁 62
(Adaptive mobile version) Responsive villa, office, and home decoration design PBootCMS template – Download source code for a decoration company website: 0263

(Adaptive mobile version) Responsive villa, office, and home decoration design PBootCMS template – Download source code for a decoration company website: 0263 Practical Collection pbootcms Template

This is an adaptive, responsive PbootCMS template designed for villa and office interior decoration projects for mobile devices. It features a high-end, modern design style, making it ideal for interior design firms to showcase premium residential and commercial space design projects. This template helps design companies attract high-quality clients online. Template Preview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn | Related Articles...
👁 48
Responsive NBA Sports Event News Template 0132

Responsive NBA Sports Event News Template 0132 Practical Collection Yiyou template

An eyouCMS responsive template designed for NBA sports event coverage. Its dynamic and energetic design enables seamless display of NBA live streams, score updates, team news, and in-depth analyses – helping sports media outlets attract basketball enthusiasts online. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS (Ey...
👁 60