sell_view_nomember.php 31 KB

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