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.

116 lines
5.1 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <div class="page-header" data-fit-aside>
  2. <h1 class="page-title">회원 목록<small>회원관리 &gt; 회원목록</small></h1>
  3. </div>
  4. <form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
  5. <div data-ax-tbl>
  6. <div data-ax-tr>
  7. <div data-ax-td>
  8. <div data-ax-td-label>기간 검색</div>
  9. <div data-ax-td-wrap>
  10. <select class="form-control" name="sdate">
  11. <option value="regtime">가입일</option>
  12. <option value="logtime">최근로그인</option>
  13. </select>
  14. </div>
  15. </div>
  16. <div data-ax-td>
  17. <div data-ax-td-wrap>
  18. <input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="">
  19. </div>
  20. <div data-ax-td-wrap>
  21. <input class="form-control" name="enddate" data-toggle="datepicker" value="">
  22. </div>
  23. </div>
  24. <div data-ax-td>
  25. <div data-ax-td-label>검색어 입력</div>
  26. <div data-ax-td-wrap>
  27. <select class="form-control" name="sc">
  28. <option value="mem_nickname">닉네임</option>
  29. <option value="mem_userid">아이디</option>
  30. </select>
  31. </div>
  32. </div>
  33. <div data-ax-td>
  34. <div data-ax-td-wrap>
  35. <input class="form-control" name="st">
  36. </div>
  37. <div data-ax-td-wrap>
  38. <button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </form>
  44. <div class="H10" data-fit-aside></div>
  45. <div class="ax-button-group" data-fit-aside>
  46. <div class="left">
  47. <a class="btn btn-primary" href="<?=base_url('admin/members/add')?>"><i class="fal fa-user-plus"></i> 회원 추가</a>
  48. </div>
  49. </div>
  50. <div class="grid-wrapper" data-fit-content>
  51. <div id="grid-container" class="grid-container"></div>
  52. </div>
  53. <script>
  54. var grid = new GRID('#grid-container', {
  55. columns: [
  56. {caption:'순번', dataField:'nums', alignment:'right', dataType:'number', format:'fixedPoint', width:60},
  57. {caption:'상태', dataField:'mem_status', alignment:'center', width:80,
  58. customizeText:function(cell){
  59. if(cell.value == 'Y') return '정상';
  60. else if (cell.value == 'D') return '접근금지';
  61. else if (cell.value == 'H') return '휴면';
  62. else if (cell.value == 'N') return '탈퇴';
  63. }
  64. },
  65. {caption:'아이디', dataField:'mem_userid', alignment:'left', width:150},
  66. {caption:'닉네임', dataField:'mem_nickname', alignment:'left', width:150},
  67. {caption:'E-mail', dataField:'mem_email', alignment:'left', width:150},
  68. {caption:'레벨', dataField:'mem_auth', alignment:'right', width:60, dataType:'number', format:'fixedPoint'},
  69. {caption:'<?=$this->site->config('point_name')?>', dataField:'mem_point', alignment:'right', width:80, dataType:'number', format:'fixedPoint'},
  70. {caption:'EMAIL', dataField:'mem_recv_email', alignment:'center', width:60,
  71. customizeText: function(cell) {return cell.value == 'Y'?'수신':'미수신'}
  72. },
  73. {caption:'SMS', dataField:'mem_recv_sms', alignment:'center', width:60,
  74. customizeText: function(cell) {return cell.value == 'Y'?'수신':'미수신'}
  75. },
  76. {caption:'가입일시', dataField:'mem_regtime', alignment:'center', width:150},
  77. {caption:'가입IP', dataField:'mem_regip', alignment:'center', width:150},
  78. {caption:'최근로그인', dataField:'mem_logtime', alignment:'center', width:150},
  79. {caption:'최근IP', dataField:'mem_logip', alignment:'center', width:150},
  80. {caption:'', calculateCellValue:function(e) {return ''}}
  81. ],
  82. onContextMenuPreparing: function(e) {
  83. if (e.row.rowType === "data") {
  84. e.items = APP.memberMenuObject(e, <?=$this->site->config('point_use')=='Y'?'"'.$this->site->config('point_name').'"':'false'?>);
  85. }
  86. },
  87. dataSource: new DevExpress.data.DataSource({
  88. key : 'mem_idx',
  89. load: function(loadOptions) {
  90. var d = $.Deferred();
  91. var params = grid.getSearchParam(loadOptions);
  92. $.ajax({
  93. url : base_url + '/admin/ajax/members',
  94. type: 'GET',
  95. async: false,
  96. cache: false,
  97. data: params
  98. }).done(function(res) {
  99. d.resolve(res.lists, {
  100. totalCount : res.totalCount
  101. });
  102. });
  103. return d.promise();
  104. }
  105. }),
  106. });
  107. $(function() {
  108. grid.init();
  109. })
  110. </script>