Beispiel #1
0
 */
/* 
 * Init routine
 */
include "inc/init.inc.php";
/* 
 * Defining the pages
 */
$pages = array("login");
/* 
 * Controller routines
 */
$error = 0;
$username = $_POST["username"];
$password = $_POST["password"];
$res = UserCtl::Login(SessionCtl::GetSession(), $username, $password);
if ($res["status"] == "FAILURE") {
    $error++;
}
if ($res["status"] == "SUCCESS") {
    $res = UserCtl::GetUserData(SessionCtl::GetSession());
    $username = $res["username"];
    setcookie('username', $username);
    $userdata = UserCtl::GetUserData(SessionCtl::GetSession());
    $pages = array("userdata_details");
}
/* 
 * Assignments to the engine
 */
$tpl->assign("content_pages", $pages);
$tpl->assign("error", $error);