Exemplo n.º 1
0
$user = null;
$site = null;
$admin = null;
$group = null;
$userid = null;
$user = new CodeKBUser();
$site = new CodeKBSite($user);
$site->registermain("main");
$site->registerfunction("menu", "showmenu", true);
$site->registerfunction("groups", "showgroups");
$site->registerfunction("users", "showusers");
$site->registerfunction("modifygroup", "showgroupmod");
$site->registerfunction("modifyuser", "showusermod");
$site->registervariable("group", $group);
$site->registervariable("user", $userid);
$site->start();
$site->output();
function main()
{
    global $lang;
    global $user;
    global $admin;
    global $site;
    try {
        $admin = new CodeKBAdmin($user);
    } catch (Exception $e) {
        $site->addcontent(notice($lang['admin']['accessdenied']));
        return false;
    }
    return true;
}