public function displayTemplate($file, $params = array()) { $template = new TemplatePage($file); $template->assign($params); $result = $template->display(); App::setTranslation('templates/' . $this->file); return $result; }
protected static function displayPage($file) { $template = new TemplatePage($file); $template->assignGlobals(self::$templateGlobals); $template->assign(self::$templateVars); $result = $template->display(); App::setTranslation('controllers/' . App::getController()); return $result; }
public function __construct() { parent::__construct('chunks/admin-list'); }
public function __construct() { parent::__construct('chunks/admin-form'); $this->vars['fields'] = array(); }
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Fecha creacion = 20-02-2015 Desarrollador = CAGC Fecha modificacion = 27-01-2016 Usuario Modifico = CAGC */ include "../Class/Utilities.php"; include "../Class/TemplatePage.php"; session_start(); if ($_GET['p'] == 'login') { $objUtilities = new Utilities('localhost', 'root', '', 'nabu'); $_SESSION['objUtilities'] = $objUtilities; $objTemplate = new TemplatePage($objUtilities); $objTemplate->initTemplate($_GET['p']); unset($_SESSION['role']); } else { if (isset($_SESSION['role']) and $_SESSION['role'] != '') { $objTemplate = new TemplatePage($_SESSION['objUtilities']); if ($objTemplate->objUtilities->validateRole($_GET['p'], $_SESSION['role'])) { $objTemplate->initTemplate($_GET['p']); } else { header("location:../Pages/nabu.php?p=error"); } } else { header("location:../Pages/nabu.php?p=login"); } }
protected static function displayPage($file) { $template = new TemplatePage($file); $template->assignGlobals(self::$templateGlobals); $template->assign(self::$templateVars); $result = $template->display(); return $result; }