mypage.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].'/common/user_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_mypage">
  9. <h2>마이페이지</h2>
  10. <p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
  11. </section>
  12. <section id="content">
  13. <?
  14. // /common/lib/func.php 1662에 정의됨
  15. $is_upro_member = getUproMember($_SESSION['s_cd_user']);
  16. $depth_info = array("NAME" => array("마이페이지", "요약보기"));
  17. if($is_upro_member) {
  18. include_once($_SERVER['DOCUMENT_ROOT']."/mypage/inc_menu_member_company.php");
  19. }else {
  20. include_once($_SERVER['DOCUMENT_ROOT']."/mypage/inc_menu_main_member.php");
  21. }
  22. ?>
  23. <!-- <ul class="location">
  24. <li><a href="/" class="home">홈</a></li>
  25. <li><span class="depth1">마이페이지</span>
  26. <ul class="sub_depth">
  27. <li><a href="/mypage/mypage.php">마이페이지</a></li>
  28. <li><a href="/sell/sell_step1.php">내찰팔기</a></li>
  29. <li><a href="/mypage/sell_list.php">전체 입찰내역</a></li>
  30. <li><a href="/mypage/sell_list_06.php">입찰중</a></li>
  31. <li><a href="/mypage/sell_list_04.php">낙찰내역</a></li>
  32. <li><a href="/mypage/sell_list_03.php">거래완료</a></li>
  33. <li><a href="/mypage/sell_list_02.php">유찰내역</a></li>
  34. <li><a href="/mypage/sell_list_05.php">거래실패/연기</a></li>
  35. <li><a href="/mypage/qna_list.php?cd_board=02&ds_kind=A">문의내역</a></li>
  36. </ul>
  37. </li>
  38. <li><span class="depth2">요약보기</span></li>
  39. </ul> -->
  40. <?
  41. $cd_user = $_SESSION['s_cd_user'];
  42. $sql ="SELECT
  43. *
  44. FROM member_master
  45. WHERE cd_user='$cd_user' AND ds_delind='N'";
  46. $mode = "Add";
  47. $col=mysql_fetch_array(mysql_query($sql));
  48. if (!empty($col[cd_user])){
  49. $cd_user = $col[cd_user];
  50. $cd_userid = $col[cd_userid];
  51. $nm_email = $col[nm_email];
  52. $nm_pass = $col[nm_pass];
  53. $nm_join = $col[nm_join];
  54. $ds_type = $col[ds_type];
  55. $ds_level = $col[ds_level];
  56. $nm_birth = $col[nm_birth];
  57. $nm_name = $col[nm_name];
  58. $nm_company = $col[nm_company];
  59. $nm_hp = $col[nm_hp];
  60. $nm_hp_01 = $col[nm_hp_01];
  61. $nm_hp_02 = $col[nm_hp_02];
  62. $nm_hp_03 = $col[nm_hp_03];
  63. $nm_tel = $col[nm_tel];
  64. $nm_tel_01 = $col[nm_tel_01];
  65. $nm_tel_02 = $col[nm_tel_02];
  66. $nm_tel_03 = $col[nm_tel_03];
  67. $nm_fax = $col[nm_fax];
  68. $nm_fax_01 = $col[nm_fax_01];
  69. $nm_fax_02 = $col[nm_fax_02];
  70. $nm_fax_03 = $col[nm_fax_03];
  71. $nm_zip = $col[nm_zip];
  72. $nm_addr = $col[nm_addr];
  73. $nm_addr_sub = $col[nm_addr_sub];
  74. $ds_area = $col[ds_area];
  75. $ds_area_sub = $col[ds_area_sub];
  76. $nm_etc_01 = $col[nm_etc_01];
  77. $nm_etc_02 = $col[nm_etc_02];
  78. $nm_etc_03 = $col[nm_etc_03];
  79. $nm_etc_04 = $col[nm_etc_04];
  80. $nm_etc_05 = $col[nm_etc_05];
  81. $ds_agree1 = $col[ds_agree1];
  82. $ds_agree2 = $col[ds_agree2];
  83. $ds_agree3 = $col[ds_agree3];
  84. $ds_agree4 = $col[ds_agree4];
  85. $ds_agree5 = $col[ds_agree5];
  86. $ds_status = $col[ds_status];
  87. $ds_status_agree = $col[ds_status_agree];
  88. $dt_insert = $col[dt_insert];
  89. $nm_insert = $col[nm_insert];
  90. $dt_update = $col[dt_update];
  91. $nm_update = $col[nm_update];
  92. $dt_delind = $col[dt_delind];
  93. $nm_delind = $col[nm_delind];
  94. $ds_delind = $col[ds_delind];
  95. /*
  96. $arr_nm_info1 = explode("-",$nm_info1);
  97. if(count($arr_nm_info1) == 3){
  98. $nm_info11 = $arr_nm_info1[0];
  99. $nm_info12 = $arr_nm_info1[1];
  100. $nm_info13 = $arr_nm_info1[2];
  101. }else{
  102. $nm_info11 = "";
  103. $nm_info12 = "";
  104. $nm_info13 = "";
  105. }
  106. $arr_nm_info3 = explode("@",$nm_info3);
  107. if(count($arr_nm_info3) == 2){
  108. $nm_info31 = $arr_nm_info3[0];
  109. $nm_info32 = $arr_nm_info3[1];
  110. }else{
  111. $nm_info31 = "";
  112. $nm_info32 = "";
  113. }
  114. $nm_info3 = $col[nm_info3];
  115. */
  116. $mode = "Update";
  117. }else{
  118. $ds_level = "1";
  119. }
  120. ?>
  121. <div class="tit_wrap">
  122. <h3>회원정보</h3>
  123. <a href="modify.php" class="button">정보수정</a>
  124. </div>
  125. <table class="tbl_h">
  126. <colgroup>
  127. <col width="16%">
  128. <col width="34%">
  129. <col width="16%">
  130. <col width="*">
  131. </colgroup>
  132. <!--tr>
  133. <th>회원구분</th>
  134. <td>개인회원</td>
  135. <th>추천인</th>
  136. <td>신성우</td>
  137. </tr-->
  138. <tr>
  139. <th>이름</th>
  140. <td><?=$nm_name?></td>
  141. <th>아이디</th>
  142. <td><?=$nm_email?></td>
  143. </tr>
  144. <tr>
  145. <th>회원가입일</th>
  146. <td><?=$dt_insert?></td>
  147. <th>연락처</th>
  148. <td><?=$nm_hp?></td>
  149. </tr>
  150. <!--tr>
  151. <th>주소</th>
  152. <td colspan="3">서울 마포구 서교동</td>
  153. </tr-->
  154. </table>
  155. <div class="tit_wrap">
  156. <h3>입찰내역</h3>
  157. <a href="sell_list.php" class="button">+더보기</a>
  158. </div>
  159. <table class="tbl_v">
  160. <colgroup>
  161. <col width="7%">
  162. <col width="*">
  163. <col width="10%">
  164. <col width="10%">
  165. <col width="15%">
  166. <col width="15%">
  167. </colgroup>
  168. <thead>
  169. <tr>
  170. <th>번호</th>
  171. <th>차종</th>
  172. <th>년식</th>
  173. <th>지역</th>
  174. <th>판매일</th>
  175. <th>처리상태</th>
  176. </tr>
  177. <!--colgroup>
  178. <col width="7%">
  179. <col width="20%">
  180. <col width="16%">
  181. <col width="*">
  182. <col width="15%">
  183. <col width="15%">
  184. </colgroup>
  185. <thead>
  186. <tr>
  187. <th>번호</th>
  188. <th>매입자</th>
  189. <th>판매금액</th>
  190. <th>차종</th>
  191. <th>판매일</th>
  192. <th>처리상태</th>
  193. </tr-->
  194. </thead>
  195. <tbody>
  196. <?
  197. $cd_user = $_SESSION['s_cd_user'];
  198. $PageNo = $_REQUEST['pageno'];
  199. $PageSize = $_REQUEST['PageSize'];
  200. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  201. if (empty($PageSize)) {
  202. $PageSize=8; //목록개수설정
  203. }else{$PageSize=$PageSize;}
  204. $pagestartpoint=($PageNo-1)*$PageSize;
  205. $sql = "where s.ds_delind='N'";
  206. $sql = $sql. " and s.cd_user='$cd_user' ";
  207. $searchtype = $_REQUEST['searchtype'];
  208. $searchword = $_REQUEST['searchword'];
  209. $ds_usertype = $_REQUEST['ds_usertype'];
  210. $ds_status = 'Z0';
  211. $ds_type = "A0"; //A0 : 매입
  212. $sql = $sql. " and s.ds_type = '$ds_type' ";
  213. if($searchword != ""){
  214. if($searchtype=="" || $searchtype==null){
  215. $sql = $sql. " and (s.nm_name like '$searchword%' or a.nm_number like '$searchword%') ";
  216. }else{
  217. $sql = $sql. " and $searchtype like '$searchword%'";
  218. }
  219. }
  220. if($ds_usertype != ""){
  221. $sql = $sql. " and s.ds_usertype = '$ds_usertype'";
  222. }
  223. $sql = $sql. " and s.ds_status in ('B0','C0','D0','E0','F0','G0','Z0')";
  224. // $sql = $sql. " and s.dt_approve >= DATE_ADD(now(), INTERVAL '-".LIMIT_TIME_SELL."' HOUR) ";
  225. $totalrows = @mysql_result(mysql_query("select count(*) from sale_master s inner join car_master a on ( s.cd_car = a.cd_car ) $sql"),0,0);
  226. $orderby = "order by s.dt_insert desc";
  227. if($totalrows>0) {
  228. $r = mysql_query("SELECT
  229. a.*
  230. , b.nm_model
  231. , c.nm_grade
  232. , d.nm_brand
  233. , e.nm_model_sub
  234. , getCode('car_master','ds_type',a.ds_type) as nm_type
  235. , getCode('car_master','ds_open',a.ds_open) as nm_open
  236. , getCode('car_master','ds_sales',a.ds_sales) as nm_sales
  237. , getCode('car_master','ds_transmission',a.ds_transmission) as nm_transmission
  238. , getCode('member_master','ds_area',s.ds_area) as nm_area
  239. , getCode('sale_master','ds_status',s.ds_status) as nm_status
  240. , s.cd_sale
  241. , s.nm_name nm_name_sale
  242. , s.nm_price nm_price_sale
  243. , s.ds_status ds_status_sale
  244. , 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
  245. , case when a.nm_act_yn in ('Y') then '유' else '무' end as nm_act_yn_name
  246. , getRemainTime(".LIMIT_TIME_SELL.", s.dt_approve, now()) as time_limit_sell
  247. FROM sale_master s
  248. inner join car_master a
  249. on (s.cd_car = a.cd_car)
  250. left outer join car_model b
  251. on (a.cd_model = b.cd_model)
  252. left outer join car_grade c
  253. on (a.cd_grade = c.cd_grade)
  254. left outer join car_brand d
  255. on (a.cd_brand = d.cd_brand)
  256. left outer join car_model_sub e
  257. on (a.cd_model_sub = e.cd_model_sub)
  258. $sql $orderby LIMIT 0,2");
  259. $i=1;
  260. while($col = mysql_fetch_array($r)) {
  261. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  262. $no = ($tmpNum - $i)+1;
  263. ?>
  264. <tr onclick="location.href='./sell_view.php?list_url=<?=$list_url?>&cd_sale=<?=$col[cd_sale]?>&ds_status_sale=<?=$col[ds_status_sale]?>&ListPageNo=<?=$PageNo?>';" style="cursor:pointer;">
  265. <td><?=$no?></td>
  266. <td><?=$col[nm_brand]." ".$col[nm_model]?></td>
  267. <td><?=$col[ds_year]?>년</td>
  268. <td><?=$col[nm_area]?></td>
  269. <td><?=$col[dt_insert]?></td>
  270. <td><? if($col[time_limit_sell]=="0분" && ($col[ds_status_sale] == "E0" || $col[ds_status_sale] == "F0")){ ?>거래마감<? }else{ ?><?=$col[nm_status_sale]?><? } ?></td>
  271. </tr>
  272. <!--tr onclick="location.href='./sell_view.php?list_url=<?=$list_url?>&cd_sale=<?=$col[cd_sale]?>&ds_status_sale=<?=$col[ds_status_sale]?>&ListPageNo=<?=$PageNo?>';" style="cursor:pointer;">
  273. <td><?=$no?></td>
  274. <td><?=$col[nm_name_sale]?></td>
  275. <td><?=$col[nm_price_sale]?></td>
  276. <td><?=$col[nm_brand]." ".$col[nm_model]?></td>
  277. <td><?=$col[dt_insert]?></td>
  278. <td><?=$col[nm_status_sale]?></td>
  279. </tr-->
  280. <?
  281. $i++;
  282. }
  283. }else{
  284. ?>
  285. <tr>
  286. <td colspan="6">등록된 정보가 없습니다.</td>
  287. </tr>
  288. <?
  289. }
  290. ?>
  291. </tr>
  292. </tbody>
  293. </table>
  294. <div class="tit_wrap">
  295. <h3>문의내역</h3>
  296. <a href="/mypage/qna_list.php?cd_board=02&ds_kind=A" class="button">+더보기</a>
  297. </div>
  298. <table class="tbl_v">
  299. <colgroup>
  300. <col width="7%">
  301. <col width="*">
  302. <col width="15%">
  303. <col width="15%">
  304. </colgroup>
  305. <thead>
  306. <tr>
  307. <th>번호</th>
  308. <th>제목</th>
  309. <th>작성일</th>
  310. <th>답변여부</th>
  311. </tr>
  312. </thead>
  313. <tbody>
  314. <?
  315. $cd_board = "02";
  316. $ds_kind = "A";
  317. $s_cd_user = $_SESSION['s_cd_user'];
  318. $s_cd_dealer = $_SESSION['s_cd_dealer'];
  319. if($ds_kind == "D"){
  320. $cd_user = $s_cd_dealer;
  321. }else{
  322. $cd_user = $s_cd_user;
  323. }
  324. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  325. $PageSize=2; //목록개수설정
  326. $pagestartpoint=($PageNo-1)*$PageSize;
  327. $sql = "where cd_board='$cd_board' and ds_delind='N'";
  328. $sql = $sql." and ds_kind='$ds_kind' ";
  329. $sql = $sql." and cd_user='$cd_user' ";
  330. if($searchword != ""){
  331. if($searchtype=="" || $searchtype==null){
  332. $sql = $sql. " and (nm_title like '$searchword%' or nm_content like '$searchword%' or cd_userid like '$searchword%')";
  333. }else{
  334. $sql = $sql. " and $searchtype like '$searchword%'";
  335. }
  336. }
  337. $totalrows = @mysql_result(mysql_query("select count(*) from board_master $sql"),0,0);
  338. if($totalrows>0) {
  339. $r = mysql_query("SELECT * FROM board_master $sql ORDER BY ds_top desc, no_famally ASC, no_order ASC LIMIT 0,2");
  340. $i=1;
  341. while($col = mysql_fetch_array($r)) {
  342. $date = strtotime ($col[dt_insert]);
  343. $view_date = strtotime ("-1 day",time());
  344. if($date >= $view_date) {
  345. $newicon = " <img src='".ADMIN_PATH."img/i_new.gif' style='margin-top:1px;' /> ";
  346. } else {
  347. $newicon = "";
  348. }
  349. if($col[no_step]>0){
  350. $padding = $col[no_step] * 8;
  351. $step = "<span style=\"padding-left:".$padding."px\"/>";
  352. }
  353. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  354. $no = ($tmpNum - $i)+1;
  355. ?>
  356. <tr onclick="location.href='./qna_view.php?cd_board=<?=$cd_board?>&ds_kind=<?=$ds_kind?>&cd_seq=<?=$col[cd_seq]?>&PageNo=1';" style="cursor: pointer; cursor: hand;">
  357. <td><?=$no?></td>
  358. <? if($cd_board=="99"){?>
  359. <td width="10%" align="center" class="list03"><img src="<?=UPLOAD_PATH?>board/board_<?=$cd_board?>/<?=$col[nm_file]?>" width="50"/></td>
  360. <?}?>
  361. <td class="al"><?=text_cut($col[nm_title],50)?></td>
  362. <td><?=$col[dt_insert]?></td>
  363. <? if($cd_board=="02"){?>
  364. <td><?=($col[nm_reply] == "") ? "미답변" : "답변완료" ?></td>
  365. <?}?>
  366. </tr>
  367. <?
  368. $i++;
  369. }
  370. }else{
  371. ?>
  372. <tr>
  373. <td colspan="4">등록된 정보가 없습니다.</td>
  374. </tr>
  375. <?
  376. }
  377. ?>
  378. </tbody>
  379. </table>
  380. </section>
  381. </section>
  382. <? include("../include/inc_footer.php") ?>
  383. <? include("../include/inc_bottom.php") ?>
  384. <?
  385. mysql_close($connect);
  386. ?>