sell_view_nomember_24_96_hour_20190419.php 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. // include $_SERVER['DOCUMENT_ROOT'].'/common/auth_chk.php';
  4. ?>
  5. <? include("../include/inc_top.php") ?>
  6. <? include("../include/inc_header.php") ?>
  7. <section id="wrap">
  8. <section id="visual" class="visual_sell">
  9. <h2>내차팔기</h2>
  10. <p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
  11. </section>
  12. <section id="content">
  13. <ul class="location">
  14. <li><a href="/" class="home">홈</a></li>
  15. <li><span class="depth1">내차팔기</span></li>
  16. <li><span class="depth2">차량정보</span></li>
  17. </ul>
  18. <?
  19. $mode = $_REQUEST["mode"];
  20. $p_nm_name = $_REQUEST["nm_name"];
  21. $p_nm_hp = $_REQUEST["nm_hp"];
  22. $p_nm_number = $_REQUEST["nm_number"];
  23. $sql ="SELECT
  24. a.*
  25. , b.nm_model
  26. , c.nm_grade
  27. , d.nm_brand
  28. , e.nm_model_sub
  29. , getCode('car_master','ds_type',a.ds_type) as nm_type
  30. , getCode('car_master','ds_year',a.ds_year) as nm_year
  31. , getCode('car_master','ds_open',a.ds_open) as nm_open
  32. , getCode('car_master','ds_sales',a.ds_sales) as nm_sales
  33. , getCode('car_master','ds_transmission',a.ds_transmission) as nm_transmission
  34. , getCode('car_master','ds_oil',a.ds_oil) as nm_oil
  35. , getCode('car_master','ds_accident',a.ds_accident) as nm_accident
  36. , getCode('sale_master','ds_usertype',s.ds_usertype) as nm_usertype
  37. , getCode('sale_master','ds_area',s.ds_area) as nm_area
  38. , getCode('sale_master','ds_status',s.ds_status) as nm_status
  39. , s.cd_sale
  40. , s.nm_name nm_name_sale
  41. , s.ds_status ds_status_sale
  42. , s.nm_hp nm_hp_sale
  43. , s.nm_email nm_email_sale
  44. , s.ds_area ds_area_sale
  45. , s.nm_recommend nm_recommend_sale
  46. , s.nm_cont_return nm_cont_return_sale
  47. , getRemainTime(".LIMIT_TIME_SELL.", s.dt_approve, now()) as time_limit_sell
  48. FROM sale_master s
  49. inner join car_master a
  50. on (s.cd_car = a.cd_car)
  51. left outer join car_model b
  52. on (a.cd_model = b.cd_model)
  53. left outer join car_grade c
  54. on (a.cd_grade = c.cd_grade)
  55. left outer join car_brand d
  56. on (a.cd_brand = d.cd_brand)
  57. left outer join car_model_sub e
  58. on (a.cd_model_sub = e.cd_model_sub)
  59. WHERE s.nm_name='$nm_name'
  60. and s.nm_hp='$nm_hp'
  61. and a.nm_number='$nm_number'
  62. and s.ds_delind = 'N'
  63. and s.ds_status in ('B0','C0','D0','E0','F0','Z0','ZS')
  64. ORDER BY s.cd_sale desc LIMIT 0,1
  65. ";
  66. $col=mysql_fetch_array(mysql_query($sql));
  67. if (!empty($col[cd_car])){
  68. $cd_sale = $col[cd_sale];
  69. $cd_car = $col[cd_car];
  70. $cd_model = $col[cd_model];
  71. $cd_brand = $col[cd_brand];
  72. $ds_logo = $col[ds_logo];
  73. $cd_category = $col[cd_category];
  74. $cd_grade = $col[cd_grade];
  75. $ds_cate = $col[ds_cate];
  76. $ds_type = $col[ds_type];
  77. $ds_year = $col[ds_year];
  78. $nm_name = $col[nm_name];
  79. $nm_price = $col[nm_price];
  80. $nm_mileage = $col[nm_mileage];
  81. $ds_driving_system = $col[ds_driving_system];
  82. $ds_transmission = $col[ds_transmission];
  83. $nm_file_list = $col[nm_file_list];
  84. $nm_file_main = $col[nm_file_main];
  85. $nm_file_report = $col[nm_file_report];
  86. $nm_file_report_back = $col[nm_file_report_back];
  87. $nm_file_front = $col[nm_file_front];
  88. $nm_file_back = $col[nm_file_back];
  89. $nm_file_side1 = $col[nm_file_side1];
  90. $nm_file_side2 = $col[nm_file_side2];
  91. $nm_file_dashboard = $col[nm_file_dashboard];
  92. $ds_oil = $col[ds_oil];
  93. $nm_gearbox = $col[nm_gearbox];
  94. $nm_color = $col[nm_color];
  95. $nm_incolor = $col[nm_incolor];
  96. $ds_accident = $col[ds_accident];
  97. $nm_cont_accident = $col[nm_cont_accident];
  98. $nm_regdate = $col[nm_regdate];
  99. $ds_sales = $col[ds_sales];
  100. $nm_btitle = $col[nm_btitle];
  101. $nm_stitle = $col[nm_stitle];
  102. $nm_ltitle = $col[nm_ltitle];
  103. $nm_cont = $col[nm_cont];
  104. $nm_guide = $col[nm_guide];
  105. $ds_open = $col[ds_open];
  106. $ds_status = $col[ds_status];
  107. $dt_insert = $col[dt_insert];
  108. $nm_insert = $col[nm_insert];
  109. $dt_update = $col[dt_update];
  110. $nm_update = $col[nm_update];
  111. $ds_delind = $col[ds_delind];
  112. $nm_number = $col[nm_number];
  113. $nm_cc = $col[nm_cc];
  114. $ds_trade = $col[ds_trade];
  115. $ds_main = $col[ds_main];
  116. $nm_regdate_yyyy = $col[nm_regdate_yyyy];
  117. $nm_regdate_mm = $col[nm_regdate_mm];
  118. $nm_regdate_dd = $col[nm_regdate_dd];
  119. $nm_brand = $col[nm_brand];
  120. $nm_model = $col[nm_model];
  121. $nm_model_sub = $col[nm_model_sub];
  122. $nm_grade = $col[nm_grade];
  123. $nm_year = $col[nm_year];
  124. $nm_type = $col[nm_type];
  125. $nm_open = $col[nm_open];
  126. $nm_sales = $col[nm_sales];
  127. $nm_transmission = $col[nm_transmission];
  128. $nm_oil = $col[nm_oil];
  129. $nm_usertype = $col[nm_usertype];
  130. $nm_accident = $col[nm_accident];
  131. $nm_area = $col[nm_area];
  132. $nm_name_sale = $col[nm_name_sale];
  133. $ds_status_sale = $col[ds_status_sale];
  134. $nm_hp_sale = $col[nm_hp_sale];
  135. $nm_email_sale = $col[nm_email_sale];
  136. $ds_area_sale = $col[ds_area_sale];
  137. $nm_recommend_sale = $col[nm_recommend_sale];
  138. $nm_cont_return_sale = $col[nm_cont_return_sale];
  139. $time_limit_sell = $col[time_limit_sell];
  140. //보험처리
  141. $nm_act_chgno = $col[nm_act_chgno];
  142. $nm_act_chgnm = $col[nm_act_chgnm];
  143. $nm_act_s1 = $col[nm_act_s1];
  144. $nm_act_s2 = $col[nm_act_s2];
  145. $nm_act_s3 = $col[nm_act_s3];
  146. $nm_act_s4 = $col[nm_act_s4];
  147. $nm_act_my = $col[nm_act_my];
  148. $nm_act_my_amt = $col[nm_act_my_amt];
  149. $nm_act_other = $col[nm_act_other];
  150. $nm_act_other_amt = $col[nm_act_other_amt];
  151. $nm_act_searchdt = $col[nm_act_searchdt];
  152. $nm_act_cnt = $col[nm_act_cnt];
  153. $nm_act_general_spec = $col[nm_act_general_spec];
  154. $nm_act_use_record = $col[nm_act_use_record];
  155. $nm_act_use_record_lend = $col[nm_act_use_record_lend];
  156. $nm_act_use_record_biz = $col[nm_act_use_record_biz];
  157. $nm_act_use_record_official = $col[nm_act_use_record_official];
  158. $nm_act_ins_loss = $col[nm_act_ins_loss];
  159. $nm_act_ins_wet = $col[nm_act_ins_wet];
  160. $nm_act_ins_robbery = $col[nm_act_ins_robbery];
  161. $nm_file_act = $col[nm_file_act];
  162. $nm_act_yn = $col[nm_act_yn];
  163. $ds_g1_01 = $col[ds_g1_01];
  164. $ds_g1_02 = $col[ds_g1_02];
  165. $ds_g1_03 = $col[ds_g1_03];
  166. $ds_g1_04 = $col[ds_g1_04];
  167. $ds_g1_05 = $col[ds_g1_05];
  168. $ds_g2_01 = $col[ds_g2_01];
  169. $ds_g2_02 = $col[ds_g2_02];
  170. $ds_g2_03 = $col[ds_g2_03];
  171. $ds_g2_04 = $col[ds_g2_04];
  172. $ds_g2_05 = $col[ds_g2_05];
  173. $ds_g3_01 = $col[ds_g3_01];
  174. $ds_g3_02 = $col[ds_g3_02];
  175. $ds_g3_03 = $col[ds_g3_03];
  176. $ds_g3_04 = $col[ds_g3_04];
  177. $ds_g3_05 = $col[ds_g3_05];
  178. $ds_g4_01 = $col[ds_g4_01];
  179. $ds_g4_02 = $col[ds_g4_02];
  180. $ds_g4_03 = $col[ds_g4_03];
  181. $ds_g4_04 = $col[ds_g4_04];
  182. $ds_g4_05 = $col[ds_g4_05];
  183. /*
  184. $arr_nm_info1 = explode("-",$nm_info1);
  185. if(count($arr_nm_info1) == 3){
  186. $nm_info11 = $arr_nm_info1[0];
  187. $nm_info12 = $arr_nm_info1[1];
  188. $nm_info13 = $arr_nm_info1[2];
  189. }else{
  190. $nm_info11 = "";
  191. $nm_info12 = "";
  192. $nm_info13 = "";
  193. }
  194. $arr_nm_info3 = explode("@",$nm_info3);
  195. if(count($arr_nm_info3) == 2){
  196. $nm_info31 = $arr_nm_info3[0];
  197. $nm_info32 = $arr_nm_info3[1];
  198. }else{
  199. $nm_info31 = "";
  200. $nm_info32 = "";
  201. }
  202. $nm_info3 = $col[nm_info3];
  203. */
  204. }else{
  205. AlertBack("진행중인 차량 정보가 존재하지 않습니다.");
  206. }
  207. ?>
  208. <h3>차량기본정보</h3>
  209. <div class="car_model">
  210. <p class="fl"><?=$nm_brand." ".$nm_model." ".$nm_model_sub." ".$nm_grade?></p>
  211. <? if($ds_status_sale == "E0" || $ds_status_sale == "F0"){ ?>
  212. <p class="fr">입찰 마감 시간 : <em><?=$time_limit_sell?></em></p>
  213. <? } ?>
  214. </div>
  215. <table class="tbl_h">
  216. <colgroup>
  217. <col width="16%">
  218. <col width="34%">
  219. <col width="16%">
  220. <col width="*">
  221. </colgroup>
  222. <tr>
  223. <th>차량번호</th>
  224. <td><?=$nm_number?></td>
  225. <th>제조사</th>
  226. <td><?=$nm_brand?></td>
  227. </tr>
  228. <tr>
  229. <th>모델</th>
  230. <td><?=$nm_model?></td>
  231. <th>세부모델</th>
  232. <td><?=$nm_model_sub?></td>
  233. </tr>
  234. <tr>
  235. <th>등급</th>
  236. <td><?=$nm_grade?></td>
  237. <th>연식(최초등록일)</th>
  238. <td><?=$nm_regdate_yyyy."년 ".$nm_regdate_mm."월"?></td>
  239. </tr>
  240. <tr>
  241. <th>형식연도</th>
  242. <td><?=$nm_year?>년</td>
  243. <th>배기량</th>
  244. <td><?=$nm_cc?>cc</td>
  245. </tr>
  246. <tr>
  247. <th>변속기</th>
  248. <td><?=$nm_transmission?></td>
  249. <th>연료</th>
  250. <td><?=$nm_oil?></td>
  251. </tr>
  252. <tr>
  253. <th>색상</th>
  254. <td><?=$nm_color?></td>
  255. <th>주행거리</th>
  256. <td><?=$nm_mileage?>km</td>
  257. </tr>
  258. <tr>
  259. <th>사고유무</th>
  260. <td><?=$nm_accident?><?=($ds_accident == "A0") ? " - ".$nm_cont_accident : "" ?></td>
  261. <th>추천인</th>
  262. <td><?= ($nm_recommend_sale == "") ? "없음":$nm_recommend_sale ?></td>
  263. </tr>
  264. <tr>
  265. <th>옵션</th>
  266. <td colspan="3"><?=$nm_cont?></td>
  267. </tr>
  268. <tr>
  269. <th>필수사진</th>
  270. <td colspan="3">
  271. <ul class="photo_list">
  272. <li>
  273. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_front?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_front?>')">
  274. <span>차량전면</span>
  275. </li>
  276. <li>
  277. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_back?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_back?>')">
  278. <span>차량후면</span>
  279. </li>
  280. <li>
  281. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side1?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side1?>')">
  282. <span>운전석 측면</span>
  283. </li>
  284. <li>
  285. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side2?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side2?>')">
  286. <span>조수석 측면</span>
  287. </li>
  288. <li>
  289. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_dashboard?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_dashboard?>')">
  290. <span>계기판</span>
  291. </li>
  292. </ul>
  293. </td>
  294. </tr>
  295. <tr>
  296. <th>추가사진</th>
  297. <td colspan="3">
  298. <ul class="photo_list">
  299. <?
  300. if(!empty($col[cd_car])){
  301. $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 ");
  302. $i=1;
  303. while($imgs = mysql_fetch_array($r)) {
  304. ?>
  305. <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>
  306. <?
  307. }
  308. }else{
  309. ?>
  310. <?
  311. }
  312. ?>
  313. </ul>
  314. </td>
  315. </tr>
  316. </table>
  317. <div class="btn_right">
  318. <?
  319. if($ds_status_sale == "A0" || $ds_status_sale == "B0" || $ds_status_sale == "C0" || $ds_status_sale == "D0"){ //ds_status_sale=A0,B0,C0,D0 입력중,입력완료,승인대기,반려
  320. ?>
  321. <a href="#" class="button gray" id="btn_update">수정하기</a>
  322. <?
  323. }
  324. ?>
  325. <!--a href="./sell_list.php?PageNo=<?=$ListPageNo?>" class="button">목록가기</a-->
  326. </div>
  327. <h3>사고이력정보</h3>
  328. <table class="tbl_h">
  329. <colgroup>
  330. <col width="16%">
  331. <col width="*">
  332. </colgroup>
  333. <tr>
  334. <th>차량번호 변경</th>
  335. <td><?=$nm_act_chgno?> 회</td>
  336. </tr>
  337. <tr>
  338. <th>소유자 변경</th>
  339. <td><?=$nm_act_chgnm?> 회</td>
  340. </tr>
  341. <tr>
  342. <th>자동차 보험 특수 사고</th>
  343. <td>전손 : <?=$nm_act_s1?>회 / 침수전손 : <?=$nm_act_s2?>회 / 침수분손 : <?=$nm_act_s3?>회 / 도난 : <?=$nm_act_s4?>회</td>
  344. </tr>
  345. <tr>
  346. <th>보험사고 (내차피해)</th>
  347. <td><?=$nm_act_my?> 회(<?=$nm_act_my_amt?> 원)</td>
  348. </tr>
  349. <tr>
  350. <th>보험사고 (타차가해)</th>
  351. <td><?=$nm_act_other?> 회(<?=$nm_act_other_amt?> 원)</td>
  352. </tr>
  353. <!--tr>
  354. <th>사고이력 조회일</th>
  355. <td>2018-12-05 </td>
  356. </tr-->
  357. </table>
  358. <div class="btn_right">
  359. <a href="#" class="button" onclick="openLayer('car'); return false;">사고이력 정보 조회 보기</a>
  360. </div>
  361. <?
  362. // $cd_sale = $_REQUEST["cd_sale"];
  363. $PageNo = $_REQUEST['pageno'];
  364. $PageSize = $_REQUEST['PageSize'];
  365. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  366. if (empty($PageSize)) {
  367. $PageSize=10; //목록개수설정
  368. }else{$PageSize=$PageSize;}
  369. $pagestartpoint=($PageNo-1)*$PageSize;
  370. $OrderBy = $_REQUEST['OrderBy'];
  371. if ($OrderBy == "") $OrderBy = "cast(t.nm_price as unsigned) desc, t.cd_tender desc ";
  372. $sOrderBy = "ORDER BY ".$OrderBy;
  373. //$sql = "where ds_delind='N'";
  374. $sql = "";
  375. $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);
  376. ?>
  377. <h3>입찰리스트</h3>
  378. <table class="tbl_v">
  379. <colgroup>
  380. <col width="7%">
  381. <col width="*">
  382. <col width="12%">
  383. <col width="15%">
  384. <!--col width="13%"-->
  385. <col width="15%">
  386. <col width="15%">
  387. </colgroup>
  388. <thead>
  389. <tr>
  390. <th>번호</th>
  391. <th>입찰업체</th>
  392. <th>입찰금액</th>
  393. <th>입찰일</th>
  394. <!--th>연락처</th-->
  395. <th>업체정보</th>
  396. <th>상태</th>
  397. </tr>
  398. </thead>
  399. <tbody>
  400. <?
  401. if($totalrows>0) {
  402. $r = mysql_query("SELECT t.*, d.nm_company nm_company_dealer, d.nm_name nm_name_dealer, s.ds_status ds_status_sale, 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");
  403. $i=1;
  404. while($col = mysql_fetch_array($r)) {
  405. ?>
  406. <tr>
  407. <td><?=$i?></td>
  408. <td><?=$col[nm_company_dealer]?> / <?=$col[nm_name_dealer1]?></td>
  409. <td><?=$col[nm_price]?> 만원</td>
  410. <td><?=$col[dt_insert]?></td>
  411. <!--td><?//=$col[nm_hp]?></td-->
  412. <td><a href="#" class="link" onclick="openPostScript('<?=$col[cd_dealer_p]?>','<?=$col[cd_tender]?>'); return false;">후기 보기</a></td>
  413. <td>
  414. <?
  415. if($col[ds_status_sale] == "Z0"){
  416. ?>
  417. <?= ($col[ds_status] == "Z0") ? "낙찰" : "낙첨" ?>
  418. <?
  419. }else if($col[ds_status_sale] == "ZS"){
  420. ?>
  421. <?= ($col[ds_status] == "Z0") ? "구매확정" : "낙첨" ?>
  422. <?
  423. }else{
  424. ?>
  425. <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>
  426. <?
  427. }
  428. ?>
  429. </td>
  430. </tr>
  431. <?
  432. $i++;
  433. }
  434. }else{
  435. ?>
  436. <tr>
  437. <td colspan="7">데이터가 존재 하지 않습니다.</td>
  438. </tr>
  439. <?
  440. }
  441. ?>
  442. </tbody>
  443. </table>
  444. <div class="paging">
  445. <?
  446. $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";
  447. // ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  448. ?>
  449. </div>
  450. <!-- Postscript -->
  451. <?
  452. if ($ds_status_sale == "ZS"){
  453. $sql = "SELECT
  454. t.*
  455. , d.nm_name nm_name_dealer_p
  456. , d.nm_zip nm_zip_dealer_p
  457. , d.nm_addr nm_addr_dealer_p
  458. , d.nm_addr_sub nm_addr_sub_dealer_p
  459. , d.nm_area nm_area_dealer_p
  460. , p.nm_name nm_name_dealer
  461. , p.nm_hp_01+'-'+p.nm_hp_02+'-'+p.nm_hp_03 nm_hp_dealer
  462. , p.nm_file nm_file_dealer
  463. , report.cd_dealer_p_min
  464. , report.cd_dealer_p_max
  465. , report.nm_price_min
  466. , report.nm_price_max
  467. , report.nm_price_avg
  468. , report.nm_name_min
  469. , report.nm_name_max
  470. , report.cnt
  471. , s.nm_price_final
  472. , s.nm_score_postscript
  473. , s.nm_cont_postscript
  474. FROM tender_master t
  475. inner join dealer_master d
  476. on (t.cd_dealer_p = d.cd_dealer
  477. and t.cd_sale = '$cd_sale'
  478. and t.ds_delind = 'N'
  479. and t.ds_status = 'Z0'
  480. )
  481. inner join dealer_master p
  482. on (t.cd_dealer = p.cd_dealer
  483. )
  484. inner join (
  485. select
  486. ff.cd_sale
  487. , ff.cd_dealer_p_min
  488. , ff.cd_dealer_p_max
  489. , ff.nm_price_min
  490. , ff.nm_price_max
  491. , ff.nm_price_avg
  492. , ff.cnt
  493. , d1.nm_name nm_name_min
  494. , d2.nm_name nm_name_max
  495. from (
  496. select
  497. max(cc.cd_sale) cd_sale
  498. , max(cc.cd_dealer_p_min) cd_dealer_p_min
  499. , max(cc.cd_dealer_p_max) cd_dealer_p_max
  500. , max(cc.nm_price_min) nm_price_min
  501. , max(cc.nm_price_max) nm_price_max
  502. , max(cc.nm_price_avg) nm_price_avg
  503. , max(cc.cnt) cnt
  504. from (
  505. select
  506. aa.cd_sale
  507. , case when aa.nm_price = bb.nm_price_min then aa.cd_dealer_p else 0 end cd_dealer_p_min
  508. , case when aa.nm_price = bb.nm_price_max then aa.cd_dealer_p else 0 end cd_dealer_p_max
  509. , bb.nm_price_min
  510. , bb.nm_price_max
  511. , bb.nm_price_avg
  512. , bb.cnt
  513. from (select * from tender_master where cd_sale = '$cd_sale' and ds_delind = 'N') aa
  514. , (
  515. select
  516. min(nm_price) nm_price_min
  517. , max(nm_price) nm_price_max
  518. , avg(nm_price) nm_price_avg
  519. , count(*) cnt
  520. from tender_master
  521. where cd_sale = '$cd_sale' and ds_delind = 'N'
  522. ) bb
  523. ) cc
  524. ) ff
  525. inner join dealer_master d1
  526. on (ff.cd_dealer_p_min = d1.cd_dealer)
  527. inner join dealer_master d2
  528. on (ff.cd_dealer_p_max = d2.cd_dealer)
  529. ) report
  530. on (t.cd_sale = report.cd_sale
  531. )
  532. inner join sale_master s
  533. on (t.cd_sale = s.cd_sale
  534. )
  535. ";
  536. $col=mysql_fetch_array(mysql_query($sql));
  537. if (!empty($col[cd_sale])){
  538. $cd_sale = $col[cd_sale];
  539. $nm_price = $col[nm_price];
  540. $nm_name_dealer_p = $col[nm_name_dealer_p];
  541. $nm_zip_dealer_p = $col[nm_zip_dealer_p];
  542. $nm_addr_dealer_p = $col[nm_addr_dealer_p];
  543. $nm_addr_sub_dealer_p = $col[nm_addr_sub_dealer_p];
  544. $nm_area_dealer_p = $col[nm_area_dealer_p];
  545. $nm_name_dealer = $col[nm_name_dealer];
  546. $nm_hp_dealer = $col[nm_hp_dealer];
  547. $nm_file_dealer = $col[nm_file_dealer];
  548. $cd_dealer_p_min = $col[cd_dealer_p_min];
  549. $cd_dealer_p_max = $col[cd_dealer_p_max];
  550. $nm_price_min = $col[nm_price_min];
  551. $nm_price_max = $col[nm_price_max];
  552. $nm_price_avg = $col[nm_price_avg];
  553. $nm_name_min = $col[nm_name_min];
  554. $nm_name_max = $col[nm_name_max];
  555. $cnt = $col[cnt];
  556. $nm_price_final = $col[nm_price_final];
  557. $nm_score_postscript = $col[nm_score_postscript];
  558. $nm_cont_postscript = $col[nm_cont_postscript];
  559. /*
  560. $arr_nm_info1 = explode("-",$nm_info1);
  561. if(count($arr_nm_info1) == 3){
  562. $nm_info11 = $arr_nm_info1[0];
  563. $nm_info12 = $arr_nm_info1[1];
  564. $nm_info13 = $arr_nm_info1[2];
  565. }else{
  566. $nm_info11 = "";
  567. $nm_info12 = "";
  568. $nm_info13 = "";
  569. }
  570. $arr_nm_info3 = explode("@",$nm_info3);
  571. if(count($arr_nm_info3) == 2){
  572. $nm_info31 = $arr_nm_info3[0];
  573. $nm_info32 = $arr_nm_info3[1];
  574. }else{
  575. $nm_info31 = "";
  576. $nm_info32 = "";
  577. }
  578. $nm_info3 = $col[nm_info3];
  579. */
  580. }else{
  581. // AlertBack("지정되지않은 요청입니다");
  582. }
  583. ?>
  584. <h3>낙찰업체</h3>
  585. <div class="tender_business">
  586. <dl class="info">
  587. <dt><?=$nm_name_dealer_p?></dt>
  588. <dd class="thumb" style="background-image:url('<?=UPLOAD_PATH?>dealer/nm_file/<?=$nm_file_dealer?>');"></dd>
  589. <dd>약속드립니다.<br>정직하게 일하겠습니다.</dd>
  590. <dd class="price">
  591. <span>참여업체 : <?=$cnt?></span>
  592. <span>평균견적 : <?=$nm_price_avg?> 만원</span>
  593. <span>낙찰가 <em><?=$nm_price_final?> 만원</em></span>
  594. <!--a href="#" class="button td_btn ty2">딜러 정보 보기</a-->
  595. </dd>
  596. </dl>
  597. <form name="frmFormPostscript" id="frmFormPostscript" method="post" action="/mypage/dealer_proc.php">
  598. <input type="hidden" name="mode" id="mode" value="WritePostscriptNomember">
  599. <input type="hidden" name="cd_sale" id="cd_sale" value="<?=$cd_sale?>">
  600. <input type="hidden" name="nm_name" id="nm_name" value="<?=$p_nm_name?>">
  601. <input type="hidden" name="nm_hp" id="nm_hp" value="<?=$p_nm_hp?>">
  602. <input type="hidden" name="nm_number" id="nm_number" value="<?=$p_nm_number?>">
  603. <div class="review_write">
  604. <p class="customer_grade">
  605. <label for="customer_score">고객만족도</label>
  606. <span id="customer_score">
  607. <select name="nm_score_postscript" id="nm_score_postscript" class="select" style="width:130px;">
  608. </select>
  609. </span>
  610. <em>점</em>
  611. </p>
  612. <p><textarea cols="90" rows="8" name="nm_cont_postscript" id="nm_cont_postscript"><?=$nm_cont_postscript?></textarea></p>
  613. </div>
  614. </form>
  615. </div>
  616. <div class="btn_center">
  617. <a href="#" class="button" id="btn_write_postscript">후기쓰기</a>
  618. </div>
  619. <?
  620. }
  621. ?>
  622. <!-- // Postscript -->
  623. <!-- layer popup -->
  624. <div class="layer_popup tender_popup">
  625. <div class="popup_wrap">
  626. <p class="msg"><em id="nm_dealer_popup">고진상사</em>에게 낙찰정보를 보내시겠습니까?</p>
  627. <div class="btn_center">
  628. <a href="#" class="button" id="btn_write">확인</a>
  629. <a href="#" class="button gray" onclick="closeLayer('tender'); return false;">취소</a>
  630. </div>
  631. </div>
  632. </div>
  633. <!-- // layer popup -->
  634. <!-- layer popup -->
  635. <div class="layer_popup car_popup">
  636. <h3>중고차 보험처리 이력정보 보고서</h3>
  637. <p class="close">레이어팝업닫기</p>
  638. <div class="scr_cont">
  639. <h4>중고차 사고이력 요약 정보</h4>
  640. <table class="tbl_data">
  641. <colgroup>
  642. <col width="35%">
  643. <col width="*">
  644. </colgroup>
  645. <tr>
  646. <th>자동차 일반사양</th>
  647. <td><?=$nm_act_general_spec?></td>
  648. </tr>
  649. <tr>
  650. <th>자동차 용도이력</th>
  651. <td><?=$nm_act_use_record?></td>
  652. </tr>
  653. <tr>
  654. <th>자동차 번호 / 소유자 변경횟수</th>
  655. <td><?=$nm_act_chgno?> 회 / <?=$nm_act_chgnm?> 회</td>
  656. </tr>
  657. <tr>
  658. <th>자동차보험 특수 사고이력(전손, 침수, 도난)</th>
  659. <td>전손 : <?=$nm_act_s1?>, 도난 : <?=$nm_act_s4?>, 침수(전손 : <?=$nm_act_s2?>, 분손 : <?=$nm_act_s3?>)</td>
  660. </tr>
  661. <tr>
  662. <th>보험사고이력(내차 피해)</th>
  663. <td><?=$nm_act_my?> 회, <?=$nm_act_my_amt?> 원</td>
  664. </tr>
  665. <tr>
  666. <th>보험사고이력(타차 피해)</th>
  667. <td><?=$nm_act_other?> 회, <?=$nm_act_other_amt?> 원</td>
  668. </tr>
  669. </table>
  670. <p class="notice01">자동차보험 사고기록이 없었다고 해서 반드시 무사고라고 할 수는 없습니다.</p>
  671. <h5>1. 자동차 용도 이력정보</h5>
  672. <table class="tbl_data">
  673. <colgroup>
  674. <col width="35%">
  675. <col width="*">
  676. </colgroup>
  677. <tr>
  678. <th>대여용도 사용이력(렌터카)</th>
  679. <td><?=$nm_act_use_record_lend?></td>
  680. </tr>
  681. <tr>
  682. <th>영업용도 사용이력</th>
  683. <td><?=$nm_act_use_record_biz?></td>
  684. </tr>
  685. <tr>
  686. <th>관용용도 사용이력</th>
  687. <td><?=$nm_act_use_record_official?></td>
  688. </tr>
  689. </table>
  690. <p class="notice02">과거 자동차번호 변경기록을 모두 검색하여 제공하는 것으로 대여용(렌트카), 영업용(택시 등)으로 사용된 적이 있는지 확인할 수 있습니다.</p>
  691. <h5>2. 자동차보험 특수 사고 이력 정보</h5>
  692. <table class="tbl_data">
  693. <colgroup>
  694. <col width="35%">
  695. <col width="*">
  696. </colgroup>
  697. <tr>
  698. <th>전손 보험사고</th>
  699. <td><?=$nm_act_ins_loss?></td>
  700. </tr>
  701. <tr>
  702. <th>침수 보험사고</th>
  703. <td><?=$nm_act_ins_wet?></td>
  704. </tr>
  705. <tr>
  706. <th>도난 보험사고</th>
  707. <td><?=$nm_act_ins_robbery?></td>
  708. </tr>
  709. </table>
  710. <h5>3. 보험사고 이력정보 : 내차 피해</h5>
  711. <table class="tbl_data2">
  712. <colgroup>
  713. <col width="20%">
  714. <col width="20%">
  715. <col width="20%">
  716. <col width="20%">
  717. <col width="20%">
  718. </colgroup>
  719. <thead>
  720. <tr>
  721. <th>사고일자</th>
  722. <th>부품</th>
  723. <th>공임</th>
  724. <th>도장</th>
  725. <th>총 수리비용</th>
  726. </tr>
  727. </thead>
  728. <tbody>
  729. <tr>
  730. <th><?=$ds_g1_01?></th>
  731. <td><?=$ds_g1_02?>원</td>
  732. <td><?=$ds_g1_03?>원</td>
  733. <td><?=$ds_g1_04?>원</td>
  734. <td><?=$ds_g1_05?>원</td>
  735. </tr>
  736. <tr>
  737. <th><?=$ds_g2_01?></th>
  738. <td><?=$ds_g2_02?>원</td>
  739. <td><?=$ds_g2_03?>원</td>
  740. <td><?=$ds_g2_04?>원</td>
  741. <td><?=$ds_g2_05?>원</td>
  742. </tr>
  743. <tr>
  744. <th><?=$ds_g3_01?></th>
  745. <td><?=$ds_g3_02?>원</td>
  746. <td><?=$ds_g3_03?>원</td>
  747. <td><?=$ds_g3_04?>원</td>
  748. <td><?=$ds_g3_05?>원</td>
  749. </tr>
  750. <tr>
  751. <th><?=$ds_g4_01?></th>
  752. <td><?=$ds_g4_02?>원</td>
  753. <td><?=$ds_g4_03?>원</td>
  754. <td><?=$ds_g4_04?>원</td>
  755. <td><?=$ds_g4_05?>원</td>
  756. </tr>
  757. </tbody>
  758. </table>
  759. <!--h5>4. 보험사고 이력정보 : 타차 가해</h5>
  760. <table class="tbl_data2">
  761. <colgroup>
  762. <col width="20%">
  763. <col width="20%">
  764. <col width="20%">
  765. <col width="20%">
  766. <col width="20%">
  767. </colgroup>
  768. <thead>
  769. <tr>
  770. <th>사고일자</th>
  771. <th>부품</th>
  772. <th>공임</th>
  773. <th>도장</th>
  774. <th>총 수리비용</th>
  775. </tr>
  776. </thead>
  777. <tbody>
  778. <tr>
  779. <th>2017-05-27</th>
  780. <td>857,610원</td>
  781. <td>857,610원</td>
  782. <td>857,610원</td>
  783. <td>857,610원</td>
  784. </tr>
  785. <tr>
  786. <th>2017-05-27</th>
  787. <td>857,610원</td>
  788. <td>857,610원</td>
  789. <td>857,610원</td>
  790. <td>857,610원</td>
  791. </tr>
  792. </tbody>
  793. </table>
  794. <ul class="notice03">
  795. <li>중고차 사고 이력정보 서비스는 자동차 보험을 취급하는 14개 손해보험사의 자동차 보험수리비 지급기록(1996년 이후)에 근거하여 제공하고 있습니다.<br>
  796. 따라서 다음과 같은 경우에는 중고차 사고 이력정보 서비스를 제공할 수 없습니다.</li>
  797. <li>
  798. <ol>
  799. <li>사고가 있었다하더라도 보험회사에 사전신고를 하지 않고 자비로 처리한 경우,<br>
  800. 사고신고를 하였더라도 면책, 취소 등의 사유로 보험금이 지급되지 않은경우,<br>
  801. 사고신고 후 자비로 처리한 경우입니다.</li>
  802. <li>사고가 있었다하더라도 종합보험, 즉 자기차량담보나 대물배상담보의 자동차 보험에 가입하지 않아서 자동차 보험으로 수리비용을 청구하지 못한 경우<br>
  803. (단, 이경우라도 타인 자동차보험에서 보상받은 경우에는 사고정보 제공가능)</li>
  804. <li>자동차보험이 아니 운수공제(택시공제, 화물공제, 버스공제 등)에 가입되어 운수공제로부터 자동차의 피해에 대한 손해를 보상받은 경우 등</li>
  805. </ol>
  806. </li>
  807. <li>본 중고차 사고이력정보는 중고차 품질확인을 위한 보조정보이며 결정적인 판단 자료로 사용되어서는 아니됩니다. 따라서 정밀한 중고차 품질확인을<br>
  808. 원하시면 차량진단 전문업체의 진단을 받아보시기 바랍니다.</li>
  809. <li>※ 보험개발원(www.kidi.or.kr)은 보험입법 제 176조에 의하여 설립된 보험요율산출기관이며,<br>
  810. 중고차사고이력정보서비스(www.carhistory.or.kr)는 보험업법시행령 제86조 제1호 근거하여 제공합니다. </li>
  811. </ul>
  812. <p class="sign"><img src="/img/img_sign.gif"></p-->
  813. </div>
  814. </div>
  815. <!-- // layer popup -->
  816. <!-- layer popup3 -->
  817. <div class="layer_popup photo_popup">
  818. <div class="popup_wrap">
  819. <img src="/img/sell/ic_car_photo1.png" id="photoBig">
  820. <!-- div class="btn_center">
  821. <a href="#" class="button gray" onclick="closeLayer('photo'); return false;">확인</a>
  822. </div -->
  823. </div>
  824. <div class="close" onclick="closeLayer('photo');">레이어팝업 닫기</div>
  825. </div>
  826. <!-- // layer popup3 -->
  827. <?
  828. if($ds_status_sale == "D0"){ //ds_status_sale=D0
  829. ?>
  830. <!-- layer_popup -->
  831. <div class="layer_popup return_popup">
  832. <div class="popup_wrap">
  833. <p class="msg">
  834. <?=$nm_cont_return_sale?>
  835. </p>
  836. <div class="btn_center">
  837. <a href="#" class="button" id="btn_update_return">차량정보 수정</a>
  838. </div>
  839. </div>
  840. <div class="close">레이어팝업 닫기</div>
  841. </div>
  842. <!-- // layer_popup -->
  843. <script type="text/javascript">
  844. openLayer('return');
  845. </script>
  846. <?
  847. }
  848. ?>
  849. </section>
  850. </section>
  851. <form name="frmForm" id="frmForm" method="post" action="/mypage/dealer_proc.php">
  852. <input type="hidden" name="mode" id="mode" value="TenderSuccessNomember">
  853. <input type="hidden" name="cd_sale" id="cd_sale" value="<?=$cd_sale?>">
  854. <input type="hidden" name="cd_tender" id="cd_tender">
  855. <input type="hidden" name="nm_price" id="nm_price">
  856. <input type="hidden" name="nm_name" id="nm_name" value="<?=$p_nm_name?>">
  857. <input type="hidden" name="nm_hp" id="nm_hp" value="<?=$p_nm_hp?>">
  858. <input type="hidden" name="nm_number" id="nm_number" value="<?=$p_nm_number?>">
  859. </form>
  860. <script laguage="javascript" type="text/javascript">
  861. function openPostScript(arg1, arg2){
  862. var url = "/mypage/sell_view_postscript.php?cd_dealer_p="+arg1+"&cd_tender="+arg2;
  863. var winname = "winPostscript";
  864. var opt = "width=600,height=700,scrollbar=no";
  865. popup_window(url, winname, opt);
  866. }
  867. function selectTender(arg1, arg2, arg3){
  868. $("#cd_tender").val(arg1);
  869. $("#nm_dealer_popup").text(arg2);
  870. $("#nm_price").val(arg3);
  871. openLayer('tender'); return false;
  872. }
  873. function viewPhoto(arg1){
  874. $("#photoBig").attr("src", arg1);
  875. openLayer('photo'); return false;
  876. }
  877. $(document).ready(function() {
  878. $("#btn_write").bind("click",function(){
  879. // $("#cd_tender").val($("#a_Tender").attr('value'));
  880. var c=confirm("정보를 등록하시겠습니까?");
  881. if(c){
  882. $("#btn_write").hide();
  883. $("#frmForm").submit();
  884. }else{
  885. $("#btn_write").show();
  886. return false;
  887. }
  888. });
  889. $("#btn_update,#btn_update_return").on("click", function(){
  890. $.post("/sell/proc.php", { mode:"updateCar", cd_car:"<?=$cd_car?>", cd_sale:"<?=$cd_sale?>"},function(data) {
  891. // alert(data);
  892. if(data=="Y"){
  893. location.href = "./sell_step1.php?mode=Step1";
  894. }else{
  895. alert("수정할 수 없습니다.");
  896. return;
  897. }
  898. });
  899. });
  900. //<!-- Postscript -->
  901. <?
  902. if ($ds_status_sale == "ZS"){
  903. ?>
  904. setCodeSelect("listcode","nm_score_postscript", "sale_master","nm_score_postscript","<?=$nm_score_postscript?>","선택하세요","");
  905. $("#btn_write_postscript").bind("click",function(){
  906. var fieldlist = [["nm_score_postscript","고객만족도"],["nm_cont_postscript","내용"]]
  907. if (!fnCheckForm(fieldlist)){
  908. return false;
  909. }
  910. var c=confirm("정보를 등록하시겠습니까?");
  911. if(c){
  912. $("#btn_write_postscript").hide();
  913. $("#frmFormPostscript").submit();
  914. }else{
  915. $("#btn_write_postscript").show();
  916. return false;
  917. }
  918. });
  919. <?
  920. }
  921. ?>
  922. //<!-- // Postscript -->
  923. });
  924. </script>
  925. <? include("../include/inc_footer.php") ?>
  926. <? include("../include/inc_bottom.php") ?>
  927. <?
  928. mysql_close($connect);
  929. ?>