<?php
if (!defined('_GNUBOARD_'))
  exit;

$begin_time = get_microtime();

include_once G5_PATH . '/head.sub.php';
?>

<script>
  var tempX = 0;
  var tempY = 0;

  function imageview(id, w, h) {

    menu(id);

    var el_id = document.getElementById(id);

    //submenu = eval(name+".style");
    submenu = el_id.style;
    submenu.left = tempX - (w + 11);
    submenu.top = tempY - (h / 2);

    selectBoxVisible();

    if (el_id.style.display != 'none')
      selectBoxHidden(id);
  }
</script>

<div id="wrap">

  <header id="header">
    <div id="admin_prof">
      <h1>
        <a href="<?php echo G5_ADMIN_URL ?>"><img src="<?= G5_ADMIN_URL ?>/img/logo.png" alt="Avocado Edition" /></a>
        <i><?= G5_GNUBOARD_VER ?></i>
      </h1>
      <p>
        <a href="<?php echo G5_ADMIN_URL ?>/member_form.php?w=u&amp;mb_id=<?php echo $member['mb_id'] ?>" class="name">
          <?= $member['mb_name'] ?>
        </a>
        <a href="<?php echo G5_BBS_URL ?>/logout.php" class="logout">로그아웃</a>
      </p>
    </div>

    <nav id="gnb">
      <ul>
        <li style="border-bottom:1px solid #444;">
          <a href="<?= G5_URL ?>" target="_blank">
            홈페이지 보기
          </a>
        </li>
      </ul>
      <?php
      $gnb_str = "<ul>";
      foreach ($menu as $key => $menuitem) {
        $current_class = $menuitem->selected ? " gnb_1dli_air" : "";
        $gnb_str .= "<li class=\"gnb_1dli{$current_class}\" data-text=\"{$menuitem->name}\">" . PHP_EOL;
        $gnb_str .= "<a href=\"" . G5_ADMIN_URL . $menuitem->url . "\" class=\"gnb_1da\">";
        $gnb_str .= $menuitem->name;
        $gnb_str .= "</a>";
        $gnb_str .= $menuitem->buildHtml();//print_menu1('menu' . $key, 1);
        $gnb_str .= "</li>";
      }
      $gnb_str .= "</ul>";
      echo $gnb_str;
      ?>
    </nav>

  </header>


  <section id="wrapper">

    <aside id="page_top">
      <h2><?php echo $g5['title'] ?></h2>
    </aside>

    <div id="container">
