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


PHP Page::setContent方法代码示例

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


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

示例1: start

 /**
  * Start constructing the page.
  * Prepare all the shared variables such as dates and check alliance ID.
  *
  */
 function start()
 {
     $this->page = new Page();
     $this->plt_id = (int) edkURI::getArg('plt_id');
     if (!$this->plt_id) {
         $this->plt_external_id = (int) edkURI::getArg('plt_ext_id');
         if (!$this->plt_external_id) {
             $id = (int) edkURI::getArg('id', 1);
             // Arbitrary number bigger than we expect to reach locally
             if ($id > 1000000) {
                 $this->plt_external_id = $id;
             } else {
                 $this->plt_id = $id;
             }
         }
     }
     $this->view = preg_replace('/[^a-zA-Z0-9_-]/', '', edkURI::getArg('view', 2));
     if ($this->view) {
         $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />');
     }
     if (!$this->plt_id) {
         if ($this->plt_external_id) {
             $this->pilot = new Pilot(0, $this->plt_external_id);
             $this->plt_id = $this->pilot->getID();
         } else {
             $html = 'That pilot doesn\'t exist.';
             $this->page->generate($html);
             exit;
         }
     } else {
         $this->pilot = Cacheable::factory('Pilot', $this->plt_id);
         $this->plt_external_id = $this->pilot->getExternalID();
     }
     $this->page->setTitle('Pilot details - ' . $this->pilot->getName());
     if (!$this->pilot->exists()) {
         $html = 'That pilot doesn\'t exist.';
         $this->page->setContent($html);
         $this->page->generate();
         exit;
     }
     if ($this->plt_external_id) {
         $this->page->addHeader("<link rel='canonical' href='" . edkURI::page('pilot_detail', $this->plt_external_id, 'plt_ext_id') . "' />");
     } else {
         $this->page->addHeader("<link rel='canonical' href='" . edkURI::page('pilot_detail', $this->plt_id, 'plt_id') . "' />");
     }
     $this->corp = $this->pilot->getCorp();
     $this->alliance = $this->corp->getAlliance();
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:53,代码来源:pilot_detail.php

示例2: page

 public function page(Page $page)
 {
     $this->tocBuilder = new TocBuilder();
     $page->setContent(parent::text($page->getContent()));
     $page->setToc($this->tocBuilder->getToc());
     $this->tocBuilder = null;
 }
开发者ID:stof,项目名称:Gitiki,代码行数:7,代码来源:Parser.php

示例3: registerPage

 public function registerPage($slug, $namespace, $page)
 {
     $page_obj = new Page();
     $content_class = $namespace . '\\Controller\\' . $page;
     $page_obj->setContent(new $content_class());
     $this->_pages[$slug] = $page_obj;
 }
开发者ID:NightWingStudios,项目名称:Nightshade,代码行数:7,代码来源:Rewrite.php

示例4: noPage

 public function noPage()
 {
     include "core/lib/page.php";
     $p = new Page();
     $p->setupPage();
     $p->setContentTitle("Page Not Found - Error 404");
     $p->setContent(file_get_contents("core/fragments/404.phtml"));
     $p->displayPage();
 }
开发者ID:andreaspada,项目名称:LotusCMS-Content-Management-System,代码行数:9,代码来源:PageView.php

示例5: add

 public function add()
 {
     if (Page::already($_POST['baseUrl'], $_POST['uri'], $_POST['language'])) {
         throw new Exception('PAGE ALREADY EXISTS', 409);
     }
     $page = new Page();
     $page->setBaseUrl($_POST['baseUrl']);
     $page->setUri($_POST['uri']);
     $page->setLanguage($_POST['language']);
     if (array_key_exists('content', $_POST) && !empty($_POST['content'])) {
         $page->setContent($_POST['content']);
     }
     $page->setModele($_POST['modele']);
     $page->setTitle($_POST['title']);
     if (array_key_exists('languageParentId', $_POST)) {
         $page->setLanguageParentId($_POST['languageParentId']);
     }
     if (array_key_exists('ajax', $_POST)) {
         $page->setAjax($_POST['ajax']);
     }
     if (array_key_exists('published', $_POST)) {
         $page->setPublished($_POST['published']);
     }
     if (array_key_exists('metas', $_POST)) {
         $page->setMetas($_POST['metas']);
     }
     if (array_key_exists('css', $_POST)) {
         $page->setCss($_POST['css']);
     }
     if (array_key_exists('js', $_POST)) {
         $page->setJs($_POST['js']);
     }
     if (array_key_exists('action', $_POST)) {
         $page->setAction($_POST['action']);
     }
     if (array_key_exists('method', $_POST)) {
         $page->setMethod($_POST['method']);
     }
     if (array_key_exists('priority', $_POST)) {
         $page->setPriority($_POST['priority']);
     }
     if (array_key_exists('datas', $_POST)) {
         $page->setDatas($_POST['datas']);
     }
     if (!array_key_exists('blockIds', $_POST)) {
         $blkIds = array();
         foreach ($_POST['blockIds'] as $blk) {
             if (array_key_exists('id', $blk) && MongoId::isValid($blk['id'])) {
                 $blkIds[] = $blk['id'];
             }
         }
         $this->page->setBlockIds($blkIds);
     }
     $page->save();
     return array('pageId' => $page->getId());
 }
开发者ID:monkeytie,项目名称:korona,代码行数:56,代码来源:page.ctrl.php

示例6: Page

<?php

/**
 * @package EDK
 */
// admin menu now loads all admin pages with options
require_once 'common/admin/admin_menu.php';
$page = new Page();
$page->setAdmin();
if ($_POST) {
    options::handlePost();
}
$page->setContent(options::genOptionsPage());
$page->addContext(options::genAdminMenu());
if (!edkURI::getArg('field', 1) || !edkURI::getArg('sub', 1) || edkURI::getArg('field', 1) == 'Advanced' && edkURI::getArg('sub', 2) == 'Configuration') {
    $page->setTitle('Administration - Board Configuration (Current version: ' . KB_VERSION . ' ' . KB_RELEASE . ')');
}
$page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:18,代码来源:admin.php

示例7: DBConnection

    $conn = new DBConnection();
    $value = (double) mysqli_get_server_info($conn->id());
    return $value;
}
$sections['PHP'] = 'PHP';
$phpver = 'PHP version: ' . phpversion();
$html = "{$phpver}  <br />";
if (phpversion() >= "5.1.2") {
    $trouble['PHP'][] = array('passed' => true, 'text' => $html);
} else {
    $trouble['PHP'][] = array('passed' => false, 'text' => $html);
}
$html = 'Checking Magic Quotes Runtime is disabled';
if (get_magic_quotes_runtime()) {
    $trouble['PHP'][] = array('passed' => false, 'text' => $html);
} else {
    $trouble['PHP'][] = array('passed' => true, 'text' => $html);
}
$sections['Server'] = 'Server';
$sqlver = 'MYSQL version: ' . find_SQL_Version();
$html = "  {$sqlver}";
if (find_SQL_Version() >= 5) {
    $trouble['Server'][] = array('passed' => true, 'text' => $html);
} else {
    $html = $trouble['Server'][] = array('passed' => false, 'text' => $html);
}
$smarty->assignByRef('sections', $sections);
$smarty->assignByRef('trouble', $trouble);
$page->setContent($smarty->fetch(get_tpl('admin_troubleshooting')));
$page->addContext($menubox->generate());
$page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:admin_troubleshooting.php

