*/ if ($_REQUEST['vercode']!=$vercode){ echo("[err]invalid vercode[/err]"); exit(); } define('SCR','search'); $wind_in = 'sc'; require_once('global.php'); /* !$_G['allowsearch'] && Showmsg('search_group_right'); if ($groupid != 3 && $groupid != 4) { list($db_opensch,$db_schstart,$db_schend) = explode("\t",$db_opensch); if ($db_opensch && (($db_schstart>-1 && $t['hours']<$db_schstart) || ($db_schend>-1 && $t['hours']>=$db_schend))) { Showmsg('search_opensch'); } }*/ InitGP(array('keyword','newatc','authorid','digest','step')); InitGP(array('sch_area'),'GP',2); //$sch_area>0 && $_G['allowsearch']!=2 && Showmsg('search_tpost'); $sch_area=0; /*if (isset($authorid) && (int)$authorid<1) { $errorname = $authorid; Showmsg('user_not_exists'); } if ($_POST['sch_time'] == 'newatc') { $newatc = 1; $_POST['sch_time'] = 86400; }*/ $_POST['sch_time'] = 'all'; if (empty($keyword)){ exit('[err]no subject[/err]'); } /* if ($keyword) { $keyword = str_replace(' ','',$keyword); $keyword_A = explode(' ',$keyword); foreach ($keyword_A as $key=>$value) { $value = trim($value); if (empty($value)) { unset($keyword_A[$key]); } else { $keyword_A[$key] = $value; } } $keyword = $keyword_A ? implode('|',$keyword_A) : ''; $keyword && strlen($keyword)<3 && Showmsg('search_word_limit'); $metakeyword = strip_tags($keyword); $subject = "$metakeyword - "; $db_metakeyword = str_replace('|',',',$metakeyword); }*/ //require_once(R_P.'require/header.php'); $forumadd = $p_table = $f = $db_searchinfo = ''; $fidout = array('0'); ($newatc || is_numeric($authorid) || $digest) && $step = 2; require_once(D_P.'data/bbscache/forumcache.php'); $_SELECT = $step!=2 ? ',name,f_type' : ''; $query = $db->query("SELECT fid,allowvisit,password $_SELECT FROM pw_forums WHERE type<>'category'"); while ($rt = $db->fetch_array($query)) { $allowvisit = (!$rt['allowvisit'] || $rt['allowvisit']!=str_replace(",$groupid,",'',$rt['allowvisit'])) ? true : false; if ($rt['f_type']=='hidden' && $allowvisit) { $forumadd .= ""; } elseif ($rt['password'] || !$allowvisit) { if ($step!=2) { $forumcache = preg_replace("/\