<?php session_start();
include("db.php");
$name=$_SESSION['name_admin'];
$rt=mysql_query("SELECT * FROM `".$ad."user` WHERE `username` LIKE '{$name}'");
$ry=mysql_fetch_assoc($rt);
$id=$ry['id'];
if($ry['dpsk']!=1){
mysql_query("UPDATE `".$ad."user` SET `dpsk` = '3' WHERE `".$ad."user`.`id` ='{$id}' LIMIT 1 ;");
die("<script language=javascript>  
alert( \"恭喜您,你已申请开通店铺,请等待管理审核,如有问题,请联系本站客服。\"  );
location.href = \"index.php\"
</script>");
}
if($ry['dpsk']==1){
die("<script language=javascript>  
alert( \"对不起,你的店铺正常运行,不需要再开通,如有问题,请联系本站客服。\"  );
location.href = \"index.php\"
</script>");
}
if($ry['dpsk']==3){
die("<script language=javascript>  
alert( \"对不起,你已经申请开通店铺了,请等待管理审核,如有问题,请联系本站客服。\"  );
location.href = \"index.php\"
</script>");
}
?>



