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.
39 lines
1.2 KiB
39 lines
1.2 KiB
<?php
|
|
|
|
require_once "config.php";
|
|
require_once __ROOT__ . "/head.php";
|
|
require_once __ROOT__ . "/entity/Menu.php";
|
|
|
|
//菜单信息
|
|
$menus = array("API" => new Menu("百度API配置", "/admin/ApiConfig.php"), new Menu("垃圾分类", "/admin/WasteSorting.php"), new Menu("题目管理", "/admin/Question.php"));
|
|
|
|
getMenu("后台管理");
|
|
|
|
|
|
echo <<<EOF
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav">
|
|
EOF;
|
|
foreach ($menus as $key => $value) {
|
|
|
|
if ($value instanceof Menu) {
|
|
echo '<li class="nav-item">';
|
|
|
|
echo '<a class="nav-link" href="' . $value->getInterface() . '">' . $value->getName() . '</a>';
|
|
|
|
echo '</li>';
|
|
}
|
|
|
|
}
|
|
echo <<<EOF
|
|
<li class="nav-item">
|
|
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true"><span style="color: black">欢迎管理员<b style="color: red">luffy</b>登陆</span></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
EOF;
|
|
|