| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
- include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
- $mp = "22"; //set top nav
- $list_url = "sell_list.php";
- $cd_user = $_REQUEST["cd_user"];
- $PageNo = $_REQUEST['pageno'];
- $PageSize = $_REQUEST['PageSize'];
- if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
- if (empty($PageSize)) {
- $PageSize=8; //목록개수설정
- }else{$PageSize=$PageSize;}
- $pagestartpoint=($PageNo-1)*$PageSize;
- $sql = "where s.ds_delind='N'";
- $sql = $sql. " and s.cd_user='$cd_user' ";
- $searchtype = $_REQUEST['searchtype'];
- $searchword = $_REQUEST['searchword'];
- $ds_usertype = $_REQUEST['ds_usertype'];
- $ds_status = 'Z0';
- $ds_type = "A0"; //A0 : 매입
- $sql = $sql. " and s.ds_type = '$ds_type' ";
- if($searchword != ""){
- if($searchtype=="" || $searchtype==null){
- $sql = $sql. " and (s.nm_name like '$searchword%' or a.nm_number like '$searchword%') ";
- }else{
- $sql = $sql. " and $searchtype like '$searchword%'";
- }
- }
- if($ds_usertype != ""){
- $sql = $sql. " and s.ds_usertype = '$ds_usertype'";
- }
- $sql = $sql. " and s.ds_status in ('B0','C0','D0','E0','F0','G0','Z0','ZS') AND s.is_staff = 'Y' ";
- $orderby = " order by s.cd_sale desc ";
- $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);
- ?>
- <? include("../inc/inc_top.php") ?>
- <? include("../inc/inc_header.php") ?>
- <section id="contents">
- <h2>SA회원 관리</h2>
- <? include("../inc/inc_header_sa.php") ?>
- <h3><em>▶</em> 입찰정보</h3>
- <div class="tbl_wrap">
- <table class="tbl_list ty2">
- <colgroup>
- <col width="7%">
- <col width="*">
- <col width="10%">
- <col width="10%">
- <col width="15%">
- <col width="15%">
- </colgroup>
- <thead>
- <tr>
- <th>번호</th>
- <th>차종</th>
- <th>년식</th>
- <th>판매지역</th>
- <th>판매일</th>
- <th>처리상태</th>
- </tr>
- </thead>
- <?
- if($totalrows>0) {
- $r = mysql_query("SELECT
- a.*
- , b.nm_model
- , d.nm_brand
- , getCode('car_master','ds_type',a.ds_type) as nm_type
- , getCode('car_master','ds_open',a.ds_open) as nm_open
- , getCode('car_master','ds_sales',a.ds_sales) as nm_sales
- , getCode('car_master','ds_transmission',a.ds_transmission) as nm_transmission
- , getCode('member_master','ds_area',s.ds_area) as nm_area
- , getCode('sale_master','ds_status',s.ds_status) as nm_status
- , s.cd_sale
- , s.nm_name nm_name_sale
- , s.ds_status ds_status_sale
- , 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
- , case when a.nm_act_yn in ('Y') then '유' else '무' end as nm_act_yn_name
- FROM sale_master s
- inner join car_master a on (s.cd_car = a.cd_car)
- left outer join car_model b on (a.cd_model = b.cd_model)
- left outer join car_brand d on (a.cd_brand = d.cd_brand)
- $sql $orderby LIMIT $pagestartpoint,$PageSize");
- $i=1;
- while($col = mysql_fetch_array($r)) {
- $tmpNum =$totalrows-($PageSize*($PageNo-1));
- $no = ($tmpNum - $i)+1;
- ?>
- <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;">
- <td><?=$no?></td>
- <td><?=$col['nm_brand']." ".$col['nm_model']?></td>
- <td><?=$col['ds_year']?>년</td>
- <td><?=$col['nm_area']?></td>
- <td><?=$col['dt_insert']?></td>
- <td><?=$col['nm_status_sale']?></td>
- </tr>
- <?
- $i++;
- }
- }else{
- ?>
- <tr>
- <td colspan="6">등록된 정보가 없습니다.</td>
- </tr>
- <?
- }
- ?>
- </table>
- </div>
- <div class="paging">
- <?
- $url = "./member_view2.php?searchtype=$searchtype&searchword=$searchword&cd_user=$cd_user&ds_status=$ds_status&ds_usertype=$ds_usertype";
- ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
- ?>
- </div>
- </section>
- <? include("../inc/inc_footer.php") ?>
- <? include("../inc/inc_bottom.php") ?>
- <?
- mysql_close($connect);
- ?>
|