国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

87 líneas
3.3KB

  1. <?php
  2. /**
  3. * 会员管理
  4. *
  5. * @version $Id: member_main.php 1 10:49 2010年7月20日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  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. $MemberTypes[$row->rank] = $row->membername;
  31. }
  32. if ($sortkey == 'mid') {
  33. $sortform = "<option value='mid'>mid/注册时间</option>\r\n";
  34. } else if ($sortkey == 'rank') {
  35. $sortform = "<option value='rank'>会员等级</option>\r\n";
  36. } else if ($sortkey == 'money') {
  37. $sortform = "<option value='money'>会员金币</option>\r\n";
  38. } else if ($sortkey == 'scores') {
  39. $sortform = "<option value='scores'>会员积分</option>\r\n";
  40. } else {
  41. $sortform = "<option value='logintime'>登录时间</option>\r\n";
  42. }
  43. $wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') ";
  44. if ($sex != '') {
  45. $wheres[] = " sex LIKE '$sex' ";
  46. }
  47. if ($mtype != '') {
  48. $wheres[] = " mtype LIKE '$mtype' ";
  49. }
  50. if ($spacesta != -10) {
  51. $wheres[] = " spacesta = '$spacesta' ";
  52. }
  53. if ($matt != 10) {
  54. $wheres[] = " matt= '$matt' ";
  55. }
  56. $whereSql = join(' AND ', $wheres);
  57. if ($whereSql != '') {
  58. $whereSql = ' WHERE '.$whereSql;
  59. }
  60. $sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC ";
  61. $dlist = new DataListCP();
  62. $dlist->SetParameter('sex', $sex);
  63. $dlist->SetParameter('spacesta', $spacesta);
  64. $dlist->SetParameter('matt', $matt);
  65. $dlist->SetParameter('mtype', $mtype);
  66. $dlist->SetParameter('sortkey', $sortkey);
  67. $dlist->SetParameter('keyword', $keyword);
  68. $dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm");
  69. $dlist->SetSource($sql);
  70. $dlist->display();
  71. function GetMemberName($rank, $mt)
  72. {
  73. global $MemberTypes;
  74. if (isset($MemberTypes[$rank])) {
  75. if ($mt == 'ut') return " <span class='text-danger'>待升级:".$MemberTypes[$rank]."</span>";
  76. else return $MemberTypes[$rank];
  77. } else {
  78. if ($mt == 'ut') return '';
  79. else return $mt;
  80. }
  81. }
  82. function GetMAtt($m)
  83. {
  84. if ($m < 1) return '';
  85. else if ($m == 10) return "&nbsp;<span class='text-danger'>[管理员]</span>";
  86. else return "&nbsp;<i class=\"fa fa-user-o\" aria-hidden=\"true\"></i> <span class='text-danger'>[荐]</span>";
  87. }