Esempio n. 1
0
<?php

$perms = new Permission();
if (!$perms->IsAllowed('groups')) {
    Exceptions::PrintOut("You do not have access to the Users and groups");
}
/**
 * Check if post names are set
 */
$post_check = Post::Check(array("title", "users", "banned", "history"));
/**
 * If post names are all set, try to insert the group
 */
if ($post_check) {
    $new_user = new UsersAndGroups();
    $result = $new_user->NewGroup($_POST['title'], array($_POST['users'], $_POST['banned'], $_POST['history']));
    /*
     * If result is not true, output the error variable
     */
    if (!$result) {
        $error = $new_user->error;
    }
}
/**
 * Include view template file
 */
include 'views/template/new_group.html';
Esempio n. 2
0
<?php

$perms = new Permission();
if (!$perms->IsAllowed('history')) {
    Exceptions::PrintOut("You do not have access to the History");
}
/**
 * Check $_POST variables for "search"
 */
$post_check = Post::Check(array("search"));
if ($post_check) {
    /**
     * If variable is passed, search for the historic messages with passed variable
     */
    $historic = History::SearchHistory($_POST['search']);
} else {
    /**
     * Else output the default historic messages
     */
    $historic = History::ListHistory();
}
include 'views/template/history.html';
Esempio n. 3
0
<?php

$perms = new Permission();
if (!$perms->IsAllowed('banned')) {
    Exceptions::PrintOut("You do not have access to the Banned area");
}
/**
 * Check for $_GET variable "id"
 */
$delcheck = Post::GCheck(array("id"));
/**
 * If variable is set, delete the user and return to page
 */
if ($delcheck) {
    UserBan::BanDelete($_GET['id']);
    header("Location: index.php?page=UserBan");
}