dealer_view3.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $mp = "21"; //set top nav
  5. $cd_dealer = $_REQUEST["cd_dealer"];
  6. $cd_dealer_p = $cd_dealer;
  7. if(empty($cd_dealer)){
  8. AlertRedirect("잘못된 요청입니다.",ADMIN_PATH."/index.php");
  9. }
  10. $PageNo =$_REQUEST['pageno'];
  11. $PageSize =$_REQUEST['PageSize'];
  12. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  13. if (empty($PageSize)) {
  14. $PageSize=10; //목록개수설정
  15. }else{$PageSize=$PageSize;}
  16. $pagestartpoint=($PageNo-1)*$PageSize;
  17. $sql = "where ds_delind='N'";
  18. $searchtype = $_REQUEST['searchtype'];
  19. $searchword = $_REQUEST['searchword'];
  20. $dt_start = $_REQUEST['dt_start'];
  21. $dt_end = $_REQUEST['dt_end'];
  22. $sql = $sql. " and cd_dealer_p = '$cd_dealer' ";
  23. $ds_type = "D1";
  24. $sql = $sql. " and ds_type = '$ds_type' ";
  25. if($searchword != ""){
  26. if($searchtype=="" || $searchtype==null){
  27. $sql = $sql. " and (nm_name like '$searchword%' or nm_email like '$searchword%') ";
  28. }else{
  29. $sql = $sql. " and $searchtype like '$searchword%'";
  30. }
  31. }
  32. if($dt_start != "" && $dt_end != ""){
  33. $sql = $sql. " and dt_insert between '$dt_start' and '$dt_end' ";
  34. }
  35. $totalrows = @mysql_result(mysql_query("select count(*) from dealer_master $sql"),0,0);
  36. ?>
  37. <? include("../inc/inc_top.php") ?>
  38. <? include("../inc/inc_header.php") ?>
  39. <section id="contents">
  40. <h2>딜러 회원관리</h2>
  41. <? include("../inc/inc_header_dealer.php") ?>
  42. <div class="tbl_wrap">
  43. <table class="tbl_list">
  44. <colgroup>
  45. <col width="7%">
  46. <col width="18%">
  47. <col width="18%">
  48. <col width="16%">
  49. <col width="*">
  50. <col width="17%">
  51. <col width="15%">
  52. </colgroup>
  53. <thead>
  54. <tr>
  55. <th>번호</th>
  56. <th>사진</th>
  57. <th>아이디</th>
  58. <th>이름</th>
  59. <th>부서</th>
  60. <th>연락처</th>
  61. <th>등록일</th>
  62. </tr>
  63. </thead>
  64. <?
  65. if($totalrows>0) {
  66. $r = mysql_query("SELECT * FROM dealer_master $sql ORDER BY cd_dealer desc LIMIT $pagestartpoint,$PageSize");
  67. $i=1;
  68. while($col = mysql_fetch_array($r)) {
  69. ?>
  70. <tr onclick="location.href='./dealer_view3_detail.php?cd_dealer=<?=$col['cd_dealer']?>&cd_dealer_p=<?=$cd_dealer_p?>&PageNo=<?=$PageNo?>';" style="cursor: pointer; cursor: hand;">
  71. <td><?=$i?></td>
  72. <td>
  73. <? if(!empty($col['nm_file'])){ ?>
  74. <img src="<?=UPLOAD_PATH?>dealer/nm_file/<?=$col['nm_file']?>" width="50">
  75. <? } ?>
  76. </td>
  77. <td><?=$col['cd_dealerid']?></td>
  78. <td><?=$col['nm_name']?></td>
  79. <td><?=$col['nm_title']?></td>
  80. <td><?=$col['nm_hp_01']."-".$col['nm_hp_02']."-".$col['nm_hp_03']?></td>
  81. <td><?=$col['dt_insert']?></td>
  82. </tr>
  83. <?
  84. $i++;
  85. }
  86. }else{
  87. ?>
  88. <tr>
  89. <td colspan="6">데이터가 존재 하지 않습니다.</td>
  90. </tr>
  91. <?
  92. }
  93. ?>
  94. </table>
  95. </div>
  96. <div class="paging">
  97. <?
  98. $url = "./dealer_view3.php?searchtype=$searchtype&searchword=$searchword&cd_dealer=<?=$cd_dealer?>";
  99. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  100. ?>
  101. </div>
  102. <div class="btn_right">
  103. <!--a href="./dealer_view3_detail.php?cd_dealer_p=<?=$cd_dealer_p?>" class="rnd_btn gray">부관리자 등록</a-->
  104. </div>
  105. </section>
  106. <? include("../inc/inc_footer.php") ?>
  107. <? include("../inc/inc_bottom.php") ?>
  108. <?
  109. mysql_close($connect);
  110. ?>