//$this->helper->writeDatas(); } else { if ($action == 'tt_news') { require 'worker.php'; $this->worker = new Worker($this->ini_array, $this->mysql, $this->pathToLogfile, $action); $this->worker->migrateImagesTtNews(); } else { if ($action == 'tt_news_dam') { require 'worker.php'; $this->worker = new Worker($this->ini_array, $this->mysql, $this->pathToLogfile, $action); $this->worker->migrateImagesTtNewsDam(); } else { if ($action == 'alter_table_45') { require 'alter.php'; $this->alter = new Alter(); $this->alter->main(); } } } } } } echo '<form method="GET" action="main.php"> <input type="submit" name="back" value="back" /> </form>'; } } // end class $controller = new Controller(); $controller->main(); die;
<?php // UTF-8 marker äöüÄÖÜ߀ // mini framework for web based applications implemented in PHP 5 // - implementing Model View Controller architecture // - class Controller acting as a central entry point // - uniform error handling // - common base class Page // This file index.php is the only file which is accessible via apache. // All other files are located in some subdirectory being protected via .htaccess. require_once "./framework/Controller.php"; Controller::main(true); // site runs in production mode
<?php require_once "app/controller/controller.php"; require_once "app/model/model.php"; $blog = new Controller(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Your Personal Blog</title> <script type="text/javascript" src="assets/js/ckeditor/ckeditor.js"></script> <link rel="icon" href="assets/img/favicon.ico" type="image/x-icon"/> <link rel="stylesheet" type="text/css" href="assets/css/style.css"> </head> <body> <?php $blog->main(); ?> </body> </html>
<?php require_once 'inc.php'; $_POST = @array_map_recursive('trim', $_POST); $_GET = @array_map_recursive('trim', $_GET); $query = isset($_GET['q']) ? $_GET['q'] : 'home'; $query = rtrim($query, '/'); $query = mb_strtolower($query); $query = explode('/', $query); try { $a = Controller::main($query); session_start(); ob_start(); $a->execute(); ob_end_flush(); } catch (UnknownClass $e) { ob_end_clean(); ControllerLost::newInstance()->execute($e); } catch (Exception $e) { ob_end_clean(); ControllerError::newInstance()->execute($e); }