ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯(lián)系官方銷售客服

1835022288

028-61286886

投訴 分享 搜索篩選,實(shí)現(xiàn)最近1個月等最近時間的篩選搜索方法分享 3 0

搜索篩選實(shí)現(xiàn)最近1個月等最近時間的篩選搜索方法分享

以官方示例為例,時間的搜索篩選只能是按時間段。

2012/1/1,2019/1/1_示例_迅睿CMS框架演示站 (xunruicms.com)

時間范圍的搜索寫法,內(nèi)容搜索,PHP開源CMS系統(tǒng)幫助文檔 (xunruicms.com)

只提供了時間范圍的搜索寫法。

分享一個在search.html頁,篩選最近時間的方法:



上代碼:

<div class="form-group row">
  <label class="col-md-2 control-label">發(fā)布時間</label>
  <div class="col-md-9">
   {php $day = $_GET["day"]}
   <label><a class="label {if !$day}label-success{else}label-default{/if}" href="{Router::search_url($params, 'diqu', NULL)}">不限</a></label>
   <!--調(diào)用單選字段數(shù)據(jù)方法-->
   <label><a class="label {if $day==7}color-1{/if}" href="{Router::search_url($params, 'day', 7)}">近一周</a></label>
   <label><a class="label {if $day==7}color-1{/if}" href="{Router::search_url($params, 'day', 30)}">近一月</a></label>
   <label><a class="label {if $day==7}color-1{/if}" href="{Router::search_url($params, 'day', 90)}">近三個月</a></label>
   <label><a class="label {if $day==7}color-1{/if}" href="{Router::search_url($params, 'day', 180)}">近半年</a></label>
   <label><a class="label {if $day==7}color-1{/if}" href="{Router::search_url($params, 'day', 365)}">近一年</a></label>
  </div>
</div>

搜索循環(huán)標(biāo)簽

{search module=MOD_DIR id=$searchid total=$sototal DAY_inputtime=$day order=$params.order catid=$catid page=1 pagesize=10 urlrule=$urlrule}

也就是增加了 DAY_inputtime=$day



這是發(fā)布時間,如果是更新時間,就改成

DAY_updatetime

解決方案