AddBuyGroup.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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,"buygroup");
  20. $enews=ehtmlspecialchars($_GET['enews']);
  21. $r[gmoney]=10;
  22. $r[gfen]=0;
  23. $r[gdate]=0;
  24. $url="<a href=ListBuyGroup.php".$ecms_hashur['whehref'].">管理充值类型</a> &gt; 增加充值类型";
  25. if($enews=="EditBuyGroup")
  26. {
  27. $id=(int)$_GET['id'];
  28. $r=$empire->fetch1("select * from {$dbtbpre}enewsbuygroup where id='$id' limit 1");
  29. $url="<a href=ListBuyGroup.php".$ecms_hashur['whehref'].">管理充值类型</a> &gt; 修改充值类型";
  30. }
  31. //----------会员组
  32. $sql=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
  33. while($level_r=$empire->fetch($sql))
  34. {
  35. if($r[ggroupid]==$level_r[groupid])
  36. {$select=" selected";}
  37. else
  38. {$select="";}
  39. $group.="<option value=".$level_r[groupid].$select.">".$level_r[groupname]."</option>";
  40. if($r[gzgroupid]==$level_r[groupid])
  41. {$zselect=" selected";}
  42. else
  43. {$zselect="";}
  44. $zgroup.="<option value=".$level_r[groupid].$zselect.">".$level_r[groupname]."</option>";
  45. if($r[buygroupid]==$level_r[groupid])
  46. {$bselect=" selected";}
  47. else
  48. {$bselect="";}
  49. $buygroup.="<option value=".$level_r[groupid].$bselect.">".$level_r[groupname]."</option>";
  50. }
  51. ?>
  52. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  53. <html>
  54. <head>
  55. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  56. <title>增加充值类型</title>
  57. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  58. </head>
  59. <body>
  60. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  61. <tr>
  62. <td>位置:<?=$url?></td>
  63. </tr>
  64. </table>
  65. <form name="form1" method="post" action="ListBuyGroup.php">
  66. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  67. <?=$ecms_hashur['form']?>
  68. <tr class="header">
  69. <td height="25" colspan="2">增加充值类型
  70. <input name="enews" type="hidden" id="enews" value="<?=$enews?>"> <input name="id" type="hidden" id="id" value="<?=$id?>">
  71. </td>
  72. </tr>
  73. <tr bgcolor="#FFFFFF">
  74. <td width="25%" height="25">类型名称:</td>
  75. <td width="75%" height="25"><input name="gname" type="text" id="gname" value="<?=$r[gname]?>" size="35">
  76. </td>
  77. </tr>
  78. <tr bgcolor="#FFFFFF">
  79. <td height="25">购买金额:</td>
  80. <td height="25"><input name="gmoney" type="text" id="gmoney" value="<?=$r[gmoney]?>" size="35">
  81. 元</td>
  82. </tr>
  83. <tr bgcolor="#FFFFFF">
  84. <td height="25">充值点数:</td>
  85. <td height="25"><input name="gfen" type="text" id="gfen" value="<?=$r[gfen]?>" size="35">
  86. 点</td>
  87. </tr>
  88. <tr bgcolor="#FFFFFF">
  89. <td rowspan="3">充值有效期:</td>
  90. <td height="25"><input name="gdate" type="text" id="gdate" value="<?=$r[gdate]?>" size="35">
  91. 天</td>
  92. </tr>
  93. <tr bgcolor="#FFFFFF">
  94. <td height="25">充值设置转向会员组:
  95. <select name="ggroupid" id="ggroupid">
  96. <option value=0>不设置</option>
  97. <?=$group?>
  98. </select></td>
  99. </tr>
  100. <tr bgcolor="#FFFFFF">
  101. <td height="25">到期后转向的会员组:
  102. <select name="gzgroupid" id="gzgroupid">
  103. <option value=0>不设置</option>
  104. <?=$zgroup?>
  105. </select> </td>
  106. </tr>
  107. <tr bgcolor="#FFFFFF">
  108. <td height="25">显示顺序:</td>
  109. <td height="25"><input name="myorder" type="text" id="myorder" value="<?=$r[myorder]?>" size="35">
  110. <font color="#666666">(值越小显示越前面)</font></td>
  111. </tr>
  112. <tr bgcolor="#FFFFFF">
  113. <td height="25">可购买的会员组:</td>
  114. <td height="25"><select name="buygroupid" id="buygroupid">
  115. <option value=0>不设置</option>
  116. <?=$buygroup?>
  117. </select>
  118. <font color="#666666">(会员组权限值大于选择的会员组都可以购买)</font></td>
  119. </tr>
  120. <tr bgcolor="#FFFFFF">
  121. <td height="25">类型说明:</td>
  122. <td height="25"><textarea name="gsay" cols="65" rows="6" id="gsay"><?=ehtmlspecialchars($r[gsay])?></textarea></td>
  123. </tr>
  124. <tr bgcolor="#FFFFFF">
  125. <td height="25" colspan="2"><div align="center">
  126. <input type="submit" name="Submit" value="提交">
  127. &nbsp;
  128. <input type="reset" name="Submit2" value="重置">
  129. </div></td>
  130. </tr>
  131. </table>
  132. </form>
  133. </body>
  134. </html>
  135. <?
  136. db_close();
  137. $empire=null;
  138. ?>