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


PHP Site::display方法代码示例

本文整理汇总了PHP中Site::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Site::display方法的具体用法?PHP Site::display怎么用?PHP Site::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Site的用法示例。


在下文中一共展示了Site::display方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: adminPosts

 /**
  * Manage posts
  *
  * Calls the appropriate admin function based on the given command under the
  * posts area.<br />
  * Current available actions: list, edit, del, add.
  *
  * @return array When appropriate, a new display array for the parent site
  *               instance.
  */
 function adminPosts()
 {
     /*
           switch ($this->action) {
              case 'list': // default
                 $this->listPosts(@$this->parameters[0]);
                 break;
              case 'edit':
                 break;
              case 'edit-go':
                 break;
              case 'del':
                 break;
              case 'del-go':
                 break;
              case 'add':
                 break;
              case 'add-go':
                 break;
           }
     */
     $this->site->display = array('index');
     $this->site->display();
 }
开发者ID:n0nick,项目名称:n0where,代码行数:34,代码来源:class.admin.php

示例2: array

            // archive , array (month, year)
            $display = array('archive', array(@$path[3], @$path[2]));
            break;
        case 'about':
            // about , what
            $display = array('about', @$path[2]);
            break;
        case 'comments':
            // comments, postid, reply?, reply to what?
            $display = array('comments', $path[2], @$path[3], @$path[4]);
            break;
        case 'rss':
            // rdf feed
            $display = array('rss');
            break;
        case 'admin':
            // TODO admin
            $display = array('admin', $path[2], @$path[3], @$path[4], @$path[5]);
            break;
        default:
            // index
            $display = array('index');
            break;
    }
    $site->display = $display;
}
// display stuff
$site->display();
// say goodbye
$site->db->_Database();
/* Simba says Roar! */
开发者ID:n0nick,项目名称:n0where,代码行数:31,代码来源:index.php

示例3: isset

$current_page = isset($_GET['page']) ? $_GET['page'] : NULL;
##Make sure the table encoding settings are right
if ($config->get("runtime_character_set_alter", "database")) {
    $db->setCharacterSet($config->get("character_encoding", "database"));
    $db->setCharacterEncoding($config->get("character_set", "database"));
}
$Site = new Site($current_page, $db, $config, $profiler);
## Determine if we have requested debug mode
define('__IN_DEBUG_MODE__', $Site->isLoggedIn() && isset($_GET['debug']) ? true : false);
$profiler->sample("Page Initialization", PROFILE_LAP);
## Set a default content header
$Site->addHeaderToPage("Content-Type", "text/html; charset=UTF-8");
## We dont want to see error messages if in debug mode
$Site->setVerbose(__IN_DEBUG_MODE__ ? false : true);
#Render the page
$Site->display();
if (!__IN_DEBUG_MODE__) {
    print $Site->getTransformed();
} else {
    $active = 'xml';
    $xml = General::sanitize($Site->getXML());
    $xsl = str_replace("\r\n", "\n", trim($Site->getXSL()));
    $xsl = General::sanitize($xsl);
    $output = General::sanitize($Site->getTransformed());
    $xml = $xml != "" ? General::str2array($xml, false) : NULL;
    $xsl = $xsl != "" ? General::str2array($xsl) : NULL;
    $output = $output != "" ? General::str2array($output, false) : NULL;
    $page_name = $db->fetchVar("title", 0, "SELECT `title` FROM `tbl_pages` WHERE `handle` = '" . $Site->_page . "'");
    $page_id = $db->fetchVar("id", 0, "SELECT `id` FROM `tbl_pages` WHERE `handle` = '" . $Site->_page . "'");
    $type = $_GET['line_numbers'] == 'false' ? 'ul' : 'ol';
    $result = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
开发者ID:symphonycms,项目名称:symphony-1.7,代码行数:31,代码来源:index.php

示例4: Profiler

require_once LIBRARY . "/class.site.php";
require_once TOOLKIT . "/class.profiler.php";
require_once TOOLKIT . "/class.xmlrepair.php";
$active = "xml";
switch ($_REQUEST['type']) {
    case "page":
        $profiler = new Profiler();
        $Site = new Site($page_handle, $DB, $Admin->_config, $profiler, false);
        $page_name = $DB->fetchVar("title", 0, "SELECT `title` FROM `tbl_pages` WHERE `handle` = '" . $Site->_page . "'");
        $profiler->sample("Page Initialization", PROFILE_LAP);
        ##Use preview mode
        if ($_GET['mode'] == 'preview') {
            $Site->togglePreviewMode();
        }
        #Render the page
        $output = $Site->display(array(), 'TRANSFORMED', false);
        $xml = $Site->buildXML(NULL, NULL, true, false);
        $xsl = $Site->display(array(), "XSL", false);
        #Record the render time
        $profiler->sample("Total Page Render Time");
        break;
    case "datasource":
        $DSM = new DatasourceManager(array('parent' => &$Admin));
        $obXML = new XMLElement("data");
        $obXML->setIncludeHeader(true);
        ##DATASOURCES
        $dsParam = array("indent-depth" => 2, "caching" => false, "indent" => true, "preview" => true);
        $ds =& $DSM->create($page_handle, array('parent' => $this, 'env' => array()));
        $result = $ds->preview($dsParam);
        if (@is_object($result)) {
            $xml = trim($result->generate(true, 0));
开发者ID:symphonycms,项目名称:symphony-1.7,代码行数:31,代码来源:sym_blueprint_pages_view.php


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