帝国帝国cms分类信息 有效期字段搜索多条件搜索 教程(Empire CMS classification information validity field search multi conditional search tutorial)

帝国cms教程  时间:2021-03-20  阅读:()

帝国cms分类信息有效期字段搜索多条件搜索教程Empire CMSclassification information validity field search multiconditional search tutorial

First, the validity of the set

Classification information, usually set the validity period,such as: this information remains N days. Wait。 And everyoneis looking for ways to make sure the expiration date dependson the actual number of days and expired. Now I' ll share thedetails (I' ll try my best to explain them in detail)

1, add new fields in the management field in the classifiedinformation model:

Field set to:

Field name: enddate (this is an example and can be customized)Field ID: Custom

Field type: small character length (TEXT) can be left blankThe input form of display elements: date (date) length can beleft blank

* other do not choose not to fill. Field order numbers. Yes,it is the association between adding information and submittingthe document before and after the show

2. Remember to re modify the "management system model" in the

classified information. (tick the "enter form template" and"front submission form template")

A: entry search item submission required item list templatecontent template can increase the hook (this can be modifiedaccording to their own requirements. If you want to collect thisitem, please tick it.

3, add the following code in the appropriate section of thecontent information content template page: (smart tag SQL canbe changed as required)

- - - - - - - - - - - - - - - - - - --

Term of validity

[e:loop={' select * from [ [db.pre, ]ecms_info, where, checked=1,order, by, newstime, DESC, ID, DESC, limit, 1' , 1,24,0} ])"PHP?

$enddate= explode ("-", "$bqr[enddate]") ; "//enddate" is thefield name. If there is any change, please change all. I'vepainted the blue.

$newstime = explode ("$bqr[newstime]") ; / / release time,format: Y-m-d H: i:s

$lt =mktime (0,0,0, $enddate[1], $enddate[2], $enddate[0] ) ;$st = mktime (0,0,0, $newstime[1], $newstime[2],

$newstime[0]) ;

$overtime=$lt - $st;

$days=$overtime /86400;

If ($days<0)

{

Echo "this information has expired"; / / suggestions can bechanged to the form of pictures

}

Else

{

Echo "this information with <b><font color=red>". $days."</font></b> day"; / / CSS custom

}

>?

[/e: loop]

- - - - - - - - - - - - - - -end - - --

4, refresh the classified information page.

Two, click field search

Search for classified information (such as custom fields) . Forexample, the classified information page shows that theenterprise type is: individual enterprise. Then click on theindividual enterprise to search all the information aboutpersonal enterprise in the classified information table.Is simple: <a href= "" --news.url--]e/action/ListInfo/!Classid=[?! --classid--]&ph=1&field name n! - field name * *">[ ! - field name --]</a>

OK, is that easy?.

Three, multiple conditional search:

Example: (take my demo)

<FORM name=,,

"/e/search/index.php", "target=", "_blank", action=

<b><font color= "#ff6600" > item query: </font></b>

<input type= "hidden" name= "TBNAME" value= "info" > < -- >--info is the name of the table!

<input type="hidden"name="tempid"value= "2" > <! --2 is thesearch template ID note that the template must be classifiedinformation model -- >

<input type=><select name= "CLassID" > <! --classid is the following textfor column field value -- >

<option value= "" > industry category </option>

<option value= "105" > clothing bags </option>

<option value= "106" > environmental protection and energysaving </option>

<option value= "107" > Food & Beverage </option>

<option value="108" >decorative building materials </option><option value= "109" > technology network </option>

<option value= "110" health care </option>

<option value= "111" fitness beauty </option>

<option value= "112" > Home Gift </option>

<option value=, "113" > industrial equipment </option><option, value=, "114" > farming, breeding, </option><option value= "115" > processing agent </option>

<option value=, "116" > Science, art and literature, </option>

</select>

<input type=, "hidden", "name=", "show[]", "value=", "qylx" <!--qylx is a field name for the following text field value -- ><input type= "hidden" name= "hh[]" value= "EQ" > <! -- EQ isthe definitionof the scope of the search, according to the needto change the life

<SELECT name=, "keyboard[]", "type=", "text" >

<option value= ' ' > enterprise type '</option>'

<option value= "independent individual" > individual sole</option>

<option value= "state-owned enterprise" > State-ownedEnterprise </option>

<option value= "foreign enterprise" > foreign enterprise</option>

<option value= collective enterprise > collective enterprise</option>

<option value=, Sino foreign joint venture >Sino foreign jointventure </option>

</select>

<input type=,><input type=, "hidden", "name=", "hh[]", "value=", "EQ" ><SELECT name=, "keyboard[]", "type=", "text" >

<option value= "" > Investment Zone </option>

<option value= "national" > National </option>

<option value=, "Beijing" > Beijing </option>

<option value=, "Shanghai" > Shanghai </option>

<option value=, "Tianjin" > Tianjin </option>

<option value=, "Chongqing" > Chongqing </option>

