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

青云互联-洛杉矶CN2弹性云限时五折,9.5元/月起,三网CN2gia回程,可选Windows,可自定义配置

官方网站:点击访问青云互联官网优惠码:五折优惠码:5LHbEhaS (一次性五折,可月付、季付、半年付、年付)活动方案:的套餐分为大带宽限流和小带宽不限流两种套餐,全部为KVM虚拟架构,而且配置都可以弹性设置1、洛杉矶cera机房三网回程cn2gia 洛杉矶cera机房                ...

onevps:新增(支付宝+中文网站),香港/新加坡/日本等9机房,1Gbps带宽,不限流量,仅需$4/月

onevps最新消息,为了更好服务中国区用户:1、网站支付方式新增了支付宝,即将增加微信;原信用卡、PayPal方式不变;(2)可以切换简体中文版网站,在网站顶部右上角找到那个米字旗,下拉可以换中国简体版本。VPS可选机房有:中国(香港)、新加坡、日本(东京)、美国(纽约、洛杉矶)、英国(伦敦)、荷兰(阿姆斯特丹)、瑞士(苏黎世)、德国(法兰克福)、澳大利亚(悉尼)。不管你的客户在亚太区域、美洲区...

pia云低至20/月,七折美国服务器

Pia云是一家2018的开办的国人商家,原名叫哔哔云,目前整合到了魔方云平台上,商家主要销售VPS服务,采用KVM虚拟架构 ,机房有美国洛杉矶、中国香港和深圳地区,洛杉矶为crea机房,三网回程CN2 GIA,带20G防御,常看我测评的朋友应该知道,一般带防御去程都是骨干线路,香港的线路也是CN2直连大陆,目前商家重新开业,价格非常美丽,性价比较非常高,有需要的朋友可以关注一下。活动方案...

帝国cms教程为你推荐
css加载失败为什么打开微博都显示CSS层加载失败?支付宝调整还款日支付宝调整花呗还款日,这个调整有没有对你造成什么影响?特朗普吐槽iPhone为什么这么多人讨厌苹果呢?iPhone配置不足但是iOS流畅度确实很高很强大,性能领先几乎所有国产www.topit.mehttp://www.topit.me/ 中自己上传的照片如何删除滴滴估值500亿滴滴出行股权项目投资怎么投 100w怎么可以投资不佛山海虹海虹蒸多长时间站点管理站点名称是什么意思localsettingsC盘文件夹Local Settings`能删掉不?权限777权限755,777,775,664都有什么区别ftp工具求一个比较好的手机在线FTP工具。
浙江vps 3322免费域名 密码泄露 商家促销 免费个人网站申请 上海域名 傲盾官网 支付宝扫码领红包 drupal安装 web服务器是什么 qq金券 大化网 阿里云邮箱个人版 谷歌搜索打不开 香港ip godaddy退款 月付空间 comodo 德国代理ip g6950 更多