function __toString()
 {
     $main = new S7N_Template('main');
     $content = new S7N_Template('default_content');
     echo $main->parse(array('content' => $content->parse(array('title' => "Error", 'content' => $this->getMessage()))));
     exit;
 }
 function __toString()
 {
     $s7n = S7Ncms::getInstance();
     $tmp = new S7N_Template('default_content');
     $s7n->output = $tmp->parse(array('title' => 'Error', 'content' => $this->getMessage()));
     $s7n->finalize();
     exit;
 }
 /**
  * Prints out the generated output
  *
  */
 public function finalize()
 {
     if (!defined('FATAL_ERRORX')) {
         $main = new S7N_Template('main');
         echo $main->parse(array('content' => $this->output));
     }
     global $startTime;
     echo '<!--' . (microtime() - $startTime) . 'sec at all-->';
 }
 * @author Eduard Baun <*****@*****.**>
 * @copyright Eduard Baun, 2006
 * @version $Id$
 */
ini_set('display_errors', 1);
error_reporting(E_ALL);
$startTime = microtime();
require '../config.php';
require '../lib/abstract/admin.php';
define('ADMINISTRATION', true);
try {
    $s7n = S7Ncms::getInstance();
    if (true or $s7n->user->isAdmin()) {
        $module = $s7n->getRequestedModule();
        if ($module === null) {
            $tpl = new S7N_Template('admin_overview');
            $s7n->output = $tpl->parse();
            //header('Location: '.$s7n->cfg['s7ncms']['scripturl'].$s7n->cfg['s7ncms']['defaultpage']);
            //exit;
        } else {
            $class = $s7n->getRequestedClass();
            $className = 'S7N_Admin_' . ucfirst($module) . '_' . ucfirst($class);
            if ($class == null or ctype_digit($class)) {
                $class = $module;
                $className = 'S7N_Admin_' . ucfirst($module);
            }
            $path = BASE_PATH . '/admin/modules/' . $module . '/' . $class . '.php';
            if (file_exists($path)) {
                require $path;
                echo $className;
                $moduleInstance = new $className();
 public function execute()
 {
     $tpl = new S7N_Template('sysinfo/sysinfo');
     $this->output = $tpl->parse(array('databaseversion' => $this->db->getVersion()));
 }
     * Load here your Plugins:
     */
    require 'plugins/Mailer.php';
    $module = $s7n->getRequestedModule();
    if ($module === null) {
        header('Location: ' . $s7n->cfg['s7ncms']['scripturl'] . $s7n->cfg['s7ncms']['defaultpage']);
        //exit;
    }
    $type = $s7n->getRequestedPageType($module);
    if ($type == 'dynamic') {
        $class = $s7n->getRequestedClass();
        if ($class == null or ctype_digit($class)) {
            $class = $module;
        }
        /*
         * TODO: path prüfen und ggf exception werfen
         */
        require BASE_PATH . '/modules/' . $module . '/' . $class . '.php';
        $module = 'S7N_Module_' . ucfirst($class);
        $moduleInstance = new $module();
        $moduleInstance->execute();
    } elseif ($type == 'static') {
        $tmp = new S7N_Template('default_content');
        $s7n->output = $tmp->parse(array('title' => $s7n->page['title'], 'content' => $s7n->page['content']));
    } else {
        throw new S7N_Exception($s7n->_('Page not found'));
    }
    $s7n->finalize();
} catch (S7N_Exceptionn $e) {
    echo $e;
}
 public function getLoginForm()
 {
     $tpl = new S7N_Template('user/login_form');
     return $tpl->parse();
 }