<?php
/**
 * 后台管理支撑类库
 * @copyright reginx.com
 * $Id$
 */
class admin_lib {
    
    /**
     * 获取左侧导航菜单
     *
     * @return array
     */
    public static function getleftnav(){
        $key = 'admin#left-nav';
        $ret = $GLOBALS['_CACHE']->get($key , '');
        if(!$ret || IS_DEBUG){
            $ret = config_lib::$nav;
            $qm  = core::getobj('nav_tab')->where("ctype = 3")->order('id desc')->getall();
            if(!empty($qm)){
                foreach ($qm as $v){
                    $ret[0]['list'][$v['url']] = $v['name'];
                }
            }
            $GLOBALS['_CACHE']->set($key , $ret , '');
        }
        return $ret;
    }
    
}
?>