| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
- include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
- $list_url = "buy_list.php";
- $mp = "30"; //set top nav
- $PageNo = $_REQUEST['pageno'];
- $PageSize = $_REQUEST['PageSize'];
- if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
- if (empty($PageSize)) {
- $PageSize=10; //목록개수설정
- }else{$PageSize=$PageSize;}
-
- $pagestartpoint=($PageNo-1)*$PageSize;
- $sql = "where s.ds_delind='N'";
- $orderby = "order by s.dt_insert desc";
- $searchtype = $_REQUEST['searchtype'];
- $searchword = $_REQUEST['searchword'];
- $ds_usertype = $_REQUEST['ds_usertype'];
- $ds_status = $_REQUEST['ds_status'];
- $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'";
- }
- if($ds_status != ""){
- if($ds_status == "Z0"){
- $sql = $sql. " and s.ds_status in ('E0','F0','G0','Z0')";
- }else{
- $sql = $sql. " and s.ds_status in ('B0','C0','D0')";
- }
- }
- $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>매입통합 리스트</h2>
- <form id="frmSearch" name="frmSearch" method="post">
- <input type="hidden" id="PageSize" name="PageSize">
- <input type="hidden" id="searchtype" name="searchtype">
- <table class="tbl_search">
- <colgroup>
- <col width="10%">
- <col width="38%">
- <col width="10%">
- <col width="*">
- </colgroup>
- <tr>
- <th>검색어</th>
- <td colspan="3">
- <span class="select2" style="margin-right:5px;width:100px;" id="sel_searchtype">
- <select>
- <option value="">전체</option>
- <option value="s.nm_name"<? if($searchtype =="nm_name"){?> selected<?}?>>판매자</option>
- <option value="a.nm_number"<? if($searchtype =="nm_number"){?> selected<?}?>>차량번호</option>
- </select>
- </span>
- <input type="text" id="searchword" name="searchword" class="inp_txt" style="width:60%;">
- </td>
- </tr>
- <tr>
- <th>회원구분</th>
- <td>
- <div class="radio_chk">
- <span class="check_wrap"><input type="radio" name="ds_usertype" id="radio1" value=""><i></i><label for="radio1">전체</label></span>
- <span class="check_wrap"><input type="radio" name="ds_usertype" id="radio2" value="A0"<?if($ds_usertype=="A0"){?> checked="checked"<?}?>><i></i><label for="radio2">개인회원</label></span>
- <span class="check_wrap"><input type="radio" name="ds_usertype" id="radio3" value="B0"<?if($ds_usertype=="B0"){?> checked="checked"<?}?>><i></i><label for="radio3">사업자회원</label></span>
- <span class="check_wrap"><input type="radio" name="ds_usertype" id="radio4" value="C0"<?if($ds_usertype=="C0"){?> checked="checked"<?}?>><i></i><label for="radio4">비회원</label></span>
- </div>
- </td>
- <th>가입승인</th>
- <td>
- <div class="radio_chk">
- <span class="check_wrap"><input type="radio" name="ds_status" id="radio11" value=""><i></i><label for="radio11">전체</label></span>
- <span class="check_wrap"><input type="radio" name="ds_status" id="radio12" value="Z0"<?if($ds_status=="Z0"){?> checked="checked"<?}?>><i></i><label for="radio12">승인</label></span>
- <span class="check_wrap"><input type="radio" name="ds_status" id="radio13" value="A0"<?if($ds_status=="A0"){?> checked="checked"<?}?>><i></i><label for="radio13">미승인</label></span>
- </div>
- <input type="submit" class="rnd_btn ty3 gray" value="검색" title="검색">
- </td>
- </tr>
- </table>
- </form>
- <h3><em>▶</em> 매입통합관리</h3>
- <div class="tbl_wrap">
- <table class="tbl_list ty2">
- <colgroup>
- <col width="7%">
- <col width="11%">
- <col width="*">
- <col width="9%">
- <col width="11%">
- <col width="8%">
- <col width="8%">
- <col width="9%">
- <col width="9%">
- <col width="13%">
- </colgroup>
- <thead>
- <tr>
- <th>번호</th>
- <th>판매자</th>
- <th>차종</th>
- <th>차량번호</th>
- <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
- , c.nm_grade
- , d.nm_brand
- , e.nm_model_sub
- , 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
- 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_grade c
- on (a.cd_grade = c.cd_grade)
- left outer join car_brand d
- on (a.cd_brand = d.cd_brand)
- left outer join car_model_sub e
- on (a.cd_model_sub = e.cd_model_sub)
- $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='./buy_view.php?list_url=<?=$list_url?>&cd_sale=<?=$col[cd_sale]?>&ds_status_sale=<?=$col[ds_status_sale]?>&ListPageNo=<?=$PageNo?>';" style="cursor:pointer;">
- <td><?=$no?></td>
- <td><?=$col[nm_name_sale]?></td>
- <td><?=$col[nm_brand]." ".$col[nm_model]?></td>
- <td><?=$col[nm_number]?></td>
- <td><?=$col[nm_mileage]?>km</td>
- <td><?=$col[nm_color]?></td>
- <td><?=$col[nm_transmission]?></td>
- <td><?=$col[nm_area]?></td>
- <td><em class="txt_bold"><?=$col[nm_status]?></em></td>
- <td><?=$col[dt_insert]?></td>
- </tr>
- <?
- $i++;
- }
- }else{
- ?>
- <tr>
- <td colspan="10">등록된 정보가 없습니다.</td>
- </tr>
- <?
- }
- ?>
- </table>
- </div>
- <div class="paging">
- <?
- $url = "./$list_url?searchtype=$searchtype&searchword=$searchword&ds_status=$ds_status&ds_usertype=$ds_usertype";
- ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
- ?>
- </div>
- </section>
- <script language="javascript" type="text/javascript">
-
- $(document).ready(function() {
- $("#btn_cal1").bind("click",function(){
- $("#dt_start").datepicker('show');
- });
- $("#btn_cal2").bind("click",function(){
- $("#dt_end").datepicker('show');
- });
- /*
- $("#selBox div.jq_sel ul li a").bind("click",function(){
- // alert(this.value);
- // alert($("#selBox option:selected").val());
- // alert($("#selBox option:selected").text());
- // $("#PageSize").val(this.value);
- $("#PageSize").val($("#selBox option:selected").val());
- $("#frmSearch").submit();
- });
- */
- $("#sel_searchtype div.jq_sel ul li a").bind("click",function(){
- $("#searchtype").val($("#sel_searchtype option:selected").val());
- });
- });
- function fnSearch(){
- if($("#searchtype").val()!="" && $("#searchword").val()==""){
- alert("검색어를 입력하세요");
- return false;
- }
- $("#frmSearch").submit();
- }
- </script>
- <? include("../inc/inc_footer.php") ?>
- <? include("../inc/inc_bottom.php") ?>
- <?
- mysql_close($connect);
- ?>
|