欢迎进入广州凡科互联网科技有限公司网站
全国服务热线
4000-399-000
dede地域连动检索 完全处理方法
时间: 2021-02-22 00:19 浏览次数:
0 加上 连动种类 地域1 ?phprequire_once(dirname(__FILE__). /../mon.inc.php require_once(DEDEINC. /arc.searchview.class.php $pagesize = (isset($pagesize) is_numeric($pagesize)) ? $pagesize : 10;$typeid = (isset($typeid) is_numeric($typ

0 加上 连动种类 地域


?php
require_once(dirname(__FILE__). /../mon.inc.php
require_once(DEDEINC. /arc.searchview.class.php

$pagesize = (isset($pagesize) is_numeric($pagesize)) ? $pagesize : 10;
$typeid = (isset($typeid) is_numeric($typeid)) ? $typeid : 0;
$nativeplace = (isset($nativeplace) is_numeric($nativeplace)) ? $nativeplace : 0;
$channeltype = (isset($channeltype) is_numeric($channeltype)) ? $channeltype : 0;
$kwtype = (isset($kwtype) is_numeric($kwtype)) ? $kwtype : 1;
$mid = (isset($mid) is_numeric($mid)) ? $mid : 0;

if(!isset($orderby)) $orderby=
else $orderby = eregi_replace( [^a-z] , ,$orderby);

if(!isset($searchtype)) $searchtype = titlekeyword
else $searchtype = eregi_replace( [^a-z] , ,$searchtype);

if(!isset($keyword)) $keyword =

$oldkeyword = $keyword;

$keyword = FilterSearch(stripslashes($keyword));

//搜索频道信息内容
if(empty($typeid))
{
 $typenameCacheFile = DEDEROOT. /data/cache/typename.inc
 if(!file_exists($typenameCacheFile) || filemtime($typenameCacheFile) time()-(3600*24) )
 {
 $fp = fopen(DEDEROOT. /data/cache/typename.inc , w );
 fwrite($fp, . ?php\r\n
 $dsql- SetQuery( Select id,typename From `ym_arctype`
 $dsql- Execute();
 while($row = $dsql- GetArray())
 {
 fwrite($fp, \$typeArr[{$row[ id ]}] = {$row[ typename ]} \r\n
 }
 fwrite($fp, ? . );
 fclose($fp);
 }
 //引进频道缓存文件并看重要字是不是有有关频道內容
 require_once($typenameCacheFile);
 if(isset($typeArr) is_array($typeArr))
 {
 foreach($typeArr as $id= $typename)
 {
 $keywordn = str_replace($typename, , $keyword);
 if($keyword != $keywordn)
 {
 $keyword = $keywordn;
 $typeid = $id;
 break;
 }
 }
 }
}

$keyword = _substr($keyword,30));

if($cfg_notallowstr != eregi($cfg_notallowstr,$keyword))
{
 ShowMsg( 你的检索重要字中存有不法內容,被系统软件严禁! , -1
 exit();
}

//if(($keyword== || strlen($keyword) 0) empty($typeid))
//{
// ShowMsg( 重要字不可以低于两个字节数! , -1 );
// exit();
//}

//查验检索间距時间
$lockfile = DEDEROOT. /data/time.lock.inc
if(!file_exists($lockfile)) {
 $fp = fopen($lockfile, w
 flock($fp,1);
 fwrite($fp,time());
 fclose($fp);
}

//刚开始時间
if(empty($starttime)) $starttime = -1;
else
{
 $starttime = (is_numeric($starttime) ? $starttime : -1);
 if($starttime 0)
 {
  $dayst = GetMkTime( :0 ) GetMkTime( :0
  $starttime = time() ($starttime * $dayst);
 }
}

$t1 = ExecTime();

$sp = new SearchView($typeid,$keyword,$orderby,$channeltype,$searchtype,$starttime,$pagesize,$kwtype,$mid,$nativeplace);
$keyword = $oldkeyword;
$sp- Display();

//echo ExecTime() $t1;
?

2 templets/
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns= 1999/xhtml
head
meta http-equiv= Content-Type content= text/html; charset=utf-8 /
title {dede:global.cfg_webname/}_检索結果 /title
link href= {dede:global.cfg_templeturl/}/style/search.css rel= stylesheet type= text/css media= screen /
/head
body

div >   div >   h1 a href= {dede:global.cfg_cmsurl/}/ {dede:global.cfg_webname/} /a /h1
  /div
  div >   form action= {dede:field name= phpurl /}/search.php name= formsearch
  div >   div >   input type= hidden name= kwtype value= 0 /
  input name= keyword type= text > input type= hidden id= hidden_nativeplace name= nativeplace value= 0 /
span id= span_nativeplace /span
span id= span_nativeplace_son /span
script language= javascript type= text/javascript src= {dede:global.cfg_indexurl/}/images/enums.js /script
script language= javascript type= text/javascript src= {dede:global.cfg_indexurl/}/data/enums/nativeplace.js /script
script language= javascript type= text/javascript MakeTopSelect( nativeplace , 0); /script
input type= hidden name= dede_addonfields value= nativeplace,stepselect

  select name= searchtype >   option value= titlekeyword selected= 1 智能化模糊不清检索 /option
  option value= title 仅检索题目 /option
  /select
  button type= submit >   /div
  /form
  div >   a href= heightsearch.php 高級检索 /a
  a href= {dede:global.cfg_cmsurl/}/ 回到 /a
  /div
  /div
/div

div >   p
 检索 strong >   /p
/div

div >  
{dede:list perpage= 20 }

  div >   h3 a href= [field:arcurl/] target= _blank [field:title/] /a /h3
  p >   p >   small 归类: /small span a href= [field:typeurl/] target= _blank [field:typename/] /a /span
  small 点一下: /small span [field:click/] /span
  small 时间: /small span [field:stime/] /span
  /p
  p span a href= [field:arcurl/] target= _blank [field:arcurl/] /a /span /p
  /div
{/dede:list}

/div

div >   ul >  {dede:pagelist listsize= 5 /} 
  /ul
/div ! /pages

div >   h2 有关检索: /h2
  ul
 {dede:likewords num= 8 /}
  /ul
/div

div >   p >  网站著作权信息内容及免责协议
  /p
  !
 以便适用织梦cms精英团队的发展趋势,请您保存织梦cms內容管理方法系统软件的连接信息内容.
 大家对适用织梦cms精英团队发展趋势的朋友表明真心实意的谢谢!织梦cms因您更精彩纷呈!
 
  p >  Powered by a href= span /strong /a ? 2004-2008 DesDev Inc.
  /p ! /powered
 
/div

/body
/html  


dedecms模版,dedecms公司模版,dedecms新闻资讯模版,高档HTML5响应式模版,dedecms手机上模版,织梦cms模版实例教程,网站模版,网页页面模版,完全免费网页页面模版



Copyright © 广州凡科互联网科技有限公司 版权所有 粤ICP备10235580号
全国服务电话:4000-399-000   传真:021-45545458
公司地址:广州市海珠区工业大道北67号凤凰创意园