<?php /** * Created by PhpStorm. * User: kevinhuron * Date: 18/12/2015 * Time: 14:16 */ session_start(); $request = NULL; if (isset($_REQUEST)) { $request = $_REQUEST; } Index::main($request); use Controller\Controller; class Index { /** MAIN FUNCTION * @param $request */ public static function main($request) { require_once "Starter.php"; new Starter(); $controller = new Controller(); if ($request == NULL && self::check_login() == 0) { echo $_SESSION['twig']->render("login.html.twig"); } else { if ($request == NULL && self::check_login() == 1) { $controller->indexAction(); } else {
{ $this->head = new Head(); $this->banner = new Banner(); $this->navegador = new Navegador(); $this->contenido = new Contenido(); $this->userControl = new UserControl(); $this->srcImg1 = 'images/banner/images/'; $this->srcImg2 = 'images/banner/tooltips/'; $this->view = $vista; } public function main() { if (isset($_POST['grabar']) and $_POST['grabar'] == 'si') { $this->userControl->logueo(); } $retornar = "<html>"; $retornar .= $this->head->imprimirHead(); $retornar .= "<body>"; $retornar .= $this->banner->imprimirBanner($this->srcImg1, $this->srcImg2); $retornar .= $this->navegador->imprimirNavegador(); $retornar .= "<div id='main'>"; $retornar .= $this->contenido->imprimirContenido(); $retornar .= "</div>"; $retornar .= "</body>"; $retornar .= "</html>"; echo $retornar; } } $index = new Index(); $index->main();
<?php if (version_compare(PHP_VERSION, '5.1.0', '<')) { exit('Your current PHP version is: ' . PHP_VERSION . '. Haxe/PHP generates code for version 5.1.0 or later'); } require_once dirname(__FILE__) . '/lib/php/Boot.class.php'; Index::main();