<option value=, "Hebei" > Hebei </option>

<opt ion value=, "Henan" > Henan </option>

<option value=, "Hubei" > Hubei </option>

<option value=, "Shandong" > Shandong </option>

<opt ion value=, "Guangdong" > Guangdong </opt ion>

<option value=, "Guangxi" > Guangxi </option>

<option value=, "Fujian" > Fujian </option>

<option value=, "Jiangsu" > Jiangsu </option>

<option value=, "Zhejiang" > Zhejiang </option>

<opt ion value=, "Hunan" > Hunan </option>

<option value=, "Jiangxi" > Jiangxi </option>

<option value=, "Jilin" > Jilin </option>

<option value=, "Heilongjiang" > Heilongjiang </option><option value=, "Guizhou" > Guizhou </option>

<option value=, "Sichuan" > Sichuan </option>

<option value=, "Qinghai" > Qinghai </option>

<option value=, "Anhui" > Anhui </option>

<option value=, "Gansu" > Gansu </option>

<option value=, "Ningxia" > Ningxia </option>

<option value=, "Inner Mongolia" > Inner Mongolia </option><option value=, "Liaoning" > Liaoning </option>

<option value=, "Shaanxi" > Shaanxi </option>

<option value=, "Yunnan" > Yunnan </option>

<option value=, "Shanxi" > Shanxi </option>

<option value=, "Hainan" > Hainan </option>

<option value=, "Xinjiang" > Xinjiang </option>

<option value=, "Tibet" > Tibet </option>

<option value=, "Hongkong" > Hongkong </option>

<option value=, "Macao" > Macao </option>

<option value=, "Taiwan" > Taiwan </option>

</select>

<input type=, "hidden", "name=", "show[]", "value=", "jmhy" ><input type=, "hidden", "name=", "hh[]", "value=", "EQ" ><SELECT name=, "keyboard[]", "type=", "text" >

<option value= "> join fee range </option>

<option value= "go into details" > discuss </option> in detail<option value= "free entry fee" > free entry fee </option>

天上云月付572元,起香港三网CN2直连,独立服务器88折优惠,香港沙田机房

天上云怎么样?天上云隶属于成都天上云网络科技有限公司,是一家提供云服务器及物理服务器的国人商家,目前商家针对香港物理机在做优惠促销,香港沙田机房采用三网直连,其中电信走CN2,带宽为50Mbps,不限制流量,商家提供IPMI,可以自行管理,随意安装系统,目前E3-1225/16G的套餐低至572元每月,有做大规模业务的朋友可以看看。点击进入:天上云官方网站天上云香港物理机服务器套餐:香港沙田数据中...

百纵科技,美国独立服务器 E52670*1 32G 50M 200G防御 899元/月

百纵科技:美国高防服务器,洛杉矶C3机房 独家接入zenlayer清洗 带金盾硬防,CPU全系列E52670、E52680v3 DDR4内存 三星固态盘阵列!带宽接入了cn2/bgp线路,速度快,无需备案,非常适合国内外用户群体的外贸、搭建网站等用途。C3机房,双程CN2线路,默认200G高防,3+1(高防IP),不限流量,季付送带宽美国洛杉矶C3机房套餐处理器内存硬盘IP数带宽线路防御价格/月套...

vpsdime:夏日促销活动,美国达拉斯VPS,2G内存/2核/20gSSD/1T流量,$20/年

vpsdime怎么样?vpsdime是2013年注册的国外VPS主机商,实际上他还有一系列的其他域名站点如Winity.io, Backupsy,Cloudive, Virtora等等,母公司“Nodisto IT”相对来说还是很靠谱了的商家。VPSDime主要提供各种高配低价VPS套餐,其中Linux VPS和存储VPS基于OpenVZ架构,高级VPS基于KVM。VPSDime在上个季度的Low...

帝国cms教程为你推荐
中國信託商業銀行yw372:Com怎么把www.jiayw.com 家园影院的电影下载到本地!!thinkphpthinkphp与PHP的差别,怎么查看thinkphp编写的系统?搜狗360没有登录过搜狗浏览器,只是用搜狗高速浏览器等QQ淘宝会有事情么重庆杨家坪猪肉摊主杀人重庆忠县的猪肉市场应该好好整顿一下了。6月份我买到了母猪肉。今天好不容易才下定决心去买农贸市场买肉。重庆杨家坪猪肉摊主杀人昨天重庆九龙坡出了严重交通事故吗人人视频总部基地落户重庆重庆总部城的项目简介ipad代理如何贷款买IPAD网站方案设计求一篇校园网络设计的方案3g手机有哪些电信3g手机有哪些?
免费网站空间 tk域名注册 美国主机论坛 godaddy优惠码 win8.1企业版升级win10 dropbox网盘 云图标 193邮箱 北京双线 qq对话框 空间技术网 新睿云 腾讯总部在哪 dnspod lick 免费ftp 华为k3 杭州电信宽带优惠 免费赚q币 magento主机 更多