60*60*5) { $row = $dsql->GetOne("SELECT spwords FROM `#@__search_keywords` WHERE keyword='".addslashes($keyword)."'; "); if(!is_array($row)) { $inquery = "INSERT INTO `#@__search_keywords`(`keyword`,`spwords`,`count`,`result`,`lasttime`) VALUES ('".addslashes($keyword)."', '".addslashes($keyword)."', '1', '0', '".time()."'); "; $dsql->ExecuteNoneQuery($inquery); } else { $dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET count=count+1,lasttime='".time()."' WHERE keyword='".addslashes($keyword)."'; "); } $keyword = urlencode($keyword); $baidu_search_url = "http://zhannei.baidu.com/cse/search?s={$site_id}&entry=1&q={$keyword}{$addquery}"; header("Location:{$baidu_search_url}"); exit; } } //查找æ ç›®ä¿¡æ¯ if(empty($typeid)) { $typenameCacheFile = DEDEDATA.'/cache/typename.inc'; if(!file_exists($typenameCacheFile) || filemtime($typenameCacheFile) < time()-(3600*24) ) { $fp = fopen(DEDEDATA.'/cache/typename.inc', 'w'); fwrite($fp, "<"."?php\r\n"); $dsql->SetQuery("Select id,typename,channeltype From `#@__arctype`"); $dsql->Execute(); while($row = $dsql->GetArray()) { $row['typename'] = HtmlReplace($row['typename']); fwrite($fp, "\$typeArr[{$row['id']}] = '{$row['typename']}';\r\n"); } fwrite($fp, '?'.'>'); fclose($fp); } //引入æ ç›®¾~“å­˜òq¶çœ‹å…³é”®å­—是å¦æœ‰ç›¸å…³æ ç›®å†…容 require_once($typenameCacheFile); if(isset($typeArr) && is_array($typeArr)) { foreach($typeArr as $id=>$typename) { //$keywordn = str_replace($typename, ' ', $keyword); $keywordn = $keyword; if($keyword != $keywordn) { $keyword = HtmlReplace($keywordn); $typeid = intval($id); break; } } } } $keyword = addslashes(cn_substr($keyword,30)); if($cfg_notallowstr !='' && preg_match("#".$cfg_notallowstr."#i", $keyword)) { ShowMsg("ä½ çš„æœçƒ¦å…³é”®å­—中存在éžæ³•å†…容åQŒè¢«¾pÈ»Ÿ¼›æ­¢åQ?,"-1"); exit(); } if(($keyword=='' || strlen($keyword)<2) && empty($typeid)) { ShowMsg('关键字ä¸èƒ½å°äº?个字节ï¼','-1'); exit(); } //‹‚€æŸ¥æœç´¢é—´éš”æ—¶é—? $lockfile = DEDEDATA.'/time.lock.inc'; $lasttime = file_get_contents($lockfile); if(!empty($lasttime) && ($lasttime + $cfg_search_time) > time()) { ShowMsg('½Ž¡ç†å‘˜è®¾å®šæœç´¢æ—¶é—´é—´éš”äØ“'.$cfg_search_time.'¿U’,è¯ïL¨åŽå†è¯•ï¼','-1'); exit(); } //开始时é—? if(empty($starttime)) $starttime = -1; else { $starttime = (is_numeric($starttime) ? $starttime : -1); if($starttime>0) { $dayst = GetMkTime("2008-1-2 0:0:0") - GetMkTime("2008-1-1 0:0:0"); $starttime = time() - ($starttime * $dayst); } } $t1 = ExecTime(); $sp = new SearchView($typeid,$keyword,$orderby,$channeltype,$searchtype,$starttime,$pagesize,$kwtype,$mid); $keyword = $oldkeyword; $sp->Display(); PutFile($lockfile, time()); //echo ExecTime() - $t1; 亚洲熟女av一区二区三区|伊人久久大香线蕉亚洲五月天色悠|91久久精品美女高潮喷水|日本免费久久精品