<?php require_once __DIR__ . '/inc/controller.class.php'; $controller = new Controller(); $password = REQUEST('p'); if (!empty($_GET['id'])) { $controller->show($_GET['id'], $password); } elseif (!empty($_SERVER['PATH_INFO'])) { $parts = array_values(array_filter(explode('/', $_SERVER['PATH_INFO']))); if (count($parts) >= 1) { switch ($parts[0]) { case 'about': $controller->about(); break; case 'ncrypt': $controller->ncrypt_script(); break; case 'p': // "safe" urls working with all paste ids $controller->show(count($parts) >= 2 ? $parts[1] : '', $password); break; default: // paste ids that are not "special" $controller->show($parts[0], $password); break; } } elseif (!empty($_POST)) { // new post submission $controller->post(POST('data'), POST('syn'), POST('ttl'), POST('p'), POST('cipher', 'AES-256-OFB')); } else { $controller->index();
<?php require_once 'System/Settings.php'; require_once 'System/Autoloader.php'; require_once 'System/Factory.php'; require_once 'System/Controller.php'; require_once 'System/SystemLog.php'; require_once 'System/Model.php'; $autoloader = new Autoloader($AutoLoad); $start = new Controller(); try { $start->run(); } catch (Exception_404 $e) { $start->view('Exceptions/404', false); $start->show(array('ERROR_MSG' => $e->getMessage())); } catch (Exception_Login $e) { $start->view('Exceptions/Login', false); $start->show(array('ERROR_MSG' => $e->getMessage())); } catch (Exception $e) { $start->view('Exceptions/Exception', false); $start->show(array('ERROR_MSG' => $e->getMessage())); }
<?php include_once "controller/controller.php"; $Controller = new Controller(); $Controller->show(); //var_dump($Controller);