dealer_tender_view.php.20200114 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].'/common/dealer_chk.php';
  4. ?>
  5. <!DOCTYPE html>
  6. <HTML lang="ko">
  7. <head>
  8. <meta charset="utf-8">
  9. <title>UPRO</title>
  10. <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width">
  11. <meta name="format-detection" content="telephone=no">
  12. <link rel="stylesheet" type="text/css" href="/m/css/sumogallery.css">
  13. <link rel="stylesheet" type="text/css" href="/m/css/common.css">
  14. <link rel="stylesheet" type="text/css" href="/m/css/sub.css">
  15. <script type="text/javascript" charset="utf-8" src="/m/js/jquery-1.11.2.min.js"></script>
  16. <script type="text/javascript" charset="utf-8" src="/m/js/jquery.panzoom.min.js"></script>
  17. <script type="text/javascript" charset="utf-8" src="/m/js/ui.js"></script>
  18. <script type="text/javascript" src="<?=JS_PATH?>"></script>
  19. </head>
  20. <body>
  21. <!-- s : header -->
  22. <? include("../inc/inc_header.php"); ?>
  23. <!-- // e : header -->
  24. <!-- s : container -->
  25. <section id="container">
  26. <section id="visual" class="visual_mypage">
  27. <h2>마이페이지</h2>
  28. <p>쉽고 간편한 내차팔기, 견적산출,<br>최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
  29. </section>
  30. <section id="content">
  31. <?
  32. $s_cd_dealer = $_SESSION['s_cd_dealer'];
  33. $s_cd_dealer_p = $_SESSION['s_cd_dealer_p'];
  34. $s_ds_type = $_SESSION['s_ds_type'];
  35. $s_ds_status_p = $_SESSION['s_ds_status_p'];
  36. if($s_ds_type == "D0"){ //딜러
  37. $sql_ds_type = " cd_dealer_p = '$s_cd_dealer' ";
  38. }else{ //딜러-관리자
  39. $sql_ds_type = " cd_dealer = '$s_cd_dealer' ";
  40. }
  41. $rq_ds_status = $_REQUEST['ds_status']; //요청받은 상태값 : request ds_status (naming request->rq, response->rs)
  42. if($rq_ds_status == "E0"){
  43. $nm_title = "입찰대기 리스트";
  44. }else if($rq_ds_status == "F0"){
  45. $nm_title = "입찰중 리스트";
  46. }else if($rq_ds_status == "Z0"){
  47. $nm_title = "낙찰 리스트";
  48. }else if($rq_ds_status == "ZS"){
  49. $nm_title = "구매확정 리스트";
  50. }
  51. $cd_sale = $_REQUEST["cd_sale"];
  52. $sql ="SELECT
  53. a.*
  54. , b.nm_model
  55. , c.nm_grade
  56. , d.nm_brand
  57. , e.nm_model_sub
  58. , getCode('car_master','ds_type',a.ds_type) as nm_type
  59. , getCode('car_master','ds_year',a.ds_year) as nm_year
  60. , getCode('car_master','ds_open',a.ds_open) as nm_open
  61. , getCode('car_master','ds_sales',a.ds_sales) as nm_sales
  62. , getCode('car_master','ds_transmission',a.ds_transmission) as nm_transmission
  63. , getCode('car_master','ds_oil',a.ds_oil) as nm_oil
  64. , getCode('car_master','ds_accident',a.ds_accident) as nm_accident
  65. , getCode('sale_master','ds_usertype',s.ds_usertype) as nm_usertype
  66. , getCode('member_master','ds_area',s.ds_area) as nm_area
  67. , getCode('member_master','ds_area',s.ds_area_user) as nm_area_user
  68. , getCode('sale_master','ds_status',s.ds_status) as nm_status
  69. , s.nm_name nm_name_sale
  70. , s.ds_status ds_status_sale
  71. , s.nm_hp nm_hp_sale
  72. , s.nm_email nm_email_sale
  73. , s.ds_area ds_area_sale
  74. , s.nm_recommend nm_recommend_sale
  75. , s.nm_cont_return nm_cont_return_sale
  76. , getRemainTime(".LIMIT_TIME_TENDER.", s.dt_approve, now()) as time_limit_tender
  77. FROM sale_master s
  78. inner join car_master a
  79. on (s.cd_car = a.cd_car)
  80. left outer join car_model b
  81. on (a.cd_model = b.cd_model)
  82. left outer join car_grade c
  83. on (a.cd_grade = c.cd_grade)
  84. left outer join car_brand d
  85. on (a.cd_brand = d.cd_brand)
  86. left outer join car_model_sub e
  87. on (a.cd_model_sub = e.cd_model_sub)
  88. WHERE s.cd_sale='$cd_sale' ";
  89. $col=mysql_fetch_array(mysql_query($sql));
  90. if (!empty($col[cd_car])){
  91. $cd_car = $col[cd_car];
  92. $cd_model = $col[cd_model];
  93. $cd_brand = $col[cd_brand];
  94. $ds_logo = $col[ds_logo];
  95. $cd_category = $col[cd_category];
  96. $cd_grade = $col[cd_grade];
  97. $ds_cate = $col[ds_cate];
  98. $ds_type = $col[ds_type];
  99. $ds_year = $col[ds_year];
  100. $nm_name = $col[nm_name];
  101. $nm_price = $col[nm_price];
  102. $nm_mileage = $col[nm_mileage];
  103. $ds_driving_system = $col[ds_driving_system];
  104. $ds_transmission = $col[ds_transmission];
  105. $nm_file_list = $col[nm_file_list];
  106. $nm_file_main = $col[nm_file_main];
  107. $nm_file_report = $col[nm_file_report];
  108. $nm_file_report_back = $col[nm_file_report_back];
  109. $nm_file_front = $col[nm_file_front];
  110. $nm_file_back = $col[nm_file_back];
  111. $nm_file_side1 = $col[nm_file_side1];
  112. $nm_file_side2 = $col[nm_file_side2];
  113. $nm_file_dashboard = $col[nm_file_dashboard];
  114. $ds_oil = $col[ds_oil];
  115. $nm_gearbox = $col[nm_gearbox];
  116. $nm_color = $col[nm_color];
  117. $nm_incolor = $col[nm_incolor];
  118. $ds_accident = $col[ds_accident];
  119. $nm_cont_accident = $col[nm_cont_accident];
  120. $nm_regdate = $col[nm_regdate];
  121. $ds_sales = $col[ds_sales];
  122. $nm_btitle = $col[nm_btitle];
  123. $nm_stitle = $col[nm_stitle];
  124. $nm_ltitle = $col[nm_ltitle];
  125. $nm_cont = $col[nm_cont];
  126. $nm_guide = $col[nm_guide];
  127. $ds_open = $col[ds_open];
  128. $ds_status = $col[ds_status];
  129. $dt_insert = $col[dt_insert];
  130. $nm_insert = $col[nm_insert];
  131. $dt_update = $col[dt_update];
  132. $nm_update = $col[nm_update];
  133. $ds_delind = $col[ds_delind];
  134. $nm_number = $col[nm_number];
  135. $nm_cc = $col[nm_cc];
  136. $ds_trade = $col[ds_trade];
  137. $ds_main = $col[ds_main];
  138. $nm_regdate_yyyy = $col[nm_regdate_yyyy];
  139. $nm_regdate_mm = $col[nm_regdate_mm];
  140. $nm_regdate_dd = $col[nm_regdate_dd];
  141. $nm_brand = $col[nm_brand];
  142. $nm_model = $col[nm_model];
  143. $nm_model_sub = $col[nm_model_sub];
  144. $nm_grade = $col[nm_grade];
  145. $nm_year = $col[nm_year];
  146. $nm_type = $col[nm_type];
  147. $nm_open = $col[nm_open];
  148. $nm_sales = $col[nm_sales];
  149. $nm_transmission = $col[nm_transmission];
  150. $nm_oil = $col[nm_oil];
  151. $nm_usertype = $col[nm_usertype];
  152. $nm_accident = $col[nm_accident];
  153. $nm_area = $col[nm_area];
  154. $nm_area_user = $col[nm_area_user];
  155. $nm_name_sale = $col[nm_name_sale];
  156. $ds_status_sale = $col[ds_status_sale];
  157. $nm_hp_sale = $col[nm_hp_sale];
  158. $nm_email_sale = $col[nm_email_sale];
  159. $ds_area_sale = $col[ds_area_sale];
  160. $nm_recommend_sale = $col[nm_recommend_sale];
  161. $nm_cont_return_sale = $col[nm_cont_return_sale];
  162. $time_limit_tender = $col[time_limit_tender];
  163. //보험처리
  164. $nm_act_chgno = $col[nm_act_chgno];
  165. $nm_act_chgnm = $col[nm_act_chgnm];
  166. $nm_act_s1 = $col[nm_act_s1];
  167. $nm_act_s2 = $col[nm_act_s2];
  168. $nm_act_s3 = $col[nm_act_s3];
  169. $nm_act_s4 = $col[nm_act_s4];
  170. $nm_act_my = $col[nm_act_my];
  171. $nm_act_my_amt = $col[nm_act_my_amt];
  172. $nm_act_other = $col[nm_act_other];
  173. $nm_act_other_amt = $col[nm_act_other_amt];
  174. $nm_act_searchdt = $col[nm_act_searchdt];
  175. $nm_act_cnt = $col[nm_act_cnt];
  176. $nm_act_general_spec = $col[nm_act_general_spec];
  177. $nm_act_use_record = $col[nm_act_use_record];
  178. $nm_act_use_record_lend = $col[nm_act_use_record_lend];
  179. $nm_act_use_record_biz = $col[nm_act_use_record_biz];
  180. $nm_act_use_record_official = $col[nm_act_use_record_official];
  181. $nm_act_ins_loss = $col[nm_act_ins_loss];
  182. $nm_act_ins_wet = $col[nm_act_ins_wet];
  183. $nm_act_ins_robbery = $col[nm_act_ins_robbery];
  184. $nm_file_act = $col[nm_file_act];
  185. $nm_act_yn = $col[nm_act_yn];
  186. $ds_g1_01 = $col[ds_g1_01];
  187. $ds_g1_02 = $col[ds_g1_02];
  188. $ds_g1_03 = $col[ds_g1_03];
  189. $ds_g1_04 = $col[ds_g1_04];
  190. $ds_g1_05 = $col[ds_g1_05];
  191. $ds_g2_01 = $col[ds_g2_01];
  192. $ds_g2_02 = $col[ds_g2_02];
  193. $ds_g2_03 = $col[ds_g2_03];
  194. $ds_g2_04 = $col[ds_g2_04];
  195. $ds_g2_05 = $col[ds_g2_05];
  196. $ds_g3_01 = $col[ds_g3_01];
  197. $ds_g3_02 = $col[ds_g3_02];
  198. $ds_g3_03 = $col[ds_g3_03];
  199. $ds_g3_04 = $col[ds_g3_04];
  200. $ds_g3_05 = $col[ds_g3_05];
  201. $ds_g4_01 = $col[ds_g4_01];
  202. $ds_g4_02 = $col[ds_g4_02];
  203. $ds_g4_03 = $col[ds_g4_03];
  204. $ds_g4_04 = $col[ds_g4_04];
  205. $ds_g4_05 = $col[ds_g4_05];
  206. /*
  207. $arr_nm_info1 = explode("-",$nm_info1);
  208. if(count($arr_nm_info1) == 3){
  209. $nm_info11 = $arr_nm_info1[0];
  210. $nm_info12 = $arr_nm_info1[1];
  211. $nm_info13 = $arr_nm_info1[2];
  212. }else{
  213. $nm_info11 = "";
  214. $nm_info12 = "";
  215. $nm_info13 = "";
  216. }
  217. $arr_nm_info3 = explode("@",$nm_info3);
  218. if(count($arr_nm_info3) == 2){
  219. $nm_info31 = $arr_nm_info3[0];
  220. $nm_info32 = $arr_nm_info3[1];
  221. }else{
  222. $nm_info31 = "";
  223. $nm_info32 = "";
  224. }
  225. $nm_info3 = $col[nm_info3];
  226. */
  227. }else{
  228. AlertBack("지정되지않은 요청입니다");
  229. }
  230. $sql ="SELECT *
  231. FROM car_history_master mst
  232. WHERE cd_car='$cd_car' AND ds_delind='N'";
  233. $history_col=mysql_fetch_array(mysql_query($sql));
  234. $r000 = $history_col["r000"];
  235. $r001 = $history_col["r001"];
  236. $r002 = $history_col["r002"];
  237. $r004 = $history_col["r004"];
  238. $r005 = $history_col["r005"];
  239. $r101 = $history_col["r101"];
  240. $r102 = $history_col["r102"];
  241. $r103 = $history_col["r103"];
  242. $r104 = $history_col["r104"];
  243. $r105 = $history_col["r105"];
  244. $r106 = $history_col["r106"];
  245. $r107 = $history_col["r107"];
  246. $r108 = $history_col["r108"];
  247. $r109 = $history_col["r109"];
  248. $r401 = $history_col["r401"];
  249. $r402 = $history_col["r402"];
  250. $r403 = $history_col["r403"];
  251. $r404 = $history_col["r404"];
  252. $r405 = $history_col["r405"];
  253. $r406_01 = $history_col["r406_01"];
  254. $r407 = $history_col["r407"];
  255. $r408_01 = $history_col["r408_01"];
  256. $r409 = $history_col["r409"];
  257. $r410_01 = $history_col["r410_01"];
  258. $r201 = $history_col["r201"];
  259. $r202 = $history_col["r202"];
  260. $r203 = $history_col["r203"];
  261. $r204 = $history_col["r204"];
  262. $r205 = $history_col["r205"];
  263. $r510 = $history_col["r510"];
  264. $r511_01 = $history_col["r511_01"];
  265. $r501 = $history_col["r501"];
  266. $r502 = $history_col["r502"];
  267. $r301 = $history_col["r301"];
  268. $r302 = $history_col["r302"];
  269. $r303 = $history_col["r303"];
  270. $r601 = $history_col["r601"];
  271. $r602 = $history_col["r602"];
  272. ?>
  273. <h3>차량 기본정보</h3>
  274. <div class="car_model">
  275. <p><?=$col[nm_model]." ".$col[nm_model_sub]." ".$col[nm_grade]?></p>
  276. <? if($ds_status_sale == "E0" || $ds_status_sale == "F0"){ ?>
  277. <p>입찰 마감 시간 : <em><?=$time_limit_tender?></em><!--시간--></p> <? } ?>
  278. </div>
  279. <table class="tbl_h">
  280. <colgroup>
  281. <col width="32%">
  282. <col width="*">
  283. </colgroup>
  284. <tr>
  285. <th>차량번호</th>
  286. <td><?=$nm_number?></td>
  287. </tr>
  288. <tr>
  289. <th>제조사</th>
  290. <td><?=$nm_brand?></td>
  291. </tr>
  292. <tr>
  293. <th>모델</th>
  294. <td><?=$nm_model?></td>
  295. </tr>
  296. <tr>
  297. <th>세부모델</th>
  298. <td><?=$nm_model_sub?></td>
  299. </tr>
  300. <tr>
  301. <th>등급</th>
  302. <td><?=$nm_grade?></td>
  303. </tr>
  304. <tr>
  305. <th>연식(최초등록일)</th>
  306. <td><?=$nm_regdate_yyyy."년 ".$nm_regdate_mm."월"?></td>
  307. </tr>
  308. <tr>
  309. <th>형식연도</th>
  310. <td><?=$nm_year?>년</td>
  311. </tr>
  312. <tr>
  313. <th>배기량</th>
  314. <td><?=$nm_cc?>cc</td>
  315. </tr>
  316. <tr>
  317. <th>변속기</th>
  318. <td><?=$nm_transmission?></td>
  319. </tr>
  320. <tr>
  321. <th>연료</th>
  322. <td><?=$nm_oil?></td>
  323. </tr>
  324. <tr>
  325. <th>색상</th>
  326. <td><?=$nm_color?></td>
  327. </tr>
  328. <tr>
  329. <th>주행거리</th>
  330. <td><?=$nm_mileage?>km</td>
  331. </tr>
  332. <!-- <tr>
  333. <th>추천인</th>
  334. <td>없음</td>
  335. </tr>-->
  336. <tr>
  337. <th>사고유무</th>
  338. <td>
  339. <?=$nm_accident?>
  340. &nbsp;<?=$nm_cont_accident?>
  341. </td>
  342. </tr>
  343. <tr>
  344. <th>옵션</th>
  345. <td><?=$nm_cont?></td>
  346. </tr>
  347. <tr>
  348. <!-- 판매 희망지역 추가 -->
  349. <th>판매희망지역</th>
  350. <td>
  351. <?=$nm_area_user?>
  352. </td>
  353. <!-- 판매 희망지역 추가 -->
  354. </tr>
  355. <tr>
  356. <th>필수사진</th>
  357. <td>
  358. <ul class="photo_list">
  359. <li>
  360. <img data-sgallery="group1" data-full="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_front?>" data-thumb="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_front?>" src="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_front?>" title="차량전면">
  361. <span>차량전면</span>
  362. </li>
  363. <li>
  364. <img data-sgallery="group1" data-full="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_back?>" data-thumb="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_back?>" src="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_back?>" title="차량후면">
  365. <span>차량후면</span>
  366. </li>
  367. <li>
  368. <img data-sgallery="group1" data-full="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_side1?>" data-thumb="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_side1?>" src="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_side1?>" title="운전석 측면">
  369. <span>운전석 측면</span>
  370. </li>
  371. <li>
  372. <img data-sgallery="group1" data-full="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_side2?>" data-thumb="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_side2?>" src="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_side2?>" title="조수석 측면">
  373. <span>조수석 측면</span>
  374. </li>
  375. <li>
  376. <img data-sgallery="group1" data-full="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_dashboard?>" data-thumb="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_dashboard?>" src="<?=UPLOAD_PATH_CAR?>nm_file_main/ratio/<?=$nm_file_dashboard?>" title="계기판">
  377. <span>계기판</span>
  378. </li>
  379. </ul>
  380. </td>
  381. </tr>
  382. <tr>
  383. <th>추가사진</th>
  384. <td>
  385. <ul class="photo_list">
  386. <?
  387. if(!empty($col[cd_car])){
  388. $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 ");
  389. $i=1;
  390. while($imgs = mysql_fetch_array($r)) {
  391. ?>
  392. <li><img data-sgallery="group2" data-full="<?=UPLOAD_PATH_CAR?><?=$imgs[cd_car]?>_detail/<?=$imgs[nm_file]?>" data-thumb="<?=UPLOAD_PATH_CAR?><?=$imgs[cd_car]?>_detail/<?=$imgs[nm_file]?>" src="<?=UPLOAD_PATH_CAR?><?=$imgs[cd_car]?>_detail/<?=$imgs[nm_file]?>"></li>
  393. <?
  394. }
  395. }else{
  396. ?>
  397. <?
  398. }
  399. ?>
  400. <!-- <li><img src="/admin/img/@img_car.jpg"></li>
  401. <li><img src="/admin/img/@img_car.jpg"></li>
  402. <li><img src="/admin/img/@img_car.jpg"></li>-->
  403. </ul>
  404. </td>
  405. </tr>
  406. <tr>
  407. <th>담당자코멘트</th>
  408. <td><?=$nm_guide?></td>
  409. </tr>
  410. </table>
  411. <h3>사고이력정보</h3>
  412. <?/*
  413. <ul class="accident_history">
  414. <li><span>차량번호 변경</span> <em><?=$nm_act_chgno?>회</em></li>
  415. <li><span>소유자 변경</span> <em><?=$nm_act_chgnm?> 회</em></li>
  416. <li><span>자동차 보험 특수 사고</span> <em>전손 : <?=$nm_act_s1?> 회 / 침수전손 : <?=$nm_act_s2?> 회 / 침수분손 : <?=$nm_act_s3?> 회 / 도난 : <?=$nm_act_s4?> 회</em></li>
  417. <li><span>보험사고 (내차피해)</span> <em><?=$nm_act_my?> 회 (<?=$nm_act_my_amt?> 원)</em></li>
  418. <li><span>보험사고 (타차가해)</span> <em><?=$nm_act_other?>회 (<?=$nm_act_other_amt?>원)</em></li>
  419. <!--<li><span>사고이력 조회일</span> <em>2018-12-05</em></li>-->
  420. </ul>
  421. */?>
  422. <ul class="accident_history">
  423. <li><span>차량번호 변경</span> <em><?=number_format($r201)?>회</em></li>
  424. <li><span>소유자 변경</span> <em><?=number_format($r204)?> 회</em></li>
  425. <li><span>자동차 보험 특수 사고</span> <em>전손 : <?=number_format($r405)?> 회 / 침수전(분)손 : <?=number_format($r407)?> 회 / 도난 : <?=number_format($r409)?> 회</em></li>
  426. <li><span>보험사고 (내차피해)</span> <em><?=number_format($r401)?> 회 (<?=number_format($r402)?> 원)</em></li>
  427. <li><span>보험사고 (타차가해)</span> <em><?=number_format($r403)?>회 (<?=number_format($r404)?>원)</em></li>
  428. <!--<li><span>사고이력 조회일</span> <em>2018-12-05</em></li>-->
  429. </ul>
  430. <div class="btn_center">
  431. <a href="#" class="button" onclick="openLayer('car'); return false;">사고이력 정보 조회 보기</a>
  432. </div>
  433. <!-- <div class="btn_center">
  434. <a href="#" class="button">목록가기</a>
  435. </div>-->
  436. <!-- layer popup -->
  437. <div class="layer_popup car_popup">
  438. <h3>중고차 보험처리 이력정보 보고서</h3>
  439. <p class="close">레이어팝업닫기</p>
  440. <div class="scr_cont">
  441. <h4>중고차 사고이력 요약 정보</h4>
  442. <table class="tbl_data">
  443. <colgroup>
  444. <col width="44%">
  445. <col width="*">
  446. </colgroup>
  447. <tr>
  448. <th>자동차 일반사양</th>
  449. <td><?=$nm_act_general_spec?></td>
  450. </tr>
  451. <tr>
  452. <th>자동차 용도이력</th>
  453. <td><?=$nm_act_use_record?></td>
  454. </tr>
  455. <tr>
  456. <th>자동차 번호 /<br>소유자 변경횟수</th>
  457. <td><?=$nm_act_chgno?>회 / <?=$nm_act_chgnm?>회</td>
  458. </tr>
  459. <tr>
  460. <th>자동차보험 특수<br>사고이력(전손, 침수, 도난)</th>
  461. <td>전손 : <?=$nm_act_s1?>, 도난 : <?=$nm_act_s4?>, 침수<br>(전손 : <?=$nm_act_s2?>, 분손 : <?=$nm_act_s3?>)</td>
  462. </tr>
  463. <tr>
  464. <th>보험사고이력(내차 피해)</th>
  465. <td><?=$nm_act_my?>회, <?=$nm_act_my_amt?>원</td>
  466. </tr>
  467. <tr>
  468. <th>보험사고이력(타차 피해)</th>
  469. <td><<?=$nm_act_other?> 회, <?=$nm_act_other_amt?> 원</td>
  470. </tr>
  471. </table>
  472. <p class="notice01">자동차보험 사고기록이 없었다고 해서 반드시 무사고라고 할 수는 없습니다.</p>
  473. <h5>1. 자동차 용도 이력정보</h5>
  474. <table class="tbl_data">
  475. <colgroup>
  476. <col width="35%">
  477. <col width="*">
  478. </colgroup>
  479. <tr>
  480. <th>대여용도 사용이력(렌터카)</th>
  481. <td><?=$nm_act_use_record_lend?></td>
  482. </tr>
  483. <tr>
  484. <th>영업용도 사용이력</th>
  485. <td><?=$nm_act_use_record_biz?></td>
  486. </tr>
  487. <tr>
  488. <th>관용용도 사용이력</th>
  489. <td><?=$nm_act_use_record_official?></td>
  490. </tr>
  491. </table>
  492. <p class="notice02">과거 자동차번호 변경기록을 모두 검색하여 제공하는 것으로 대여용(렌트카), 영업용(택시 등)으로 사용된 적이 있는지 확인할 수 있습니다.</p>
  493. <h5>2. 자동차보험 특수 사고 이력 정보</h5>
  494. <table class="tbl_data">
  495. <colgroup>
  496. <col width="35%">
  497. <col width="*">
  498. </colgroup>
  499. <tr>
  500. <th>전손 보험사고</th>
  501. <td><?=$nm_act_ins_loss?></td>
  502. </tr>
  503. <tr>
  504. <th>침수 보험사고</th>
  505. <td><?=$nm_act_ins_wet?></td>
  506. </tr>
  507. <tr>
  508. <th>도난 보험사고</th>
  509. <td><?=$nm_act_ins_robbery?></td>
  510. </tr>
  511. </table>
  512. <h5>3. 보험사고 이력정보 : 내차 피해</h5>
  513. <table class="tbl_data2">
  514. <colgroup>
  515. <col width="20%">
  516. <col width="20%">
  517. <col width="20%">
  518. <col width="20%">
  519. <col width="20%">
  520. </colgroup>
  521. <thead>
  522. <tr>
  523. <th>사고일자</th>
  524. <th>부품</th>
  525. <th>공임</th>
  526. <th>도장</th>
  527. <th>총 수리비용</th>
  528. </tr>
  529. </thead>
  530. <tbody>
  531. <tr>
  532. <th><?=$ds_g1_01?></th>
  533. <td><?=$ds_g1_02?>원</td>
  534. <td><?=$ds_g1_03?>원</td>
  535. <td><?=$ds_g1_04?>원</td>
  536. <td><?=$ds_g1_05?>원</td>
  537. </tr>
  538. <tr>
  539. <th><?=$ds_g2_01?></th>
  540. <td><?=$ds_g2_02?>원</td>
  541. <td><?=$ds_g2_03?>원</td>
  542. <td><?=$ds_g2_04?>원</td>
  543. <td><?=$ds_g2_05?>원</td>
  544. </tr>
  545. <tr>
  546. <th><?=$ds_g3_01?></th>
  547. <td><?=$ds_g3_02?>원</td>
  548. <td><?=$ds_g3_03?>원</td>
  549. <td><?=$ds_g3_04?>원</td>
  550. <td><?=$ds_g3_05?>원</td>
  551. </tr>
  552. <tr>
  553. <th><?=$ds_g4_01?></th>
  554. <td><?=$ds_g4_02?>원</td>
  555. <td><?=$ds_g4_03?>원</td>
  556. <td><?=$ds_g4_04?>원</td>
  557. <td><?=$ds_g4_05?>원</td>
  558. </tr>
  559. </tbody>
  560. </table>
  561. <!-- <h5>4. 보험사고 이력정보 : 타차 가해</h5>
  562. <table class="tbl_data2">
  563. <colgroup>
  564. <col width="20%">
  565. <col width="20%">
  566. <col width="20%">
  567. <col width="20%">
  568. <col width="20%">
  569. </colgroup>
  570. <thead>
  571. <tr>
  572. <th>사고일자</th>
  573. <th>부품</th>
  574. <th>공임</th>
  575. <th>도장</th>
  576. <th>총 수리비용</th>
  577. </tr>
  578. </thead>
  579. <tbody>
  580. <tr>
  581. <th>2017-05-27</th>
  582. <td>857,610원</td>
  583. <td>857,610원</td>
  584. <td>857,610원</td>
  585. <td>857,610원</td>
  586. </tr>
  587. <tr>
  588. <th>2017-05-27</th>
  589. <td>857,610원</td>
  590. <td>857,610원</td>
  591. <td>857,610원</td>
  592. <td>857,610원</td>
  593. </tr>
  594. </tbody>
  595. </table>-->
  596. <ul class="notice03">
  597. <li>중고차 사고 이력정보 서비스는 자동차 보험을 취급하는 14개 손해보험사의 자동차 보험수리비 지급기록(1996년 이후)에 근거하여 제공하고 있습니다.<br>
  598. 따라서 다음과 같은 경우에는 중고차 사고 이력정보 서비스를 제공할 수 없습니다.</li>
  599. <li>
  600. <ol>
  601. <li>사고가 있었다하더라도 보험회사에 사전신고를 하지 않고 자비로 처리한 경우,<br>
  602. 사고신고를 하였더라도 면책, 취소 등의 사유로 보험금이 지급되지 않은경우,<br>
  603. 사고신고 후 자비로 처리한 경우입니다.</li>
  604. <li>사고가 있었다하더라도 종합보험, 즉 자기차량담보나 대물배상담보의 자동차 보험에 가입하지 않아서 자동차 보험으로 수리비용을 청구하지 못한 경우<br>
  605. (단, 이경우라도 타인 자동차보험에서 보상받은 경우에는 사고정보 제공가능)</li>
  606. <li>자동차보험이 아니 운수공제(택시공제, 화물공제, 버스공제 등)에 가입되어 운수공제로부터 자동차의 피해에 대한 손해를 보상받은 경우 등</li>
  607. </ol>
  608. </li>
  609. <li>본 중고차 사고이력정보는 중고차 품질확인을 위한 보조정보이며 결정적인 판단 자료로 사용되어서는 아니됩니다. 따라서 정밀한 중고차 품질확인을<br>
  610. 원하시면 차량진단 전문업체의 진단을 받아보시기 바랍니다.</li>
  611. <li>※ 보험개발원(www.kidi.or.kr)은 보험입법 제 176조에 의하여 설립된 보험요율산출기관이며,<br>
  612. 중고차사고이력정보서비스(www.carhistory.or.kr)는 보험업법시행령 제86조 제1호 근거하여 제공합니다. </li>
  613. </ul>
  614. <p class="sign"><img src="/m/img/img_sign.gif"></p>
  615. </div>
  616. </div>
  617. <!-- // layer popup -->
  618. <?
  619. // $sql ="select count(*) cnt, max(case when ".$sql_ds_type." then nm_price else 0 end) nm_price_max from tender_master where cd_sale = $cd_sale ";
  620. $sql ="select count(*) cnt
  621. , max(case when ".$sql_ds_type." then cast(nm_price as UNSIGNED) else 0 end) nm_price_max
  622. , min(cast(nm_price as UNSIGNED)) min_price
  623. , avg(cast(nm_price as UNSIGNED)) avg_price
  624. , max(cast(nm_price as UNSIGNED)) max_price
  625. from tender_master where cd_sale = $cd_sale ";
  626. // echo $sql;
  627. $col1=mysql_fetch_array(mysql_query($sql));
  628. // $col1=mysql_fetch_array(mysql_query($sql));
  629. ?>
  630. <?
  631. #유찰의 경우만 visible
  632. if($rq_ds_status == "ZE") {
  633. ?>
  634. <!-- 2020-01-23 유찰상세추가 -->
  635. <div class="price_info">
  636. <ul class="price_list">
  637. <li>최고가 : <?=number_format($col1[max_price])?>만원</li>
  638. <li>최저가 : <?=number_format($col1[min_price])?>만원</li>
  639. <li>평균 입찰금액 : <?=number_format($col1[avg_price])?>만원</li>
  640. <li>입찰자 수 : <?=$col1[cnt]?>곳</li>
  641. </ul>
  642. <ul class="ranking">
  643. <?
  644. $col2_cnt = 1;
  645. $col2_ord = 65;
  646. $sql2 =mysql_query("select nm_price
  647. ,(select nm_company from dealer_master a where a.cd_dealer = b.cd_dealer_p limit 1) as nm_company
  648. from tender_master b where cd_sale = $cd_sale
  649. order by cast(nm_price as UNSIGNED) desc limit 3");
  650. while($col2 = mysql_fetch_array($sql2)) {
  651. ?>
  652. <li><span class="rank"><?=$col2_cnt?>위</span> : <?=number_format($col2[nm_price])?>만원 / <?=chr($col2_ord)?>상사<?//$col2[nm_company]?></li>
  653. <?
  654. $col2_ord++;
  655. $col2_cnt++;
  656. }
  657. ?>
  658. <!-- <li><span class="rank">1위</span> : 3,000만원 / A상사</li>
  659. <li><span class="rank">2위</span> : 2,850만원 / B상사</li>
  660. <li><span class="rank">3위</span> : 2,500만원 / C상사</li> -->
  661. </ul>
  662. </div>
  663. <?
  664. if($col1[nm_price_max]>0) {
  665. ?>
  666. <div class="bidding_board">
  667. <p class="my_price">나의 입찰가는 <strong><?=number_format($col1[nm_price_max])?></strong>만원입니다.</p>
  668. </div>
  669. <?
  670. }
  671. ?>
  672. <!-- // 2020-01-23 유찰상세추가 -->
  673. <?
  674. }else {
  675. ?>
  676. <div class="bidding_board" <? if($col1[nm_price_max]>0) { ?> ty2<? } ?>>
  677. <dl>
  678. <dt>입찰 진행 중</dt>
  679. <dd><strong><?=$col1[cnt]?></strong>명의 딜러가 입찰하였습니다.</dd>
  680. </dl>
  681. <?
  682. if($col1[nm_price_max]>0) {
  683. ?>
  684. <p>나의 입찰가는 <strong><?=$col1[nm_price_max]?></strong>만원입니다.</p>
  685. <?
  686. }
  687. ?>
  688. </div>
  689. <?
  690. //select count(*) cnt_tender, sum(case when cd_dealer = '55' then 1 else 0 end) cnt_tender_dealer from tender_master where ds_delind ='N' and cd_sale = '73' and cd_dealer_p = '52'
  691. // $cd_tender = @mysql_result(mysql_query("select cd_tender from tender_master where ds_delind ='N' and cd_sale = '$cd_sale' and cd_dealer = '$s_cd_dealer' "),0,0);
  692. $cd_tender = mysql_fetch_array(mysql_query("select count(*) cnt_tender, sum(case when cd_dealer = '$s_cd_dealer' then 1 else 0 end) cnt_tender_dealer from tender_master where ds_delind ='N' and cd_sale = '$cd_sale' and cd_dealer_p = '$s_cd_dealer_p' "));
  693. //입찰하기 : 입찰대기건/부관리자/현재미입찰건(부관리자본인)
  694. // if($rq_ds_status == "E0" && $s_ds_type == "D1" && empty($cd_tender) && $time_limit_tender != "0분"){ //딜러-관리자
  695. //입찰하기 : 입찰대기건/부관리자/소속딜러입찰건1건이하일경우만(2건이상일경우제한)/현재미입찰건(부관리자본인)/소속총괄관리자 관리자에게 승인 받은 경우
  696. if($rq_ds_status == "E0" && $s_ds_type == "D1" && ($cd_tender[cnt_tender] < 2 && $cd_tender[cnt_tender_dealer] == 0) && $time_limit_tender != "0분" && $s_ds_status_p == "Z0"){ //딜러-관리자
  697. ?>
  698. <div class="btn_center">
  699. <a href="#" class="button" onclick="openLayer('price'); return false;">입찰하기</a>
  700. </div>
  701. <!-- layer_popup -->
  702. <div class="layer_popup price_popup">
  703. <div class="popup_wrap">
  704. <p class="msg">
  705. 내 입찰금액은<br><input type="text" class="inp_txt" style="width:100%;" name="nm_price_pop" id="nm_price_pop"><br>만원입니다.
  706. <span class="sub_txt">(※ 입력 예시 : 1500만원일 경우 1500입력, 500만원일 경우 500입력)</span>
  707. </p>
  708. <div class="btn_center">
  709. <a href="#" class="button" id="btn_write">입찰하기</a>
  710. </div>
  711. <!-- p class="msg2"><em>내 입찰금액은</em><strong>2,500</strong>만원입니다.</p>
  712. <div class="btn_center">
  713. <a href="#" class="button">확인</a>
  714. <a href="#" class="button gray" onclick="closeLayer('price'); return false;">취소</a>
  715. </div -->
  716. </div>
  717. <div class="close">레이어팝업 닫기</div>
  718. </div>
  719. <? } ?>
  720. <!-- // layer_popup -->
  721. <?
  722. //입찰금액 수정은 딱히 정해 진게 없어서 정의 후 작업
  723. /*
  724. * 딜러가 입찰한 내역이 있어야 하고
  725. * 현재 sale 상태가 입찰대기(E0)여야 하며
  726. * 수정 내역이 3번까지만 가능
  727. * 낙찰 마감일이 안지나야 가능
  728. */
  729. $cd_tender_sql = "select cd_tender, nm_modify_cnt
  730. , (select ds_status from sale_master s where s.cd_sale = t.cd_sale) as sale_ds_status
  731. from tender_master t
  732. where t.ds_delind ='N'
  733. and t.cd_sale = '$cd_sale'
  734. and t.cd_dealer_p = '$s_cd_dealer_p'
  735. limit 1";
  736. // echo $cd_tender_sql;
  737. $cd_tender = mysql_fetch_array(mysql_query($cd_tender_sql));
  738. if($rq_ds_status == "F0" && $s_ds_type == "D1" && $cd_tender[sale_ds_status] == 'E0' && !empty($cd_tender[cd_tender]) && $cd_tender[nm_modify_cnt] < 3 && $time_limit_tender != "0분" && $s_ds_status_p == "Z0"){ //딜러-관리자
  739. ?>
  740. <style>
  741. .price_popup{text-align:center;}
  742. .price_popup .msg{padding:15px 10px 0;line-height:30px;}
  743. .price_popup .msg .inp_txt{font-size:18px;color:#000;text-align:center;}
  744. .price_popup .msg strong{font-size:30px;color:#0496bb;}
  745. .price_popup .msg .sub_txt{display:block;font-size:9px;color:#b30303;}
  746. .price_popup .msg2{padding-top:20px;line-height:30px;text-align:center;}
  747. .price_popup .msg2 em{display:block;font-size:15px;}
  748. .price_popup .msg2 strong{font-size:21px;color:#0496bb;vertical-align:bottom;}
  749. .price_popup .btn_center{margin-top:10px;}
  750. .price_popup .msg2 + .btn_center{margin-top:20px;}
  751. </style>
  752. <div class="btn_center">
  753. <a href="#" class="button" onclick="openLayer('price'); return false;">가격수정</a>
  754. </div>
  755. <!-- layer_popup -->
  756. <div class="layer_popup price_popup">
  757. <div class="popup_wrap">
  758. <p class="msg">
  759. 내 입찰금액은<br><input type="text" class="inp_txt" style="width:100%;" name="mod_nm_price_pop" id="mod_nm_price_pop"><br>만원입니다.
  760. <span class="sub_txt">(※ 입력 예시 : 1500만원일 경우 1500입력, 500만원일 경우 500입력)</span>
  761. </p>
  762. <div class="btn_center">
  763. <a href="#" class="button" id="btn_mod_write">수정하기</a>
  764. </div>
  765. <!-- p class="msg2"><em>내 입찰금액은</em><strong>2,500</strong>만원입니다.</p>
  766. <div class="btn_center">
  767. <a href="#" class="button">확인</a>
  768. <a href="#" class="button gray" onclick="closeLayer('price'); return false;">취소</a>
  769. </div -->
  770. </div>
  771. <div class="close">레이어팝업 닫기</div>
  772. </div>
  773. <? } ?>
  774. <form id="frmForm" name="frmForm" method="post" action="./dealer_proc.php">
  775. <input type="hidden" name="mode" id="mode" value="Tender"/>
  776. <input type="hidden" name="cd_sale" id="cd_sale" value="<?=$cd_sale?>"/>
  777. <input type="hidden" name="nm_price" id="nm_price"/>
  778. <input type="hidden" name="ListPageNo" value="<?=$ListPageNo?>"/>
  779. </form>
  780. <script language="javascript" type="text/javascript">
  781. var ds_mode ="<?=$mode?>";
  782. $(document).ready(function() {
  783. $("#btn_write").bind("click",function(){
  784. var fieldlist = [["nm_price_pop","입찰금액"]]
  785. if (!fnCheckForm(fieldlist)){
  786. return false;
  787. }
  788. $("#nm_price").val($("#nm_price_pop").val());
  789. var c = confirm("처리하시겠습니까?");
  790. if(c){
  791. $("#frmForm").submit();
  792. }else{
  793. return false;
  794. }
  795. });
  796. $("#btn_mod_write").bind("click",function(){
  797. var fieldlist = [["mod_nm_price_pop","입찰 수정금액"]]
  798. if (!fnCheckForm(fieldlist)){
  799. return false;
  800. }
  801. $("#nm_price").val($("#mod_nm_price_pop").val());
  802. var c = confirm("처리하시겠습니까?");
  803. if(c){
  804. $("#mode").val("TenderModify");
  805. $("#frmForm").submit();
  806. }else{
  807. return false;
  808. }
  809. });
  810. });
  811. </script>
  812. <?
  813. }
  814. ?>
  815. <!-- layer popup3 -->
  816. <div class="layer_popup photo_popup">
  817. <div class="popup_wrap">
  818. <img src="/img/sell/ic_car_photo1.png" id="photoBig">
  819. </div>
  820. <div class="close" onclick="closeLayer('photo');">레이어팝업 닫기</div>
  821. </div>
  822. <!-- // layer popup3 -->
  823. </div>
  824. <script laguage="javascript" type="text/javascript">
  825. $('.photo_list li').on('click',function(){
  826. $(".SumoGallery").find('.Sbody img').panzoom({
  827. minScale: 0.7,
  828. maxScale: 3,
  829. exponential: true,
  830. // 기본적으로 패닝 끔
  831. disablePan: true
  832. }).on("panzoomzoom", function(e, panzoom, scale, opts) {
  833. // 확대/축소 동작시 패닝 켬
  834. panzoom.options.disablePan = false;
  835. }).on("panzoomend", function(e, panzoom, matrix, changed) {
  836. // 제스처가 끝난 시점에
  837. // 1. scale이 1보다 작음
  838. // 2. 변화가 없었고 더블 탭으로 판명
  839. // 1 혹은 2번을 만족하면 리셋한다. (scale을 1로, pan을 제자리로)
  840. if (panzoom.scale <= 1 || (!changed && +new Date() - prevTapTime < 300)) {
  841. panzoom.reset();
  842. panzoom.options.disablePan = true;
  843. }
  844. prevTapTime = +new Date();
  845. }).on("panzoomend", function(e, panzoom, matrix, changed) {
  846. var rect = panzoom.$elem.find("img").get(0).getBoundingClientRect();
  847. var diffW = Math.max(rect.width - $root.width(), 0);
  848. var diffH = Math.max(rect.height - $root.height(), 0);
  849. var maxX = diffW / 2;
  850. var minX = -maxX;
  851. var maxY = diffH / 2;
  852. var minY = -maxY;
  853. var x = parseFloat(matrix[4]);
  854. var y = parseFloat(matrix[5]);
  855. // 확대된 상태에서 패닝시 이미지가 뷰포트를 벗어나지 못하게 한다.
  856. if (panzoom.scale > 1) {
  857. x = Math.max(minX, Math.min(x, maxX));
  858. y = Math.max(minY, Math.min(y, maxY));
  859. panzoom.pan(x, y, {
  860. animate: true,
  861. silent: true
  862. });
  863. }
  864. })
  865. })
  866. function viewPhoto(arg1){
  867. $("#photoBig").attr("src", arg1);
  868. openLayer('photo');
  869. return false;
  870. }
  871. </script>
  872. </section>
  873. </section>
  874. <!-- e : container -->
  875. <!-- s : footer -->
  876. <? include("../inc/inc_footer.html"); ?>
  877. <!-- // e : footer -->
  878. <script type="text/javascript" charset="utf-8" src="/m/js/jquery.sumogallery.js"></script>
  879. </body>
  880. </html>
  881. <?
  882. mysql_close($connect);
  883. ?>