dealer_view4_detail.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $cd_dealer = $_REQUEST["cd_dealer"];
  5. $PageNo = $_REQUEST["ListPageNo"];
  6. ?>
  7. <? include("../inc/inc_top.php") ?>
  8. <? include("../inc/inc_header.php") ?>
  9. <section id="contents">
  10. <h2>딜러 회원관리</h2>
  11. <? include("../inc/inc_header_dealer.php") ?>
  12. <?
  13. $s_cd_dealer = $_REQUEST["cd_dealer"];
  14. $s_cd_dealer_p = $s_cd_dealer;
  15. $sql1 = " cd_dealer_p = '$s_cd_dealer' ";
  16. $cd_sale = $_REQUEST["cd_sale"];
  17. $sql ="SELECT
  18. a.*
  19. , b.nm_model
  20. , c.nm_grade
  21. , d.nm_brand
  22. , e.nm_model_sub
  23. , getCode('car_master','ds_type',a.ds_type) as nm_type
  24. , getCode('car_master','ds_year',a.ds_year) as nm_year
  25. , getCode('car_master','ds_open',a.ds_open) as nm_open
  26. , getCode('car_master','ds_sales',a.ds_sales) as nm_sales
  27. , getCode('car_master','ds_transmission',a.ds_transmission) as nm_transmission
  28. , getCode('car_master','ds_oil',a.ds_oil) as nm_oil
  29. , getCode('car_master','ds_accident',a.ds_accident) as nm_accident
  30. , getCode('sale_master','ds_usertype',s.ds_usertype) as nm_usertype
  31. , getCode('member_master','ds_area',s.ds_area) as nm_area
  32. , getCode('sale_master','ds_status',s.ds_status) as nm_status
  33. , s.nm_name nm_name_sale
  34. , s.ds_status ds_status_sale
  35. , s.nm_hp nm_hp_sale
  36. , s.nm_email nm_email_sale
  37. , s.ds_area ds_area_sale
  38. , s.nm_recommend nm_recommend_sale
  39. , s.nm_cont_return nm_cont_return_sale
  40. , case when s.ds_status in ('B0','C0') then '미승인' when s.ds_status in ('D0') then '반려' when s.ds_status in ('E0','F0') then '입찰중' when s.ds_status in ('G0') then '입찰마감' when s.ds_status in ('Z0') then '낙찰' when s.ds_status in ('ZS') then '구매확정' else '' end as nm_status_sale
  41. FROM sale_master s
  42. inner join car_master a
  43. on (s.cd_car = a.cd_car)
  44. left outer join car_model b
  45. on (a.cd_model = b.cd_model)
  46. left outer join car_grade c
  47. on (a.cd_grade = c.cd_grade)
  48. left outer join car_brand d
  49. on (a.cd_brand = d.cd_brand)
  50. left outer join car_model_sub e
  51. on (a.cd_model_sub = e.cd_model_sub)
  52. WHERE s.cd_sale='$cd_sale' ";
  53. $col=mysql_fetch_array(mysql_query($sql));
  54. if (!empty($col['cd_car'])){
  55. $cd_car = $col['cd_car'];
  56. $cd_model = $col['cd_model'];
  57. $cd_brand = $col['cd_brand'];
  58. $ds_logo = $col['ds_logo'];
  59. $cd_category = $col['cd_category'];
  60. $cd_grade = $col['cd_grade'];
  61. $ds_cate = $col['ds_cate'];
  62. $ds_type = $col['ds_type'];
  63. $ds_year = $col['ds_year'];
  64. $nm_name = $col['nm_name'];
  65. $nm_price = $col['nm_price'];
  66. $nm_mileage = $col['nm_mileage'];
  67. $ds_driving_system = $col['ds_driving_system'];
  68. $ds_transmission = $col['ds_transmission'];
  69. $nm_file_list = $col['nm_file_list'];
  70. $nm_file_main = $col['nm_file_main'];
  71. $nm_file_report = $col['nm_file_report'];
  72. $nm_file_report_back = $col['nm_file_report_back'];
  73. $nm_file_front = $col['nm_file_front'];
  74. $nm_file_back = $col['nm_file_back'];
  75. $nm_file_side1 = $col['nm_file_side1'];
  76. $nm_file_side2 = $col['nm_file_side2'];
  77. $nm_file_dashboard = $col['nm_file_dashboard'];
  78. $ds_oil = $col['ds_oil'];
  79. $nm_gearbox = $col['nm_gearbox'];
  80. $nm_color = $col['nm_color'];
  81. $nm_incolor = $col['nm_incolor'];
  82. $ds_accident = $col['ds_accident'];
  83. $nm_regdate = $col['nm_regdate'];
  84. $ds_sales = $col['ds_sales'];
  85. $nm_btitle = $col['nm_btitle'];
  86. $nm_stitle = $col['nm_stitle'];
  87. $nm_ltitle = $col['nm_ltitle'];
  88. $nm_cont = $col['nm_cont'];
  89. $nm_guide = $col['nm_guide'];
  90. $ds_open = $col['ds_open'];
  91. $ds_status = $col['ds_status'];
  92. $dt_insert = $col['dt_insert'];
  93. $nm_insert = $col['nm_insert'];
  94. $dt_update = $col['dt_update'];
  95. $nm_update = $col['nm_update'];
  96. $ds_delind = $col['ds_delind'];
  97. $nm_number = $col['nm_number'];
  98. $nm_cc = $col['nm_cc'];
  99. $ds_trade = $col['ds_trade'];
  100. $ds_main = $col['ds_main'];
  101. $nm_regdate_yyyy = $col['nm_regdate_yyyy'];
  102. $nm_regdate_mm = $col['nm_regdate_mm'];
  103. $nm_regdate_dd = $col['nm_regdate_dd'];
  104. $nm_brand = $col['nm_brand'];
  105. $nm_model = $col['nm_model'];
  106. $nm_model_sub = $col['nm_model_sub'];
  107. $nm_grade = $col['nm_grade'];
  108. $nm_year = $col['nm_year'];
  109. $nm_type = $col['nm_type'];
  110. $nm_open = $col['nm_open'];
  111. $nm_sales = $col['nm_sales'];
  112. $nm_transmission = $col['nm_transmission'];
  113. $nm_oil = $col['nm_oil'];
  114. $nm_usertype = $col['nm_usertype'];
  115. $nm_accident = $col['nm_accident'];
  116. $nm_area = $col['nm_area'];
  117. $nm_name_sale = $col['nm_name_sale'];
  118. $ds_status_sale = $col['ds_status_sale'];
  119. $nm_hp_sale = $col['nm_hp_sale'];
  120. $nm_email_sale = $col['nm_email_sale'];
  121. $ds_area_sale = $col['ds_area_sale'];
  122. $nm_recommend_sale = $col['nm_recommend_sale'];
  123. $nm_cont_return_sale = $col['nm_cont_return_sale'];
  124. //보험처리
  125. $nm_act_chgno = $col['nm_act_chgno'];
  126. $nm_act_chgnm = $col['nm_act_chgnm'];
  127. $nm_act_s1 = $col['nm_act_s1'];
  128. $nm_act_s2 = $col['nm_act_s2'];
  129. $nm_act_s3 = $col['nm_act_s3'];
  130. $nm_act_s4 = $col['nm_act_s4'];
  131. $nm_act_my = $col['nm_act_my'];
  132. $nm_act_my_amt = $col['nm_act_my_amt'];
  133. $nm_act_other = $col['nm_act_other'];
  134. $nm_act_other_amt = $col['nm_act_other_amt'];
  135. $nm_act_searchdt = $col['nm_act_searchdt'];
  136. $nm_act_cnt = $col['nm_act_cnt'];
  137. $nm_act_general_spec = $col['nm_act_general_spec'];
  138. $nm_act_use_record = $col['nm_act_use_record'];
  139. $nm_act_use_record_lend = $col['nm_act_use_record_lend'];
  140. $nm_act_use_record_biz = $col['nm_act_use_record_biz'];
  141. $nm_act_use_record_official = $col['nm_act_use_record_official'];
  142. $nm_act_ins_loss = $col['nm_act_ins_loss'];
  143. $nm_act_ins_wet = $col['nm_act_ins_wet'];
  144. $nm_act_ins_robbery = $col['nm_act_ins_robbery'];
  145. $nm_file_act = $col['nm_file_act'];
  146. $nm_act_yn = $col['nm_act_yn'];
  147. /*
  148. $arr_nm_info1 = explode("-",$nm_info1);
  149. if(count($arr_nm_info1) == 3){
  150. $nm_info11 = $arr_nm_info1['0'];
  151. $nm_info12 = $arr_nm_info1['1'];
  152. $nm_info13 = $arr_nm_info1['2'];
  153. }else{
  154. $nm_info11 = "";
  155. $nm_info12 = "";
  156. $nm_info13 = "";
  157. }
  158. $arr_nm_info3 = explode("@",$nm_info3);
  159. if(count($arr_nm_info3) == 2){
  160. $nm_info31 = $arr_nm_info3['0'];
  161. $nm_info32 = $arr_nm_info3['1'];
  162. }else{
  163. $nm_info31 = "";
  164. $nm_info32 = "";
  165. }
  166. $nm_info3 = $col['nm_info3'];
  167. */
  168. }else{
  169. AlertBack("지정되지않은 요청입니다");
  170. }
  171. ?>
  172. <div class="tbl_wrap">
  173. <table class="tbl_list2 ty2">
  174. <colgroup>
  175. <col width="12%">
  176. <col width="38%">
  177. <col width="12%">
  178. <col width="38%">
  179. </colgroup>
  180. <tr>
  181. <th>차량번호</th>
  182. <td><?=$nm_number?></td>
  183. <th>제조사</th>
  184. <td><?=$nm_brand?></td>
  185. </tr>
  186. <tr>
  187. <th>모델</th>
  188. <td><?=$nm_model?></td>
  189. <th>세부모델</th>
  190. <td><?=$nm_model_sub?></td>
  191. </tr>
  192. <tr>
  193. <th>등급</th>
  194. <td><?=$nm_grade?></td>
  195. <th>연식(최초등록일)</th>
  196. <td><?=$nm_regdate_yyyy."년 ".$nm_regdate_mm."월"?></td>
  197. </tr>
  198. <tr>
  199. <th>형식연도</th>
  200. <td><?=$nm_year?>년</td>
  201. <th>배기량</th>
  202. <td><?=$nm_cc?>cc</td>
  203. </tr>
  204. <tr>
  205. <th>변속기</th>
  206. <td><?=$nm_transmission?></td>
  207. <th>연료</th>
  208. <td><?=$nm_oil?></td>
  209. </tr>
  210. <tr>
  211. <th>색상</th>
  212. <td><?=$nm_color?></td>
  213. <th>주행거리</th>
  214. <td><?=$nm_mileage?>km</td>
  215. </tr>
  216. <tr>
  217. <th>사고유무</th>
  218. <td><?=$nm_accident?></td>
  219. <th>추천인</th>
  220. <td><?= ($nm_recommend_sale == "") ? "없음":$nm_recommend_sale ?></td>
  221. </tr>
  222. <tr>
  223. <th>옵션</th>
  224. <td colspan="3"><?=$nm_cont?></td>
  225. </tr>
  226. <tr>
  227. <th>필수사진</th>
  228. <td colspan="3">
  229. <ul class="photo_list">
  230. <li>
  231. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_front?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_front?>')">
  232. <span>차량전면</span>
  233. </li>
  234. <li>
  235. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_back?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_back?>')">
  236. <span>차량후면</span>
  237. </li>
  238. <li>
  239. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side1?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side1?>')">
  240. <span>운전석 측면</span>
  241. </li>
  242. <li>
  243. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side2?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_side2?>')">
  244. <span>조수석 측면</span>
  245. </li>
  246. <li>
  247. <img src="<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_dashboard?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?>nm_file_main/<?=$nm_file_dashboard?>')">
  248. <span>계기판</span>
  249. </li>
  250. </ul>
  251. </td>
  252. </tr>
  253. <tr>
  254. <th>추가사진</th>
  255. <td colspan="3">
  256. <ul class="photo_list">
  257. <?
  258. if(!empty($col['cd_car'])){
  259. $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 ");
  260. $i=1;
  261. while($imgs = mysql_fetch_array($r)) {
  262. ?>
  263. <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>
  264. <?
  265. }
  266. }else{
  267. ?>
  268. <?
  269. }
  270. ?>
  271. </ul>
  272. </td>
  273. </tr>
  274. </table>
  275. </div>
  276. <?
  277. $sql ="select * from tender_master where cd_sale = $cd_sale and cd_dealer_p = '$s_cd_dealer' ";
  278. $col1=mysql_fetch_array(mysql_query($sql));
  279. ?>
  280. <table class="tbl_list3">
  281. <colgroup>
  282. <col width="13%">
  283. <col width="25%">
  284. <col width="13%">
  285. <col width="20%">
  286. <col width="13%">
  287. <col width="*">
  288. </colgroup>
  289. <tr>
  290. <th>입찰금액</th>
  291. <td><em class="txt_blue"><?=$col1['nm_price']?>만원</em></td>
  292. <th>상태</th>
  293. <td>
  294. <? if ($ds_status_sale == "ZS" && $col1['ds_status'] == "Z0"){ ?>
  295. <em class="txt_green">구매확정</em>
  296. <? }else if ($ds_status_sale == "Z0" && $col1['ds_status'] == "Z0"){ ?>
  297. <em class="txt_red">낙찰</em>
  298. <? }else if (($ds_status_sale == "Z0" || $ds_status_sale == "ZS") && $col1['ds_status'] == "A0"){ ?>
  299. <em>유찰</em>
  300. <? }else{ ?>
  301. <em class="txt_blue">입찰대기</em>
  302. <? } ?>
  303. </td>
  304. <th>입찰자</th>
  305. <td><?=$col1['nm_name']?></td>
  306. </tr>
  307. </table>
  308. <div class="btn_right">
  309. <a href="dealer_view4.php?cd_dealer=<?=$cd_dealer?>&PageNo=<?=$PageNo?>" class="rnd_btn ty2 gray">목록</a>
  310. <!--a href="#" class="rnd_btn ty2 black">저장</a-->
  311. </div>
  312. </section>
  313. <!-- layer popup3 -->
  314. <div class="layer_popup photo_popup">
  315. <div class="popup_wrap">
  316. <div class="btn_center">
  317. <img src="/img/sell/ic_car_photo1.png" id="photoBig">
  318. </div>
  319. <div class="btn_center">
  320. <a href="#" class="button gray" onclick="closeLayer('photo'); return false;">취소</a>
  321. </div>
  322. </div>
  323. </div>
  324. <!-- // layer popup3 -->
  325. </div>
  326. <script laguage="javascript" type="text/javascript">
  327. function viewPhoto(arg1){
  328. $("#photoBig").attr("src", arg1);
  329. openLayer('photo'); return false;
  330. }
  331. </script>
  332. <? include("../inc/inc_footer.php") ?>
  333. <? include("../inc/inc_bottom.php") ?>
  334. <?
  335. mysql_close($connect);
  336. ?>