当前位置: 首页>>代码示例>>PHP>>正文


PHP Layout::loadTemplate方法代码示例

本文整理汇总了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));
开发者ID:scabros,项目名称:scabrosfw,代码行数:12,代码来源:post.php

示例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));
开发者ID:scabros,项目名称:scabrosfw,代码行数:13,代码来源:entries.php

示例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);
开发者ID:scabros,项目名称:scabrosfw,代码行数:12,代码来源:error.php

示例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));
开发者ID:scabros,项目名称:scabrosfw,代码行数:17,代码来源:login.php

示例5: Layout

<?php

require 'load.php';
$entries = Entries::getAll();
$tpl = new Layout();
echo $tpl->blogLayout($tpl->loadTemplate('index', array('posts' => $entries->data)));
开发者ID:scabros,项目名称:scabrosfw,代码行数:6,代码来源:index.php

示例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));
开发者ID:scabros,项目名称:scabrosfw,代码行数:19,代码来源:new_entry.php

示例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']);
    }
}
开发者ID:scabros,项目名称:scabrosfw,代码行数:9,代码来源:core.php

示例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));
开发者ID:scabros,项目名称:scabrosfw,代码行数:9,代码来源:user.php

示例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)));
开发者ID:scabros,项目名称:scabrosfw,代码行数:10,代码来源:post.php


注:本文中的Layout::loadTemplate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。