function tab_nginx_domains() { $projects = new Webinterface\Helper\Projects(); $domains = new Webinterface\Helper\Domains(); $tpl_data = array('no_layout' => true, 'project_folders' => $projects->getProjects(true), 'domains' => $domains->listDomains()); render('Config\\tab-nginx-domains', $tpl_data); }
// if the file exists, require it if (file_exists($file) === true) { require $file; } /*else { throw new \Exception( sprintf('Autoloading Failure! Class "%s" requested, but file "%s" not found.', $class, $file) ); }*/ }); function exception_handler(Exception $e) { $trace = str_replace(array('#', '):'), array('<br>#', "):<br> →"), $e->getTraceAsString()); include WPNXM_VIEW_DIR . 'header.php'; $html = '<h2 class="heading">Exception</h2>'; $html .= '<div class="centered"><div class="cs-message">'; $html .= '<div class="cs-message-content" style="width: 100%; font-size: 16px; height: auto !important;">'; $html .= '<div class="error"><h2>Something Bad Happened</h3>'; $html .= '<p>' . $e->getMessage() . '</p>'; $html .= '<p>' . $trace . '</p>'; $html .= '</div></div></div></div>'; echo $html; include WPNXM_VIEW_DIR . 'footer.php'; } set_exception_handler('exception_handler'); // create tools menu (cached html menu) if (!file_exists(WPNXM_DATA_DIR . 'tools-topmenu.html')) { $projects = new Webinterface\Helper\Projects(); $projects->listTools(); unset($projects); }
/** * WPИ-XM Server Stack * Copyright © 2010 - onwards, Jens-André Koch <*****@*****.**> * http://wpn-xm.org/ * * This source file is subject to the terms of the MIT license. * For full copyright and license information, view the bundled LICENSE file. */ function index() { $projects = new Webinterface\Helper\Projects(); $tpl_data = array('load_jquery_additionals' => true, 'numberOfProjects' => $projects->getNumberOfProjects(), 'listProjects' => $projects->listProjects(), 'numberOfTools' => $projects->getNumberOfTools(), 'listTools' => $projects->listTools()); render('page-action', $tpl_data); }