inc_header.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. if(!isset($back_url)) {
  3. $back_url = "";
  4. }
  5. ?>
  6. <?php include_once($_SERVER['DOCUMENT_ROOT'].'/m/inc/inc_top.php'); ?>
  7. <header>
  8. <div class="header--wrapper">
  9. <div class="header--contents">
  10. <?php if($HEADER_LOC != 'main' ){?>
  11. <div class="sub--title btn--wrap">
  12. <?php if($show_btn_back) {?>
  13. <button type="button" class="back--btn" id="btn_header_back"></button>
  14. <?php }else { ?>
  15. <button type="button" class="back--btn" style='background:none;' disabled></button>
  16. <?php } ?>
  17. <h2><?=$nav_title?></h2>
  18. </div>
  19. <?php }else{?>
  20. <h1 class="logo"></h1>
  21. <?php }?>
  22. <div class="hmb--btn"></div>
  23. </div>
  24. </div>
  25. </header>
  26. <aside>
  27. <button class="close--btn"></button>
  28. <div class="log--msg">
  29. <?php
  30. if(!empty($_SESSION['s_cd_userid'])){
  31. ?>
  32. <div class="thumb on"></div>
  33. <h2><strong><?=$_SESSION['s_nm_name']?></strong>님 환영합니다.</h2>
  34. <?php }else{?>
  35. <div class="thumb"></div>
  36. <h2 id="btn_aside_login"><strong>로그인</strong>후 확인하세요<i class="arrow--right"></i></h2>
  37. <?php }?>
  38. </div>
  39. <div class="gnb--wrapper">
  40. <a href="/m/company/company.php" class="<?if($MENU_ACTV == 1){?>actv<?}?>">이차조아란?</a>
  41. <a href="/m/sell/search.php" class="<?if($MENU_ACTV == 2){?>actv<?}?>">내차 사고이력 조회</a>
  42. <a href="/m/customer/notice_list.php" class="<?if($MENU_ACTV == 3){?>actv<?}?>">공지사항</a>
  43. <a href="/m/customer/faq.php" class="<?if($MENU_ACTV == 3){?>actv<?}?>">FAQ</a>
  44. <a href="/m/customer/qna.php" class="<?if($MENU_ACTV == 3){?>actv<?}?>">QNA</a>
  45. <?php
  46. if(!empty($_SESSION['s_cd_userid'])){
  47. ?>
  48. <a href="/m/member/standby_list.php" class="<?php if($MENU_ACTV == 4){?>actv<?}?>">입찰대기</a>
  49. <a href="/m/member/prepare_list.php" class="<?php if($MENU_ACTV == 5){?>actv<?}?>">입찰중</a>
  50. <a href="/m/member/underway_list.php" class="<?php if($MENU_ACTV == 6){?>actv<?}?>">거래중</a>
  51. <a href="/m/member/end_list.php" class="<?php if($MENU_ACTV == 7){?>actv<?}?>">판매완료</a>
  52. <a href="/m/member/fail_list.php" class="<?php if($MENU_ACTV == 8){?>actv<?}?>">유찰</a>
  53. <!-- <a href="#" class="<?php if($MENU_ACTV == 7){?>actv<?}?>">내차 사고이력 조회</a> -->
  54. <a href="/m/member/mypage.php" class="<?php if($MENU_ACTV == 9){?>actv<?}?>">마이페이지</a>
  55. <a ___href="/m/member/logout.php" id="btn_aside_logout" class="login--out"><i class="logout--ic"></i>로그아웃</a>
  56. <?php }else{?>
  57. <a href="/m/member/join.php" class="<?if($MENU_ACTV == 3){?>actv<?}?>">회원가입</a>
  58. <a href="/m/member/login.php" class="<?if($MENU_ACTV == 3){?>actv<?}?>">로그인</a>
  59. <?php }?>
  60. </div>
  61. </aside>
  62. <script>
  63. var back_url = "<?=$back_url?>";
  64. $(function() {
  65. $("#btn_header_back").on("click", function() {
  66. if($.trim(back_url) == "") {
  67. history.back(-1);
  68. }else {
  69. link(back_url);
  70. }
  71. });
  72. $("#btn_aside_login").on("click", function() {
  73. link("/m/member/login.php");
  74. });
  75. $("#btn_aside_logout").on("click", function() {
  76. setLogout();
  77. link("/m/member/logout.php");
  78. });
  79. })
  80. </script>