<?php
	include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
	include $_SERVER['DOCUMENT_ROOT'].'/common/aap_chk.php';



	$s_cd_dealer 	= $_SESSION['s_cd_dealer'];
	$s_cd_dealer_p 	= $_SESSION['s_cd_dealer_p'];
	$s_aap_ds_type 		= $_SESSION['s_aap_ds_type'];

	$s_ds_usertype 	= $_SESSION['s_ds_usertype'];

	$PageNo = $_REQUEST['pageno'];
	$PageSize = $_REQUEST['PageSize'];
	if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
	if (empty($PageSize)) {
		$PageSize=2; //목록개수설정
	}else{$PageSize=$PageSize;}

    if(empty($ds_aap_status)) {
        $ds_aap_status = 'E0';
    }

	$pagestartpoint=($PageNo-1)*$PageSize;

	$orderby = "order by s.dt_insert desc";


	if($s_aap_ds_type == "D0"){	//딜러
		$sql_ds_type = "	and cd_dealer_p = '$s_cd_dealer' ";
	}else{	//딜러-부관리자
		$sql_ds_type = "	and cd_dealer = '$s_cd_dealer' ";
	}

	$sql = "where s.ds_delind='N'";

	$ds_type = "A0";	//A0 : 매입
	$sql = $sql. "	and s.ds_type = '$ds_type' ";

	// $sql = $sql. "	and s.ds_status in ('E0','F0','G0','Z0','ZE','ZS')";
	$sql = $sql. "	and s.ds_dealer_type = 'A0' ";

	// $sql = $sql. "	and s.cd_sale not in (select cd_sale from tender_master where ds_delind = 'N' and cd_dealer_p = '$s_cd_dealer_p' group by cd_sale having count(*) > 1)";	//딜러 업체 소속 입찰 건이 2건 보다 작을 시만 입찰 요청 건에 보이게 한다.

	// if($s_aap_ds_type == "D1"){	//딜러-관리자
	// 	// $sql = $sql. "	and s.cd_sale not in (select cd_sale from tender_master where ds_delind = 'N' and cd_dealer = '$s_cd_dealer' group by cd_sale)";	//본인 입찰 건 제외한 입찰 건
	// }

	// echo $sql;
	// exit;

	// $total_sql = "SELECT
	// 						count(*) as total_cnt
	// 						, sum(case when s.ds_status = 'E0' and ifnull(t.cd_tender,0) < 1 AND s.dt_approve >=  DATE_ADD(now(), INTERVAL '-".LIMIT_TIME_TENDER."' HOUR) then 1 else 0 end) as E0_cnt
	// 						, sum(case when s.ds_status = 'E0' and t.cd_tender > 0 then 1 else 0 end) as F0_cnt
	// 						, sum(case when s.ds_status = 'Z0' and (s.ds_status_contract = '' or s.ds_status_contract = 'Z0') and t.cd_tender > 0 then 1 else 0 end) as Z0_cnt
    //                         , sum(case when (s.ds_status = 'ZE' OR (s.ds_status = 'Z0' AND s.ds_status_contract IN ('C0', 'E0', 'M0'))) then 1 else 0 end) as ZE_cnt
    //                         , sum(case when s.ds_status = 'ZS' then 1 else 0 end) as ZS_cnt
	// 						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 tender_master t on (s.cd_sale = t.cd_sale AND t.ds_delind = 'N' $sql_ds_type )
	// 							left outer join car_brand d on (a.cd_brand = d.cd_brand)
	// 							$sql";
	//2023-08-28 query 문 LIMIT TIME TENDER가  ds_auction_time로 변경되어 쿼리문 수정
	//또한 동일날짜에 tender master left outer join을 inner join 으로 변경함

	//입찰대기
	$sum_sql = "SELECT
				sum(case when ifnull(t.cd_tender,0) < 1 then 1 else 0 end) as cnt
				FROM sale_master s
				INNER JOIN  car_master a on (s.cd_car = a.cd_car)
				left outer join (
					SELECT * from tender_master tm
					where ds_delind = 'N'
						$sql_ds_type
					group by cd_sale
				) t on ( s.cd_sale = t.cd_sale )
					$sql
					AND s.ds_status = 'E0'
					AND s.dt_approve >=  DATE_ADD(now(), INTERVAL concat('-', s.ds_auction_time) HOUR) ";
	// echo $sum_sql;
	$sum = mysql_fetch_array(mysql_query($sum_sql));
	$E0_cnt = (!empty($sum['cnt']) ? $sum['cnt'] : 0);
	// echo $E0_cnt;
	// exit;

	//입찰중
	$sum_sql = "SELECT
				sum(case when t.cd_tender > 0 then 1 else 0 end) as cnt
				FROM sale_master s
				INNER JOIN  car_master a on (s.cd_car = a.cd_car)
				INNER join (
					SELECT * from tender_master tm
					where ds_delind = 'N'
						$sql_ds_type
					group by cd_sale
				) t on ( s.cd_sale = t.cd_sale )
					$sql
					AND s.ds_status = 'E0' ";
	// echo $sum_sql;
	$sum = mysql_fetch_array(mysql_query($sum_sql));
	$F0_cnt = (!empty($sum['cnt']) ? $sum['cnt'] : 0);
	// echo $F0_cnt;
	// exit;


	//거래중
	$sum_sql = "SELECT
				sum(case when t.cd_tender > 0 then 1 else 0 end) as cnt
				FROM sale_master s
				INNER JOIN  car_master a on (s.cd_car = a.cd_car)
				INNER join (
					SELECT * from tender_master tm
					where ds_delind = 'N'
						AND ds_status = 'Z0'
						$sql_ds_type
					group by cd_sale
				) t on ( s.cd_sale = t.cd_sale )
					$sql
					AND s.ds_status = 'Z0' and (s.ds_status_contract = '' or s.ds_status_contract = 'Z0') AND s.ds_status_contract_step1 = 'Y' ";
	// echo $sum_sql;
	$sum = mysql_fetch_array(mysql_query($sum_sql));
	$Z0_cnt = (!empty($sum['cnt']) ? $sum['cnt'] : 0);
	// echo $Z0_cnt;
	// exit;


	//유찰
	$sum_sql = "SELECT
				sum(case when ifnull(t.cd_tender,0) < 1 then 1 else 0 end) as cnt
				FROM sale_master s
				INNER JOIN  car_master a on (s.cd_car = a.cd_car)
				left outer join (
					SELECT * from tender_master tm
					where ds_delind = 'N'
						$sql_ds_type
					group by cd_sale
				) t on ( s.cd_sale = t.cd_sale )
					$sql
					AND (s.ds_status = 'ZE' OR (s.ds_status = 'Z0' AND s.ds_status_contract IN ('C0', 'E0', 'M0'))) ";
	// echo $sum_sql;
	$sum = mysql_fetch_array(mysql_query($sum_sql));
	$ZE_cnt = (!empty($sum['cnt']) ? $sum['cnt'] : 0);
	// echo $ZE_cnt;
	// exit;

	//거래완료
	$sum_sql = "SELECT
				sum(case when t.cd_tender > 0 then 1 else 0 end) as cnt
				FROM sale_master s
				INNER JOIN  car_master a on (s.cd_car = a.cd_car)
				INNER join (
					SELECT * from tender_master tm
					where ds_delind = 'N'
						AND ds_status = 'Z0'
						$sql_ds_type
					group by cd_sale
				) t on ( s.cd_sale = t.cd_sale )
					$sql
					AND s.ds_status = 'ZS' ";
	// echo $sum_sql;
	$sum = mysql_fetch_array(mysql_query($sum_sql));
	$ZS_cnt = (!empty($sum['cnt']) ? $sum['cnt'] : 0);
	// echo $ZS_cnt;
	// exit;

	// $total_sql = "SELECT
	// 						count(*) as total_cnt
	// 						, sum(case when s.ds_status = 'E0' and ifnull(t.cd_tender,0) < 1 AND s.dt_approve >=  DATE_ADD(now(), INTERVAL concat('-', s.ds_auction_time) HOUR) then 1 else 0 end) as E0_cnt
	// 						, sum(case when s.ds_status = 'E0' and t.cd_tender > 0 then 1 else 0 end) as F0_cnt
	// 						, sum(case when s.ds_status = 'Z0' and (s.ds_status_contract = '' or s.ds_status_contract = 'Z0') AND s.ds_status_contract_step1 = 'Y' and t.cd_tender > 0 then 1 else 0 end) as Z0_cnt
	// 						, sum(case when (s.ds_status = 'ZE' OR (s.ds_status = 'Z0' AND s.ds_status_contract IN ('C0', 'E0', 'M0'))) then 1 else 0 end) as ZE_cnt
	// 						, sum(case when s.ds_status = 'ZS' $sql_ds_type then 1 else 0 end) as ZS_cnt
	// 						FROM sale_master s
	// 							INNER JOIN  car_master a on (s.cd_car = a.cd_car)
	// 							left outer join tender_master t on (s.cd_sale = t.cd_sale AND t.ds_delind = 'N' $sql_ds_type )
	// 							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";
	//
	//
	// // echo $total_sql;
	// // exit;
	// if($_SERVER['REMOTE_ADDR'] == '220.86.24.199') {
	// 	echo $total_sql;
	// 	// exit;
	// }
	// $count_data = mysql_fetch_array(mysql_query($total_sql));
	// $totalrows = $count_data['total_cnt'];
	// $E0_cnt = $count_data['E0_cnt'];
	// $F0_cnt = $count_data['F0_cnt'];
	// $Z0_cnt = $count_data['Z0_cnt'];
	// $ZE_cnt = $count_data['ZE_cnt'];
	// $ZS_cnt = $count_data['ZS_cnt'];
