Hongmu Notes
Home Program Notes EmpireCMS – Quickly modify data titles and title images when creating a clone site, making testing easier.
Program Notes Empire cms

EmpireCMS – Quickly modify data titles and title images when creating a clone site, making testing easier.

EmpireCMS – Quickly modify data titles and title images when creating a clone site, making testing easier.

Modified effect

20240104153544887-图片

SQLcode

 隐藏内容:评论后查看
UPDATE `phome_ecms_news` SET `title` = CONCAT('这是一篇测试文章,文章ID为', id,',需要修改文章请在后台栏目修改');

Quick batch thumbnail creation

The thumbnail can be configured directly using PHP.

PHP code: Randomly select an image from a specified folder and then redirect the user.

<?php

$file = "/skin/static/pic";
$img = glob(".".$file.'/*.{webp,png,jpg,jpeg}',GLOB_BRACE);
$name = basename($img[mt_rand(0,(count($img)-1))]);
$url = "{$file}/{$name}";

header("Location: " . $url);

To ensure that all images are randomly selected, simply add an extra GET parameter when generating the thumbnails...

SQLcode

 隐藏内容:评论后查看
UPDATE `phome_ecms_news` SET `titlepic` = CONCAT('http://123.56.73.59/img.php?', id);

Home Slide

Typically, go to Backend> Other> Image Information Management.

SQL statement

Simply replace the image URL with your own image URL.

INSERT INTO `phome_enewspic` (`picid`, `title`, `pic_url`, `url`, `pic_width`, `pic_height`, `open_pic`, `border`, `pictext`, `classid`) VALUES (NULL, '后台-其他-图片信息管理', '/skin/static/images/f5.jpg', '/', '100', '50', '_blank', '0', '', '2');

method of calling

[e:loop={'SELECT * FROM `[!db.pre!]enewspic` WHERE `classid` = 2',20,24,0}]
	<li style="background:url(<?=$bqr['pic_url']?>) center 0 no-repeat;">
		<a href="<?=$bqr['url']?>"><?=$bqr['title']?></a>
	</li>
[/e:loop]
微信赞赏

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…
👁 351
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
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

Recommended reading

(Adaptive mobile version) Responsive financial investment management institution website – PBootCMS template; Financial and investment website source code download – 0662

(Adaptive mobile version) Responsive financial investment management institution website – PBootCMS template; Financial and investment website source code download – 0662 Practical Collection pbootcms Template

A responsive PbootCMS website template designed for financial investment and wealth management institutions, compatible with both PC and WAP devices. Its modern financial design makes it ideal for investment firms and wealth management agencies to showcase their products and services. This template helps financial institutions attract high-net-worth clients online and enhance brand trust. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s...
👁 40
(PC+WAP) Energy-efficient building shading products – Marketing-oriented website using PBootCMS template; Energy-saving building websites source code download – 0045

(PC+WAP) Energy-efficient building shading products – Marketing-oriented website using PBootCMS template; Energy-saving building websites source code download – 0045 Practical Collection pbootcms Template

This PbootCMS template is designed as a marketing-oriented corporate website for building energy efficiency and shading product companies, supporting both PC and mobile devices. The clean, eco-friendly design emphasizes the principles of energy conservation and environmental sustainability. The pages highlight shading products, energy-saving solutions, and project cases, enabling building energy efficiency firms to efficiently acquire online customers and showcase their technical advantages. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin...
👁 39
PHP – Query a single SQL record

PHP – Query a single SQL record Language Notes PHP PHP and mysql

You can use the mysqli or PDO extensions in PHP to query a single SQL record. Below are example codes for both methods: Using the mysqli extension to query a single SQL record: // Establish a connection $conn = mysqli_connect("localhost", "username", "password", "dbname"); // Check the connection...
👁 126
Responsive Energy Efficiency Technology Website Template 0740

Responsive Energy Efficiency Technology Website Template 0740 Practical Collection Yiyou template

An eYouCMS responsive website template designed for energy-saving technologies. Its modern, technology-driven design is ideal for showcasing energy-efficient products, energy solutions, and corporate expertise. This template helps energy-saving technology companies effectively promote their brands online and attract both government and corporate clients. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for eYouCMS | eYouCMS...
👁 40
Responsive school/college website template 0112

Responsive school/college website template 0112 Practical Collection Yiyou template

This EYO CMS responsive template is ideal for schools, universities, and academic institutions. Its educational-themed design is perfect for showcasing school environments, teaching achievements, admissions information, and campus news, helping educational organizations attract students and parents online. Template Demo | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EYO CMS | EYO CMS (Eyo...
👁 56
(Adaptive mobile version) Responsive bilingual (Simplified/Traditional Chinese) eco-friendly website – PBootCMS template; Download source code for an environmental technology company's website – 0663

(Adaptive mobile version) Responsive bilingual (Simplified/Traditional Chinese) eco-friendly website – PBootCMS template; Download source code for an environmental technology company's website – 0663 Practical Collection pbootcms Template

A responsive, bilingual (Simplified and Traditional Chinese) green and eco-friendly PbootCMS website template, compatible with both PC and WAP devices. Its fresh and eco-conscious design makes it ideal for environmental technology companies to showcase their green technologies and corporate image in the Taiwan and Mainland China markets, as well as in other Chinese-speaking markets. This template can help businesses expand their partnerships within the green industry. Template Preview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.c...
👁 56