示例8: intval

        } else {
            // update
            $id = intval($key);
            $uri = $val["url"];
            $active = isset($val["active"]) ? 1 : 0;
            $lastkill = intval($val["lastkill"]);
            if ($feeds[$id]['active'] != $active) {
                // flags have changed
                $feed_flags = 0;
                if ($active) {
                    $feed_flags |= FEED_ACTIVE;
                }
                $qry->execute("UPDATE kb3_feeds SET feed_flags={$feed_flags} WHERE feed_kbsite = '" . KB_SITE . "' AND feed_id = {$id}");
                $feeds[$id]['active'] = (bool) ($feed_flags & FEED_ACTIVE);
            }
            if ($feeds[$id]['lastkill'] != $lastkill || $feeds[$id]['uri'] != $uri) {
                $qry->execute("UPDATE kb3_feeds SET feed_lastkill={$lastkill}, feed_url='" . $qry->escape($uri) . "' WHERE feed_kbsite = '" . KB_SITE . "' AND feed_id = {$id}");
                $feeds[$id]['lastkill'] = $lastkill;
                $feeds[$id]['uri'] = $uri;
            }
        }
    }
}
// Add an empty feed to the list, or create with one empty feed.
$feeds[] = array('id' => 'new', 'updated' => '', 'active' => '', 'uri' => "", 'lastkill' => 0);
$smarty->assignByRef('rows', $feeds);
$smarty->assign('results', $html);
$smarty->assign('url', edkURI::page("admin_idfeedsyndication"));
$page->addContext($menubox->generate());
$page->setContent($smarty->fetch(get_tpl('admin_idfeed')));
$page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:admin_idfeedsyndication.php

示例9: __autoload

<?php

