<?
@require_once('../inc/fun.inc.php');
@require_once('../inc/config.db.php');
@require_once('cookie.php');
?>
<?
trim($name = $_POST["name"]);
if(empty($name))
{
	msg($wtime,"admin.php?main=newslb","表单不能为空请返回");
	exit;
}
$sql="select * from lb where name='".$name."'";
$result = mysql_query($sql);
$num = mysql_num_rows($result);
if($num!=0)
{
	msg($wtime,"admin.php?main=newslb","对不起类别名称以存在请重新输入");
	exit;
}
$sql = "insert into lb(name) values('$name')";
$result = mysql_query($sql);
if($result)
{
	msg($wtime,"admin.php?main=newslb","添加成功");
	exit;
}else
{
	msg($wtime,"admin.php?main=newslb","非法操作请返回");
	exit;
}
?>