$PATH = explode('/', $URI); $PAGE_REQUEST = str_replace('.', null, array_shift($PATH)); if (is_file('web-interfaces/pts_webui_' . $PAGE_REQUEST . '.php')) { $webui_class = 'pts_webui_' . $PAGE_REQUEST; } else { if (is_file('html/' . $PAGE_REQUEST . '.html')) { $webui_class = $PAGE_REQUEST; } else { // or pts_webui_intro on invalidated classes $webui_class = 'pts_webui_loader'; } } pts_webui::websocket_setup_defines(); $webui_class = pts_webui::load_web_interface($webui_class, $PATH, 'web-interfaces/', 'html/'); if ($webui_class === false) { $webui_class = pts_webui::load_web_interface('pts_webui_main', $PATH, 'web-interfaces/', 'html/'); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html style="height: 100%;"> <head> <link href="assets/pts-web-interface.css" rel="stylesheet" type="text/css" /> <?php if (stripos($_SERVER['HTTP_USER_AGENT'], 'iPod') || stripos($_SERVER['HTTP_USER_AGENT'], 'iPhone') || stripos($_SERVER['HTTP_USER_AGENT'], 'Android')) { ?> <link href="assets/pts-mobile-interface.css" rel="stylesheet" type="text/css" /> <?php } ?> <script src="js/pts-web-interface.js" type="text/javascript"></script> <script src="js/pts-web-socket.js" type="text/javascript"></script>
$PAGE_REQUEST = 'main'; } } if (isset($_SESSION['AdminLevel'])) { if ($_SESSION['AdminLevel'] == -40 && (stripos($PAGE_REQUEST, 'admin') === false && stripos($PAGE_REQUEST, 'result') === false) && $PAGE_REQUEST != 'logout') { $PAGE_REQUEST = 'admin'; } else { if ($_SESSION['AdminLevel'] > 0 && stripos($PAGE_REQUEST, 'admin') !== false) { $PAGE_REQUEST = 'main'; } } } define('PAGE_REQUEST', $PAGE_REQUEST); $page_class = 'phoromatic_' . PAGE_REQUEST; pts_webui::websocket_setup_defines(); $page_class = pts_webui::load_web_interface($page_class, $PATH, '../pages/'); if (substr($PAGE_REQUEST, 0, 2) == 'r_' || isset($_GET['download'])) { // RESOURCE phoromatic_server::prepare_database(); $page_class::render_page_process($PATH); if (phoromatic_server::$db != null) { phoromatic_server::$db->close(); } return; } ?> <!DOCTYPE html> <html> <head> <script src="/phoromatic.js?<?php echo date('Ymd') . PTS_CORE_VERSION;