function __autoload($name)
{
    include_once "modules/classes/{$name}.class.php";
}
session_start();
$profil = new Profil();
$page = new Page();
if (!isset($_SESSION['kvh_login']) || $_SESSION['kvh_login'] == "" || $_SESSION['kvh_login'] == 0 || !$profil->checkIDLogin($_SESSION['kvh_login'])) {
    $page->setTitle("KVH Ústí nad Labem");
    $page->addToDrobeckovaNavigace('<a href="index.php">kvhusti.cz</a>');
    $page->setNavigation(include_once 'views/navigation.php');
    $page->setContent(include_once "controllers/admin/badName.php");
    $page->setAdminLog(include 'controllers/login/form.php');
    print (include_once 'views/page.php');
    return;
}
$page->addScript('<script src="js/ajax.js"></script>');
$page->addScript('<script src="js/admin.js"></script>');
$page->addScript('<script src="js/jquery-ui-1.8.18.custom.min.js"></script>');
if (isset($_GET['page'])) {
    $getPage = $_GET['page'];
} else {
    $getPage = "home";
}
$page->setTitle("KVH Ústí nad Labem");
$page->addToDrobeckovaNavigace('<a href="admin.php">kvhusti.cz</a>');
$page->setNavigation(include_once 'views/admin/navigation.php');
$page->setContent(include_once "controllers/admin/{$getPage}.php");
if ($page->getContent() == "") {
开发者ID:ununik,项目名称:kvhusti,代码行数:31,代码来源:admin.php

示例10: Page

    $page = new Page();
    $page->setController('site/form/contact');
    $page->setUri('contact');
    $page->setTitle('Contact');
    $page->setReserved(1);
    $page->setContent('
<h3>' . $settings['sitename'] . '</h3>
          <p>Our headquarter is located in Sydney CBD with easy access by public transportation. We open Monday to Friday from 9AM to 5PM, Saturday to Sunday from 9AM to 1PM. We are present on all business hours on phone. You can also reach us by email or filling up the contact form below.</p>
');
    $page->save();
    // student service
    $page = new Page();
    $page->setUri('services/student');
    $page->setTitle('Student service');
    $page->setReserved(0);
    $page->setContent('
<h3>We help you to apply for educational institution</h3>
          <p>Some content goes here.</p>
');
    $page->save();
    // immigration service
    $page = new Page();
    $page->setUri('services/immigration');
    $page->setTitle('Immigration service');
    $page->setReserved(0);
    $page->setContent('
<h3>We help you to Immigrate</h3>
          <p>Some content goes here.</p>
');
    $page->save();
}
开发者ID:jeffreycai,项目名称:ct21,代码行数:31,代码来源:fixture.php

示例11: Page

<?php

// index.php
require $_SERVER['DOCUMENT_ROOT'] . '/hangee/m/lib/__core.php';
$page = new Page();
$page->setTitle('HanGEE::Study');
$page->setMaster('m');
$page->setScript('/hangee/m/study.js');
ob_start();
?>


<?php 
$page->setContent(ob_get_contents());
ob_clean();
$page->render();
开发者ID:sandrain,项目名称:hangee,代码行数:16,代码来源:study.php

示例12: slashfix

    $error = false;
    if (config::get('user_regpass')) {
        if ($_POST['regpass'] != config::get('user_regpass')) {
            $smarty->assign('error', 'Registration password does not match.');
            $error = true;
        }
    }
    if (!$_POST['usrlogin']) {
        $smarty->assign('error', 'You missed to specify a login.');
        $error = true;
    }
    if (!$_POST['usrpass']) {
        $smarty->assign('error', 'You missed to specify a password.');
        $error = true;
    }
    if (strlen($_POST['usrpass']) < 3) {
        $smarty->assign('error', 'Your password needs to have at least 4 chars.');
        $error = true;
    }
    if (!$error) {
        $pilot = null;
        $id = null;
        user::register(slashfix($_POST['usrlogin']), slashfix($_POST['usrpass']), $pilot, $id);
        $page->setContent('Account registered.');
        $page->generate();
        return;
    }
}
$smarty->assign('actionURL', edkURI::page('register'));
$page->setContent($smarty->fetch(get_tpl('user_register')));
$page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:register.php

示例13: __autoload

<?php

error_reporting(E_ALL);
ini_set('display_errors', 'On');
function __autoload($class)
{
    include "classes/{$class}.class.php";
}
include "config.php";
$Page = new Page();
$Page->setContent(new ContentKostiumy());
$Page->display();
?>

<!--<a href="kostiumy.php" class="button2">Powrót</a>-->
<!--<h2><?php 
echo $this->group["group"];
?>
</h2>-->

<!--<ul class="lista-kostiumow">-->
<!--<?php 
foreach ($this->photos as $photo) {
    ?>
-->

<!--<li><a href="costumes/large/<?php 
    echo $photo["id"];
    ?>
.jpg" rel="group">-->
<!--	<img src="costumes/thumb/<?php 
开发者ID:skonina,项目名称:maskarada_jekyll,代码行数:31,代码来源:kostiumy.php

示例14: Page

$page = new Page();
$page->setAdmin();
$page->setTitle('Administration - Role Management');
if ($_POST['action'] == 'search') {
    $hitlist = array();
    $search = slashfix($_POST['search']);
    $qry = DBFactory::getDBQuery();
    $qry->execute('select usr_login from kb3_user where usr_login like ' . "'%" . $search . "%'");
    while ($row = $qry->getRow()) {
        $hitlist[] = $row['usr_login'];
    }
    $smarty->assignByRef('role', $_POST['role']);
    $smarty->assignByRef('user', $hitlist);
    $smarty->assign('url', edkURI::page("admin_roles"));
    $page->addContext($menubox->generate());
    $page->setContent($smarty->fetch(get_tpl('admin_roles_assign')));
    $page->generate();
} elseif ($_POST['action'] == 'assign') {
    $qry = DBFactory::getDBQuery();
    $tmp = role::_get($_POST['role']);
    var_dump($tmp);
    #$qry->execute('select usr_login from kb3_user where usr_login like '."'%".$search."%'");
} elseif ($_POST['action'] == 'create') {
    $page->addContext($menubox->generate());
    $page->setContent('to be done');
    $page->generate();
} else {
    $hardcoded =& role::get(true);
    $softcoded =& role::get();
    $smarty->assignByRef('hroles', $hardcoded);
    $smarty->assignByRef('sroles', $softcoded);
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:admin_roles.php

示例15: start

 /**
  * Start constructing the page.
  * Prepare all the shared variables such as dates and check alliance ID.
  */
 function start()
 {
     $this->page = new Page();
     $this->all_id = (int) edkURI::getArg('all_id');
     $this->all_external_id = (int) edkURI::getArg('all_ext_id');
     if (!$this->all_id && !$this->all_external_id) {
         $this->all_id = (int) edkURI::getArg('id', 1);
         // And now a bit of magic to test if this is an external ID
         if ($this->all_id > 500000 && $this->all_id < 500021 || $this->all_id > 1000000) {
             $this->all_external_id = $this->all_id;
             $this->all_id = 0;
         }
     }
     $this->view = preg_replace('/[^a-zA-Z0-9_-]/', '', edkURI::getArg('view', 2));
     // Search engines should only index the main view.
     if ($this->view) {
         $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />');
     }
     if (!$this->all_id && !$this->all_external_id) {
         $html = 'No valid alliance id specified.';
         $this->page->setContent($html);
         $this->page->generate();
         exit;
     }
     if (!$this->all_id && $this->all_external_id) {
         $this->alliance = new Alliance($this->all_external_id, true);
         $this->all_id = $this->alliance->getID();
         if (!$this->all_id) {
             echo 'No valid alliance id specified.';
             exit;
         }
     } else {
         $this->alliance = Cacheable::factory('Alliance', $this->all_id);
         $this->all_external_id = $this->alliance->getExternalID();
     }
     $this->page->addHeader("<link rel='canonical' href='" . $this->alliance->getDetailsURL() . "' />");
     if ($this->view) {
         $this->year = (int) edkURI::getArg('y', 3);
         $this->month = (int) edkURI::getArg('m', 4);
     } else {
         $this->year = (int) edkURI::getArg('y', 2);
         $this->month = (int) edkURI::getArg('m', 3);
     }
     if (!$this->month) {
         $this->month = kbdate('m');
     }
     if (!$this->year) {
         $this->year = kbdate('Y');
     }
     if ($this->month == 12) {
         $this->nmonth = 1;
         $this->nyear = $this->year + 1;
     } else {
         $this->nmonth = $this->month + 1;
         $this->nyear = $this->year;
     }
     if ($this->month == 1) {
         $this->pmonth = 12;
         $this->pyear = $this->year - 1;
     } else {
         $this->pmonth = $this->month - 1;
         $this->pyear = $this->year;
     }
     $this->monthname = kbdate("F", strtotime("2000-" . $this->month . "-2"));
     global $smarty;
     $smarty->assign('monthname', $this->monthname);
     $smarty->assign('year', $this->year);
     $smarty->assign('pmonth', $this->pmonth);
     $smarty->assign('pyear', $this->pyear);
     $smarty->assign('nmonth', $this->nmonth);
     $smarty->assign('nyear', $this->nyear);
     if ($this->alliance->isFaction()) {
         $this->page->setTitle(Language::get('page_faction_det') . ' - ' . $this->alliance->getName());
     } else {
         $this->page->setTitle(Language::get('page_all_det') . ' - ' . $this->alliance->getName());
     }
     $smarty->assign('all_name', $this->alliance->getName());
     $smarty->assign('all_id', $this->alliance->getID());
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:83,代码来源:alliance_detail.php


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