AddMemberGroup.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. $editor=1;
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. //验证权限
  19. CheckLevel($logininid,$loginin,$classid,"membergroup");
  20. $enews=ehtmlspecialchars($_GET['enews']);
  21. $url="<a href=ListMemberGroup.php".$ecms_hashur['whehref'].">管理会员组</a>&nbsp;>&nbsp;增加会员组";
  22. $r[level]=1;
  23. $r[favanum]=120;
  24. $r[daydown]=0;
  25. $r[msgnum]=50;
  26. $r[msglen]=255;
  27. if($enews=="EditMemberGroup")
  28. {
  29. $groupid=(int)$_GET['groupid'];
  30. $r=$empire->fetch1("select * from {$dbtbpre}enewsmembergroup where groupid='$groupid'");
  31. $url="<a href=ListMemberGroup.php".$ecms_hashur['whehref'].">管理会员组</a>&nbsp;>&nbsp;修改会员组:<b>".$r[groupname]."</b>";
  32. if($r[checked])
  33. {$checked=" checked";}
  34. }
  35. //会员表单
  36. $memberform='';
  37. $fsql=$empire->query("select fid,fname from {$dbtbpre}enewsmemberform order by fid");
  38. while($fr=$empire->fetch($fsql))
  39. {
  40. if($r['formid']==$fr[fid])
  41. {
  42. $selected=' selected';
  43. }
  44. else
  45. {
  46. $selected='';
  47. }
  48. $memberform.="<option value='".$fr[fid]."'".$selected.">".$fr[fname]."</option>";
  49. }
  50. //空间模板
  51. $spacestyle='';
  52. $sssql=$empire->query("select styleid,stylename from {$dbtbpre}enewsspacestyle order by styleid");
  53. while($ssr=$empire->fetch($sssql))
  54. {
  55. if($r['spacestyleid']==$ssr[styleid])
  56. {
  57. $selected=' selected';
  58. }
  59. else
  60. {
  61. $selected='';
  62. }
  63. $spacestyle.="<option value='".$ssr[styleid]."'".$selected.">".$ssr[stylename]."</option>";
  64. }
  65. db_close();
  66. $empire=null;
  67. ?>
  68. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  69. <html>
  70. <head>
  71. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  72. <title>会员组</title>
  73. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  74. </head>
  75. <body>
  76. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
  77. <tr>
  78. <td height="25">位置:
  79. <?=$url?>
  80. </td>
  81. </tr>
  82. </table>
  83. <form name="form1" method="post" action="../ecmsmember.php">
  84. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  85. <?=$ecms_hashur['form']?>
  86. <tr class="header">
  87. <td width="22%" height="25">增加会员组</td>
  88. <td width="78%" height="25"><input name="enews" type="hidden" id="enews" value="<?=$enews?>">
  89. <input name="groupid" type="hidden" id="groupid" value="<?=$groupid?>"></td>
  90. </tr>
  91. <tr bgcolor="#FFFFFF">
  92. <td height="25">会员组名称</td>
  93. <td height="25"> <input name="groupname" type="text" id="groupname" value="<?=$r[groupname]?>" size="38">
  94. <font color="#666666">(比如:VIP会员,普通会员)</font></td>
  95. </tr>
  96. <tr bgcolor="#FFFFFF">
  97. <td height="25">会员组级别值</td>
  98. <td height="25"> <input name="level" type="text" id="level" value="<?=$r[level]?>" size="38">
  99. <font color="#666666">(如:1,2...等,级别值越高权限越大)</font></td>
  100. </tr>
  101. <tr bgcolor="#FFFFFF">
  102. <td height="25">最大收藏夹数</td>
  103. <td height="25"><input name="favanum" type="text" id="favanum" value="<?=$r[favanum]?>" size="38">
  104. </td>
  105. </tr>
  106. <tr bgcolor="#FFFFFF">
  107. <td height="25">每天最大下载数</td>
  108. <td height="25"><input name="daydown" type="text" id="daydown" value="<?=$r[daydown]?>" size="38">
  109. <font color="#666666">(0为不限制)</font></td>
  110. </tr>
  111. <tr bgcolor="#FFFFFF">
  112. <td height="25">每天最大投稿数</td>
  113. <td height="25"><input name="dayaddinfo" type="text" id="dayaddinfo" value="<?=$r[dayaddinfo]?>" size="38">
  114. <font color="#666666">(0为不限制)</font></td>
  115. </tr>
  116. <tr bgcolor="#FFFFFF">
  117. <td height="25">投稿信息是否审核</td>
  118. <td height="25"><input name="infochecked" type="checkbox" id="infochecked" value="1"<?=$r[infochecked]==1?' checked':''?>>
  119. 直接通过,不用审核</td>
  120. </tr>
  121. <tr bgcolor="#FFFFFF">
  122. <td height="25">评论是否审核</td>
  123. <td height="25"><input name="plchecked" type="checkbox" id="plchecked" value="1"<?=$r[plchecked]==1?' checked':''?>>
  124. 直接通过,不用审核</td>
  125. </tr>
  126. <tr bgcolor="#FFFFFF">
  127. <td height="25">最大短消息数</td>
  128. <td height="25"><input name="msgnum" type="text" id="msgnum" value="<?=$r[msgnum]?>" size="38">
  129. </td>
  130. </tr>
  131. <tr bgcolor="#FFFFFF">
  132. <td height="25">短消息最大字数</td>
  133. <td height="25"><input name="msglen" type="text" id="msglen" value="<?=$r[msglen]?>" size="38">
  134. 个字节</td>
  135. </tr>
  136. <tr bgcolor="#FFFFFF">
  137. <td height="25">信息使用表单</td>
  138. <td height="25"><select name="formid" id="formid">
  139. <?=$memberform?>
  140. </select></td>
  141. </tr>
  142. <tr bgcolor="#FFFFFF">
  143. <td height="25">前台可注册</td>
  144. <td height="25"><input type="radio" name="canreg" value="1"<?=$r[canreg]==1?' checked':''?>>
  145. <input type="radio" name="canreg" value="0"<?=$r[canreg]==0?' checked':''?>>
  146. 否</td>
  147. </tr>
  148. <tr bgcolor="#FFFFFF">
  149. <td height="25">注册需要审核</td>
  150. <td height="25"><input type="radio" name="regchecked" value="1"<?=$r[regchecked]==1?' checked':''?>>
  151. <input type="radio" name="regchecked" value="0"<?=$r[regchecked]==0?' checked':''?>>
  152. 否</td>
  153. </tr>
  154. <tr bgcolor="#FFFFFF">
  155. <td height="25">会员默认空间模板</td>
  156. <td height="25"><select name="spacestyleid" id="spacestyleid">
  157. <option value=0>不设置</option>
  158. <?=$spacestyle?>
  159. </select> <font color="#666666">(不设置则使用默认空间模板) </font></td>
  160. </tr>
  161. <tr bgcolor="#FFFFFF">
  162. <td height="25">&nbsp;</td>
  163. <td height="25"> <input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
  164. </tr>
  165. </table>
  166. </form>
  167. </body>
  168. </html>