member_view2.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $mp = "20"; //set top nav
  5. $list_url = "sell_list.php";
  6. $cd_user = $_REQUEST["cd_user"];
  7. $PageNo = $_REQUEST['pageno'];
  8. $PageSize = $_REQUEST['PageSize'];
  9. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  10. if (empty($PageSize)) {
  11. $PageSize=8; //목록개수설정
  12. }else{$PageSize=$PageSize;}
  13. $pagestartpoint=($PageNo-1)*$PageSize;
  14. $sql = "where s.ds_delind='N'";
  15. $sql = $sql. " and s.cd_user='$cd_user' ";
  16. $searchtype = $_REQUEST['searchtype'];
  17. $searchword = $_REQUEST['searchword'];
  18. $ds_usertype = $_REQUEST['ds_usertype'];
  19. $ds_status = 'Z0';
  20. $ds_type = "A0"; //A0 : 매입
  21. $sql = $sql. " and s.ds_type = '$ds_type' ";
  22. if($searchword != ""){
  23. if($searchtype=="" || $searchtype==null){
  24. $sql = $sql. " and (s.nm_name like '$searchword%' or a.nm_number like '$searchword%') ";
  25. }else{
  26. $sql = $sql. " and $searchtype like '$searchword%'";
  27. }
  28. }
  29. if($ds_usertype != ""){
  30. $sql = $sql. " and s.ds_usertype = '$ds_usertype'";
  31. }
  32. $sql = $sql. " and s.ds_status in ('B0','C0','D0','E0','F0','G0','Z0')";
  33. $orderby = " order by s.cd_sale desc ";
  34. $totalrows = @mysql_result(mysql_query("select count(*) from sale_master s inner join car_master a on ( s.cd_car = a.cd_car ) $sql"),0,0);
  35. ?>
  36. <? include("../inc/inc_top.php") ?>
  37. <? include("../inc/inc_header.php") ?>
  38. <section id="contents">
  39. <h2>일반회원 관리</h2>
  40. <? include("../inc/inc_header_member.php") ?>
  41. <h3><em>▶</em> 입찰정보</h3>
  42. <div class="tbl_wrap">
  43. <table class="tbl_list ty2">
  44. <colgroup>
  45. <col width="7%">
  46. <col width="*">
  47. <col width="10%">
  48. <col width="10%">
  49. <col width="15%">
  50. <col width="15%">
  51. </colgroup>
  52. <thead>
  53. <tr>
  54. <th>번호</th>
  55. <th>차종</th>
  56. <th>년식</th>
  57. <th>지역</th>
  58. <th>판매일</th>
  59. <th>처리상태</th>
  60. </tr>
  61. </thead>
  62. <?
  63. if($totalrows>0) {
  64. $r = mysql_query("SELECT
  65. a.*
  66. , b.nm_model
  67. , c.nm_grade
  68. , d.nm_brand
  69. , e.nm_model_sub
  70. , getCode('car_master','ds_type',a.ds_type) as nm_type
  71. , getCode('car_master','ds_open',a.ds_open) as nm_open
  72. , getCode('car_master','ds_sales',a.ds_sales) as nm_sales
  73. , getCode('car_master','ds_transmission',a.ds_transmission) as nm_transmission
  74. , getCode('member_master','ds_area',s.ds_area) as nm_area
  75. , getCode('sale_master','ds_status',s.ds_status) as nm_status
  76. , s.cd_sale
  77. , s.nm_name nm_name_sale
  78. , s.ds_status ds_status_sale
  79. , case when s.ds_status in ('B0','C0') then '미승인' when s.ds_status in ('D0') then '반려' when s.ds_status in ('E0','F0') then '입찰중' when s.ds_status in ('G0') then '입찰마감' when s.ds_status in ('Z0') then '낙찰' when s.ds_status in ('ZS') then '구매확정' else '' end as nm_status_sale
  80. , case when a.nm_act_yn in ('Y') then '유' else '무' end as nm_act_yn_name
  81. FROM sale_master s
  82. inner join car_master a
  83. on (s.cd_car = a.cd_car)
  84. left outer join car_model b
  85. on (a.cd_model = b.cd_model)
  86. left outer join car_grade c
  87. on (a.cd_grade = c.cd_grade)
  88. left outer join car_brand d
  89. on (a.cd_brand = d.cd_brand)
  90. left outer join car_model_sub e
  91. on (a.cd_model_sub = e.cd_model_sub)
  92. $sql $orderby LIMIT $pagestartpoint,$PageSize");
  93. $i=1;
  94. while($col = mysql_fetch_array($r)) {
  95. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  96. $no = ($tmpNum - $i)+1;
  97. ?>
  98. <tr onclick="location.href='./member_view2_detail.php?list_url=<?=$list_url?>&cd_user=<?=$cd_user?>&cd_sale=<?=$col[cd_sale]?>&ds_status_sale=<?=$col[ds_status_sale]?>&ListPageNo=<?=$PageNo?>';" style="cursor:pointer;">
  99. <td><?=$no?></td>
  100. <td><?=$col[nm_brand]." ".$col[nm_model]?></td>
  101. <td><?=$col[ds_year]?>년</td>
  102. <td><?=$col[nm_area]?></td>
  103. <td><?=$col[dt_insert]?></td>
  104. <td><?=$col[nm_status_sale]?></td>
  105. </tr>
  106. <?
  107. $i++;
  108. }
  109. }else{
  110. ?>
  111. <tr>
  112. <td>등록된 정보가 없습니다.</td>
  113. </tr>
  114. <?
  115. }
  116. ?>
  117. </table>
  118. </div>
  119. <div class="paging">
  120. <?
  121. $url = "./member_view2.php?searchtype=$searchtype&searchword=$searchword&cd_user=$cd_user&ds_status=$ds_status&ds_usertype=$ds_usertype";
  122. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  123. ?>
  124. </div>
  125. </section>
  126. <? include("../inc/inc_footer.php") ?>
  127. <? include("../inc/inc_bottom.php") ?>
  128. <?
  129. mysql_close($connect);
  130. ?>