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

Sharktech10Gbps带宽,不限制流量,自带5个IPv4,100G防御

Sharktech荷兰10G带宽的独立服务器月付319美元起,10Gbps共享带宽,不限制流量,自带5个IPv4,免费60Gbps的 DDoS防御,可加到100G防御。CPU内存HDD价格购买地址E3-1270v216G2T$319/月链接E3-1270v516G2T$329/月链接2*E5-2670v232G2T$389/月链接2*E5-2678v364G2T$409/月链接这里我们需要注意,默...

Friendhosting全场VDS主机45折,虚拟主机4折,老用户续费9折

Friendhosting发布了今年黑色星期五促销活动,针对全场VDS主机提供45折优惠码,虚拟主机4折,老用户续费可获9折加送1个月使用时长,优惠后VDS最低仅€14.53/年起,商家支持PayPal、信用卡、支付宝等付款方式。这是一家成立于2009年的老牌保加利亚主机商,提供的产品包括虚拟主机、VPS/VDS和独立服务器租用等,数据中心可选美国、保加利亚、乌克兰、荷兰、拉脱维亚、捷克、瑞士和波...

Letbox(35美元/年),美国洛杉矶VPS终身7折

Letbox 云服务商在前面的文章中其实也有多次介绍,这个服务商其实也算是比较老牌的海外服务商,几年前我也一直有使用过他们家的VPS主机,早年那时候低至年付15-35美元左右的VPS算式比较稀缺的。后来由于服务商确实比较多,而且也没有太多的网站需要用到,所以就没有续费,最近这个服务商好像有点活动就躁动的发布希望引起他人注意。这不有看到所谓的家中有喜事,应该是团队中有生宝宝了,所以也有借此来发布一些...

帝国cms教程为你推荐
点击media小企业如何做品牌中小企业如何建立品牌效应,提升品牌效应 ?163yeah网易的163,126,yeah邮箱有什么不同?特朗普吐槽iPhone为什么这么多人讨厌苹果呢?iPhone配置不足但是iOS流畅度确实很高很强大,性能领先几乎所有国产支付宝账户是什么好评返现 要支付宝帐号 支付宝帐号是什么啊资费标准电信套餐资费介绍表银花珠树晓来看姗姗而来的 作文腾讯公司电话是多少腾讯公司电话是多少我爱试用网我发现我对性爱这个话题好敏感!来吧看谁能把我下面说湿了?要200以上的才好评啊!电子商务世界世界第一的电子商务网站???
免费虚拟空间 双线主机租用 免费域名申请 godaddy域名解析教程 好看的留言 免费ddos防火墙 华为4核 52测评网 赞助 昆明蜗牛家 smtp虚拟服务器 web应用服务器 免费的域名 net空间 中国电信测速网站 万网空间 存储服务器 杭州电信宽带 asp空间 中国电信宽带测速 更多