public function display($templateName) { $this->assign('loggedInUser', Person::getLoggedInUser()); $this->assign('topnav', Config::get('app.topnav')); $this->assign('randoms', $this->getRandoms()); parent::display($templateName); }
function subMigration($p, $s) { if (!isset($s['v'])) { trigger_error("no version passed in. use -v migration_version"); } else { $version = $s['v']; } if (!isset($s['n'])) { trigger_error("no name passed in. use -n migration_name"); } else { $name = $s['n']; } if (!isset($s['s'])) { $stationaryFilename = 'migration.tpl'; } else { $stationaryFilename = $s['s']; } if (isset($s['m'])) { $moduleName = $s['m']; } $gui = new Gui(); $gui->left_delimiter = '[['; $gui->right_delimiter = ']]'; if (isset($s['m'])) { $stationaryFilename = 'file:' . zoop_dir . "/{$moduleName}/stationary/{$stationaryFilename}"; } else { if (strpos($stationaryFilename, ':') === false) { $stationaryFilename = 'file:' . getcwd() . "/stationary/{$stationaryFilename}"; } else { $parts = explode(':', $stationaryFilename); $modName = $parts[0]; $filename = $parts[1]; $stationaryFilename = 'file:' . zoop_dir . "/{$modName}/stationary/{$filename}"; } } $gui->assign('version', str_replace('.', '_', $version)); $contents = $gui->fetch($stationaryFilename); $dir = getcwd() . '/migrations'; $newFilename = $dir . '/' . $version . '_' . $name . '.php'; if (!file_exists($dir)) { mkdir($dir, 0775, true); } file_put_contents($newFilename, $contents); }
function fetch($tpl_file, $cache_id = null, $compile_id = null, $display = false) { $this->assign("TEMPLATE_CONTENT", $tpl_file); return parent::fetch('layouts/main.tpl', $cache_id, $compile_id, $display); }
public function display($templateName) { // do global assigns here parent::display($templateName); }
public function display($templateName) { $this->autoInherit(); // do global assigns here parent::display($templateName); }
/** * Affiche un objet $value en lui ayant au préalable appliqué la méthode $method * @param Object $value * @param string $method Méthode de la classe GUI ou de la classe de $value */ public static function showOne($value, $method = 'toString') { echo Gui::getOne($value, $method); }
public function display($templateName) { $this->assign('showTopNav', 1); $this->assign('topnav', array()); parent::display($templateName); }
<?php require_once 'system/classes/Filesystem.php'; require_once 'system/classes/Gui.php'; require_once 'system/classes/Security.php'; require_once 'system/savant/Savant3.php'; $conf = array('template_path' => dirname($_SERVER['SCRIPT_FILENAME']) . '/layout/templates'); $tpl = new Savant3($conf); $security = new Security(); $gui = new Gui(); $filesystem = new Filesystem(); $gui->filesystem = $filesystem; switch ($security->checkAuth(isset($_REQUEST['config']))) { case 'config': if (isset($_POST['root'])) { $status = $security->setConfig(array('root' => $_POST['root'], 'locked' => isset($_POST['locked']) ? 'true' : 'false', 'password' => $_POST['password'], 'password_repeat' => $_POST['password_repeat'])); } else { $status = ''; } $tpl->content = $gui->renderConfig($security->config, $status); $content = 'config.tpl.php'; break; case 'login': if (isset($_POST['password'])) { $retry = $security->checkLogin($_POST['password']); } $tpl->content = $gui->renderLogin(isset($retry)); $content = 'login.tpl.php'; break; case 'browser': $security->checkPath();
<?php require_once 'system/classes/Filesystem.php'; require_once 'system/classes/Gui.php'; require_once 'system/classes/Security.php'; $security = new Security(); $gui = new Gui(); $filesystem = new Filesystem(); echo $gui->renderResults($filesystem->read($_GET['absolutePath'], $_GET['relativePath'], $_GET['sortName'], $_GET['sortOrder']));