?>
<?php include("include/header.php") ?>

<main class="pb123">
	<section>

		<!-- 개발 먼저 진행해주세요 디자인 추후 입힐 예정입니다. -->
		<div class="main--header--contents">
			<div class="d-flex align-items-center justify-content-center">
				<div onclick="location.href='/aap/standby_list.php'">
					<div>입찰대기</div>
					<div><?=number_format($E0_cnt)?></div>
				</div>
				<div onclick="location.href='/aap/prepare_list.php'">
					<div>입찰중</div>
					<div><?=number_format($F0_cnt)?></div>
				</div>
				<div onclick="location.href='/aap/underway_list.php'">
					<div>거래중</div>
					<div><?=number_format($Z0_cnt)?></div>
				</div>
				<div onclick="location.href='/aap/fail_list.php'">
					<div>유찰</div>
					<div><?=number_format($ZE_cnt)?></div>
				</div>
				<div onclick="location.href='/aap/end_list.php'">
					<div>매입완료</div>
					<div><?=number_format($ZS_cnt)?></div>
				</div>
			</div>
		</div>
	</section>

	<section>
		<div class="car--list--wrap">
			<div class="title--wrapper">
				<h2>입찰 대기중 차량</h2>
				<button type="button" class="more--btn" onclick="link('standby_list.php')">more+</button>
			</div>
			<ul>
			<?php
				$sql1 = $sql."    and s.ds_status in ('E0') and t.cd_sale is null ";

				//2023-10-24 1개 매물에 부관리자가 여러명 입찰시 메인관리자는 매물이 2개가 나와 쿼리문 수정
				// "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
				// 						, getCode('car_master','ds_accident',a.ds_accident) as nm_act_yn_name
                //                         , getRemainTime(".LIMIT_TIME_TENDER.", s.dt_approve, now()) as time_limit_tender
                //                         FROM sale_master s
                //                             inner join car_master a on (s.cd_car = a.cd_car)
				// 							left outer join tender_master t on (s.cd_sale = t.cd_sale $sql_ds_type)
                //                             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)
                //                             $sql1
				// 							and s.dt_approve >=  DATE_ADD(now(), INTERVAL '-".LIMIT_TIME_TENDER."' HOUR)
				// 							$orderby LIMIT $pagestartpoint,$PageSize"

                $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
										, getCode('car_master','ds_accident',a.ds_accident) as nm_act_yn_name
                                        , getRemainTime(".LIMIT_TIME_TENDER.", s.dt_approve, now()) as time_limit_tender
                                        FROM sale_master s
                                            inner join car_master a on (s.cd_car = a.cd_car)
											left outer join (
												SELECT * from tender_master tm
												where 1
													$sql_ds_type
												group by cd_sale
											) t on ( s.cd_sale = t.cd_sale )
                                            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)
                                            $sql1
											and s.dt_approve >=  DATE_ADD(now(), INTERVAL '-".LIMIT_TIME_TENDER."' HOUR)
											$orderby LIMIT $pagestartpoint,$PageSize");


    				$i=1;
    				while($col = mysql_fetch_array($r)) {
						$car_image = getCarBasicThumbImage($col['cd_car'], $col['nm_file_front'], '차량전면', false, 'car_basic');
						// $car_image = "/images/common/bg_no_photo.png";
						// if(file_exists($_SERVER['DOCUMENT_ROOT'].UPLOAD_PATH_CAR."nm_file_main/ratio/".$col['nm_file_front'])) {
						// 	$car_image = UPLOAD_PATH_CAR."nm_file_main/ratio/".$col['nm_file_front'];
						// }
    		?>
						<li class="">
							<div class="car--box--wrap ">
								<h2 class="car--name"><?=$col['nm_brand']." ".$col['nm_model']?></h2>
								<div class="thumb--wrap">
									<?=$car_image?>
								</div>
								<div class="car--info">
									<dl>
										<dt>주행거리 : </dt>
										<dd><?=number_format($col['nm_mileage'])?>km</dd>
									</dl>
									<dl>
										<dt>최초 등록일 : </dt>
										<dd><?=$col['nm_regdate_mm']?> / <?=$col['nm_regdate_yyyy']?></dd>
									</dl>
									<dl>
										<dt>사고유무 : </dt>
										<dd><?=$col['nm_act_yn_name']?></dd>
									</dl>
									<dl>
										<dt>판매지역 : </dt>
										<dd><?=$col['nm_area']?></dd>
									</dl>
								</div>
								<div class="status--wrap">
									<!-- <span><?=$col['nm_status_sale']?></span> -->
									<span>대기중</span>
								</div>
								<div class="btn--wrapper hide">
									<button type="button" onclick="link('standby_view.php?cd_sale=<?=$col['cd_sale']?>')">자동차 보러가기<i class="arrow--ic"></i></button>
								</div>
							</div>
						</li>
    		<?php
                        $i++;
    				}

                    if($i==1) {
    		?>
    					<li class="info_no" style="width: 100%;text-align: center; ">
    			            <dl class="inner">
    			                <dt>등록된 정보가 없습니다.</dt>
    			            </dl>
    					</li>
    		<?php
    			     }
    		?>

			</ul>
		</div>
	</section>

	<section>
		<div class="car--list--wrap vertical--type">
			<div class="title--wrapper">
				<h2>입찰중 차량</h2>
				<button type="button" class="more--btn" onclick="link('prepare_list.php')">more+</button>
			</div>
			<ul>

			<?php
                $sql1 = $sql."    and s.ds_status in ('E0')    and t.cd_sale is not null ";

				//2023-10-24 1개 매물에 부관리자가 여러명 입찰시 메인관리자는 매물이 2개가 나와 쿼리문 수정
				// "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
                //                         , getRemainTime(".LIMIT_TIME_TENDER.", s.dt_approve, now()) as time_limit_tender
                //                         FROM sale_master s
                //                             inner join car_master a on (s.cd_car = a.cd_car)
				// 							left outer join tender_master t on (s.cd_sale = t.cd_sale $sql_ds_type )
                //                             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)
                //                             $sql1 $orderby LIMIT $pagestartpoint,$PageSize"
                $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
                                        , getRemainTime(".LIMIT_TIME_TENDER.", s.dt_approve, now()) as time_limit_tender
                                        FROM sale_master s
                                            inner join car_master a on (s.cd_car = a.cd_car)
											left outer join (
												SELECT * from tender_master tm
												where ds_delind = 'N'
													$sql_ds_type
												group by cd_sale
											) t on ( s.cd_sale = t.cd_sale )
                                            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)
                                            $sql1 $orderby LIMIT $pagestartpoint,$PageSize");
					if($_SERVER['REMOTE_ADDR'] == '220.86.24.199') {

					}
    				$i=1;
    				while($col = mysql_fetch_array($r)) {
						$car_image = getCarBasicThumbImage($col['cd_car'], $col['nm_file_front'], '차량전면', false, 'car_basic');
						// $car_image = "/images/common/bg_no_photo.png";
						// if(file_exists($_SERVER['DOCUMENT_ROOT'].UPLOAD_PATH_CAR."nm_file_main/ratio/".$col['nm_file_front'])) {
						// 	$car_image = UPLOAD_PATH_CAR."nm_file_main/ratio/".$col['nm_file_front'];
						// }
    		?>
						<li class="">
							<div class="car--box--wrap ">
								<div class="thumb--wrap">
									<?=$car_image?>
								</div>
								<div>
									<div class="car--info">
										<h2 class="car--name"><?=$col['nm_brand']." ".$col['nm_model']?></h2>
										<dl>
											<dt>주행거리 : </dt>
											<dd><?=number_format($col['nm_mileage'])?>km</dd>
										</dl>
										<dl>
											<dt>최초 등록일 : </dt>
											<dd><?=$col['nm_regdate_mm']?> / <?=$col['nm_regdate_yyyy']?></dd>
										</dl>
										<dl>
											<dt>사고유무 : </dt>
											<dd><?=$col['nm_act_yn_name']?></dd>
										</dl>
										<dl>
											<dt>판매지역 : </dt>
											<dd><?=$col['nm_area']?></dd>
										</dl>
									</div>
									<div class="status--wrap">
										<span><?=$col['nm_status_sale']?></span>
									</div>
									<div class="btn--wrapper hide">
										<button type="button" onclick="link('prepare_view.php?cd_sale=<?=$col['cd_sale']?>')">자동차 보러가기<i class="arrow--ic"></i></button>
									</div>
								</div>

							</div>
						</li>

    		<?php
                        $i++;
    				}

                    if($i==1) {
    		?>
						<li class="info_no" style="width: 100%;text-align: center; ">
							<dl class="inner">
								<dt>등록된 정보가 없습니다.</dt>
							</dl>
						</li>
    		<?php
    			     }
    		?>
			</ul>
		</div>
	</section>
