<?php
@$vercode=''; //此处取值请自行修改
if(!empty($vercode)){
		if ($_POST['vercode']!=$vercode){
		 echo("[err]invalid vercode[/err]");
		 exit();
		}
}


define('EmpireCMSAdmin','1');
require("../class/connect.php");
require("../class/db_sql.php");
require("../class/functions.php");
require LoadLang("pub/fun.php");
require("../class/delpath.php");
require("../class/copypath.php");
require("../class/t_functions.php");
require("../data/dbcache/class.php");
require("../data/dbcache/MemberLevel.php");
$link=db_connect();
$empire=new mysqlquery();
$enews='AddNews';
/*$enews=$_POST['enews'];
if(empty($enews))
{
 $enews=$_GET['enews'];
}*/

//增加信息
function etchktitle($add){
	global $empire,$dbtbpre,$class_r;
	$classid=(int)$add['classid'];
 if(!$add[title]||!$add[classid])
 {
  //printerror("EmptyTitle","history.go(-1)");
  exit("[err]请正确设置标题(title)和栏目(classid)[/err]");
 }
	$title=AddAddsData($add['title']);
	$where=' and classid='.$classid;
	//已审核
	$num=$empire->gettotal("select count(*) as total from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where title='".addslashes($title)."'".$where." limit 1");
	//未审核
	if(empty($num))
	{
		$num=$empire->gettotal("select count(*) as total from {$dbtbpre}ecms_".$class_r[$classid][tbname]."_check where title='".addslashes($title)."'".$where." limit 1");
	}
	if(empty($num))
	{
   exit('[no]');
	}else{
   exit('[yes]');
	}

}




require("../class/hinfofun.php");

 
etchktitle($_POST);
db_close();
$empire=null;
?>