| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
- // include $_SERVER['DOCUMENT_ROOT'].'/common/auth_chk.php';
- ?>
- <? include("../include/inc_top.php") ?>
- <? include("../include/inc_header.php") ?>
- <section id="wrap">
- <section id="visual" class="visual_sell">
- <h2>내차팔기</h2>
- <p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
- </section>
- <section id="content">
- <ul class="location">
- <li><a href="/" class="home">홈</a></li>
- <li><span class="depth1">내차팔기</span></li>
- <li><span class="depth2">차량정보</span></li>
- </ul>
- <?
- $mode = $_REQUEST["mode"];
- $p_nm_name = $_REQUEST["nm_name"];
- $p_nm_hp = $_REQUEST["nm_hp"];
- $p_nm_number = $_REQUEST["nm_number"];
- $sql ="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_year',a.ds_year) as nm_year
- , 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('car_master','ds_oil',a.ds_oil) as nm_oil
- , getCode('car_master','ds_accident',a.ds_accident) as nm_accident
- , getCode('sale_master','ds_usertype',s.ds_usertype) as nm_usertype
- , getCode('sale_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
- , s.nm_hp nm_hp_sale
- , s.nm_email nm_email_sale
- , s.ds_area ds_area_sale
- , s.nm_recommend nm_recommend_sale
- , s.nm_cont_return nm_cont_return_sale
- , getRemainTimeByPhase(".LIMIT_TIME_TENDER.", ".LIMIT_TIME_SELL.", s.dt_approve, now()) as time_limit_sell
- 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)
- WHERE s.nm_name='$nm_name'
- and s.nm_hp='$nm_hp'
- and a.nm_number='$nm_number'
- and s.ds_delind = 'N'
- and s.ds_status in ('B0','C0','D0','E0','F0','Z0','ZS')
- ORDER BY s.cd_sale desc LIMIT 0,1
- ";
- $col=mysql_fetch_array(mysql_query($sql));
- if (!empty($col[cd_car])){
- $cd_sale = $col[cd_sale];
- $cd_car = $col[cd_car];
- $cd_model = $col[cd_model];
- $cd_brand = $col[cd_brand];
- $ds_logo = $col[ds_logo];
- $cd_category = $col[cd_category];
- $cd_grade = $col[cd_grade];
- $ds_cate = $col[ds_cate];
- $ds_type = $col[ds_type];
- $ds_year = $col[ds_year];
- $nm_name = $col[nm_name];
- $nm_price = $col[nm_price];
- $nm_mileage = $col[nm_mileage];
- $ds_driving_system = $col[ds_driving_system];
- $ds_transmission = $col[ds_transmission];
- $nm_file_list = $col[nm_file_list];
- $nm_file_main = $col[nm_file_main];
- $nm_file_report = $col[nm_file_report];
- $nm_file_report_back = $col[nm_file_report_back];
- $nm_file_front = $col[nm_file_front];
- $nm_file_back = $col[nm_file_back];
- $nm_file_side1 = $col[nm_file_side1];
- $nm_file_side2 = $col[nm_file_side2];
- $nm_file_dashboard = $col[nm_file_dashboard];
- $ds_oil = $col[ds_oil];
- $nm_gearbox = $col[nm_gearbox];
- $nm_color = $col[nm_color];
- $nm_incolor = $col[nm_incolor];
- $ds_accident = $col[ds_accident];
- $nm_cont_accident = $col[nm_cont_accident];
- $nm_regdate = $col[nm_regdate];
- $ds_sales = $col[ds_sales];
- $nm_btitle = $col[nm_btitle];
- $nm_stitle = $col[nm_stitle];
- $nm_ltitle = $col[nm_ltitle];
- $nm_cont = $col[nm_cont];
- $nm_guide = $col[nm_guide];
- $ds_open = $col[ds_open];
- $ds_status = $col[ds_status];
- $dt_insert = $col[dt_insert];
- $nm_insert = $col[nm_insert];
- $dt_update = $col[dt_update];
- $nm_update = $col[nm_update];
- $ds_delind = $col[ds_delind];
- $nm_number = $col[nm_number];
- $nm_cc = $col[nm_cc];
- $ds_trade = $col[ds_trade];
- $ds_main = $col[ds_main];
- $nm_regdate_yyyy = $col[nm_regdate_yyyy];
- $nm_regdate_mm = $col[nm_regdate_mm];
- $nm_regdate_dd = $col[nm_regdate_dd];
- $nm_brand = $col[nm_brand];
- $nm_model = $col[nm_model];
- $nm_model_sub = $col[nm_model_sub];
- $nm_grade = $col[nm_grade];
- $nm_year = $col[nm_year];
- $nm_type = $col[nm_type];
- $nm_open = $col[nm_open];
- $nm_sales = $col[nm_sales];
- $nm_transmission = $col[nm_transmission];
- $nm_oil = $col[nm_oil];
- $nm_usertype = $col[nm_usertype];
- $nm_accident = $col[nm_accident];
- $nm_area = $col[nm_area];
- $nm_name_sale = $col[nm_name_sale];
- $ds_status_sale = $col[ds_status_sale];
- $nm_hp_sale = $col[nm_hp_sale];
- $nm_email_sale = $col[nm_email_sale];
- $ds_area_sale = $col[ds_area_sale];
- $nm_recommend_sale = $col[nm_recommend_sale];
- $nm_cont_return_sale = $col[nm_cont_return_sale];
- $time_limit_sell = $col[time_limit_sell];
- //보험처리
- $nm_act_chgno = $col[nm_act_chgno];
- $nm_act_chgnm = $col[nm_act_chgnm];
- $nm_act_s1 = $col[nm_act_s1];
- $nm_act_s2 = $col[nm_act_s2];
- $nm_act_s3 = $col[nm_act_s3];
- $nm_act_s4 = $col[nm_act_s4];
- $nm_act_my = $col[nm_act_my];
- $nm_act_my_amt = $col[nm_act_my_amt];
- $nm_act_other = $col[nm_act_other];
- $nm_act_other_amt = $col[nm_act_other_amt];
- $nm_act_searchdt = $col[nm_act_searchdt];
- $nm_act_cnt = $col[nm_act_cnt];
- $nm_act_general_spec = $col[nm_act_general_spec];
- $nm_act_use_record = $col[nm_act_use_record];
- $nm_act_use_record_lend = $col[nm_act_use_record_lend];
- $nm_act_use_record_biz = $col[nm_act_use_record_biz];
- $nm_act_use_record_official = $col[nm_act_use_record_official];
- $nm_act_ins_loss = $col[nm_act_ins_loss];
- $nm_act_ins_wet = $col[nm_act_ins_wet];
- $nm_act_ins_robbery = $col[nm_act_ins_robbery];
- $nm_file_act = $col[nm_file_act];
- $nm_act_yn = $col[nm_act_yn];
- $ds_g1_01 = $col[ds_g1_01];
- $ds_g1_02 = $col[ds_g1_02];
- $ds_g1_03 = $col[ds_g1_03];
- $ds_g1_04 = $col[ds_g1_04];
- $ds_g1_05 = $col[ds_g1_05];
- $ds_g2_01 = $col[ds_g2_01];
- $ds_g2_02 = $col[ds_g2_02];
- $ds_g2_03 = $col[ds_g2_03];
- $ds_g2_04 = $col[ds_g2_04];
- $ds_g2_05 = $col[ds_g2_05];
- $ds_g3_01 = $col[ds_g3_01];
- $ds_g3_02 = $col[ds_g3_02];
- $ds_g3_03 = $col[ds_g3_03];
- $ds_g3_04 = $col[ds_g3_04];
- $ds_g3_05 = $col[ds_g3_05];
- $ds_g4_01 = $col[ds_g4_01];
- $ds_g4_02 = $col[ds_g4_02];
- $ds_g4_03 = $col[ds_g4_03];
- $ds_g4_04 = $col[ds_g4_04];
- $ds_g4_05 = $col[ds_g4_05];
- /*
- $arr_nm_info1 = explode("-",$nm_info1);
- if(count($arr_nm_info1) == 3){
- $nm_info11 = $arr_nm_info1[0];
- $nm_info12 = $arr_nm_info1[1];
- $nm_info13 = $arr_nm_info1[2];
- }else{
- $nm_info11 = "";
- $nm_info12 = "";
- $nm_info13 = "";
- }
- $arr_nm_info3 = explode("@",$nm_info3);
- if(count($arr_nm_info3) == 2){
- $nm_info31 = $arr_nm_info3[0];
- $nm_info32 = $arr_nm_info3[1];
- }else{
- $nm_info31 = "";
- $nm_info32 = "";
- }
- $nm_info3 = $col[nm_info3];
- */
- }else{
- AlertBack("진행중인 차량 정보가 존재하지 않습니다.");
- }
- ?>
- <h3>차량기본정보</h3>
- <div class="car_model">
- <p class="fl"><?=$nm_brand." ".$nm_model." ".$nm_model_sub." ".$nm_grade?></p>
- <? if($ds_status_sale == "E0" || $ds_status_sale == "F0"){ ?>
- <p class="fr">입찰 마감 시간 : <em><?=$time_limit_sell?></em></p>
- <? } ?>
- </div>
- <table class="tbl_h">
- <colgroup>
- <col width="16%">
- <col width="34%">
- <col width="16%">
- <col width="*">
- </colgroup>
- <tr>
- <th>차량번호</th>
- <td><?=$nm_number?></td>
- <th>제조사</th>
- <td><?=$nm_brand?></td>
- </tr>
- <tr>
- <th>모델</th>
- <td><?=$nm_model?></td>
- <th>세부모델</th>
- <td><?=$nm_model_sub?></td>
- </tr>
- <tr>
- <th>등급</th>
- <td><?=$nm_grade?></td>
- <th>연식(최초등록일)</th>
- <td><?=$nm_regdate_yyyy."년 ".$nm_regdate_mm."월"?></td>
- </tr>
- <tr>
- <th>형식연도</th>
- <td><?=$nm_year?>년</td>
- <th>배기량</th>
- <td><?=$nm_cc?>cc</td>
- </tr>
- <tr>
- <th>변속기</th>
- <td><?=$nm_transmission?></td>
- <th>연료</th>
- <td><?=$nm_oil?></td>
- </tr>
- <tr>
- <th>색상</th>
- <td><?=$nm_color?></td>
- <th>주행거리</th>
- <td><?=$nm_mileage?>km</td>
- </tr>
- <tr>
- <th>사고유무</th>
- <td><?=$nm_accident?><?=($ds_accident == "A0") ? " - ".$nm_cont_accident : "" ?></td>
- <th>추천인</th>
- <td><?= ($nm_recommend_sale == "") ? "없음":$nm_recommend_sale ?></td>
- </tr>
- <tr>
- <th>옵션</th>
- <td colspan="3"><?=$nm_cont?></td>
- </tr>
- <tr>
- <th>필수사진</th>
- <td colspan="3">
- <ul class="photo_list">
- <li>
- <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_front?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_front?>')">
- <span>차량전면</span>
- </li>
- <li>
- <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_back?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_back?>')">
- <span>차량후면</span>
- </li>
- <li>
- <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side1?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side1?>')">
- <span>운전석 측면</span>
- </li>
- <li>
- <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side2?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side2?>')">
- <span>조수석 측면</span>
- </li>
- <li>
- <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_dashboard?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_dashboard?>')">
- <span>계기판</span>
- </li>
- </ul>
- </td>
- </tr>
- <tr>
- <th>추가사진</th>
- <td colspan="3">
- <ul class="photo_list">
- <?
- if(!empty($col[cd_car])){
- $r = mysql_query("SELECT * FROM car_file WHERE cd_car = '$cd_car' and ds_type='' and ds_delind='N' Order by no_sort asc , cd_car ASC ");
- $i=1;
- while($imgs = mysql_fetch_array($r)) {
- ?>
- <li><img src="<?=UPLOAD_PATH_CAR?><?=$imgs[cd_car]?>_detail/<?=$imgs[nm_file]?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?><?=$imgs[cd_car]?>_detail/<?=$imgs[nm_file]?>')"></li>
- <?
- }
- }else{
- ?>
- <?
- }
- ?>
- </ul>
- </td>
- </tr>
- </table>
- <div class="btn_right">
- <?
- if($ds_status_sale == "A0" || $ds_status_sale == "B0" || $ds_status_sale == "C0" || $ds_status_sale == "D0"){ //ds_status_sale=A0,B0,C0,D0 입력중,입력완료,승인대기,반려
- ?>
- <a href="#" class="button gray" id="btn_update">수정하기</a>
- <?
- }
- ?>
- <!--a href="./sell_list.php?PageNo=<?=$ListPageNo?>" class="button">목록가기</a-->
- </div>
- <h3>사고이력정보</h3>
- <table class="tbl_h">
- <colgroup>
- <col width="16%">
- <col width="*">
- </colgroup>
- <tr>
- <th>차량번호 변경</th>
- <td><?=$nm_act_chgno?> 회</td>
- </tr>
- <tr>
- <th>소유자 변경</th>
- <td><?=$nm_act_chgnm?> 회</td>
- </tr>
- <tr>
- <th>자동차 보험 특수 사고</th>
- <td>전손 : <?=$nm_act_s1?>회 / 침수전손 : <?=$nm_act_s2?>회 / 침수분손 : <?=$nm_act_s3?>회 / 도난 : <?=$nm_act_s4?>회</td>
- </tr>
- <tr>
- <th>보험사고 (내차피해)</th>
- <td><?=$nm_act_my?> 회(<?=$nm_act_my_amt?> 원)</td>
- </tr>
- <tr>
- <th>보험사고 (타차가해)</th>
- <td><?=$nm_act_other?> 회(<?=$nm_act_other_amt?> 원)</td>
- </tr>
- <!--tr>
- <th>사고이력 조회일</th>
- <td>2018-12-05 </td>
- </tr-->
- </table>
- <div class="btn_right">
- <a href="#" class="button" onclick="openLayer('car'); return false;">사고이력 정보 조회 보기</a>
- </div>
- <?
- // $cd_sale = $_REQUEST["cd_sale"];
- $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;
- $OrderBy = $_REQUEST['OrderBy'];
- if ($OrderBy == "") $OrderBy = "cast(t.nm_price as unsigned) desc, t.cd_tender desc ";
- $sOrderBy = "ORDER BY ".$OrderBy;
- //$sql = "where ds_delind='N'";
- $sql = "";
- $totalrows = @mysql_result(mysql_query("select count(*) FROM dealer_master d inner join tender_master t on (d.cd_dealer = t.cd_dealer_p and t.cd_sale = $cd_sale and t.ds_delind='N' $sql) "),0,0);
- ?>
- <h3>입찰리스트</h3>
- <table class="tbl_v">
- <colgroup>
- <col width="7%">
- <col width="*">
- <col width="12%">
- <col width="15%">
- <!--col width="13%"-->
- <col width="15%">
- <col width="15%">
- </colgroup>
- <thead>
- <tr>
- <th>번호</th>
- <th>입찰업체</th>
- <th>입찰금액</th>
- <th>입찰일</th>
- <!--th>연락처</th-->
- <th>업체정보</th>
- <th>상태</th>
- </tr>
- </thead>
- <tbody>
- <?
- if($totalrows>0) {
- $r = mysql_query("SELECT t.*, d.nm_company nm_company_dealer, d.nm_name nm_name_dealer, s.ds_status ds_status_sale, getRemainTimeByPhase(".LIMIT_TIME_TENDER.", ".LIMIT_TIME_SELL.", s.dt_approve, now()) as time_limit_sell, d1.nm_name nm_name_dealer1 FROM dealer_master d inner join tender_master t on (d.cd_dealer = t.cd_dealer_p and t.cd_sale = $cd_sale and t.ds_delind='N' $sql) inner join dealer_master d1 on (t.cd_dealer = d1.cd_dealer) inner join sale_master s on (t.cd_sale = s.cd_sale) $sOrderBy LIMIT $pagestartpoint,$PageSize");
- $i=1;
- while($col = mysql_fetch_array($r)) {
- ?>
- <tr>
- <td><?=$i?></td>
- <td><?=$col[nm_company_dealer]?> / <?=$col[nm_name_dealer1]?></td>
- <td><?=$col[nm_price]?> 만원</td>
- <td><?=$col[dt_insert]?></td>
- <!--td><?//=$col[nm_hp]?></td-->
- <td><a href="#" class="link" onclick="openPostScript('<?=$col[cd_dealer_p]?>','<?=$col[cd_tender]?>'); return false;">후기 보기</a></td>
- <td>
- <?
- if($col[ds_status_sale] == "Z0" || $col[ds_status_sale] == "ZS" || $col[ds_status_sale] == "ZE"){
- ?>
- <?
- if($col[ds_status_sale] == "ZE"){
- ?>
- 거래실수
- <?
- }else{
- ?>
- <?= ($col[ds_status] == "Z0") ? "낙찰" : "낙첨" ?>
- <?
- }
- ?>
- <?
- }else{
- ?>
- <?
- if($col[ds_status_sale] == "E0" || $col[ds_status_sale] == "F0"){
- if($col[time_limit_sell]=="0분"){
- ?>
- 낙첨
- <?
- }else{
- ?>
- <a href="#" class="td_btn ty3" onclick="selectTender('<?=$col[cd_tender]?>','<?=$col[nm_company_dealer]?>','<?=$col[nm_price]?>')" id="a_Tender" value="<?=$col[cd_tender]?>">낙찰하기</a>
- <?
- }
- ?>
- <?
- }
- ?>
- <?
- }
- ?>
- </td>
- </tr>
- <?
- $i++;
- }
- }else{
- ?>
- <tr>
- <td colspan="7">데이터가 존재 하지 않습니다.</td>
- </tr>
- <?
- }
- ?>
- </tbody>
- </table>
- <div class="paging">
- <?
- $url = "./sell_view_nomember.php?list_url=$list_url&cd_sale=$cd_sale&ds_status_sale=$ds_status_sale&ListPageNo=$ListPageNo&PageNo=$PageNo&nm_name=$p_nm_name&nm_hp=$p_nm_hp&nm_number=$p_nm_number&mode=$mode";
- // ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
- ?>
- </div>
- <!-- Postscript -->
- <?
- if ($ds_status_sale == "ZS"){
- $sql = "SELECT
- t.*
- , d.nm_name nm_name_dealer_p
- , d.nm_zip nm_zip_dealer_p
- , d.nm_addr nm_addr_dealer_p
- , d.nm_addr_sub nm_addr_sub_dealer_p
- , d.nm_area nm_area_dealer_p
- , p.nm_name nm_name_dealer
- , p.nm_hp_01+'-'+p.nm_hp_02+'-'+p.nm_hp_03 nm_hp_dealer
- , p.nm_file nm_file_dealer
- , report.cd_dealer_p_min
- , report.cd_dealer_p_max
- , report.nm_price_min
- , report.nm_price_max
- , report.nm_price_avg
- , report.nm_name_min
- , report.nm_name_max
- , report.cnt
- , s.nm_price_final
- , s.nm_score_postscript
- , s.nm_cont_postscript
- FROM tender_master t
- inner join dealer_master d
- on (t.cd_dealer_p = d.cd_dealer
- and t.cd_sale = '$cd_sale'
- and t.ds_delind = 'N'
- and t.ds_status = 'Z0'
- )
- inner join dealer_master p
- on (t.cd_dealer = p.cd_dealer
- )
- inner join (
- select
- ff.cd_sale
- , ff.cd_dealer_p_min
- , ff.cd_dealer_p_max
- , ff.nm_price_min
- , ff.nm_price_max
- , ff.nm_price_avg
- , ff.cnt
- , d1.nm_name nm_name_min
- , d2.nm_name nm_name_max
- from (
- select
- max(cc.cd_sale) cd_sale
- , max(cc.cd_dealer_p_min) cd_dealer_p_min
- , max(cc.cd_dealer_p_max) cd_dealer_p_max
- , max(cc.nm_price_min) nm_price_min
- , max(cc.nm_price_max) nm_price_max
- , max(cc.nm_price_avg) nm_price_avg
- , max(cc.cnt) cnt
- from (
- select
- aa.cd_sale
- , case when aa.nm_price = bb.nm_price_min then aa.cd_dealer_p else 0 end cd_dealer_p_min
- , case when aa.nm_price = bb.nm_price_max then aa.cd_dealer_p else 0 end cd_dealer_p_max
- , bb.nm_price_min
- , bb.nm_price_max
- , bb.nm_price_avg
- , bb.cnt
- from (select * from tender_master where cd_sale = '$cd_sale' and ds_delind = 'N') aa
- , (
- select
- min(nm_price) nm_price_min
- , max(nm_price) nm_price_max
- , avg(nm_price) nm_price_avg
- , count(*) cnt
- from tender_master
- where cd_sale = '$cd_sale' and ds_delind = 'N'
- ) bb
- ) cc
- ) ff
- inner join dealer_master d1
- on (ff.cd_dealer_p_min = d1.cd_dealer)
- inner join dealer_master d2
- on (ff.cd_dealer_p_max = d2.cd_dealer)
- ) report
- on (t.cd_sale = report.cd_sale
- )
- inner join sale_master s
- on (t.cd_sale = s.cd_sale
- )
- ";
- $col=mysql_fetch_array(mysql_query($sql));
- if (!empty($col[cd_sale])){
- $cd_sale = $col[cd_sale];
- $nm_price = $col[nm_price];
- $nm_name_dealer_p = $col[nm_name_dealer_p];
- $nm_zip_dealer_p = $col[nm_zip_dealer_p];
- $nm_addr_dealer_p = $col[nm_addr_dealer_p];
- $nm_addr_sub_dealer_p = $col[nm_addr_sub_dealer_p];
- $nm_area_dealer_p = $col[nm_area_dealer_p];
- $nm_name_dealer = $col[nm_name_dealer];
- $nm_hp_dealer = $col[nm_hp_dealer];
- $nm_file_dealer = $col[nm_file_dealer];
- $cd_dealer_p_min = $col[cd_dealer_p_min];
- $cd_dealer_p_max = $col[cd_dealer_p_max];
- $nm_price_min = $col[nm_price_min];
- $nm_price_max = $col[nm_price_max];
- $nm_price_avg = $col[nm_price_avg];
- $nm_name_min = $col[nm_name_min];
- $nm_name_max = $col[nm_name_max];
- $cnt = $col[cnt];
- $nm_price_final = $col[nm_price_final];
- $nm_score_postscript = $col[nm_score_postscript];
- $nm_cont_postscript = $col[nm_cont_postscript];
- /*
- $arr_nm_info1 = explode("-",$nm_info1);
- if(count($arr_nm_info1) == 3){
- $nm_info11 = $arr_nm_info1[0];
- $nm_info12 = $arr_nm_info1[1];
- $nm_info13 = $arr_nm_info1[2];
- }else{
- $nm_info11 = "";
- $nm_info12 = "";
- $nm_info13 = "";
- }
- $arr_nm_info3 = explode("@",$nm_info3);
- if(count($arr_nm_info3) == 2){
- $nm_info31 = $arr_nm_info3[0];
- $nm_info32 = $arr_nm_info3[1];
- }else{
- $nm_info31 = "";
- $nm_info32 = "";
- }
- $nm_info3 = $col[nm_info3];
- */
- }else{
- // AlertBack("지정되지않은 요청입니다");
- }
- ?>
- <h3>낙찰업체</h3>
- <div class="tender_business">
- <dl class="info">
- <dt><?=$nm_name_dealer_p?></dt>
- <dd class="thumb" style="background-image:url('<?=UPLOAD_PATH?>dealer/nm_file/<?=$nm_file_dealer?>');"></dd>
- <dd>약속드립니다.<br>정직하게 일하겠습니다.</dd>
- <dd class="price">
- <span>참여업체 : <?=$cnt?></span>
- <span>평균견적 : <?=$nm_price_avg?> 만원</span>
- <span>낙찰가 <em><?=$nm_price_final?> 만원</em></span>
- <!--a href="#" class="button td_btn ty2">딜러 정보 보기</a-->
- </dd>
- </dl>
- <form name="frmFormPostscript" id="frmFormPostscript" method="post" action="/mypage/dealer_proc.php">
- <input type="hidden" name="mode" id="mode" value="WritePostscriptNomember">
- <input type="hidden" name="cd_sale" id="cd_sale" value="<?=$cd_sale?>">
- <input type="hidden" name="nm_name" id="nm_name" value="<?=$p_nm_name?>">
- <input type="hidden" name="nm_hp" id="nm_hp" value="<?=$p_nm_hp?>">
- <input type="hidden" name="nm_number" id="nm_number" value="<?=$p_nm_number?>">
- <div class="review_write">
- <p class="customer_grade">
- <label for="customer_score">고객만족도</label>
- <span id="customer_score">
- <select name="nm_score_postscript" id="nm_score_postscript" class="select" style="width:130px;">
- </select>
- </span>
- <em>점</em>
- </p>
- <p><textarea cols="90" rows="8" name="nm_cont_postscript" id="nm_cont_postscript"><?=$nm_cont_postscript?></textarea></p>
- </div>
- </form>
- </div>
- <div class="btn_center">
- <a href="#" class="button" id="btn_write_postscript">후기쓰기</a>
- </div>
- <?
- }
- ?>
- <!-- // Postscript -->
- <!-- layer popup -->
- <div class="layer_popup tender_popup">
- <div class="popup_wrap">
- <p class="msg"><em id="nm_dealer_popup">고진상사</em>에게 낙찰정보를 보내시겠습니까?</p>
- <div class="btn_center">
- <a href="#" class="button" id="btn_write">확인</a>
- <a href="#" class="button gray" onclick="closeLayer('tender'); return false;">취소</a>
- </div>
- </div>
- </div>
- <!-- // layer popup -->
-
- <!-- layer popup -->
- <div class="layer_popup car_popup">
- <h3>중고차 보험처리 이력정보 보고서</h3>
- <p class="close">레이어팝업닫기</p>
- <div class="scr_cont">
- <h4>중고차 사고이력 요약 정보</h4>
- <table class="tbl_data">
- <colgroup>
- <col width="35%">
- <col width="*">
- </colgroup>
- <tr>
- <th>자동차 일반사양</th>
- <td><?=$nm_act_general_spec?></td>
- </tr>
- <tr>
- <th>자동차 용도이력</th>
- <td><?=$nm_act_use_record?></td>
- </tr>
- <tr>
- <th>자동차 번호 / 소유자 변경횟수</th>
- <td><?=$nm_act_chgno?> 회 / <?=$nm_act_chgnm?> 회</td>
- </tr>
- <tr>
- <th>자동차보험 특수 사고이력(전손, 침수, 도난)</th>
- <td>전손 : <?=$nm_act_s1?>, 도난 : <?=$nm_act_s4?>, 침수(전손 : <?=$nm_act_s2?>, 분손 : <?=$nm_act_s3?>)</td>
- </tr>
- <tr>
- <th>보험사고이력(내차 피해)</th>
- <td><?=$nm_act_my?> 회, <?=$nm_act_my_amt?> 원</td>
- </tr>
- <tr>
- <th>보험사고이력(타차 피해)</th>
- <td><?=$nm_act_other?> 회, <?=$nm_act_other_amt?> 원</td>
- </tr>
- </table>
- <p class="notice01">자동차보험 사고기록이 없었다고 해서 반드시 무사고라고 할 수는 없습니다.</p>
- <h5>1. 자동차 용도 이력정보</h5>
- <table class="tbl_data">
- <colgroup>
- <col width="35%">
- <col width="*">
- </colgroup>
- <tr>
- <th>대여용도 사용이력(렌터카)</th>
- <td><?=$nm_act_use_record_lend?></td>
- </tr>
- <tr>
- <th>영업용도 사용이력</th>
- <td><?=$nm_act_use_record_biz?></td>
- </tr>
- <tr>
- <th>관용용도 사용이력</th>
- <td><?=$nm_act_use_record_official?></td>
- </tr>
- </table>
- <p class="notice02">과거 자동차번호 변경기록을 모두 검색하여 제공하는 것으로 대여용(렌트카), 영업용(택시 등)으로 사용된 적이 있는지 확인할 수 있습니다.</p>
- <h5>2. 자동차보험 특수 사고 이력 정보</h5>
- <table class="tbl_data">
- <colgroup>
- <col width="35%">
- <col width="*">
- </colgroup>
- <tr>
- <th>전손 보험사고</th>
- <td><?=$nm_act_ins_loss?></td>
- </tr>
- <tr>
- <th>침수 보험사고</th>
- <td><?=$nm_act_ins_wet?></td>
- </tr>
- <tr>
- <th>도난 보험사고</th>
- <td><?=$nm_act_ins_robbery?></td>
- </tr>
- </table>
- <h5>3. 보험사고 이력정보 : 내차 피해</h5>
- <table class="tbl_data2">
- <colgroup>
- <col width="20%">
- <col width="20%">
- <col width="20%">
- <col width="20%">
- <col width="20%">
- </colgroup>
- <thead>
- <tr>
- <th>사고일자</th>
- <th>부품</th>
- <th>공임</th>
- <th>도장</th>
- <th>총 수리비용</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th><?=$ds_g1_01?></th>
- <td><?=$ds_g1_02?>원</td>
- <td><?=$ds_g1_03?>원</td>
- <td><?=$ds_g1_04?>원</td>
- <td><?=$ds_g1_05?>원</td>
- </tr>
- <tr>
- <th><?=$ds_g2_01?></th>
- <td><?=$ds_g2_02?>원</td>
- <td><?=$ds_g2_03?>원</td>
- <td><?=$ds_g2_04?>원</td>
- <td><?=$ds_g2_05?>원</td>
- </tr>
- <tr>
- <th><?=$ds_g3_01?></th>
- <td><?=$ds_g3_02?>원</td>
- <td><?=$ds_g3_03?>원</td>
- <td><?=$ds_g3_04?>원</td>
- <td><?=$ds_g3_05?>원</td>
- </tr>
- <tr>
- <th><?=$ds_g4_01?></th>
- <td><?=$ds_g4_02?>원</td>
- <td><?=$ds_g4_03?>원</td>
- <td><?=$ds_g4_04?>원</td>
- <td><?=$ds_g4_05?>원</td>
- </tr>
- </tbody>
- </table>
- <!--h5>4. 보험사고 이력정보 : 타차 가해</h5>
- <table class="tbl_data2">
- <colgroup>
- <col width="20%">
- <col width="20%">
- <col width="20%">
- <col width="20%">
- <col width="20%">
- </colgroup>
- <thead>
- <tr>
- <th>사고일자</th>
- <th>부품</th>
- <th>공임</th>
- <th>도장</th>
- <th>총 수리비용</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th>2017-05-27</th>
- <td>857,610원</td>
- <td>857,610원</td>
- <td>857,610원</td>
- <td>857,610원</td>
- </tr>
- <tr>
- <th>2017-05-27</th>
- <td>857,610원</td>
- <td>857,610원</td>
- <td>857,610원</td>
- <td>857,610원</td>
- </tr>
- </tbody>
- </table>
- <ul class="notice03">
- <li>중고차 사고 이력정보 서비스는 자동차 보험을 취급하는 14개 손해보험사의 자동차 보험수리비 지급기록(1996년 이후)에 근거하여 제공하고 있습니다.<br>
- 따라서 다음과 같은 경우에는 중고차 사고 이력정보 서비스를 제공할 수 없습니다.</li>
- <li>
- <ol>
- <li>사고가 있었다하더라도 보험회사에 사전신고를 하지 않고 자비로 처리한 경우,<br>
- 사고신고를 하였더라도 면책, 취소 등의 사유로 보험금이 지급되지 않은경우,<br>
- 사고신고 후 자비로 처리한 경우입니다.</li>
- <li>사고가 있었다하더라도 종합보험, 즉 자기차량담보나 대물배상담보의 자동차 보험에 가입하지 않아서 자동차 보험으로 수리비용을 청구하지 못한 경우<br>
- (단, 이경우라도 타인 자동차보험에서 보상받은 경우에는 사고정보 제공가능)</li>
- <li>자동차보험이 아니 운수공제(택시공제, 화물공제, 버스공제 등)에 가입되어 운수공제로부터 자동차의 피해에 대한 손해를 보상받은 경우 등</li>
- </ol>
- </li>
- <li>본 중고차 사고이력정보는 중고차 품질확인을 위한 보조정보이며 결정적인 판단 자료로 사용되어서는 아니됩니다. 따라서 정밀한 중고차 품질확인을<br>
- 원하시면 차량진단 전문업체의 진단을 받아보시기 바랍니다.</li>
- <li>※ 보험개발원(www.kidi.or.kr)은 보험입법 제 176조에 의하여 설립된 보험요율산출기관이며,<br>
- 중고차사고이력정보서비스(www.carhistory.or.kr)는 보험업법시행령 제86조 제1호 근거하여 제공합니다. </li>
- </ul>
- <p class="sign"><img src="/img/img_sign.gif"></p-->
- </div>
- </div>
- <!-- // layer popup -->
- <!-- layer popup3 -->
- <div class="layer_popup photo_popup">
- <div class="popup_wrap">
- <img src="/img/sell/ic_car_photo1.png" id="photoBig">
- <!-- div class="btn_center">
- <a href="#" class="button gray" onclick="closeLayer('photo'); return false;">확인</a>
- </div -->
- </div>
- <div class="close" onclick="closeLayer('photo');">레이어팝업 닫기</div>
- </div>
- <!-- // layer popup3 -->
- <?
- if($ds_status_sale == "D0"){ //ds_status_sale=D0
- ?>
- <!-- layer_popup -->
- <div class="layer_popup return_popup">
- <div class="popup_wrap">
- <p class="msg">
- <?=$nm_cont_return_sale?>
- </p>
- <div class="btn_center">
- <a href="#" class="button" id="btn_update_return">차량정보 수정</a>
- </div>
- </div>
- <div class="close">레이어팝업 닫기</div>
- </div>
- <!-- // layer_popup -->
- <script type="text/javascript">
- openLayer('return');
- </script>
- <?
- }
- ?>
- </section>
- </section>
- <form name="frmForm" id="frmForm" method="post" action="/mypage/dealer_proc.php">
- <input type="hidden" name="mode" id="mode" value="TenderSuccessNomember">
- <input type="hidden" name="cd_sale" id="cd_sale" value="<?=$cd_sale?>">
- <input type="hidden" name="cd_tender" id="cd_tender">
- <input type="hidden" name="nm_price" id="nm_price">
- <input type="hidden" name="nm_name" id="nm_name" value="<?=$p_nm_name?>">
- <input type="hidden" name="nm_hp" id="nm_hp" value="<?=$p_nm_hp?>">
- <input type="hidden" name="nm_number" id="nm_number" value="<?=$p_nm_number?>">
- </form>
- <script laguage="javascript" type="text/javascript">
- function openPostScript(arg1, arg2){
- var url = "/mypage/sell_view_postscript.php?cd_dealer_p="+arg1+"&cd_tender="+arg2;
- var winname = "winPostscript";
- var opt = "width=600,height=700,scrollbar=no";
- popup_window(url, winname, opt);
- }
- function selectTender(arg1, arg2, arg3){
- $("#cd_tender").val(arg1);
- $("#nm_dealer_popup").text(arg2);
- $("#nm_price").val(arg3);
- openLayer('tender'); return false;
- }
- function viewPhoto(arg1){
- $("#photoBig").attr("src", arg1);
- openLayer('photo'); return false;
- }
- $(document).ready(function() {
-
- $("#btn_write").bind("click",function(){
- // $("#cd_tender").val($("#a_Tender").attr('value'));
- var c=confirm("정보를 등록하시겠습니까?");
- if(c){
- $("#btn_write").hide();
- $("#frmForm").submit();
- }else{
- $("#btn_write").show();
- return false;
- }
- });
- $("#btn_update,#btn_update_return").on("click", function(){
- $.post("/sell/proc.php", { mode:"updateCar", cd_car:"<?=$cd_car?>", cd_sale:"<?=$cd_sale?>"},function(data) {
- // alert(data);
- if(data=="Y"){
- location.href = "./sell_step1.php?mode=Step1";
- }else{
- alert("수정할 수 없습니다.");
- return;
- }
- });
- });
- //<!-- Postscript -->
- <?
- if ($ds_status_sale == "ZS"){
- ?>
- setCodeSelect("listcode","nm_score_postscript", "sale_master","nm_score_postscript","<?=$nm_score_postscript?>","선택하세요","");
-
- $("#btn_write_postscript").bind("click",function(){
- var fieldlist = [["nm_score_postscript","고객만족도"],["nm_cont_postscript","내용"]]
-
- if (!fnCheckForm(fieldlist)){
- return false;
- }
- var c=confirm("정보를 등록하시겠습니까?");
- if(c){
- $("#btn_write_postscript").hide();
- $("#frmFormPostscript").submit();
- }else{
- $("#btn_write_postscript").show();
- return false;
- }
- });
- <?
- }
- ?>
- //<!-- // Postscript -->
- });
- </script>
- <? include("../include/inc_footer.php") ?>
- <? include("../include/inc_bottom.php") ?>
- <?
- mysql_close($connect);
- ?>
|