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.

121 lines
6.7 KiB

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