ListMemberMore.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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,"member");
  20. include("../../member/class/user.php");
  21. include "../".LoadLang("pub/fun.php");
  22. include("../../data/dbcache/MemberLevel.php");
  23. $page=(int)$_GET['page'];
  24. $page=RepPIntvar($page);
  25. $start=0;
  26. $line=15;//每页显示条数
  27. $page_line=12;//每页显示链接数
  28. //搜索
  29. $search='';
  30. $search.=$ecms_hashur['ehref'];
  31. //自定义每页数量
  32. $showline=(int)$_GET['showline'];
  33. if($showline)
  34. {
  35. if($showline<10||$showline>100)
  36. {
  37. $line=15;
  38. }
  39. else
  40. {
  41. $line=$showline;
  42. $search.='&showline='.$showline;
  43. }
  44. }
  45. $offset=$page*$line;//总偏移量
  46. $and='';
  47. if($_GET['sear'])
  48. {
  49. $keyboard=RepPostVar2($_GET['keyboard']);
  50. if($keyboard)
  51. {
  52. $show=RepPostStr($_GET['show'],1);
  53. if($show==1)//用户ID
  54. {
  55. $and.=" where userid='$keyboard'";
  56. }
  57. elseif($show==2)//注册IP
  58. {
  59. $and.=" where regip like '%$keyboard%'";
  60. }
  61. elseif($show==3)//最后登录IP
  62. {
  63. $and.=" where lastip like '%$keyboard%'";
  64. }
  65. elseif($show==4)//空间名称
  66. {
  67. $and.=" where spacename like '%$keyboard%'";
  68. }
  69. elseif($show==5)//空间公告
  70. {
  71. $and.=" where spacegg like '%$keyboard%'";
  72. }
  73. elseif($show==6)//手机
  74. {
  75. $and.=" where phone like '%$keyboard%'";
  76. }
  77. elseif($show==7)//姓名
  78. {
  79. $and.=" where truename like '%$keyboard%'";
  80. }
  81. elseif($show==8)//公司名
  82. {
  83. $and.=" where company like '%$keyboard%'";
  84. }
  85. elseif($show==9)//联系地址
  86. {
  87. $and.=" where address like '%$keyboard%'";
  88. }
  89. $search.="&sear=1&keyboard=".urlencode($keyboard)."&show=$show";
  90. }
  91. }
  92. $query="select * from {$dbtbpre}enewsmemberadd".$and;
  93. $totalquery="select count(*) as total from {$dbtbpre}enewsmemberadd".$and;
  94. $num=$empire->gettotal($totalquery);//取得总条数
  95. $query=$query." order by userid desc limit $offset,$line";
  96. $sql=$empire->query($query);
  97. $returnpage=page2($num,$line,$page_line,$start,$page,$search);
  98. $url="<a href=ListMemberMore.php".$ecms_hashur['whehref'].">管理会员(详细)</a>";
  99. //----------内部组
  100. $ingroup='';
  101. $chingroup='';
  102. $inmsql=$empire->query("select * from {$dbtbpre}enewsingroup order by myorder");
  103. while($inm_r=$empire->fetch($inmsql))
  104. {
  105. if($ingid==$inm_r['gid'])
  106. {$select=" selected";}
  107. else
  108. {$select="";}
  109. $ingroup.="<option value=".$inm_r['gid'].$select.">".$inm_r['gname']."</option>";
  110. $chingroup.="<option value=".$inm_r['gid'].">".$inm_r['gname']."</option>";
  111. }
  112. ?>
  113. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  114. <html>
  115. <head>
  116. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  117. <title>管理会员(详细)</title>
  118. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  119. <script>
  120. function CheckAll(form)
  121. {
  122. for (var i=0;i<form.elements.length;i++)
  123. {
  124. var e = form.elements[i];
  125. if (e.name != 'chkall')
  126. e.checked = form.chkall.checked;
  127. }
  128. }
  129. </script>
  130. </head>
  131. <body>
  132. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  133. <tr>
  134. <td width="50%">位置:
  135. <?=$url?>
  136. </td>
  137. <td><div align="right"> </div></td>
  138. </tr>
  139. </table>
  140. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  141. <form name="searchm" method="get" action="ListMemberMore.php">
  142. <?=$ecms_hashur['eform']?>
  143. <tr>
  144. <td><div align="center">搜索:
  145. <input name="keyboard" type="text" id="keyboard" value="<?=$keyboard?>">
  146. <select name="show" id="show">
  147. <option value="1"<?=$show==1?' selected':''?>>用户ID</option>
  148. <option value="2"<?=$show==2?' selected':''?>>注册IP</option>
  149. <option value="3"<?=$show==3?' selected':''?>>最后登录IP</option>
  150. <option value="4"<?=$show==4?' selected':''?>>空间名称</option>
  151. <option value="5"<?=$show==5?' selected':''?>>空间公告</option>
  152. <option value="6"<?=$show==6?' selected':''?>>手机</option>
  153. <option value="7"<?=$show==7?' selected':''?>>姓名</option>
  154. <option value="8"<?=$show==8?' selected':''?>>公司名</option>
  155. <option value="9"<?=$show==9?' selected':''?>>联系地址</option>
  156. </select>
  157. 每页显示
  158. <input name="showline" type="text" id="showline" value="<?=$line?>" size="5">
  159. <input type="submit" name="Submit" value="搜索">
  160. <input name="sear" type="hidden" id="sear" value="1">
  161. </div></td>
  162. </tr>
  163. </form>
  164. </table>
  165. <form name="memberform" method=post action=ListMember.php onsubmit="return confirm('确认要执行操作?');">
  166. <?=$ecms_hashur['form']?>
  167. <?
  168. while($r=$empire->fetch($sql))
  169. {
  170. $ur=$empire->fetch1("select ".eReturnSelectMemberF('username,email,groupid,userfen,money,userdate,zgroupid,checked,registertime,ingid,agid,isern')." from ".eReturnMemberTable()." where ".egetmf('userid')."='$r[userid]'");
  171. $username=$ur['username'];
  172. if(empty($ur['checked']))
  173. {
  174. $checked=" title='未审核' style='background:#99C4E3'";
  175. $namefont1="<font color='gray'>";
  176. $namefont2="</font>";
  177. $checkedtitle=' (<font color=red>未审核</font>)';
  178. }
  179. else
  180. {
  181. $checked="";
  182. $namefont1="";
  183. $namefont2="";
  184. $checkedtitle=' (已审核)';
  185. }
  186. if(empty($ur['isern']))
  187. {
  188. $isernstatus=' <没有实名>';
  189. $isernstatus2=' (<font color=red>没有实名</font>)';
  190. }
  191. else
  192. {
  193. $isernstatus=' <已实名>';
  194. $isernstatus2=' (已实名)';
  195. }
  196. //管理组
  197. $magname='';
  198. $magadminname='';
  199. if($ur['agid'])
  200. {
  201. $magname=$aglevel_r[$ur['agid']]['agname'];
  202. if($magname)
  203. {
  204. if($aglevel_r[$ur['agid']]['isadmin']==9)
  205. {
  206. $magadminname='管理员 ('.$aglevel_r[$ur['agid']]['isadmin'].')';
  207. }
  208. elseif($aglevel_r[$ur['agid']]['isadmin']==5)
  209. {
  210. $magadminname='版主 ('.$aglevel_r[$ur['agid']]['isadmin'].')';
  211. }
  212. elseif($aglevel_r[$ur['agid']]['isadmin']==1)
  213. {
  214. $magadminname='实习版主 ('.$aglevel_r[$ur['agid']]['isadmin'].')';
  215. }
  216. else
  217. {
  218. $magadminname='('.$aglevel_r[$ur['agid']]['isadmin'].')';
  219. }
  220. }
  221. }
  222. //内部组
  223. $migname='';
  224. if($ur['ingid'])
  225. {
  226. $migname=$iglevel_r[$ur['ingid']]['gname'];
  227. }
  228. ?>
  229. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class=tableborder>
  230. <tr>
  231. <td width="3%" bgcolor="#FFFFFF" id=user<?=$r['userid']?>><div align="center">
  232. <input name="userid[]" type="checkbox" id="userid[]" value="<?=$r['userid']?>"<?=$checked?> onclick="if(this.checked){user<?=$r['userid']?>.style.backgroundColor='#4FB4DE';}else{user<?=$r['userid']?>.style.backgroundColor='#ffffff';}">
  233. </div></td>
  234. <td width="97%" height="27"><table width="100%" border="0" cellspacing="1" cellpadding="3">
  235. <tr>
  236. <td width="14%">ID:<?=$r['userid']?></td>
  237. <td width="20%">用户名:<a href="../../space/?userid=<?=$r['userid']?>" title="查看会员空间" target="_blank"><?=$namefont1?><?=$username?><?=$namefont2?></a></td>
  238. <td width="14%">内部组:<?=$migname?></td>
  239. <td width="20%">注册时间:<?=eReturnMemberRegtime($ur['registertime'],"Y-m-d H:i:s")?></td>
  240. <td width="20%">注册IP:<?=$r['regip']?>:<?=$r['regipport']?></td>
  241. <td width="12%" rowspan="2"><div align="center">[<a href="AddMember.php?enews=EditMember&userid=<?=$r['userid']?><?=$ecms_hashur['ehref']?>" target="_blank">修改</a>]
  242. &nbsp;
  243. [<a href="ListMember.php?enews=DelMember&userid=<?=$r['userid']?><?=$ecms_hashur['href']?>" onclick="return confirm('确认要删除?');">删除</a>]
  244. </div>
  245. </div></td>
  246. </tr>
  247. <tr>
  248. <td>管理组:<?=$magname?></td>
  249. <td>会员组:<?=$level_r[$ur['groupid']][groupname]?></td>
  250. <td>登录次数:<?=$r['loginnum']?></td>
  251. <td>最后登录:<?=date("Y-m-d H:i:s",$r['lasttime'])?></td>
  252. <td>最后IP:<?=$r['lastip']?>:<?=$r['lastipport']?></td>
  253. </tr>
  254. </table></td>
  255. </tr>
  256. <tr bgcolor="#FFFFFF">
  257. <td height="23" bgcolor="#FFFFFF">&nbsp; </td>
  258. <td height="23" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="3">
  259. <tr>
  260. <td width="50%" height="23">注册资料<?=$checkedtitle?><?=$isernstatus2?></td>
  261. <td width="50%">空间名称和公告</td>
  262. </tr>
  263. <tr>
  264. <td><textarea name="textarea" cols="60" style="WIDTH:100%" rows="8">用户名:<?=$username."\r\n"?>
  265. 邮箱地址:<?=$ur['email']."\r\n"?>
  266. 公司名称:<?=stripSlashes($r['company'])."\r\n"?>
  267. 真实姓名:<?=stripSlashes($r['truename'])."\r\n"?>
  268. 联系电话:<?=stripSlashes($r['mycall'])."\r\n"?>
  269. 传真号码:<?=stripSlashes($r['fax'])."\r\n"?>
  270. 手机号码:<?=stripSlashes($r['phone'])."\r\n"?>
  271. QQ号码:<?=stripSlashes($r['oicq'])."\r\n"?>
  272. MSN:<?=stripSlashes($r['msn'])."\r\n"?>
  273. 会员头像:<?=$r['userpic']."\r\n"?>
  274. 网站地址:<?=stripSlashes($r['homepage'])."\r\n"?>
  275. 联系地址:<?=stripSlashes($r['address'])."\r\n"?>
  276. 邮编:<?=stripSlashes($r['zip'])."\r\n"?>
  277. 简介:<?="\r\n"?>
  278. <?=stripSlashes($r['saytext'])?>
  279. </textarea></td>
  280. <td><textarea name="textarea2" cols="60" style="WIDTH:100%" rows="8">空间名称:<?=stripSlashes($r['spacename'])."\r\n"?>
  281. 空间公告:<?="\r\n"?>
  282. <?=stripSlashes($r['spacegg'])?>
  283. </textarea></td>
  284. </tr>
  285. </table></td>
  286. </tr>
  287. </table>
  288. <br>
  289. <?
  290. }
  291. ?>
  292. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class=tableborder>
  293. <tr>
  294. <td width="3%" bgcolor="#FFFFFF"><div align="center"><input type=checkbox name=chkall value=on onclick="CheckAll(this.form)" title="全选"></div></td>
  295. <td height="30" bgcolor="#FFFFFF">
  296. <select name="toingid" id="toingid">
  297. <option value="0">取消内部组</option>
  298. <?=$chingroup?>
  299. </select>
  300. <input type="submit" name="Submit32" value="转移内部组" onclick="document.memberform.enews.value='DoMoveInGroupMember_all';">
  301. &nbsp;&nbsp;&nbsp;
  302. <input type="submit" name="Submit3" value="审核" onclick="document.memberform.enews.value='DoCheckMember_all';document.memberform.docheck.value='1';"> &nbsp;&nbsp;&nbsp;
  303. <input type="submit" name="Submit3" value="取消审核" onclick="document.memberform.enews.value='DoCheckMember_all';document.memberform.docheck.value='0';"> &nbsp;&nbsp;&nbsp;
  304. <input type="submit" name="Submit2" value="删除" onclick="document.memberform.enews.value='DelMember_all';">
  305. &nbsp;
  306. <input name="enews" type="hidden" id="enews" value="DelMember_all">
  307. <input name="docheck" type="hidden" id="docheck" value="1"> </td>
  308. </tr>
  309. <tr>
  310. <td bgcolor="#FFFFFF">&nbsp;</td>
  311. <td height="30" bgcolor="#FFFFFF">分页:
  312. <?=$returnpage?></td>
  313. </tr>
  314. </table>
  315. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  316. <tr>
  317. <td height="30"><font color="#666666">说明:多选框为蓝色或用户名灰色代表未审核会员. </font></td>
  318. </tr>
  319. </table>
  320. </form>
  321. </body>
  322. </html>
  323. <?
  324. db_close();
  325. $empire=null;
  326. ?>