<?php
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=getcvar('loginuserid');
$loginin=getcvar('loginusername');
$loginrnd=getcvar('loginrnd');
$loginlevel=getcvar('loginlevel');
$editor=1;
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"member");
$enews=$_GET['enews'];
$url="<a href=ListMemberGroup.php>管理会员组</a>&nbsp;->&nbsp;增加会员组";
$r[level]=1;
$r[favanum]=120;
$r[daydown]=0;
$r[msgnum]=50;
$r[msglen]=255;
if($enews=="EditMemberGroup")
{
	$groupid=(int)$_GET['groupid'];
	$r=$empire->fetch1("select * from {$dbtbpre}enewsmembergroup where groupid='$groupid'");
	$url="<a href=ListMemberGroup.php>管理会员组</a>&nbsp;->&nbsp;修改会员组：<b>".$r[groupname]."</b>";
	if($r[checked])
	{$checked=" checked";}
}
db_close();
$empire=null;
//风格
$loginadminstyleid=(int)getcvar('loginadminstyleid');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加会员组</title>
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td height="25">位置：<?=$url?></td>
  </tr>
</table>
<form name="form1" method="post" action="../enews.php">
  <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
    <tr class="header"> 
      <td width="30%" height="25">增加会员组</td>
      <td width="70%" height="25"><input name="enews" type="hidden" id="enews" value="<?=$enews?>"> 
        <input name="add[groupid]" type="hidden" id="add[groupid]" value="<?=$groupid?>"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">会员组名称</td>
      <td height="25"> <input name="add[groupname]" type="text" id="add[groupname]" value="<?=$r[groupname]?>">
        (比如：VIP会员,普通会员)</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">会员组级别值</td>
      <td height="25"> <input name="add[level]" type="text" id="add[level]" value="<?=$r[level]?>" size="6">
        (如：1,2...等，级别值越高，查看新闻的权限越大)</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">最大收藏夹数</td>
      <td height="25"><input name="add[favanum]" type="text" id="add[favanum]" value="<?=$r[favanum]?>" size="6">
        个 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">每天最大下载数</td>
      <td height="25"><input name="add[daydown]" type="text" id="add[daydown]" value="<?=$r[daydown]?>" size="6">
        次(0为不限制)</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="25">最大短信息数</td>
      <td height="25"><input name="add[msgnum]" type="text" id="add[msgnum]" value="<?=$r[msgnum]?>" size="6">
        个</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="25">短信息最大字数</td>
      <td height="25"><input name="add[msglen]" type="text" id="add[msglen]" value="<?=$r[msglen]?>" size="6">
        个字节</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">&nbsp;</td>
      <td height="25"> <input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
    </tr>
  </table>
</form>
</body>
</html>
