<?php

$vercode='';	//此处取值请自行修改


define('NOROBOT', TRUE);
define('CURSCRIPT', 'search');
if ($_REQUEST['vercode']==$vercode){

	require_once './include/common.inc.php';
	$keyword = isset($subject) ? htmlspecialchars(trim($subject)) : '';
	if ($keyword==''){
	echo('[err]no subject[/err]');
	exit();
	} 
	if (isset($fid) && ($fid!=0) && ($fid!='')){
	$srchstring=' and fid = '.$fid ;
	}
	else
	{
	$srchstring='';
	}
	
	$query = $db->query("SELECT * FROM {$tablepre}threads WHERE subject= '{$keyword}' ".$srchstring." LIMIT 1");
	if ($db->num_rows($query)>0){
	echo('1');
	}
	else
	{
	echo('0');
	}
}
else
{
	echo('[err]invalid vercode[/err]');
}
$db->close;
exit();

?>