帝国帝国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>

1C2G5M轻量服务器48元/年,2C4G8M三年仅198元,COM域名首年1元起

腾讯云双十一活动已于今天正式开启了,多重优惠享不停,首购服务器低至0.4折,比如1C2G5M轻量应用服务器仅48元/年起,2C4G8M也仅70元/年起;个人及企业用户还可以一键领取3500-7000元满减券,用于支付新购、续费、升级等各项账单;企业用户还可以以首年1年的价格注册.COM域名。活动页面:https://cloud.tencent.com/act/double11我们分享的信息仍然以秒...

pacificrack:VPS降价,SSD价格下降

之前几个月由于CHIA挖矿导致全球固态硬盘的价格疯涨,如今硬盘挖矿基本上已死,硬盘的价格基本上恢复到常规价位,所以,pacificrack决定对全系Cloud server进行价格调整,降幅较大,“如果您是老用户,请通过续费管理或升级套餐,获取同步到最新的定价”。官方网站:https://pacificrack.com支持PayPal、支付宝等方式付款VPS特征:基于KVM虚拟,纯SSD raid...

CYUN专注海外精品服务器资源 国庆钜惠 最低5折起 限量促销

国庆钜惠 最低5折起 限量促销CYUN专注海外精品服务器资源,主营香港CN2 GIA、美国CERA、美国高防服务器资源,实体公司,ISP/IDC资质齐全,客服配备齐全。本次针对国庆推出非常给力的促销活动,旗下所有平台同享,新老客户同享,限时限量,售完截止。活动截止时间:2021年10月9日官网地址:www.cyun.net参与机型:香港CN2 GIA云服务器、香港双程CN2云服...

帝国cms教程为你推荐
三星支付宝toupianaoeiu后面是什么?access数据库修复编程怎样实现access中对数据库的修复功能。ipad代理如何贷款买IPAD中国保健养猪网135保健养猪,135天可以出栏吗?什么是通配符dir是什么discuz7.2求解答Discuz!7.2 论坛怎么设置discuz7.0如何建立Discuz!7.0.0论坛邮件管理系统邮件管理软件哪种最好?zencartzencart opencart 哪个好
过期域名 中国万网域名注册 中文域名注册 太原域名注册 三级域名网站 服务器评测 美国翻墙 英语简历模板word 好看的留言 360抢票助手 镇江联通宽带 租空间 最好的空间 权嘉云 165邮箱 宁波服务器 idc资讯 老左来了 699美元 shopex主机 更多