sa_view2.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $mp = "22"; //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','ZS') AND s.is_staff = 'Y' ";
  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>SA회원 관리</h2>
  40. <? include("../inc/inc_header_sa.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. , d.nm_brand
  68. , getCode('car_master','ds_type',a.ds_type) as nm_type
  69. , getCode('car_master','ds_open',a.ds_open) as nm_open
  70. , getCode('car_master','ds_sales',a.ds_sales) as nm_sales
  71. , getCode('car_master','ds_transmission',a.ds_transmission) as nm_transmission
  72. , getCode('member_master','ds_area',s.ds_area) as nm_area
  73. , getCode('sale_master','ds_status',s.ds_status) as nm_status
  74. , s.cd_sale
  75. , s.nm_name nm_name_sale
  76. , s.ds_status ds_status_sale
  77. , 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
  78. , case when a.nm_act_yn in ('Y') then '유' else '무' end as nm_act_yn_name
  79. FROM sale_master s
  80. inner join car_master a on (s.cd_car = a.cd_car)
  81. left outer join car_model b on (a.cd_model = b.cd_model)
  82. left outer join car_brand d on (a.cd_brand = d.cd_brand)
  83. $sql $orderby LIMIT $pagestartpoint,$PageSize");
  84. $i=1;
  85. while($col = mysql_fetch_array($r)) {
  86. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  87. $no = ($tmpNum - $i)+1;
  88. ?>
  89. <tr _onclick="location.href='./sa_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;">
  90. <td><?=$no?></td>
  91. <td><?=$col['nm_brand']." ".$col['nm_model']?></td>
  92. <td><?=$col['ds_year']?>년</td>
  93. <td><?=$col['nm_area']?></td>
  94. <td><?=$col['dt_insert']?></td>
  95. <td><?=$col['nm_status_sale']?></td>
  96. </tr>
  97. <?
  98. $i++;
  99. }
  100. }else{
  101. ?>
  102. <tr>
  103. <td colspan="6">등록된 정보가 없습니다.</td>
  104. </tr>
  105. <?
  106. }
  107. ?>
  108. </table>
  109. </div>
  110. <div class="paging">
  111. <?
  112. $url = "./member_view2.php?searchtype=$searchtype&searchword=$searchword&cd_user=$cd_user&ds_status=$ds_status&ds_usertype=$ds_usertype";
  113. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  114. ?>
  115. </div>
  116. </section>
  117. <? include("../inc/inc_footer.php") ?>
  118. <? include("../inc/inc_bottom.php") ?>
  119. <?
  120. mysql_close($connect);
  121. ?>