<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    <title></title>

    <link rel="stylesheet" type="text/css" media="screen" href="<?= THEMEPATH ?>/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" media="screen" href="<?= THEMEPATH ?>/css/AdminLTE.min.css"/>
    <link rel="stylesheet" type="text/css" media="screen" href="<?= THEMEPATH ?>/css/font-awesome.min.css"/>
    <link rel="stylesheet" type="text/css" media="screen" href="<?= THEMEPATH ?>/css/front.css"/>
    <link rel="stylesheet" type="text/css" media="screen" href="<?= THEMEPATH ?>/css/bootstrap-dialog.min.css"/>

</head>
<body>
<!-- Main -->

<div >
    <nav class="navbar fixed navbar-default">
       <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="javascript:void(0);">

                </a>
            </div>
            <ul class="nav navbar-nav">

                <li>
                    <a href="javascript:void(0);" data-url="<?=site_url('main/show')?>">
                        <i class="fa fa-list"></i>
                        <span>考试列表</span>
                    </a>
                </li>
            </ul>

            <!-- Collect the nav links, forms, and other content for toggling -->

            <ul class="nav navbar-nav navbar-right">
              <?php if ($user['level'] > 7): ?>
                  <li>
                      <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                          <i class="fa fa-gear"></i>
                      </a>
                      <ul class="dropdown-menu">
                          <li>
                              <a href="javascript:void(0);" data-url="<?= site_url('admin/category') ?>">
                                  <i class="fa fa-cubes"></i>
                                  科目管理
                              </a>
                          </li>
                          <li>
                              <a href="javascript:void(0);" data-url="<?= site_url('admin/group') ?>">
                                  <i class="fa fa-group"></i>
                                  分组管理
                              </a>
                          </li>
                          <li>
                              <a href="javascript:void(0);" data-url="<?= site_url('admin/question') ?>">
                                  <i class="fa fa-question-circle-o"></i>
                                  试题管理
                              </a>
                          </li>
                          <li>
                              <a href="javascript:void(0);" data-url="<?= site_url('admin/page') ?>">
                                  <i class="fa fa-sticky-note"></i>
                                  试卷管理
                              </a>
                          </li>
                          <li>
                              <a href="javascript:void(0);" data-url="<?= site_url('admin/room') ?>">
                                  <i class="fa fa-th-large"></i>
                                  考场管理
                              </a>
                          </li>
                      </ul>
                  </li>
              <?php endif; ?>
              <?php if ($user['level'] == 9): ?>
              <li>
                  <a href="#" class=" dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-gears"></i>
                  </a>
                  <ul class="dropdown-menu">
                      <li>
                          <a href="javascript:void(0);" data-url="<?= site_url('admin/city') ?>">
                              <i class="fa fa-sitemap"></i>
                              地区管理
                          </a>
                      </li>

                      <li>
                          <a href="javascript:void(0);" data-url="<?= site_url('admin/type') ?>">
                              <i class="fa fa-th-list"></i>
                              题型管理
                          </a>
                      </li>
                      <li>
                          <a href="javascript:void(0);" data-url="<?= site_url('admin/users') ?>">
                              <i class="fa fa-user-o"></i>
                              用户管理
                          </a>
                      </li>
                  </ul>
              </li>
              <?php endif;?>

                <li>
                    <a href="javascript:void(0);" data-open="<?= site_url('user/modify') ?>" title="修改密码" data-size="m">
                        <i class="fa fa-key"></i>
                    </a>
                </li>
                <li class="dropdown user user-menu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
                                  <img src="<?= THEMEPATH ?>/images/avatar/<?= $user['avatar'] ? : 'default.jpg' ?>" height="22px" class="user-image img-circle" title="<?= $user_title ?>"/>
                                  <?= $user['name'] ?>
                                </a>
                                <ul class="dropdown-menu">
                                    <!-- User image -->
                                    <li class="user-header">
                                        <img src="<?= THEMEPATH ?>/images/avatar/<?= $user['avatar'] ? : 'default.jpg' ?>" class="img-circle" alt="User Image">

                                        <p>
                                            <?= $user['name'] ?>
                                            <small></small>
                                        </p>
                                    </li>
                                    <!-- Menu Footer-->
                                    <li class="user-footer">
                                      <div class="pull-left">
                                        <a href="<?= site_url('user/profile') ?>" class="btn btn-default btn-flat">
                                          <i class="fa fa-user"></i> 个人属性
                                        </a>
                                      </div>
                                        <div class="pull-right">

                                            <a href="<?= site_url('/login/out') ?>" class="btn btn-default btn-flat">
                                              <i class="fa fa-sign-out"></i> 退出登录
                                            </a>
                                        </div>
                                    </li>
                                </ul>
                            </li>


            </ul>
        </div>
      </div>
        <!-- /.navbar-collapse -->
    </nav>
  </div>
    <div class="container-fluid">
        <div class="main-content">

        </div>
    </div>

</div>
<!-- End Main -->
<script src="<?= THEMEPATH ?>/js/jquery.min.js"></script>

<!--[if lt IE 9]>
<script src="<?=THEMEPATH?>/js/html5shiv.min.js"></script>
<script src="<?=THEMEPATH?>/js/respond.min.js"></script>
<script src="<?=THEMEPATH?>/css/font-awesome-ie7.min.css"></script>
<![endif]-->

<script src="<?= THEMEPATH ?>/js/bootstrap.min.js"></script>
<script src="<?= THEMEPATH ?>/js/bootstrap-dialog.min.js"></script>
<script src="<?= THEMEPATH ?>/js/custom.js"></script>

<script type="text/javascript">
    $(function () {
        var url = store('url') ? store('url') : "<?=site_url('main/show')?>";

        $('.main-content').load(url);

        $('.nav a').click(function () {
            var href = $(this).data('url');
            store('url', href);
            if (href) {
                $('.main-content').load(href);
            }
        });

    });
</script>
</body>
</html>
