关于pc的多站点处理

1.想要实现不同的站点的处理,就要找到siteid这个处理,站点公用的就去掉,站点私有地就保护起来。

    function init () {
        $tree = pc_base::load_sys_class('tree');
        $tree->icon = array('   │ ','   ├─ ','   └─ ');
        $tree->nbsp = '   ';
        $userid = $_SESSION['userid'];
        $admin_username = param::get_cookie('admin_username');

        $table_name = $this->db->table_name;

        $result = $this->db->select('','*','','listorder ASC,id DESC');
        $array = array();
        foreach($result as $r) {
            $r['cname'] = L($r['name']);
            $r['str_manage'] = '$r['id'].'&menuid='.$_GET['menuid'].'">'.L('add_submenu').' | $r['id'].'&menuid='.$_GET['menuid'].'">'.L('modify').' | $r['id'].'&menuid='.$_GET['menuid'].'\',\''.L('confirm',array('message'=>$r['cname'])).'\')">'.L('delete').' ';
            $array[] = $r;
        }

        $str  = "
                    
                    \$id
                    \$spacer\$cname
                    \$str_manage
                ";
        $tree->init($array);
        $categorys = $tree->get_tree(0, $str);
        include $this->admin_tpl('menu');

你可能感兴趣的:(phpcms)