<?php
session_start();
include_once '../../common.php';
include_once '../../conn.php';
if(!isset($_SESSION['username'])){echo "<script>alert('身份已失效请重新登录!')</script><script>location.href='index.php'</script>";exit;}
$username=ubo($_SESSION['username']);
$sql1 = mysql_query("SELECT * FROM zhucema WHERE  user='$username'");
$row=mysql_fetch_array($sql1);
if($row[zdsl]!=""){echo "<script>location.href='index.php'</script>";}

if($_POST){
$delid=ubo($_POST['id']);
$type="id=$delid";
dbdel(zhucema,$type);
echo json_encode(array('zt'=>"1"));
}else{
$msg=iconv("GB2312","UTF-8","参数错误");
$json_data = array ('zt'=>"0",'msg'=>$msg);   
echo json_encode($json_data);
}
?>
