国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.4KB

  1. <?php
  2. /**
  3. * 会员管理
  4. *
  5. * @version $Id: member_main.php 1 10:49 2010年7月20日Z tianya $
  6. * @package DedeCMS.Administrator
  7. * @copyright Copyright (c) 2020, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license/v6
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. CheckPurview('member_List');
  13. require_once(DEDEINC."/datalistcp.class.php");
  14. setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
  15. if(!isset($sex)) $sex = '';
  16. if(!isset($mtype)) $mtype = '';
  17. if(!isset($spacesta)) $spacesta = -10;
  18. if(!isset($matt)) $matt = 10;
  19. if(!isset($keyword)) $keyword = '';
  20. else $keyword = trim(FilterSearch($keyword));
  21. $mtypeform = empty($mtype) ? "<option value=''>类型</option>\r\n" : "<option value='$mtype'>$mtype</option>\r\n";
  22. $sexform = empty($sex) ? "<option value=''>性别</option>\r\n" : "<option value='$sex'>$sex</option>\r\n";
  23. $sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i",'',$sortkey);
  24. $staArr = array(-2=>'限制用户(禁言)', -1=>'未通过审核', 0=>'审核通过,提示填写完整信息', 1=>'没填写详细资料', 2=>'正常使用状态');
  25. $staArrmatt = array(1=>'被推荐', 0=>'非普通 ' );
  26. $MemberTypes = array();
  27. $dsql->SetQuery("Select rank,membername From `#@__arcrank` where rank>0 ");
  28. $dsql->Execute();
  29. while($row = $dsql->GetObject())
  30. {
  31. $MemberTypes[$row->rank] = $row->membername;
  32. }
  33. if($sortkey=='mid')
  34. {
  35. $sortform = "<option value='mid'>mid/注册时间</option>\r\n";
  36. }
  37. else if($sortkey=='rank')
  38. {
  39. $sortform = "<option value='rank'>会员等级</option>\r\n";
  40. }
  41. else if($sortkey=='money')
  42. {
  43. $sortform = "<option value='money'>会员金币</option>\r\n";
  44. }
  45. else if($sortkey=='scores')
  46. {
  47. $sortform = "<option value='scores'>会员积分</option>\r\n";
  48. }
  49. else
  50. {
  51. $sortform = "<option value='logintime'>登录时间</option>\r\n";
  52. }
  53. $wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') ";
  54. if($sex != '')
  55. {
  56. $wheres[] = " sex LIKE '$sex' ";
  57. }
  58. if($mtype != '')
  59. {
  60. $wheres[] = " mtype LIKE '$mtype' ";
  61. }
  62. if($spacesta != -10)
  63. {
  64. $wheres[] = " spacesta = '$spacesta' ";
  65. }
  66. if($matt != 10)
  67. {
  68. $wheres[] = " matt= '$matt' ";
  69. }
  70. $whereSql = join(' AND ',$wheres);
  71. if($whereSql!='')
  72. {
  73. $whereSql = ' WHERE '.$whereSql;
  74. }
  75. $sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC ";
  76. $dlist = new DataListCP();
  77. $dlist->SetParameter('sex',$sex);
  78. $dlist->SetParameter('spacesta',$spacesta);
  79. $dlist->SetParameter('matt',$matt);
  80. $dlist->SetParameter('mtype',$mtype);
  81. $dlist->SetParameter('sortkey',$sortkey);
  82. $dlist->SetParameter('keyword',$keyword);
  83. $dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm");
  84. $dlist->SetSource($sql);
  85. $dlist->display();
  86. function GetMemberName($rank,$mt)
  87. {
  88. global $MemberTypes;
  89. if(isset($MemberTypes[$rank]))
  90. {
  91. if($mt=='ut') return " <font color='red'>待升级:".$MemberTypes[$rank]."</font>";
  92. else return $MemberTypes[$rank];
  93. } else {
  94. if($mt=='ut') return '';
  95. else return $mt;
  96. }
  97. }
  98. function GetMAtt($m)
  99. {
  100. if($m<1) return '';
  101. else if($m==10) return "&nbsp;<font color='red'>[管理员]</font>";
  102. else return "&nbsp;<img src='images/adminuserico.gif' wmidth='16' height='15'><font color='red'>[荐]</font>";
  103. }