<?php /** * As developers we need to maintain and control information that site admins * have no use for. This information includes, but is not limited to: Error Logs, * Script Execution Times, Database Query Totals, Slow Queries, and Peak Traffic * Times. * * On the same token, admins control content that we do not need to be bothered * with. This is what /Dev is for, showing developers the information they need * to make sound decisions and to nip errors in the bud, without the extra clutter * and hastle of actual page content. * * This also opens the door to adding a cloud editor in the Dev environment * so that devs can log on from any computer and make code changes online. */ import::routes(); import::RequestHandler(); import::template(); import::models(); routes::classmap('dev', '/dev', array('/' => 'Dashboard', '/login' => 'Login', '/logout' => 'Logout'));
<?php $isfront = routes::isFrontPage(); ?> <header id="header" class="index-header"> <div class="container"> <h1 class="logo pull-left"> <a href="<?php echo URL::site(); ?> " title="Morning pages">Morning Pages</a> </h1> <div data-bind="ImAburger:true" class="hamburger-container"> <div class="hamburger-line"></div> <div class="hamburger-line"></div> <div class="hamburger-line"></div> </div> <div id="mobile-nav" class="mobile-navigation"> <ul> <li class="header">Navigation</li> <li><a href="#about">About</a></li> <li><a href="<?php echo URL::site('write'); ?> " title="Write">Write<?php echo user::logged() ? ' (' . user::get()->current_streak . ')' : ''; ?> </a></li> <li class="<?php
<?php import::routes(); import::RequestHandler(); import::template(); import::models(); routes::classmap('admin', '/admin', array('/' => 'Dashboard'));
<?php import::routes(); routes::appmap(array('/install' => 'install.php', '/admin(.*?)' => 'admin/routes.php', '/dev(.*?)' => 'dev/routes.php'));
public static function appmap($routes) { foreach ($routes as $regex => $appfile) { if (preg_match('~^' . $regex . '$~', ROUTES_CURRENTURI)) { import::app($appfile); return true; } } die('LogError: No Routes Found For ' . ROUTES_CURRENTURI); } public static function classmap($app, $dir_prefix, $routes) { foreach ($routes as $regex => $appfile) { if ($regex == '/') { // sometimes users will enter /admin instead of /admin/, so if // the regex is a /, wee need to change it to /? to account for // this issue. $regex .= '?'; } if (preg_match('~^' . $dir_prefix . $regex . '$~', ROUTES_CURRENTURI)) { import::app($app . '/' . $appfile . '.php'); $app = new $appfile(); return true; } echo $dir_prefix . $regex . "\n"; } die('LogError: No Class Routes Found For ' . ROUTES_CURRENTURI); } } routes::seturi();
$smarty->assign('to', $_POST['to']); $smarty->assign('weight', $_POST['weight']); $smarty->assign('proceed', $proceed); } } else { echo "COMPLETE INFORMATION NECCESSARY"; } } if (isset($_POST['payNow'])) { $order = new orders(); $order->add($_SESSION['userid'], $_POST['from'], $_POST['to'], $_POST['weight'], 0); echo "thankyou"; } if (isset($_POST['POD'])) { echo "thankyou"; $order = new orders(); $order->add($_SESSION['userid'], $_POST['from'], $_POST['to'], $_POST['weight'], 1); } $route = new routes(); $allRoutes = $route->getAll(); $smarty->assign('allRoutes', $allRoutes); $smarty->display('neworder.tpl'); //include neworder template $smarty->display('footer.tpl'); //include footer file } else { header('Location:' . URL . 'notauthorised.php'); } } else { header('Location:' . URL . 'noaccess.php'); }