Ejemplo n.º 1
0
<?php

// TODO: require right stuff in here!
//INCLUDE THE FILES NEEDED...
require_once 'Settings.php';
// view
require_once 'view/LayoutView.php';
// controller
require_once 'controller/MasterController.php';
if (\Settings::DisplayError) {
    error_reporting(E_ALL);
    ini_set('display_errors', 'On');
}
$htmlView = new \view\LayoutView();
$masterController = new \controller\MasterController();
$masterController->run();
$view = $masterController->generateOutput();
$nav = $masterController->generateNavigation();
$htmlView->renderHTMLPage($view, $nav);
Ejemplo n.º 2
0
<?php

require_once 'config.php';
$controller = new \controller\MasterController();
$controller->handleInput();
$page = new \view\ContentView();
echo $page->Render($controller->generateOutput(), $controller->IsLoggedIn());
<?php

/**
 * Solution for assignment 2
 * @author Daniel Toll
 */
require_once "Settings.php";
require_once "controller/MasterController.php";
if (Settings::DISPLAY_ERRORS) {
    error_reporting(-1);
    ini_set('display_errors', 'ON');
}
//session must be started before LoginModel is created
session_start();
$Master = new \controller\MasterController();
$Master->run();
Ejemplo n.º 4
0
<?php

require_once "src/app/controller/MasterController.php";
if (Settings::DEBUG_MODE) {
    ini_set('display_errors', 'On');
    ini_set('display_errors', 1);
    error_reporting(E_ALL);
}
$mc = new \controller\MasterController();
$mc->run();
Ejemplo n.º 5
0
<?php

// \
require_once 'Settings.php';
require_once 'controller/MasterController.php';
require_once 'view/RenderView.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');
$mController = new \controller\MasterController();
$mController->run();
$rView = new \view\renderView();
$rView->render($mController->getHTML(), $mController->getNavigation());
Ejemplo n.º 6
0
<?php

/**
 * Solution for assignment 2
 * @author Daniel Toll
 */
require_once "Settings.php";
require_once "controller/MasterController.php";
require_once "model/DAL/Connect.php";
if (Settings::DISPLAY_ERRORS) {
    error_reporting(-1);
    ini_set('display_errors', 'ON');
}
//session must be started before LoginModel is created
session_start();
//Dependency injection
$mc = new \controller\MasterController();
//Controller must be run first since state is changed
$mc->doMasterControl();
//Generate output
$mc->generateOutput();
Ejemplo n.º 7
0
<?php

require_once 'controller/MasterController.php';
ini_set('max_execution_time', 100);
$controller = new \controller\MasterController();
$controller->doControlApp();
Ejemplo n.º 8
0
<?php

//phpinfo();
session_start();
error_reporting(E_ALL);
ini_set('display_errors', 'On');
require_once 'controller/MasterController.php';
$master = new controller\MasterController();
$master->runProgram();
Ejemplo n.º 9
0
require_once "view/LayoutView.php";
require_once "view/HomeView.php";
require_once "view/CalculatorView.php";
require_once "view/ConverterView.php";
require_once "view/PeriodicTableView.php";
require_once "model/CalculatorModel.php";
require_once "model/ConverterModel.php";
require_once "model/PeriodicTableModel.php";
require_once "controller/CalculatorController.php";
require_once "controller/ConverterController.php";
require_once "controller/PeriodicTableController.php";
require_once "controller/MasterController.php";
//session must be started before LoginModel is created
session_start();
//Controller must be run first since state is changed
$calcModel = new \model\CalculatorModel();
$convModel = new \model\ConverterModel();
$periodicModel = new \model\PeriodicTableModel();
$calcView = new \view\CalculatorView();
$convView = new \view\ConverterView();
$periodicView = new \view\PeriodicTableView();
$calcControl = new \controller\CalculatorController($calcModel, $calcView);
$convControl = new \controller\ConverterController($convModel, $convView);
$periodicControl = new \controller\PeriodicTableController($periodicModel, $periodicView);
$masterControl = new \controller\MasterController($calcControl, $convControl, $periodicControl);
$masterControl->handleInput();
//Generate output
$view = $masterControl->generateOutput();
$dtv = new \view\DateTimeView();
$layoutView = new \view\LayoutView();
$layoutView->render($view, $dtv);
Ejemplo n.º 10
0
<?php

require_once "Controller/MasterController.php";
require_once "Model/HandleRequest.php";
require_once "View/RenderOutput.php";
require_once "View/FormatOutput.php";
error_reporting(E_ALL);
ini_set('display_errors', 'Off');
$handleRequest = new \model\HandleRequest();
$renderView = new \view\RenderOutput();
$formatOutput = new \view\FormatOutput();
$controller = new \controller\MasterController($handleRequest, $renderView, $formatOutput);
$controller->StartApplication();
Ejemplo n.º 11
0
<?php

/**
 * Solution for assignment 2
 * @author Daniel Toll
 */
require_once "Settings.php";
require_once "controller/MasterController.php";
require_once "model/LoginModel.php";
require_once "view/LoginView.php";
require_once "view/DateTimeView.php";
require_once "view/LayoutView.php";
require_once "view/NavigationView.php";
require_once "view/RegisterView.php";
if (Settings::DISPLAY_ERRORS) {
    error_reporting(-1);
    ini_set('display_errors', 'OFF');
}
//session must be started before LoginModel is created
session_start();
//Dependency injection
$m = new \model\LoginModel();
$v = new \view\LoginView($m);
$rv = new \view\RegisterView();
$c = new \controller\MasterController();
//Controller must be run first since state is changed
$c->doApp();
Ejemplo n.º 12
0
<?php

