<?php
$vercode=''; //此处取值请自行修改
if(isset($_POST['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,$class_r,$class_zr,$bclassid,$public_r,$dbtbpre,$emod_r;
 $add[classid]=(int)$add[classid];
 $ztid=$add[ztid];
 if(!$add[title]||!$add[classid])
 {
  //printerror("EmptyTitle","history.go(-1)");
  exit("[err]请输入标题title,并选择栏目classid[/err]");
 }

  $num=$empire->gettotal("select count(*) as total from {$dbtbpre}ecms_".$class_r[$add[classid]][tbname]." where title='$add[title]' limit 1");
  if($num)
  {
   //printerror("ReInfoTitle","history.go(-1)");
   exit('[yes]');
     }else{
   exit('[no]');
  }
  
}




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

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