當前位置: 首頁>>代碼示例>>PHP>>正文


PHP page::render方法代碼示例

本文整理匯總了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;
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:34,代碼來源:msg.php

示例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();
     //показываем страницу
 }
開發者ID:openweb-tech,項目名稱:hotbackup,代碼行數:11,代碼來源:app.php

示例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;
});
開發者ID:jakerb,項目名稱:Tucan-CMS,代碼行數:31,代碼來源:config.php

示例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();
開發者ID:openweb-tech,項目名稱:hotbackup,代碼行數:31,代碼來源:index.php

示例5: __destruct

 public function __destruct()
 {
     parent::render();
 }
開發者ID:codifyllc,項目名稱:phpopenfw,代碼行數:4,代碼來源:module.class.php

示例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();
開發者ID:BackupTheBerlios,項目名稱:thinkedit-svn,代碼行數:20,代碼來源:datagrid.test.php


注:本文中的page::render方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。