本文整理匯總了PHP中view::loadTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP view::loadTemplate方法的具體用法?PHP view::loadTemplate怎麽用?PHP view::loadTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類view
的用法示例。
在下文中一共展示了view::loadTemplate方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTools
/**
* Return Tools-Page as HTML-View (only Logout)
*/
public function getTools()
{
require 'classes/view.php';
$view = new view();
$view->setTemplate('admin/tools');
return $view->loadTemplate(new stdClass());
}
示例2: getMain
/**
* Return Highscore-Page as HTML-View
*/
public function getMain()
{
require_once 'classes/person.php';
require_once 'classes/view.php';
person::startSession();
$view = new view();
return $view->loadTemplate($this->getModel());
}
示例3: getMain
/**
* Returns Login-Page as HTML-View
* @param unknown_type $succesLocation
*/
public function getMain($succesLocation = '')
{
require 'classes/view.php';
$view = new view();
$view->setTemplate('login');
$model = new stdClass();
$model->submitUrl = 'Admin';
return $view->loadTemplate($model);
}
示例4: getMain
/**
* Return Kategorien-Page as HTML-View
*/
public function getMain()
{
require 'classes/SQL.php';
require 'classes/view.php';
$model = new stdClass();
$model->template = 'admin/KategorieTable';
$sql = new SQL();
$sql->connect();
$model->data = $sql->get("SELECT * FROM quizCategories");
$view = new view();
return $view->loadTemplate($model);
}
示例5: getQuestionTable
/**
* Return QuestionTable-Page as HTML-View
* parameters = POST: CategorieID
*/
public function getQuestionTable()
{
require 'classes/SQL.php';
require 'classes/view.php';
$categorie = htmlentities($_POST['katID']);
$model = new stdClass();
$model->template = 'admin/QuestionTable';
$sql = new SQL();
$sql->connect();
$model->data = $sql->get("SELECT * FROM ViewQuestionQuote WHERE categorie='" . $categorie . "' ORDER BY question");
$view = new view();
return $view->loadTemplate($model);
}
示例6: getMain
/**
* Return Gamer-Main-Page as HTML-View
*/
public function getMain()
{
if (person::getPermissionName() != 'admin' && person::getPermissionName() != 'gameuser') {
$login = Uri::getAction('Login');
header("Location: {$login}");
} else {
require 'classes/view.php';
$model = new stdClass();
$model->template = 'game/main';
$model->hasFrage = isset($_SESSION['tmpFrage']['id']);
$model->user = $_SESSION['username'];
$model->points = 0;
$model->message = $model->hasFrage ? 'Welcome back' : 'Welcome';
$view = new view();
return $view->loadTemplate($model);
}
}