public function finalize() { $engine = engine::getInstance(); if ($this->command) { header('Content-Type: text/xml'); // header('Content-length: '.strlen } $engine->setResult($this->html); }
public function finalize() { $template = template::getInstance(); $this->html = $template->get('index'); $html = $this->html; if (!is_null($this->content)) { $this->content->finalize(); // $html = $this->content->display(); } $html = $template->updateLang($html); $html = str_replace('EXEC_TIME', microtime(true) - EXEC_TIME, $html); $html = str_replace('APP_NAME', APP_NAME, $html); $html = str_replace('APP_VERSION', APP_VERSION, $html); $html = str_replace('APP_BUILD', APP_BUILD, $html); $html = str_replace('APP_AUTHOR', APP_AUTHOR, $html); unset($this->module); $this->module = null; $engine = engine::getInstance(); $engine->setResult($html); }
<?php /** * @author Mathieu Chocat * @version $Id: index.php 55 2007-02-07 13:10:01Z mathieu $ * @copyright (c) 2006 Sygil.eu **/ define('EXEC_TIME', microtime(true)); require_once 'include/config.php'; require_once 'include/class/db.php'; require_once 'include/class/engine.php'; require_once 'include/class/session.php'; $engine = engine::getInstance(); $engine->initialize(); $engine->execute(); $engine->finalize(); unset($engine);
public function __construct() { $this->session = session::getInstance(); $this->engine = engine::getInstance(); $this->template = template::getInstance(); }
function addDownload($info) { $engine = engine::getInstance(); $template = template::getInstance(); $path = $_SERVER['DOCUMENT_ROOT'] . '/data/' . $engine->cv . '/download/'; $content = ''; if (is_dir($path)) { $list = scandir($path); foreach ($list as $value) { if ($value != '..' && $value != '.') { $content .= '<a href="data/' . $engine->cv . '/download/' . $value . '">' . $value . '</a><br/>'; } } $array = array('code' => $info['code'], 'title' => $info['title'], 'option' => 'style="display:' . ($info['hide'] ? 'none' : 'block') . '"', 'content' => $content); return $template->evaluate('box', $array); } else { return ''; } }
<?php /** * @author Mathieu Chocat * @version $Id: ajax.php 55 2007-02-07 13:10:01Z mathieu $ * @copyright (c) 2006 Sygil.eu **/ define('EXEC_TIME', microtime(true)); require_once 'include/config.php'; require_once 'include/class/db.php'; require_once 'include/class/engine.php'; require_once 'include/class/session.php'; $engine = engine::getInstance('AJAX_SESSION'); $engine->initialize(); $engine->execute(); $engine->finalize(); unset($engine);