public function LaunchApplication()
 {
     $uDAL = new userDAL();
     $dtv = new DateTimeView();
     $layv = new LayoutView();
     $lm = new LoginModel($uDAL);
     if (isset($_GET["register"])) {
         $rv = new RegisterView($rm);
         $rm = new RegisterModel($uDAL);
         $rc = new RegisterControl($rm, $rv);
         $rc->tryRegisterUser();
         //Runs the tryRegisteruser from registercontroller.
         $layv->render($lm->isloggedin(), $rv, $dtv);
     } else {
         $logv = new LoginView($lm);
         $lc = new LoginController($logv, $lm);
         $lc->init();
         $layv->render($lm->isLoggedIn(), $logv, $dtv);
         //Renders the HTML-layout.
     }
 }
Beispiel #2
0
<?php

session_start();
//INCLUDE THE FILES NEEDED...
require_once 'controller/loginController.php';
require_once 'model/loginModel.php';
require_once 'model/RegisterModel.php';
require_once 'model/User.php';
require_once 'model/UserDAL.php';
require_once 'view/LoginView.php';
require_once 'view/DateTimeView.php';
require_once 'view/LayoutView.php';
require_once 'view/RegisterView.php';
//MAKE SURE ERRORS ARE SHOWN... MIGHT WANT TO TURN THIS OFF ON A PUBLIC SERVER
error_reporting(E_ALL);
ini_set('display_errors', 'On');
$uDAL = new UserDAL();
//CREATE OBJECTS OF THE VIEWS
$lm = new LoginModel($uDAL);
$rm = new RegisterModel($uDAL);
$v = new LoginView($lm);
$rv = new RegisterView();
$dtv = new DateTimeView();
$lv = new LayoutView();
$loginController = new LoginController($v, $lm, $rv, $rm);
$loginController->init();
$lv->render($lm->getLoginStatus(), $v, $dtv, $rv);
Beispiel #3
0
<?php

/**
 * Авторизация, точка входа.
 */
define('IS_USER_ACTION', 1);
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php';
require_once ABS_PATH . '/classes/yii/tinyyii.php';
require_once __DIR__ . '/controllers/LoginController.php';
$module = new CModule('login');
$module->setBasePath(dirname(__FILE__));
$controller = new LoginController('login', $module);
$controller->init();
// инициализация контролера
$controller->run('index');
// запуск обработчика
//@todo: Отключает лишнюю обертку в template3
$stretch_page = true;
$registration_page = $registration_folder = true;
$footer_registration = true;
$hide_banner_top = true;
$content = 'tpl.index.php';
include ABS_PATH . '/template3.php';