예제 #1
0
<?php

require_once "includes/global.php";
$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;
예제 #2
0
<?php

require_once "includes/global.php";
$id = 0;
$category = null;
$user = null;
$site = null;
try {
    $user = new CodeKBUser();
    $site = new CodeKBSite($user);
} catch (Exception $e) {
    CodeKBException::backtrace();
}
$site->registermain("main");
$site->registerfunction("list", "showlisting", true);
$site->registerfunction("sort", "showsort");
$site->registerfunction("cookie", "showcookie");
$site->registerfunction("new", "showinput");
$site->registerfunction("change", "showinput");
$site->registerfunction("delete", "showdelete");
$site->registervariable("id", $id);
$site->start();
$site->output();
function main()
{
    global $lang;
    global $id;
    global $user;
    global $site;
    global $category;
    if (is_bool($id) || !is_numeric($id)) {
예제 #3
0
<?php

require_once "includes/global.php";
$fileid = null;
$catid = null;
$category = null;
$file = null;
$user = null;
$site = null;
try {
    $user = new CodeKBUser();
    $site = new CodeKBSite($user);
} catch (Exception $e) {
    CodeKBException::backtrace();
}
$site->registermain("main");
$site->registerfunction("show", "showfile", true);
$site->registerfunction("modify", "showinput");
$site->registerfunction("download", "showdownload");
$site->registervariable("id", $fileid);
$site->registervariable("cat", $catid);
$site->start();
$site->output();
function main()
{
    global $lang;
    global $fileid;
    global $catid;
    global $user;
    global $site;
    global $category;
예제 #4
0
<?php

require_once "includes/global.php";
$user = null;
$site = null;
$user = new CodeKBUser();
$site = new CodeKBSite($user);
$site->registerfunction("login", "showlogin", true);
$site->registerfunction("logout", "showlogout");
$site->registerfunction("register", "showregister");
$site->registerfunction("registered", "showregistered");
$site->start();
$site->output();
function showlogin()
{
    global $lang;
    global $site;
    global $user;
    $site->title($lang['login']['title']);
    $site->addfooter("help.php?on=login", "help", $lang['menu']['help'], $lang['menu']['helpalt']);
    if ($_POST['cancel']) {
        redirect("home.php");
    }
    $form = new CodeKBForm("login.php", "login");
    $form->addtext("user");
    $form->addlabel("user", $lang['general']['username']);
    $form->setrequired("user");
    $form->addpassword("password");
    $form->addlabel("password", $lang['general']['password']);
    $form->setrequired("password");
    $form->addcheckbox("cookie", $lang['login']['cookie']);
예제 #5
0
<?php

require_once "includes/global.php";
$user = null;
$site = null;
try {
    $user = new CodeKBUser();
    $site = new CodeKBSite($user);
} catch (Exception $e) {
    CodeKBException::backtrace();
}
$site->registerfunction("extended", "showextended", true);
$site->registerfunction("search", "showsearch");
$site->start();
$site->output();
function showextended()
{
    global $lang;
    global $conf;
    global $site;
    global $user;
    $site->title($lang['search']['extended']);
    $form = new CodeKBForm("search.php", "search");
    $form->addtext("query");
    $form->addlabel("query", $lang['search']['keywords']);
    $form->addtext("author");
    $form->addlabel("author", $lang['search']['author']);
    $form->addmultiselect("cats", "0", $lang['category']['root']);
    $tmpcat = new CodeKBCategory(0, $user);
    $array = $tmpcat->listcategories("name", 1);
    while (is_array($array) && ($val = array_shift($array))) {
예제 #6
0
<?php

require_once "includes/global.php";
$user = null;
$site = null;
$user = new CodeKBUser();
$site = new CodeKBSite($user);
$site->registermain("main");
$site->start();
$site->output();
function main()
{
    global $site;
    $help = new CodeKBHelp();
    $help->load("home");
    $site->addcontent($help);
}
// main
?>

예제 #7
0
<?php

require_once "includes/global.php";
$help = 0;
$user = null;
$site = null;
try {
    $user = new CodeKBUser();
    $site = new CodeKBSite($user);
} catch (Exception $e) {
    CodeKBException::backtrace();
}
$site->registerfunction("show", "showhelp", true);
$site->registervariable("on", $help);
$site->start();
$site->output();
function showhelp()
{
    global $lang;
    global $user;
    global $site;
    global $conf;
    global $help;
    $site->title($lang['help']['title']);
    try {
        $topic = new CodeKBHelp();
        if (!$help) {
            $help = "index";
        }
        $topic->load($help);
    } catch (Exception $e) {
예제 #8
0
<?php

require_once "includes/global.php";
$id = null;
$cat = null;
$category = null;
$entry = null;
$user = null;
$site = null;
$user = new CodeKBUser();
$site = new CodeKBSite($user);
$site->registermain("main");
$site->registerfunction("show", "showentry", true);
$site->registerfunction("new", "showinput");
$site->registerfunction("modify", "showinput");
$site->registerfunction("change", "showchange");
$site->registerfunction("link", "showlinks");
$site->registerfunction("files", "showfiles");
$site->registervariable("id", $id);
$site->registervariable("cat", $cat);
$site->start();
$site->output();
function main()
{
    global $lang;
    global $id;
    global $cat;
    global $user;
    global $site;
    global $category;
    global $entry;