ListMAgUser.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. require("../../member/class/user.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. $editor=1;
  10. //验证用户
  11. $lur=is_login();
  12. $logininid=$lur['userid'];
  13. $loginin=$lur['username'];
  14. $loginrnd=$lur['rnd'];
  15. $loginlevel=$lur['groupid'];
  16. $loginadminstyleid=$lur['adminstyleid'];
  17. //ehash
  18. $ecms_hashur=hReturnEcmsHashStrAll();
  19. //验证权限
  20. CheckLevel($logininid,$loginin,$classid,"madmingroup");
  21. $agid=(int)$_GET['agid'];
  22. if(!$agid)
  23. {
  24. printerror("ErrorUrl","history.go(-1)");
  25. }
  26. $r=$empire->fetch1("select * from {$dbtbpre}enewsag where agid='$agid'");
  27. if(!$r['agid'])
  28. {
  29. printerror("ErrorUrl","history.go(-1)");
  30. }
  31. if($r['isadmin']==9)
  32. {
  33. $isadminname='管理员';
  34. }
  35. elseif($r['isadmin']==5)
  36. {
  37. $isadminname='版主';
  38. }
  39. elseif($r['isadmin']==1)
  40. {
  41. $isadminname='实习版主';
  42. }
  43. else
  44. {
  45. $isadminname='';
  46. }
  47. $url="<a href=ListMAdminGroup.php".$ecms_hashur['whehref'].">管理会员管理组</a>&nbsp;>&nbsp;管理组:".$r['agname']."&nbsp;>&nbsp;<a href='ListMAgUser.php?agid=$agid".$ecms_hashur['ehref']."'>[".$isadminname."]成员列表</a>";
  48. ?>
  49. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  50. <html>
  51. <head>
  52. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  53. <title>会员管理组 - 成员列表</title>
  54. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  55. </head>
  56. <body>
  57. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
  58. <tr>
  59. <td width="50%">位置:
  60. <?=$url?>
  61. </td>
  62. <td><div align="right" class="emenubutton"></div></td>
  63. </tr>
  64. </table>
  65. <br>
  66. <form name="form1" method="post" action="ListMAdminGroup.php" onsubmit="return confirm('确认要增加管理员?');">
  67. <table width="800" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  68. <?=$ecms_hashur['form']?>
  69. <tr class="header">
  70. <td height="25" colspan="3">增加会员管理员:
  71. <input name=enews type=hidden id="enews" value=AddMAgUser> <input name="agid" type="hidden" id="agid" value="<?=$agid?>"></td>
  72. </tr>
  73. <tr>
  74. <td width="223" height="25" bgcolor="#FFFFFF"><div align="center">用户ID</div></td>
  75. <td width="421" bgcolor="#FFFFFF"><div align="center">用户名</div></td>
  76. <td width="134" bgcolor="#FFFFFF"><div align="center">操作</div></td>
  77. </tr>
  78. <tr>
  79. <td height="25" bgcolor="#FFFFFF"><div align="center">
  80. <input name="adduserid" type="text" id="adduserid">
  81. </div></td>
  82. <td height="25" bgcolor="#FFFFFF"><div align="center">
  83. <input name="addusername" type="text" id="addusername" size="36">
  84. </div></td>
  85. <td height="25" bgcolor="#FFFFFF"><div align="center">
  86. <input type="submit" name="Submit" value="增加">
  87. </div></td>
  88. </tr>
  89. </table>
  90. </form>
  91. <table width="800" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  92. <tr class="header">
  93. <td width="223" height="25"> <div align="center">用户ID</div></td>
  94. <td width="421" height="25"> <div align="center">用户名</div></td>
  95. <td width="134" height="25"> <div align="center">操作</div></td>
  96. </tr>
  97. <?
  98. $amr=explode(',',$r['auids']);
  99. $mcount=count($amr)-1;
  100. for($mi=1;$mi<$mcount;$mi++)
  101. {
  102. $auserid=(int)$amr[$mi];
  103. $member_r=$empire->fetch1("select ".eReturnSelectMemberF('username')." from ".eReturnMemberTable()." where ".egetmf('userid')."='$auserid'");
  104. ?>
  105. <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
  106. <td height="25"> <div align="center">
  107. <?=$auserid?>
  108. </div></td>
  109. <td height="25"> <div align="center">
  110. <?=$member_r['username']?>
  111. </div></td>
  112. <td height="25"> <div align="center">[<a href="ListMAdminGroup.php?enews=DelMAgUser&agid=<?=$agid?>&adduserid=<?=$auserid?><?=$ecms_hashur['href']?>" onclick="return confirm('确认要删除此管理员?');">删除</a>]</div></td>
  113. </tr>
  114. <?
  115. }
  116. db_close();
  117. $empire=null;
  118. ?>
  119. <tr bgcolor="#FFFFFF">
  120. <td height="25" colspan="3"><font color="#666666">说明:增加版主后,然后再到各个栏目增加可管理的栏目。</font></td>
  121. </tr>
  122. </table>
  123. </body>
  124. </html>