require_once 'controller/MasterController.php';
//error_reporting(E_ALL);
//ini_set('display_errors', 'On');
$master = new controller\MasterController();
$master->RunProgram();
Ejemplo n.º 13
0
<?php

session_start();
//INCLUDE THE FILES NEEDED...
require_once 'Settings.php';
require_once 'view/DateTimeView.php';
require_once 'view/LayoutView.php';
require_once 'model/Login.php';
require_once 'controller/MasterController.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');
//CREATE OBJECTS OF THE CONTROLLER
$masterController = new \controller\MasterController();
$masterController->handleInput();
//Creates the date/time atm, and the LayoutView to render out html.
$dtv = new DateTimeView();
$lv = new LayoutView();
$lv->render($masterController->getSession(), $masterController->getHTML(), $dtv, $masterController->getLink());
Ejemplo n.º 14
0
<?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');
error_reporting(0);
//INCLUDE THE FILES NEEDED...
require_once 'controller/MasterController.php';
//CREATE OBJECTS OF THE CONTROLLERS
$mc = new \controller\MasterController();
$mc->Run();
Ejemplo n.º 15
0
<?php

/**
 * Project in web development with PHP
 * @author Joakim Holmewi
 * With some references from Daniel Toll
 */
require_once "Settings.php";
require_once "exceptions/ImageException.php";
require_once "exceptions/ProductException.php";
require_once "exceptions/DatabaseException.php";
require_once "exceptions/CategoryException.php";
require_once "view/HTMLView.php";
require_once "controller/MasterController.php";
if (Settings::DISPLAY_ERRORS) {
    error_reporting(-1);
    ini_set('display_errors', 'ON');
}
session_start();
$mc = new \controller\MasterController();
$mc->doMasterControl();
$container = $mc->generateContainer();
$aside = $mc->generateAside();
$html = new \view\HTMLView();
$html->getHTML($container->getResponse(), $aside->getResponse());
Ejemplo n.º 16
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once "controller/MasterController.php";
require_once "view/HTMLView.php";
$mc = new \controller\MasterController();
$mc->handleInput();
$view = $mc->generateOutput();
$htmlView = new \view\HTMLView("utf-8");
echo $htmlView->getHTMLPage("I like it!", $view->getHTML());
Ejemplo n.º 17
0
<?php

/**
 * Created by PhpStorm.
 * User: Benjamin
 * Date: 2015-10-26
 * Time: 20:35
 */
require_once "controller/MasterController.php";
require_once "controller/LoginController.php";
require_once "model/FileDAL.php";
require_once "model/LoginDAL.php";
require_once "model/DBConn.php";
require_once "view/View.php";
require_once "view/FileView.php";
require_once "view/LoginView.php";
require_once "view/UploadView.php";
require_once "view/LoggedUser.php";
require_once "/var/conf/conf.php";
session_start();
$lv = new \view\LoginView();
$up = new \view\UploadView();
$v = new view\View();
$ld = new \model\LoginDAL();
$fileDal = new \model\FileDAL();
$lc = new \controller\LoginController($v, $lv, $ld);
$c = new controller\MasterController($up, $v, $fileDal, $lv, $ld, $lc);
$c->doControl();
Ejemplo n.º 18
0
<?php

session_start();
require_once 'Settings.php';
require_once 'view/renderView.php';
require_once 'controller/masterController.php';
error_reporting(E_ALL);
ini_set('display_errors', 'On');
$mController = new \controller\MasterController();
$mController->run();
$rView = new \view\RenderView();
$rView->render($mController->getHTML());
Ejemplo n.º 19
0
<?php

require_once __DIR__ . "/common/RequireAll.php";
$htmlView = new common\HTMLView();
$masterController = new \controller\MasterController();
$body = $masterController->render();
$htmlView->echoHTML($body);
/**
 * Created by PhpStorm.
 * User: dav
 * Date: 2014-09-21
 * Time: 11:57
 */
Ejemplo n.º 20
-1
<?php

require_once "controller/MasterController.php";
$mc = new \controller\MasterController();
header('Content-Type: text/html; charset=ISO-8859-1');
$mc->renderPage();
Ejemplo n.º 21
-1
<?php

require_once "src/controller/MasterController.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');
date_default_timezone_set("Europe/Stockholm");
//TODO: MOVE BACK TO MASTER CONTROLLER
//TODO: check why testcase 1.8 doesnt work now?? in automated tests.....
$app = new \controller\MasterController();
$app->run();
Ejemplo n.º 22
-2
<?php

//Include needed file
require_once 'config.php';
$controller = new \controller\MasterController();
$lv = new \view\DefaultView();
$m = new \model\LoginModel();
$v = new \view\LoginView($m);
$lv->getHTML($v->isLoggedIn(), $controller->main());
Ejemplo n.º 23
-5
<?php

require_once 'controller/MasterController.php';
ini_set('max_execution_time', 100);
$controller = new \controller\MasterController();
$controller->doLogin();
Ejemplo n.º 24
-6
<?php

require_once "controller/MasterController.php";
error_reporting(E_ALL);
ini_set('display_errors', 'On');
$m = new controller\MasterController();
$m->run();