本文整理汇总了PHP中Layout::loadTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::loadTemplate方法的具体用法?PHP Layout::loadTemplate怎么用?PHP Layout::loadTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::loadTemplate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Layout
<?php
require '../load.php';
$response = Entries::get($_GET['id']);
$tpl = new Layout();
$data = array();
if ($response['success'] == true) {
$data['entries'] = $response['data'];
} else {
$data['msg'] = $response['msg'];
}
echo $tpl->entriesLayout($tpl->loadTemplate('post', $data));
示例2: Layout
<?php
require '../load.php';
require '../init.php';
$response = Entries::getAll($_SESSION['userNAME']);
$tpl = new Layout();
$data = array();
if ($response->success == true) {
$data['entries'] = $response->data;
} else {
$data['msg'] = $response->msg;
}
echo $tpl->mobiLayout($tpl->loadTemplate('entries', $data));
示例3: Layout
<?php
require 'load.php';
$tpl = new Layout();
$data = array();
if (isset($_SESSION['sys_err'])) {
if (DEBUG == 'DEVEL') {
$data['error'] = $_SESSION['sys_err'];
}
unset($_SESSION['sys_err']);
}
echo $tpl->loadTemplate('error', $data);
示例4: array
<?php
require '../load.php';
if (!isset($_POST['entrar'])) {
$data = array('user' => '');
$error = array();
} else {
$response = User::login($_POST);
if ($response->success) {
redirect('user.php');
} else {
$data = $response->data;
$data['msg'] = $response->msg;
}
}
$tpl = new Layout();
echo $tpl->mobiLayout($tpl->loadTemplate('login', $data));
示例5: Layout
<?php
require 'load.php';
$entries = Entries::getAll();
$tpl = new Layout();
echo $tpl->blogLayout($tpl->loadTemplate('index', array('posts' => $entries->data)));
示例6: array
<?php
require '../load.php';
require '../init.php';
if (!isset($_POST['enviar'])) {
$data = array();
$error = array();
} else {
$response = Entries::create($_POST);
if ($response->success) {
setNotification('success', $response->msg);
redirect('entries.php');
} else {
$data = $response->data;
$data['msg'] = $response->msg;
}
}
$tpl = new Layout();
echo $tpl->mobiLayout($tpl->loadTemplate('new_entry', $data));
示例7: getNotification
function getNotification()
{
if (isset($_SESSION['sessMSG'])) {
$tpl = new Layout();
$data = array('msgType' => $_SESSION['sessMSG']['type'], 'msg' => $_SESSION['sessMSG']['msg']);
echo $tpl->loadTemplate('notif', $data);
unset($_SESSION['sessMSG']);
}
}
示例8: Layout
<?php
require '../load.php';
require '../init.php';
$response = User::getData($_SESSION['userID']);
$data = $response->data;
//var_dump($data);die();
$tpl = new Layout();
echo $tpl->mobiLayout($tpl->loadTemplate('user', $data));
示例9: setNotification
<?php
require 'load.php';
$entry = Entries::get($_GET['id']);
if (!$entry->success) {
setNotification('error', $entry->msg);
redirect('index.php');
}
$tpl = new Layout();
echo $tpl->entriesLayout($tpl->loadTemplate('post', array('post' => $entry->data)));