<?php
/*
 * Site Skin : Basic
 * head.php
 * 
 */
if (!defined("_GNUBOARD_"))
    exit; // 개별 페이지 접근 불가

include_once "{$g4['g4m_path']}/head.sub.php";
include_once "{$g4['path']}/lib/visit.lib.php";
include_once "{$g4['g4m_path']}/lib/g4m.lib.php";
/*
  include_once "{$g4['path']}/lib/outlogin.lib.php";
  include_once "{$g4['path']}/lib/poll.lib.php";
  include_once "{$g4['path']}/lib/connect.lib.php";
  include_once "{$g4['path']}/lib/popular.lib.php";
  include_once "{$g4['path']}/lib/latest.lib.php";
 */
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
?>
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?php echo $g4['g4m_path'] ?>">G4M</a>
        </div>
        
        <div class="navbar-collapse collapse">

            <ul class="nav navbar-nav">
                <li class="active"><a href="<?php echo $g4['g4m_path'] ?>">Home</a></li>
                <?php
                //관리자 그룹 설정 첫번째 추가필드gr_1 를 정렬에 사용한다.
                $hide_group = ""; //출력하지 않을 그룹 id 입력, 여러 그룹일 경우 쉼표(,)로 구분
                echo group_menu($hide_group);
                ?>                
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Menu <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <?php if ($is_admin) { ?>
                            <li><a href="<?php echo $g4['g4m_admin_path'] ?>">Admin</a></li>
                        <?php } ?>
                        <?php if ($is_member) { ?>
                            <li><a href="<?php echo $g4['g4m_bbs_path'] ?>/memo.php">쪽지</a></li>
                            <!-- <li><a href="<?php echo $g4['g4m_path'] ?>/bbs/member_confirm.php?url=register_form.php">정보수정</a></li> -->
                        <?php } ?>

                        <li><a href="<?php echo $g4['g4m_bbs_path'] ?>/new.php">최신게시물</a></li>
                        <?php if ($is_member) { ?>

                            <li><a href="<?php echo $g4['g4m_bbs_path'] ?>/logout.php">로그아웃</a></li>
                        <?php } else { ?>
                            <li><a href='<?php echo $g4['g4m_bbs_path'] ?>/login.php?url=<?php echo urlencode($_SERVER['REQUEST_URI']) ?>'>로그인</a>
                            <?php } ?>
                            <!--
                            <li class="divider"></li>
                            <li class="dropdown-header">Nav header</li>
                            <li><a href="#">Separated link</a></li>
                            <li><a href="#">One more separated link</a></li>
                            -->
                    </ul>
                </li>
            </ul>
        </div><!--/.navbar-collapse -->
    </div>
</div>


<div class="container">
    <div class="row">
        <div class="col-sm-3">
            <div class="well sidebar-nav">
                <form action="<?php echo $g4['g4m_bbs_path'] ?>/search.php" name="fsearchbox" method="get" class="form-horizontal" role="form">
                    <input type="hidden" name="sfl" value="wr_subject||wr_content"/>
                    <input type="hidden" name="sop" value="and"/>
                    <input type="hidden" value="m" name="where"/>
                    <input type="hidden" value="mtp_hty" name="sm"/>
                    <div class="form-group">
                        <label class="sr-only" for="autocomplete_input">검색</label>
                        <input type="text" value="" title="검색어 입력" class="form-control" name="stx" id="autocomplete_input" placeholder="검색어 입력" style="margin-bottom: 5px"/>
                        <button type="submit" class="btn btn-primary btn-aw-100">검색</button>
                    </div>
                </form>
                <ul class="nav side_menu">
                    <?php if ($is_admin) { ?>
                        <li><a href="<?php echo $g4['g4m_admin_path'] ?>">Admin</a></li>
                    <?php } ?>
                    <?php if ($is_member) { ?>
                        <li><a href="<?php echo $g4['g4m_bbs_path'] ?>/memo.php">쪽지</a></li>
                        <!-- <li><a href="<?php echo $g4['g4m_path'] ?>/bbs/member_confirm.php?url=register_form.php">정보수정</a></li> -->
                    <?php } ?>
                    <li><a href="<?php echo $g4['g4m_bbs_path'] ?>/new.php">최신게시물</a></li>
                    <?php if ($is_member) { ?>
                    <li><a href="<?php echo $g4['g4m_bbs_path'] ?>/member_confirm.php?url=register_form.php">정보수정</a></li>
                    <li><a href="<?php echo $g4['g4m_bbs_path'] ?>/logout.php">로그아웃</a></li>
                    <?php } else { ?>
                    <li><a href='<?php echo $g4['g4m_bbs_path'] ?>/login.php?url=<?php echo urlencode($_SERVER['REQUEST_URI']) ?>'>로그인</a>
                        <li><a href='<?php echo $g4['g4m_bbs_path'] ?>/register.php'>가입</a>
                    <?php } ?>
                        <!--
                        <li class="divider"></li>
                        <li class="dropdown-header">Nav header</li>
                        <li><a href="#">Separated link</a></li>
                        <li><a href="#">One more separated link</a></li>
                        -->
                </ul>
            </div><!--/.well -->
        </div><!--/span-->
        <div class="col-sm-9" id="wrap">
