ecshop广告添加搜索功能
ecshop广告添加搜索功能,第一步:新建ad_name.htm文件 div class=form-div form action=javascript:search_suppliers() name=searchForm img src=images/icon_search.gif width=26 height=22 border=0 alt=SEARCH / 广告列表 input type=
ecshop广告添加搜索功能,第一步:新建ad_name.htm文件 <div class="form-div"> <form action="javascript:search_suppliers()" name="searchForm"> <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
广告列表 <input type="text" name="ad_name" size="15" /> <input type="submit" value="{$lang.button_search}" class="button" /> </form> </div>
<script language="JavaScript"> function search_suppliers() { listTable.filter['ad_name'] = Utils.trim(document.forms['searchForm'].elements['ad_name'].value);
listTable.filter['page'] = 1; listTable.loadList(); } </script> 第二步:ads_list.htm 引入文件 {include file="ad_name.htm"} 第三步: 获得总记录数据 上面加入 $filter['ad_name'] = $_REQUEST['ad_name']; if($filter['ad_name']) {
$ad_name = $filter['ad_name']; $where .= " and ad_name like '%$ad_name%'"; } (责任编辑:最模板) 商城网站建设:http://www.zuimoban.com/shop/
|