* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ require_once 'config.php'; final class LookingGlass { private $frontpage; private $contact; private $misc; private $routers; function __construct() { global $config; $this->frontpage = $config['frontpage']; $this->contact = $config['contact']; $this->misc = $config['misc']; $this->routers = $config['routers']; } private function render_routers() { print '
'; print ''; print ''; print '
'; } private function render_commands() { print '
'; print ''; print ''; print '
'; } private function render_parameters() { print '
'; print ''; print ''; print '
'; } private function render_buttons() { print '
'; print '
'; print ''; print '
'; print '
'; print ''; print '
'; print '
'; } private function render_header() { print ''; print '
'; if (!isset($this->frontpage['show_title']) || $this->frontpage['show_title']) { print '

'.htmlentities($this->frontpage['title']).'


'; } if (isset($this->frontpage['image'])) { print 'logo'; } print '
'; print '
'; } private function render_content() { print '
'; print ''; print 'Error! '; print '
'; print '
'; print '
'; print '
'; foreach ($this->frontpage['order'] as $element) { switch ($element) { case 'routers': $this->render_routers(); break; case 'commands': $this->render_commands(); break; case 'parameters': $this->render_parameters(); break; case 'buttons': $this->render_buttons(); break; default: break; } } print ''; print '
'; print '
'; print '
'; print '
'; print '
'; print '
'; print '
'; print '
'; print '
'; print '
'; print '
';
    print '
'; print ''; print '
'; print '
'; } private function render_footer() { print ''; } public function render() { print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''.htmlentities($this->frontpage['title']).''; print ''; print ''; print ''; print ''; print ''; $this->render_header(); $this->render_content(); $this->render_footer(); print ''; print ''; print ''; print ''; print ''; print ''; } } $looking_glass = new LookingGlass(); $looking_glass->render(); // End of index.php