dealer_manager.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].'/common/dealer_chk.php';
  4. $s_cd_dealer = $_SESSION['s_cd_dealer'];
  5. $s_cd_dealer_p = $_SESSION['s_cd_dealer_p'];
  6. $s_ds_type = $_SESSION['s_ds_type'];
  7. $PageNo =$_REQUEST['pageno'];
  8. $PageSize =$_REQUEST['PageSize'];
  9. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  10. if (empty($PageSize)) {
  11. $PageSize=10; //목록개수설정
  12. }else{$PageSize=$PageSize;}
  13. $pagestartpoint=($PageNo-1)*$PageSize;
  14. $sql = "where ds_delind='N'";
  15. $searchtype = $_REQUEST['searchtype'];
  16. $searchword = $_REQUEST['searchword'];
  17. $dt_start = $_REQUEST['dt_start'];
  18. $dt_end = $_REQUEST['dt_end'];
  19. $ds_type = "D1";
  20. $sql = $sql. " and ds_type = '$ds_type' ";
  21. //관리자만 들어올 수 있는 메뉴로 관리자의 cd_dealer값으로 변경하여 하위 부관리자를 가져오게 변경
  22. // $sql = $sql. " and cd_dealer_p = '$s_cd_dealer_p' ";
  23. $sql = $sql. " and cd_dealer_p = '$s_cd_dealer' ";
  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 dealer_master $sql"),0,0);
  35. ?>
  36. <? include("../include/inc_top.php") ?>
  37. <? include("../include/inc_header.php") ?>
  38. <section id="wrap">
  39. <section id="visual" class="visual_mypage">
  40. <h2>마이페이지</h2>
  41. <p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
  42. </section>
  43. <section id="content">
  44. <ul class="location">
  45. <li><a href="/" class="home">홈</a></li>
  46. <li><span class="depth1">마이페이지</span>
  47. <ul class="sub_depth">
  48. <li><a href="#">마이페이지</a></li>
  49. <li><a href="#">입찰정보</a></li>
  50. <li><a href="#">차량정보</a></li>
  51. <li><a href="#">문의내역</a></li>
  52. </ul>
  53. </li>
  54. <li><span class="depth2">딜러</span></li>
  55. </ul>
  56. <? include("./inc_menu_dealer.php") ?>
  57. <h3>관리자 관리</h3>
  58. <table class="tbl_v">
  59. <colgroup>
  60. <col width="7%">
  61. <col width="18%">
  62. <col width="16%">
  63. <col width="*">
  64. <col width="17%">
  65. <col width="15%">
  66. </colgroup>
  67. <thead>
  68. <tr>
  69. <th>번호</th>
  70. <th>아이디</th>
  71. <th>이름</th>
  72. <th>부서</th>
  73. <th>연락처</th>
  74. <th>등록일</th>
  75. </tr>
  76. </thead>
  77. <tbody>
  78. <?
  79. if($totalrows>0) {
  80. $r = mysql_query("SELECT * FROM dealer_master $sql ORDER BY cd_dealer desc LIMIT $pagestartpoint,$PageSize");
  81. $i=1;
  82. while($col = mysql_fetch_array($r)) {
  83. ?>
  84. <tr onclick="location.href='./dealer_manager_form.php?cd_dealer=<?=$col[cd_dealer]?>&PageNo=<?=$PageNo?>';" style="cursor: pointer; cursor: hand;">
  85. <td><?=$i?></td>
  86. <td><?=$col[cd_dealerid]?></td>
  87. <td><?=$col[nm_name]?></td>
  88. <td><?=$col[nm_title]?></td>
  89. <td><?=$col[nm_hp_01]."-".$col[nm_hp_02]."-".$col[nm_hp_03]?></td>
  90. <td><?=$col[dt_insert]?></td>
  91. </tr>
  92. <?
  93. $i++;
  94. }
  95. }else{
  96. ?>
  97. <tr>
  98. <td colspan="6">데이터가 존재 하지 않습니다.</td>
  99. </tr>
  100. <?
  101. }
  102. ?>
  103. </tbody>
  104. </table>
  105. <div class="paging">
  106. <?
  107. $url = "./dealer_manager.php?searchtype=$searchtype&searchword=$searchword&ds_status=$ds_status&dt_start=$dt_start&dt_end=$dt_end";
  108. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  109. ?>
  110. </div>
  111. <div class="btn_right">
  112. <a href="./dealer_manager_form.php" class="button">관리자 등록</a>
  113. </div>
  114. </section>
  115. </section>
  116. <? include("../include/inc_footer.php") ?>
  117. <? include("../include/inc_bottom.php") ?>
  118. <?
  119. mysql_close($connect);
  120. ?>