<? include_once("./_common.php"); ?>
<div id="xe_top">
  <div id="xe_top_box">
    <div id="xe1_top">
      <ul>
        <li><a href="javascript:bookmarksite('<?=$config[cf_title]?>', 'http://<?=$_SERVER['SERVER_NAME']?>')"><?=$config[cf_title]?>를 즐겨찾기</a></li>
        <li><a href="<?=$g4['path']?>/"><?=$config[cf_title]?> 메인화면</a></li>
      </ul>
    </div>
    <div id="xe2_top">
      <ul>
        <li><a href="<?=$g4['path']?>/">홈</a></li>
        <? if (!$member['mb_id']) { ?>
        <!-- 로그인 이전 -->
        <li><a href="<?=$g4['bbs_path']?>/login.php?url=<?=$urlencode?>">로그인</a></li>
        <li><a href="<?=$g4['bbs_path']?>/register.php">회원가입</a></li>
        <? } else { ?>
        <!-- 로그인 이후 -->
        <li><a href="<?=$g4['bbs_path']?>/logout.php">로그아웃</a></li>
        <li><a href="<?=$g4['bbs_path']?>/member_confirm.php?url=register_form.php">정보수정</a></li>
        <? } ?>
        <? if ($is_admin == "super" || $is_auth) { ?>
        <li><a href="<?=$g4['path']?>/adm" style="color:#f00;">관리자</a> </li>
        <? } ?>
      </ul>
    </div>
    <div style="clear:both;"></div>
  </div>
</div>
<div id="logo_xe">
  <h1><a href="<?=$g4[path]?>"><img src="<?=$g4[path]?>/xe/theme/<?=$config[cf_xe_theme]?>/img/global/logo_gnuxe.png" alt="<?=$config[cf_xe_theme]?>"></a></h1>
</div>
<div id="xe_menu">
  <!-- 메뉴 -->
  <div id="xe_menu_box">
    <div id="nav1_top">
      <ul>
        <?
        $not_in_gr_id = "('','')";  // "('제외그룹1','제외그룹2','제외그룹')"
        $sql = "select * from $g4[group_table] where gr_id  not in $not_in_gr_id  order by gr_1 asc";  // 그룹전체
        $qry = sql_query($sql);
        for ($i=0; $row=sql_fetch_array($qry); $i++) {
        ?>
        <? if ($i <> "0") { ?>
        <li class="bar"></li>
        <? } ?>
        <li><a href="<?=$g4['bbs_path']?>/group.php?gr_id=<?=$row['gr_id']?>"><?=$row[gr_subject];?></a></li>
        <? } ?>
      </ul>
    </div>
    <div id="nav2_top">
      <ul>
        <li><a href="http://www.facebook.com/">페이스북</a> </li>
        <li class="bar"></li>
        <li><a href="http://www.twitter.com/">트위터</a> </li>
        <li class="bar"></li>
        <li><a href="http://www.me2day.net">미투데이</a> </li>
        <li class="bar"></li>
        <li><a href="http://yozm.daum.net/">요즘</a> </li>
      </ul>
    </div>
    <div style="clear:both;"></div>
  </div>
  <!--// 메뉴 -->
</div>
<div id="container">
  <div class="snb">
    <div id="outligin_01"><div style="padding:15px;"><?=outlogin("xe_basic");?></div></div>
    <? if ($bo_table || $gr_id) { ?>
    <div class="xe_cate_title"><div style="padding:10px 0 10px 15px;"><span><?=$group[gr_subject]?></span></div></div>
    <div class="xe_cate_menu">
      <div class="latest_list01" style="padding:10px;">
        <ul>
          <?
            $hsql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_table != 'use_email' and bo_table != 'use_privacy' and bo_table != 'use_stipulation' order by gr_id, bo_table ";
            $hresult = sql_query($hsql);
            for ($i=0; $row=sql_fetch_array($hresult); $i++)
            {
                if ($i > 0)
                    echo "";
                if ($bo_table == $row[bo_table] ) {
                    echo "<li class=\"active\">";
                }
                else {
                    echo "<li>";
                }
                echo "<a href='$g4[path]/bbs/board.php?bo_table=$row[bo_table]'><span>&middot; $row[bo_subject]</span></a>";
                echo "</li>\n";
            }
            if ($i==0)
                echo "<li><a href=''><span>&middot; 게시판이 없습니다. </span> </a></li>\n";
          ?>
        </ul>
      </div>
    </div>
    <? } ?>
    <div style="margin:20px 0;">
      <img src="<?=$g4[path]?>/xe/theme/<?=$config[cf_xe_theme]?>/img/banner_xe.gif" width="220" height="172" border="0" alt="">
    </div>
  </div>
  <div id="content">
    <? if($bo_table) { ?>
    <div class="subtitle"><?=($board[bo_subject]?"{$board[bo_subject]}":"메인화면")?></div>
    <? if ($sca) { ?>
    <div class="subtitle_sca"> [ <?=$sca?> ]</div>
    <? } ?>
    <div class="subtitle_location">
      <div style="font-size:9pt;color:#aaa;">
        홈 &gt;
        <?
            if ($bo_table) {
                echo $group[gr_subject];
                echo "&gt;".$board[bo_subject];
            }
            else {
                echo "메인화면";
            }
        ?>
      </div>
    </div>
    <div style="clear:both;"></div>
    <div class="subtitle_underline"></div>
    <? } ?>