<?php
	$acl=$_SESSION["acl"];
	if (strlen($acl)<1 || !strpos($acl,"<2030>")) {	//没有权限
		ob_clean();
		header("Location: accesserror.html");
		exit;
	}
?>

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>优惠等级详细信息</title>
</head>

<body background="bkg.bmp" style="background-attachment: fixed">

<p align="center"><font size="3"><b>优惠等级详细信息</b></font></p>
<center>
<?php
    $db=mysql_pconnect(get_cfg_var("SIPSERVER"),get_cfg_var("SIPUSER"),get_cfg_var("SIPPWD"));
    mysql_select_db(get_cfg_var("SIPDB"),$db);
    $viptype=$_REQUEST["viptype"];
    if ($viptype!="") {
       $rs=mysql_query("select * from vips where viptype='".$viptype."'",$db);
       if ( $row = mysql_fetch_array($rs) ) {
          $discount=strval($row["discount"]);
          $givelength=strval($row["givelength"]);
          echo("优惠等级:".$viptype.",默认折扣:".$discount."%,默认赠送".$givelength."<br>");
          echo("<a href='revisevip.php?viptype=".$viptype."' target='vipuser'>修改</a>");
          echo("&nbsp;&nbsp;&nbsp;&nbsp;<a href='vipuser.php?viptype=".$viptype."' target='vipuser'>成员列表</a>");
          echo("&nbsp;&nbsp;&nbsp;&nbsp;<a href='addvipuser1.php?viptype=".$viptype."' target='vipuser'>添加成员</a>");
	   }
       else {
	      echo("没有要查询的优惠等级");
	   }
       mysql_free_result($rs);
	}
    else {
	   echo("请点击优惠等级列表中的优惠等级以显示其详细信息");
	}
    mysql_close($db);
?>
</center>
</body>

</html>

