You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
7.0 KiB

7 years ago
7 years ago
7 years ago
  1. <?php
  2. // CSS 파일과 JS파일 추가 (TRUE 옵션을 준경우 옵션을 주지않은경우보다 상위에 위치한다.)
  3. $this->site->add_css('https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css',TRUE);
  4. $this->site->add_css("/assets/css/desktop.min.css", TRUE);
  5. $this->site->add_js('https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js', TRUE);
  6. $this->site->add_js('https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js', TRUE);
  7. $this->site->add_js("/assets/js/desktop.min.js", TRUE);
  8. ?>
  9. <div class="container-fluid">
  10. <header id="header" class="row">
  11. <nav class="navbar navbar-default">
  12. <div class="container">
  13. <div class="navbar-header">
  14. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-navigation" aria-expanded="false">
  15. <span class="sr-only">Toggle navigation</span>
  16. <span class="icon-bar"></span>
  17. <span class="icon-bar"></span>
  18. <span class="icon-bar"></span>
  19. </button>
  20. <a class="navbar-brand" href="<?=base_url()?>"><?=$this->site->config('site_title')?></a>
  21. </div>
  22. <div class="collapse navbar-collapse" id="main-navigation">
  23. <ul class="nav navbar-nav">
  24. <?php $menu = $this->site->menu(); // 메뉴를 가져온다. ?>
  25. <?php foreach($menu as $menu1) : ?>
  26. <?php if( count($menu1['children']) >0 ) : // 1차메뉴가 하위메뉴가 있다면 ?>
  27. <li class="dropdown <?=$menu1['active']?'active':''?>">
  28. <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?=$menu1['mnu_name']?> <span class="caret"></span></a>
  29. <ul class="dropdown-menu">
  30. <?php foreach($menu1['children'] as $menu2) :?>
  31. <?php if( count($menu2['children']) > 0 ) : // 2차메뉴가 하위메뉴가 있다면?>
  32. <li class="<?=$menu2['active']?'active':''?>">
  33. <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?=$menu2['mnu_name']?></a>
  34. <ul class="dropdown-menu">
  35. <?php foreach($menu2['children'] as $menu3) :?>
  36. <li class="<?=$menu3['active']?'active':''?>">
  37. <a href="<?=$menu3['mnu_link']?>" <?=$menu3['mnu_newtab']=='Y'?'target="_blank"':''?>><?=$menu3['mnu_name']?></a>
  38. </li>
  39. <?php endforeach;?>
  40. </ul>
  41. </li>
  42. <?php else : // 2차메뉴가 하위메뉴가 없다면?>
  43. <li class="<?=$menu2['active']?'active':''?>">
  44. <a href="<?=$menu2['mnu_link']?>" <?=$menu2['mnu_newtab']=='Y'?'target="_blank"':''?>><?=$menu2['mnu_name']?></a>
  45. </li>
  46. <?php endif;?>
  47. <?php endforeach;?>
  48. </ul>
  49. </li>
  50. <?php else : // 1차메뉴가 하위메뉴가 없다면 ?>
  51. <li class="<?=$menu1['active']?'active':''?>">
  52. <a href='<?=$menu1['mnu_link']?>' <?=$menu1['mnu_newtab']=='Y'?'target="_blank"':''?>><?=$menu1['mnu_name']?></a>
  53. </li>
  54. <?php endif; ?>
  55. <?php endforeach; ?>
  56. </ul>
  57. <?php if( $this->member->is_login() ) :?>
  58. <!--START:: 회원전용 메뉴-->
  59. <ul class="nav navbar-nav navbar-right">
  60. <li class="dropdown">
  61. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?=$this->member->info('nickname')?> <span class="caret"></span></a>
  62. <ul class="dropdown-menu">
  63. <li><a href="<?=base_url('members/info')?>"> 정보</a></li>
  64. <li><a href="<?=base_url('members/info/social')?>">소셜 연동 설정</a></li>
  65. <li class="divider"></li>
  66. <li><a href="<?=base_url('members/logout')?>">로그아웃</a></li>
  67. </ul>
  68. </li>
  69. </ul>
  70. <!--END:: 회원전용 메뉴-->
  71. <?php else :?>
  72. <!--START:: 비회원 전용 메뉴-->
  73. <ul class="nav navbar-nav navbar-right">
  74. <li><a href="<?=base_url('members/login?reurl='.current_full_url(TRUE))?>">로그인</a></li>
  75. <li><a href="<?=base_url('members/register')?>">회원가입</a></li>
  76. </ul>
  77. <!--END:: 비회원전용 메뉴-->
  78. <?php endif;?>
  79. <form class="navbar-form navbar-left" id="search_box" action="<?=base_url('search')?>">
  80. <div class="form-group">
  81. <input class="form-control" placeholder="<?=langs('공통/search/search_placeholder')?>" name="query">
  82. </div>
  83. <button class="btn btn-default"><?=langs('공통/search/search_submit')?></button>
  84. </form>
  85. </div>
  86. </nav>
  87. </header>
  88. </div>
  89. <section id="contents">
  90. <div class="container">
  91. <div class="col-sm-3">
  92. <?=outlogin('basic')?>
  93. </div>
  94. <div class="col-sm-9">
  95. <?=$contents?>
  96. </div>
  97. </div>
  98. </section>
  99. <footer id="footer">
  100. <div class="container">
  101. <ul>
  102. <li><a href="<?=base_url('agreement/site')?>">사이트 이용약관</a></li>
  103. <li><a class="font-bold" href="<?=base_url('agreement/privacy')?>">개인정보 취급방침</a></li>
  104. <li><a class="font-bold" href="<?=base_url('customer/faq')?>">자주 묻는 질문</a></li>
  105. <li><a class="font-bold" href="<?=base_url('customer/qna')?>">1:1문의</a></li>
  106. </ul>
  107. </div>
  108. </footer>
  109. </div>