<?php
$cate_id = "mnu_member"; //현재 메뉴 ID 필수!!!
include_once "{$_SERVER['DOCUMENT_ROOT']}/common.inc.php";
include_once _ADM_INC_PATH_ ."/auth_check.php";

include _ADM_INC_PATH_ ."/header.html";
?>

        <form method="post" name="sform" id="sform" action="###" onsubmit="return false;">
          <a href="###">사원 추가</a>
        </form>

        <div id="cmd_bar" class="mb-2">
          <div>

          </div>
          <div class="text-right">
            <a href="./member_put.php" class="btn btn-primary"> <i class="bi bi-person-plus"></i> 사원 추가</a>
          </div>
        </div>

        <table class="table table-bordered mt-3">
          <colgroup>
            <col width="5%">
            <col width="10%">
            <col width="*">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
          </colgroup>
          <thead>
            <tr class="text-center bg-dark text-light">
              <th>No</th>
              <th>사원 ID</th>
              <th>사원명</th>
              <th>권한</th>
              <th>등록일</th>
              <th>수정일</th>
              <th>최종로그인</th>
            </tr>
          </thead>
          <tbody>
          <?php
          $_REQUEST['no_echo'] = true;
          $_REQUEST['mode'] = "getMemeberList";
          include _ADM_PATH_."/member/member.ajax.php";
          $mem_list = $retval['data'];

          foreach( $mem_list->rows as $row ){
          ?>
          <tr class="text-center">
            <td><?=$mem_list->line_cnt--?></td>
            <td><?=$row['member_id']?></td>
            <td><a href="./member_put.php?member_id=<?=$row['member_id']?>"><?=$row['member_name']?></a></td>
            <td><?=$row['member_auth']?></td>
            <td><?=getDT_datetime($row['reg_date'])?></td>
            <td><?=getDT_datetime($row['mod_date'])?></td>
            <td><?=getDT_datetime($row['login_date'])?></td>
          </tr>
          <?php }?>
          </tbody>
        </table>
        <nav aria-label="Page navigation example">
          <ul class="pagination flex-column align-items-center">
            <?php foreach( (array)$mem_list->pages as $page ){?>
            <li><?=$page?></li>
            <?php }?>
          </ul>
        </nav>

<?php

include _ADM_INC_PATH_ ."/footer.html";