function renderTemplate($viewName, $data = array()) { import("framework.view.Template"); $temp = new Template(); $temp->setView("application/views/" . $viewName); foreach ($data as $key => $value) { $temp->set(strToLower($key), $value); } return $temp->render(); }
/** * @param \Throwable $instance Exception or Error instance * @throws Error */ public static function handleUncaughtException($instance) { @ob_end_clean(); if (Database::getInstance() && Database::getInstance()->inTransaction()) { Database::getInstance()->rollBack(); } if (!$instance instanceof Error) { $instance = new self($instance->getMessage(), intval($instance->getCode()), $instance, $instance->getTrace()); } Template::setView('Misc/Error'); Template::putContext('instance', $instance); Filter::preRender(); Template::render(); Filter::afterRender(); exit; }
} self::$fileInfo[] = ADMIN_CONFIGURATION::$CONFIG['adminURL'] . LANG . '/filemanager/?modal=1path=' . urlencode($path) . '&file=' . urlencode($name); if (is_file(dirname(__FILE__) . "/../../../" . $path . '/' . $name)) { $getExtenstion = explode('.', $name); if (in_array($getExtenstion[count($getExtenstion) - 1], $this->extensions)) { self::$Icons[] = $this->icons[array_search($getExtenstion[count($getExtenstion) - 1], $this->extensions)]; } else { self::$Icons[] = 'file-o'; } } else { self::$Icons[] = 'folder'; } self::$files[] = array($name, $userInfo->USERNAME . ' ' . $userInfo->USERLATNAME, $infoFile['size'], $infoFile['timestamp']); } } } if (!isset($_GET['path']) or !empty(trim($_GET['path']))) { $path = '.'; } else { $path = urldecode($_GET['path']); } if (isset($_GET['file'])) { $file = urldecode($_GET['file']); } if (!isset($_GET['file'])) { $fm = new FileManager($path); $fm->OpenFolder($path); } else { Template::setModel(dirname(__FILE__) . '/../models/InfoFileManager.php'); Template::setView(dirname(__FILE__) . '/../views/InfoFileManager.html'); }
public function setView($view) { $this->_template->setView($view); }