Example #1
0
<?php

include 'core/Page.php';
if (!Session::logged_in()) {
    Page::Redirect('login');
}
if (!Auth::ACL("admin") && !Auth::ACL("su")) {
    Page::Redirect('dash');
}
$p = new Page();
if (!$p->ajax) {
    $p->HTML('header.html', array("###MENU###" => Dropdown_menu($p)));
}
$p->title = "Your Website";
$p->CSS("main.css");
$p->Jquery();
$getpost = getpost();
if (!isset($getpost['ID'])) {
    Page::Redirect('dash');
}
if (isset($getpost['new'])) {
    $p->JS('notifier.js');
    $p->JS('Notifier.info("Editing new Item");');
}
$p->HTML('<BR>');
global $auth_database;
$profile_model = new Profile($auth_database);
$auth_model = new Auth($auth_database);
$a = $auth_model->Get($getpost['ID']);
if (false_or_null($a)) {
    Page::Redirect('profiles');