不知道楼主还在不在呢。我发现论坛搜索页打开后底部出现下面的代码,是什么原因呢
$srchtype == 'fulltext' ? 'p' : 't').".authorid IN ($srchuid)"; } if(!empty($srchfrom)) { $searchfrom = ($before ? '<=' : '>=').(TIMESTAMP - $srchfrom); $sqlsrch .= " AND t.lastpost$searchfrom"; } if(!empty($specials)) { $sqlsrch .= " AND special IN (".dimplode($special).")"; } $keywords = str_replace('%', '+', $srchtxt); $expiration = TIMESTAMP + $cachelife_text; } $num = $ids = 0; $_G['setting']['search']['forum']['maxsearchresults'] = $_G['setting']['search']['forum']['maxsearchresults'] ? intval($_G['setting']['search']['forum']['maxsearchresults']) : 500; $query = DB::query("SELECT ".($srchtype == 'fulltext' ? 'DISTINCT' : '')." t.tid, t.closed, t.author, t.authorid $sqlsrch ORDER BY tid DESC LIMIT ".$_G['setting']['search']['forum']['maxsearchresults']); while($thread = DB::fetch($query)) { $ids .= ','.$thread['tid']; $num++; } DB::free_result($query); } DB::query("INSERT INTO ".DB::table('common_searchindex')." (srchmod, keywords, searchstring, useip, uid, dateline, expiration, num, ids) VALUES ('$srchmod', '$keywords', '$searchstring', '$_G[clientip]', '$_G[uid]', '$_G[timestamp]', '$expiration', '$num', '$ids')"); $searchid = DB::insert_id(); !($_G['group']['exempt'] & 2) && updatecreditbyaction('search'); } dheader("location: search.php?mod=forum&searchid=$searchid&orderby=$orderby&ascdesc=$ascdesc&searchsubmit=yes&kw=".urlencode($keyword)); } } ?> |