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.

85 lines
2.9 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">
  2. <h2 class="page-title">관리자 추가</h2>
  3. </div>
  4. <form class="form-flex" 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 form-control-inline" name="scol">
  11. <option value="mem_nickname" <?=$scol=='mem_nickname'?'selected':''?>>닉네임 검색</option>
  12. <option value="mem_userid" <?=$scol=='mem_userid'?'selected':''?>>아이디 검색</option>
  13. </select>
  14. </div>
  15. </div>
  16. <div data-ax-td>
  17. <div data-ax-td-wrap>
  18. <input class="form-control form-control-inline" name="stxt" placeholder="검색어를 입력하세요" value="<?=$stxt?>">
  19. </div>
  20. </div>
  21. <div data-ax-td>
  22. <div data-ax-td-wrap>
  23. <button class="btn btn-sm btn-default">검색</button>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </form>
  29. <div class="H10"></div>
  30. <div class="grid">
  31. <table>
  32. <thead>
  33. <tr>
  34. <th>아이디</th>
  35. <th class="W100">닉네임</th>
  36. <th class="W140">가입일시</th>
  37. <th class="W140">최근로그인</th>
  38. <th class="W80">관리</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <?php if(count($lists) == 0) :?>
  43. <tr>
  44. <td colspan="5" class="empty">검색된 회원이 없습니다.</td>
  45. </tr>
  46. <?php endif;?>
  47. <?php foreach($lists as $row):?>
  48. <tr>
  49. <td class="text-center"><?=$row['mem_userid']?></td>
  50. <td class="text-center"><?=$row['mem_nickname']?></td>
  51. <td class="text-center"><?=$row['mem_regtime']?></td>
  52. <td class="text-center"><?=$row['mem_logtime']?></td>
  53. <td class="text-center">
  54. <button type="button" class="btn btn-sm btn-primary" data-button="admin-add-ok" data-idx="<?=$row['mem_idx']?>">추가하기</button>
  55. </td>
  56. </tr>
  57. <?php endforeach;?>
  58. </tbody>
  59. </table>
  60. </div>
  61. <script>
  62. $(function(){
  63. $('[data-button="admin-add-ok"]').click(function(e){
  64. e.preventDefault();
  65. var idx = $(this).data('idx');
  66. if(! confirm('해당 회원을 관리자로 추가하시겠습니까?')) return false;
  67. $.ajax({
  68. url : base_url + '/admin/ajax/setting/admins',
  69. type : 'POST',
  70. async: false,
  71. cache: false,
  72. data : {
  73. mem_idx : idx
  74. },
  75. success:function() {
  76. alert('지정한 사용자를 관리자로 추가하였습니다.');
  77. location.reload();
  78. }
  79. })
  80. });
  81. });
  82. </script>