var['mod'], $modarray) ? 'forum' : $discuz->var['mod']; $mod='forum'; //zzcity add define('CURMODULE', $mod); $modcachelist = array('register' => array('modreasons', 'stamptypeid', 'fields_required', 'fields_optional')); $cachelist = $slist = array(); if(isset($modcachelist[CURMODULE])) { $cachelist = $modcachelist[CURMODULE]; } $discuz->cachelist = $cachelist; $discuz->init(); //runhooks(); require_once libfile('function/discuzcode'); //require DISCUZ_ROOT.'./source/module/search/search_'.$mod.'.php'; /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: search_portal.php 8544 2010-04-21 05:25:03Z monkey $ */ //if(!defined('IN_DISCUZ')) { // exit('Access Denied'); //} define('NOROBOT', TRUE); require_once libfile('function/home'); $sdb = DB::object(); $srchtxt = getgpc('subject'); $srchtxt = isset($srchtxt) ? htmlspecialchars(trim($srchtxt)) : ''; $fid=intval(getgpc('fid')); $fid=$fid ? $fid :0; if (empty($srchtxt)){ exit('[err]no subject[/err]'); } $wherestr= $catid ? " and fid=$fid " : ""; $srchtxtsql = addcslashes($srchtxt, '%_'); $query = $sdb->fetch_first("SELECT tid FROM ".DB::table('forum_thread')." WHERE subject = '$srchtxtsql' $wherestr LIMIT 1"); if(!$query) { echo('[no]'); }else{ echo('[yes]'); } ?>