</main>

<!-- <main class="pb-5">
	<section>
		<div class="main--visual">
			<div class="main--visual--title--wrap">
				<h2>이차조아 소개 카피라이터 부분입니다</h2>
				<p>
					아치조아 소개글 상세 내용입니다. 아치조아 소개글 상세 내용입니다.<br />아치조아 소개글 상세 내용입니다. 아치조아 소개글 상세 내용입니다.
				</p>

				<div class="main--visual--contents">

					<div class="box--01">
						<h2>거래중</h2>
						<div>13</div>
					</div>

					<div class="box--02">
						<h2>판매완료</h2>
						<div>13</div>
					</div>

					<div class="car--find">
						<div>
							<h2>소유주명</h2>
							<div> <input type="text" class="form-control proprietor" id=""></div>
						</div>
						<div>
							<h2>차량 번호</h2>
							<div><input type="text" class="form-control carnumber" id=""></div>
						</div>
						<button class="car--find--btn">차량조회<i class="zoom--icon"></i></button>
					</div>

				</div>
			</div>
		</div>
	</section>

	<section>
		<div class="car--list--wrap">
			<div class="title--wrapper">
				<h2>입찰 대기중 차량</h2>
				<button class="more--btn">more+</button>
			</div>
			<ul>
				<li class="">
					<div class="car--box--wrap ">
						<h2 class="car--name">GLA-Class 200d 4M</h2>
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div class="car--info">
							<dl>
								<dt>주행거리 : </dt>
								<dd>28,980km</dd>
							</dl>
							<dl>
								<dt>최초 등록일 : </dt>
								<dd>11 / 2017</dd>
							</dl>
							<dl>
								<dt>사고유무 : </dt>
								<dd>무</dd>
							</dl>
							<dl>
								<dt>판매지역 : </dt>
								<dd>서울</dd>
							</dl>
						</div>
						<div class="status--wrap">
							<span>반려</span>
						</div>
					</div>
				</li>

				<li>
					<div class="car--box--wrap on">
						<h2 class="car--name">GLA-Class 200d 4M</h2>
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div class="car--info">
							<dl>
								<dt>주행거리 : </dt>
								<dd>28,980km</dd>
							</dl>
							<dl>
								<dt>최초 등록일 : </dt>
								<dd>11 / 2017</dd>
							</dl>
							<dl>
								<dt>사고유무 : </dt>
								<dd>무</dd>
							</dl>
							<dl>
								<dt>판매지역 : </dt>
								<dd>서울</dd>
							</dl>
						</div>
						<div class="btn--wrapper">
							<button type="button">자동차 보러가기<i class="arrow--ic"></i></button>
						</div>
					</div>
				</li>

				<li>
					<div class="car--box--wrap">
						<h2 class="car--name">GLA-Class 200d 4M</h2>
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div class="car--info">
							<dl>
								<dt>주행거리 : </dt>
								<dd>28,980km</dd>
							</dl>
							<dl>
								<dt>최초 등록일 : </dt>
								<dd>11 / 2017</dd>
							</dl>
							<dl>
								<dt>사고유무 : </dt>
								<dd>무</dd>
							</dl>
							<dl>
								<dt>판매지역 : </dt>
								<dd>서울</dd>
							</dl>
						</div>
						<div class="status--wrap">
							<span class="ready">대기중</span>
						</div>
					</div>
				</li>

				<li>
					<div class="car--box--wrap">
						<h2 class="car--name">GLA-Class 200d 4M</h2>
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div class="car--info">
							<dl>
								<dt>주행거리 : </dt>
								<dd>28,980km</dd>
							</dl>
							<dl>
								<dt>최초 등록일 : </dt>
								<dd>11 / 2017</dd>
							</dl>
							<dl>
								<dt>사고유무 : </dt>
								<dd>무</dd>
							</dl>
							<dl>
								<dt>판매지역 : </dt>
								<dd>서울</dd>
							</dl>
						</div>
						<div class="status--wrap">
							<span class="ready">대기중</span>
						</div>
					</div>
				</li>

			</ul>
		</div>
	</section>

	<section>
		<div class="car--list--wrap vertical--type">
			<div class="title--wrapper">
				<h2>입찰중 차량</h2>
				<button class="more--btn">more+</button>
			</div>
			<ul>
				<li class="">
					<div class="car--box--wrap ">
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div>
							<div class="car--info">
								<h2 class="car--name">GLA-Class 200d 4M</h2>
								<dl>
									<dt>주행거리 : </dt>
									<dd>28,980km</dd>
								</dl>
								<dl>
									<dt>최초 등록일 : </dt>
									<dd>11 / 2017</dd>
								</dl>
								<dl>
									<dt>사고유무 : </dt>
									<dd>무</dd>
								</dl>
								<dl>
									<dt>판매지역 : </dt>
									<dd>서울</dd>
								</dl>
							</div>
							<div class="status--wrap">
								<span>반려</span>
							</div>
						</div>

					</div>
				</li>

				<li class="">
					<div class="car--box--wrap ">
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div>
							<div class="car--info">
								<h2 class="car--name">GLA-Class 200d 4M</h2>
								<dl>
									<dt>주행거리 : </dt>
									<dd>28,980km</dd>
								</dl>
								<dl>
									<dt>최초 등록일 : </dt>
									<dd>11 / 2017</dd>
								</dl>
								<dl>
									<dt>사고유무 : </dt>
									<dd>무</dd>
								</dl>
								<dl>
									<dt>판매지역 : </dt>
									<dd>서울</dd>
								</dl>
							</div>
							<div class="status--wrap">
								<span>반려</span>
							</div>
						</div>

					</div>
				</li>

				<li class="">
					<div class="car--box--wrap ">
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div>
							<div class="car--info">
								<h2 class="car--name">GLA-Class 200d 4M</h2>
								<dl>
									<dt>주행거리 : </dt>
									<dd>28,980km</dd>
								</dl>
								<dl>
									<dt>최초 등록일 : </dt>
									<dd>11 / 2017</dd>
								</dl>
								<dl>
									<dt>사고유무 : </dt>
									<dd>무</dd>
								</dl>
								<dl>
									<dt>판매지역 : </dt>
									<dd>서울</dd>
								</dl>
							</div>
							<div class="status--wrap">
								<span>반려</span>
							</div>
						</div>

					</div>
				</li>

				<li class="">
					<div class="car--box--wrap ">
						<div class="thumb--wrap">
							<img src="/design/staff/assets/img/samp.png" />
						</div>
						<div>
							<div class="car--info">
								<h2 class="car--name">GLA-Class 200d 4M</h2>
								<dl>
									<dt>주행거리 : </dt>
									<dd>28,980km</dd>
								</dl>
								<dl>
									<dt>최초 등록일 : </dt>
									<dd>11 / 2017</dd>
								</dl>
								<dl>
									<dt>사고유무 : </dt>
									<dd>무</dd>
								</dl>
								<dl>
									<dt>판매지역 : </dt>
									<dd>서울</dd>
								</dl>
							</div>
							<div class="status--wrap">
								<span>반려</span>
							</div>
						</div>

					</div>
				</li>



			</ul>
		</div>
	</section>
</main> -->

<script>
$(function() {
	$(".car--list--wrap li").hover(function() {
		$(this).find(".car--box--wrap").addClass("on");
		$(this).find(".status--wrap").addClass("hide");
		$(this).find(".btn--wrapper").removeClass("hide");

	}, function() {
		$(this).find(".car--box--wrap").removeClass("on");
		$(this).find(".status--wrap").removeClass("hide");
		$(this).find(".btn--wrapper").addClass("hide");
	});
})
</script>
<?php include("include/footer.php") ?>
