Пример #1
0
 >
                                
                                <span class="title"><?php 
        echo $one->name;
        ?>
</span>
								<?php 
        if (!$one->url) {
            ?>
                                <span class="arrow"></span>
								<?php 
        }
        ?>
                            </a>
							<?php 
        $menu2 = Menu::getList($one->id);
        if ($menu2) {
            ?>
                            <ul class="sub-menu">
								<?php 
            foreach ($menu2 as $two) {
                ?>
                                <li>
                                    <a id="menu_2_<?php 
                echo $two->id;
                ?>
" class="" href="<?php 
                echo $two->url;
                ?>
"><?php 
                echo $two->name;
Пример #2
0
 function action_index()
 {
     $res = Menu::getList();
     $page = $this->getMenu($res, 0);
     echo $page;
 }
 public function article()
 {
     load('extend');
     $id = $_GET['detail'];
     //获取完整导航数据
     $menu = new Menu();
     $nav = $menu->getMenu();
     $this->assign('menu', $nav);
     //获取当前一级列表数据
     $name = $menu->getLoneMenuName($id);
     $this->assign('Lone', $name);
     //获取二级列表数据
     $list = $menu->getList($id);
     $this->assign('subList', $list);
     //获取内容
     $content = new Content($id);
     //获取点击文章后的路径数组
     $nav_arr = $content->getArticleNavPath($id);
     $this->assign('navarr', $nav_arr);
     $articleArr = $content->getArtDetail();
     $this->assign('content', $articleArr['artdetail']);
     $this->assign('hot', $articleArr['hot']);
     $this->display("Content:detail");
 }
Пример #4
0
function save()
{
    $res = Menu::getList();
    $page = getMenu($res, 0);
    file_put_contents($setting["SCRIPT_PATH"] . $setting["TEMPLATE_PATH"] . "/menu.html", $page, LOCK_EX);
    header("Location: index.php?menu=view&status=changesSaved");
}