本文整理汇总了PHP中Layout::mobiLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::mobiLayout方法的具体用法?PHP Layout::mobiLayout怎么用?PHP Layout::mobiLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::mobiLayout方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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));
示例2: 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));
示例3: 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));
示例4: 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));