manager_list.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].'/common/aap_chk_m.php';
  4. $HEADER_LOC = 'main';
  5. $nav_title = "관리자 관리";
  6. $s_cd_dealer = $_SESSION['s_cd_dealer'];
  7. $s_cd_dealer_p = $_SESSION['s_cd_dealer_p'];
  8. $s_ds_type = $_SESSION['s_ds_type'];
  9. $PageNo = $_REQUEST['pageno'];
  10. $PageSize = $_REQUEST['PageSize'];
  11. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  12. if (empty($PageSize)) {
  13. $PageSize=10; //목록개수설정
  14. }else{$PageSize=$PageSize;}
  15. $pagestartpoint=($PageNo-1)*$PageSize;
  16. $sql = "where ds_delind='N'";
  17. $searchtype = $_REQUEST['searchtype'];
  18. $searchword = $_REQUEST['searchword'];
  19. $dt_start = $_REQUEST['dt_start'];
  20. $dt_end = $_REQUEST['dt_end'];
  21. $ds_type = "D1";
  22. $sql = $sql. " and ds_type = '$ds_type' ";
  23. $sql = $sql. " and cd_dealer_p = '$s_cd_dealer_p' ";
  24. if($searchword != ""){
  25. if($searchtype=="" || $searchtype==null){
  26. $sql = $sql. " and (nm_name like '$searchword%' or nm_email like '$searchword%') ";
  27. }else{
  28. $sql = $sql. " and $searchtype like '$searchword%'";
  29. }
  30. }
  31. if($dt_start != "" && $dt_end != ""){
  32. $sql = $sql. " and dt_insert between '$dt_start' and '$dt_end' ";
  33. }
  34. $totalrows = @mysql_result(mysql_query("select count(*) from aap_master $sql"),0,0);
  35. ?>
  36. <?php include("include/header.php") ?>
  37. <main class="pb123">
  38. <section>
  39. <div class="sub--top--visual">
  40. <div class="contents--inner">
  41. <h2>관리자 관리</h2>
  42. <p>이차조아에서는 사고 이력 조회 후 최고가 내차를 판매할 수 있습니다.</p>
  43. </div>
  44. </div>
  45. </section>
  46. <section>
  47. <div class="top--nav--wrap">
  48. <div class="contents--inner">
  49. <div class="breadcrumbs--wrap">
  50. <span></span>
  51. <span>관리자 관리</span>
  52. <span>관리자 관리</span>
  53. </div>
  54. </div>
  55. </div>
  56. </section>
  57. <section>
  58. <div class="car--list--wrap ty2">
  59. <div class="title--wrapper">
  60. <div class="d-flex justify-content-end sch--m--wrapper">
  61. <div>
  62. <select id="inputState" class="form-select" style="width:120px;">
  63. <option selected="">선택</option>
  64. <option></option>
  65. </select>
  66. </div>
  67. <div class="ms-2 sch--m--wrap">
  68. <input type="text" class="form-control" id="" placeholder="">
  69. <button type="button" class="sch--t--btn"></button>
  70. </div>
  71. </div>
  72. </div>
  73. <section class="mt-3">
  74. <div class="data--table--wrap ty2">
  75. <div class="table--m--wrap">
  76. <table class="table table-bordered">
  77. <colgroup>
  78. <col style="width:20%;">
  79. <col />
  80. <col style="width:15%;">
  81. <col style="width:150px;">
  82. <col style="width:150px;">
  83. </colgroup>
  84. <thead>
  85. <tr>
  86. <th><div class="d-flex justify-content-center">NO</div></th>
  87. <th><div class="d-flex justify-content-center">아이디</div></th>
  88. <th><div class="d-flex justify-content-center">이름</div></th>
  89. <th><div class="d-flex justify-content-center">연락처</div></th>
  90. <th><div class="d-flex justify-content-center">등록일</div></th>
  91. </tr>
  92. </thead>
  93. <tbody>
  94. <?php
  95. if($totalrows>0) {
  96. $r = mysql_query("SELECT * FROM aap_master $sql ORDER BY cd_dealer desc LIMIT $pagestartpoint,$PageSize");
  97. $i=1;
  98. while($col = mysql_fetch_array($r)) {
  99. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  100. $no = ($tmpNum - $i)+1;
  101. ?>
  102. <tr>
  103. <td>
  104. <div class="d-flex justify-content-center"><?=$no?></div>
  105. </td>
  106. <td>
  107. <div class="d-flex align-items-center justify-content-center">
  108. <a href="manager_form.php?cd_dealerid=<?=$col['cd_dealerid']?>"><?=$col['cd_dealerid']?></a>
  109. </div>
  110. </td>
  111. <td>
  112. <div class="d-flex align-items-center justify-content-center">
  113. <?=$col['nm_name']?>
  114. </div>
  115. </td>
  116. <td>
  117. <div class="d-flex justify-content-center"><?=$col['nm_hp']?></div>
  118. </td>
  119. <td>
  120. <div class="d-flex justify-content-center"><?=left($col['dt_insert'], 10)?></div>
  121. </td>
  122. </tr>
  123. <?php
  124. $i++;
  125. }
  126. }else{
  127. ?>
  128. <tr>
  129. <td colspan="5" align="center">등록된 관리자가 없습니다</td>
  130. </tr>
  131. <?php
  132. }
  133. ?>
  134. </tbody>
  135. </table>
  136. </div>
  137. </div>
  138. <div class="col-12 d-flex justify-content-center pagination--wrapper">
  139. <?php
  140. $url = "./manager_list.php?searchtype=$searchtype&searchword=$searchword&ds_status=$ds_status&ds_usertype=$ds_usertype&PageSort=$PageSort";
  141. ListMobilePg($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  142. ?>
  143. <div class="btn--left--wrap">
  144. <button type='button' class="btn btn-primary ml15" style="width:130px; height:45px;" id="btn_manager_form">관리자 등록</button>
  145. </div>
  146. </div>
  147. </section>
  148. </div>
  149. </section>
  150. </main>
  151. <script type="text/javascript">
  152. $(document).ready(function() {
  153. $(document).on("click", "#btn_manager_form", function() {
  154. link("manager_form.php");
  155. });
  156. });
  157. </script>
  158. <?php include("include/footer.php") ?>