<?php require "app/controller/controller.php"; $mvc = new controller(); if (empty($_GET['action'])) { $_GET['action'] = "home"; } if ($_GET["action"] == "home") { $mvc->home(); } elseif ($_GET['action'] == "login") { $mvc->pageLogin(); } elseif ($_GET['action'] == "contenido") { $mvc->content(); } elseif ($_GET['action'] == "auscultacion") { $mvc->panel2(); } elseif ($_GET['action'] == "diagnostico") { $mvc->panel3(); } elseif ($_GET['action'] == "panel") { $mvc->panel_admin(); } else { $mvc->error(); }
private final function _getContents($file) { $this->setHeaderType(substr(strstr($file, '.'), 1)); //find any addins for this view and include them so they are executable $addins = str_replace(LWAF_PAGEROOT, LWAF_ADDINROOT, $file); //quick and dirty if (file_exists($addins)) { @(include_once $addins); if (!empty($this->addins)) { foreach ($this->addins as $anum => $afile) { @(include_once $afile); } } } //get data for view and attach to static container ob_end_flush(); ob_start("ob_gzhandler"); include $file; controller::$content = ob_get_contents(); ob_end_clean(); }