示例#1
0
 public function __toString()
 {
     if ($this->getLogging() == true) {
         $this->saveLog();
     }
     if (Framework::getTpl()) {
         Framework::getTpl()->assign('exception', $this);
         Framework::getTpl()->assign('returnLink', isset($_SERVER['HTTP_REFERER']) == true && empty($_SERVER['HTTP_REFERER']) == false ? $_SERVER['HTTP_REFERER'] : '');
         $output = Framework::getTpl()->fetch('exception/' . $this->tenplateName . '.tpl');
         echo $output;
     } else {
         echo parent::__toString();
     }
     exit;
 }
示例#2
0
<?php

define('SHEEPWAR', 1);
require_once "global.php";
// load template engine
$Framework->loadTpl(dirname(__FILE__) . '/templates/');
$Framework->loadOthers();
// load active page/modul
require_once $Framework->BuildModulPath();
$activePage = $Framework->BuildModulClass();
// create active page
$page = new $activePage();
// assign to use in template
Framework::getTpl()->assign('activePage', Framework::getActivePage());
Framework::getTpl()->assign('activePageObj', $page);
// Load data
$page->loadData();
// display active page
$page->show();
// clean up
$Framework = null;
exit;
示例#3
0
 public function show()
 {
     Framework::getTpl()->assign('data', $this->data);
     header('Content-type: application/json');
     parent::show();
 }
示例#4
0
 public function getTpl()
 {
     return Framework::getTpl();
 }
示例#5
0
 public function show()
 {
     Framework::getTpl()->assign(array('headerTitle' => $this->item->ItemID . ' ' . $this->item->Name, 'item' => $this->item, 'items' => $this->items));
     parent::show();
 }