本文整理汇总了PHP中page::render方法的典型用法代码示例。如果您正苦于以下问题:PHP page::render方法的具体用法?PHP page::render怎么用?PHP page::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类page
的用法示例。
在下文中一共展示了page::render方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
public static function show(array $msg)
{
$page = new page();
$page->set('msg', $msg);
$message = $page->render('msg');
if ($message !== false) {
echo $message;
} else {
$page->title = $msg['type'];
$page->body = array('class' => 'msg');
$page->header();
$page->add('');
$page->add('<div id="icon"><div class="zotop-icon zotop-icon-' . $msg['type'] . '"></div></div>');
$page->add('<div id="msg" class="' . $msg['type'] . ' clearfix">');
$page->add(' <div id="msg-type">' . $msg['type'] . '</div>');
$page->add(' <div id="msg-life">' . (int) $msg['life'] . '</div>');
$page->add(' <div id="msg-title">' . $msg['title'] . '</div>');
$page->add(' <div id="msg-content">' . $msg['content'] . '</div>');
$page->add(' <div id="msg-detail">' . $msg['detail'] . '</div>');
$page->add(' <div id="msg-action">' . $msg['action'] . '</div>');
$page->add(' <div id="msg-file">' . $msg['file'] . '</div>');
$page->add(' <div id="msg-line">' . $msg['line'] . '</div>');
if (!empty($msg['url'])) {
$page->add(' <div>');
$page->add(' <div><b>如果页面没有自动跳转,请点击以下链接</b></div>');
$page->add(' <a href="' . $msg['url'] . '" id="msg-url">' . $msg['url'] . '</a>');
$page->add(' </div>');
}
$page->add('</div>');
$page->add('<div id="powered">' . zotop::config('zotop.name') . ' ' . zotop::config('zotop.version') . '</div>');
$page->footer();
}
exit;
}
示例2: showPage
function showPage()
{
$curpage = getcurpage();
// берём контроллер для текущей страницы
include __corePath . "controllers/{$curpage}.php";
$page = new page($curpage, $this->db, $this->config);
$page->prepare();
$page->render();
echo $page->show();
//показываем страницу
}
示例3: render
/*
* HttpError doesn't have access to
* vars outside of here.
*/
$render = new render();
$config = new config();
$build = new page();
$pages = new db("pages");
$request = $_SERVER['REQUEST_URI'];
$found = false;
foreach ($pages->all() as $page) {
$component = array_keys($page)[0];
if ($page["endpoint"] != "/") {
//Add slash to URL
$page["endpoint"] = "/" . $page["endpoint"];
}
if ($page["endpoint"] == $request) {
$found = $page;
}
}
if ($found) {
$endpoint = "app/cache/" . $found['page'] . ".html";
if (file_exists($endpoint)) {
die(file_get_contents($endpoint));
}
$build->render($found);
} else {
$render->render("admin.error", ["system" => $config->system]);
}
die;
});
示例4: getInstallActions
}
return $res;
}
function getInstallActions()
{
if (!isset($_POST['action'])) {
return 0;
}
$action = str_replace('.', '##', $_POST['action']);
if (file_exists("actions/" . $action . '.php')) {
return $action;
}
return 0;
}
$action = getInstallActions();
if ($action) {
include "actions/{$action}.php";
$action = new action(0);
$action->execute();
}
$route = getroute();
if (beforeInstall()) {
$curpage = 'controller/beforeInstall';
} else {
$curpage = 'controller/' . $route;
}
include "{$curpage}.php";
$page = new page($curpage, 0, 0);
$page->prepare();
$page->render();
echo $page->show();
示例5: __destruct
public function __destruct()
{
parent::render();
}
示例6: page
<?php
require_once '../thinkedit.init.php';
require_once '../class/datagrid.class.php';
require_once '../class/page.class.php';
$page = new page();
$datagrid = new datagrid();
$datagrid->addColumn('firstname', 'First name', true, true);
$datagrid->addColumn('lastname', 'Last name', true, true);
$datagrid->addColumn('title', 'Last name', true, true);
for ($i = 1; $i < 1000; $i++) {
$data['firstname'] = rand(1, 100);
$data['lastname'] = rand(1, 100);
$data['title'] = rand(1, 100);
$datagrid->add($data);
}
$page->startPanel('test');
$page->add($datagrid->render('icon'));
$page->endPanel('test');
echo $page->render();