header.php 2.7 KB

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