Пример #1
0
function noGuest()
{
    global $USER;
    if ($USER['id'] == 0) {
        dietoindex();
    }
}
Пример #2
0
<?php

include 'bin/load_system.php';
// --- get REQUEST vars
$EXTERNELVAL['username'] = getrequest('username', 'STR');
$EXTERNELVAL['password'] = getrequest('password', 'STR');
// --- set template
$template->template = 'login';
//$template->additional_headerdata = '<script src="js/jssor.slider.mini.js"></script>';
//$template->placeholder['imageslider'] = $template->getSnippetHTML("partial/imageslider", array());
// --- try to login
if ($EXTERNELVAL['username'] != "" && $EXTERNELVAL['password'] != "") {
    $result = $user->login($EXTERNELVAL['username'], $EXTERNELVAL['password']);
    if ($result->successful) {
        dietoindex();
    } else {
        $template->messages = $result->messages;
    }
}
//---- sideBar
// $template->placeholder["sidecontent"] = $template->getSnippetHTML("sidebar/login", Array());
die($template->rollout());