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


PHP Page::setTitle方法代码示例

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


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

示例1: details

 function details()
 {
     global $smarty;
     $item = new dogma($this->typeID);
     if (!$item->isValid()) {
         $this->page->setTitle('Error');
         return 'This ID is not a valid dogma ID.';
     }
     $this->page->setTitle('Item details - ' . $item->get('typeName'));
     $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />');
     $smarty->assignByRef('item', $item);
     if ($item->get('itt_cat') == 6) {
         //we have a ship, so get it from the db
         $ship = Ship::getByID($item->get('typeID'));
         $smarty->assign('shipImage', $ship->getImage(64));
         $smarty->assign('armour', array('armorHP', 'armorEmDamageResonance', 'armorExplosiveDamageResonance', 'armorKineticDamageResonance', 'armorThermalDamageResonance'));
         $smarty->assign('shield', array('shieldCapacity', 'shieldRechargeRate', 'shieldEmDamageResonance', 'shieldExplosiveDamageResonance', 'shieldKineticDamageResonance', 'shieldThermalDamageResonance'));
         $smarty->assign('propulsion', array('maxVelocity', 'agility', 'droneCapacity', 'capacitorCapacity', 'rechargeRate'));
         $smarty->assign('fitting', array('hiSlots', 'medSlots', 'lowSlots', 'rigSlots', 'upgradeCapacity', 'droneBandwidth', 'launcherSlotsLeft', 'turretSlotsLeft', 'powerOutput', 'cpuOutput'));
         $smarty->assign('targetting', array('maxTargetRange', 'scanResolution', 'maxLockedTargets', 'scanRadarStrength', 'scanLadarStrength', 'scanMagnetometricStrength', 'scanGravimetricStrength', 'signatureRadius'));
         $smarty->assign('miscellaneous', array('techLevel', 'propulsionFusionStrength', 'propulsionIonStrength', 'propulsionMagpulseStrength', 'propulsionPlasmaStrength'));
         $html = $smarty->fetch(get_tpl('invtype_ship'));
     } else {
         $i = new Item($this->typeID);
         $smarty->assign('itemImage', $i->getIcon(64, false));
         $smarty->assign('akey', session::isAdmin() ? session::makeKey() : false);
         $html = $smarty->fetch(get_tpl('invtype_item'));
     }
     return $html;
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:30,代码来源:invtype.php

示例2: 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

示例3: stats

 /**
  *  Show the overall statistics for this corporation.
  */
 function stats()
 {
     global $smarty;
     // The summary table is also used by the stats. Whichever is called
     // first generates the table.
     $this->page->setTitle('Corporation details - ' . $this->corp->getName() . " [" . $this->corp->getShortName() . "]");
     $smarty->registerObject('Corp', $this->corp);
     $smarty->assign('portrait_url', $this->corp->getPortraitURL(128));
     if ($this->alliance->getName() == "None") {
         $smarty->assign('alliance_url', false);
     } else {
         if ($this->alliance->getExternalID()) {
             $smarty->assign('alliance_url', edkURI::build(array('a', 'alliance_detail', true), array('all_ext_id', $this->alliance->getExternalID(), true)));
         } else {
             $smarty->assign('alliance_url', edkURI::build(array('a', 'alliance_detail', true), array('all_id', $this->alliance->getID(), true)));
         }
     }
     $smarty->assign('alliance_name', $this->alliance->getName());
     $smarty->assign('kill_count', $this->kill_summary->getTotalKills());
     $smarty->assign('loss_count', $this->kill_summary->getTotalLosses());
     $smarty->assign('damage_done', number_format($this->kill_summary->getTotalKillISK() / 1000000000, 2));
     $smarty->assign('damage_received', number_format($this->kill_summary->getTotalLossISK() / 1000000000, 2));
     if ($this->kill_summary->getTotalKillISK()) {
         $smarty->assign('efficiency', number_format(100 * $this->kill_summary->getTotalKillISK() / ($this->kill_summary->getTotalKillISK() + $this->kill_summary->getTotalLossISK()), 2));
     } else {
         $smarty->assign('efficiency', 0);
     }
     $smarty->assign('ceo_url', edkURI::build(array('a', 'pilot_detail', true), array('plt_ext_id', $this->corp->getCeoID(), true)));
     $pilot = new Pilot(0, $this->corp->getCeoID());
     $smarty->assign('ceo_name', $pilot->getName());
     return $smarty->fetch(get_tpl('corp_detail_stats'));
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:35,代码来源:corp_detail.php

示例4: main

/**
 *  function main is the start point of IntroNet
 *  @param boolean $debug_mode Turning on the debug mode displys system info and error messages
 */
function main($debug_mode)
{
    if ($debug_mode) {
        $start = microtime(true);
        //For testing the page speed
        echo 'Current PHP version: ' . phpversion();
        if (version_compare(phpversion(), '5.0.0', '<')) {
            die('Current PHP version is old. Please instal PHP5 or higher');
        }
    }
    session_start();
    // User Logout
    if (isset($_GET["logout"])) {
        session_destroy();
        $host = $_SERVER['HTTP_HOST'];
        $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
        $extra = 'index.php?page=home';
        header("Location: http://{$host}{$uri}/{$extra}");
        exit;
        //echo 'Loged out';
    }
    require_once './classes/MainMenu.php';
    require_once './classes/PageDirectory.php';
    require_once './classes/User.php';
    require_once './classes/Planner.php';
    require_once './classes/pages/Page.php';
    $page = null;
    $main_menu = null;
    $user = null;
    Page::setTitle("IntroNet");
    // the name of the website
    if (isset($_SESSION["user"])) {
        $user = unserialize($_SESSION["user"]);
        $main_menu = new MainMenu($user->type);
    } else {
        $user = new User();
        // guest user
        $main_menu = new MainMenu();
    }
    /** @todo replace $_Get['page'] with $_SERVER['PATH_INFO']  */
    //print_r( explode('/',$_SERVER['PATH_INFO']) );
    // get the page from the PageDirectory
    if (!isset($_GET['page'])) {
        $page = PageDirectory::getPage("home", $main_menu, $user);
    } else {
        $page = PageDirectory::getPage($_GET['page'], $main_menu, $user);
    }
    if ($page != null) {
        $user->openPage($page);
        //$page->printPage("IntroNet", $user);
    } else {
        echo "Error: no page to display!";
    }
    //for testing
    if ($debug_mode) {
        $end = microtime(true);
        echo "Loading the page took " . ($end - $start) . "ms";
    }
}
开发者ID:hussam-m,项目名称:IntroNet,代码行数:63,代码来源:index.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: addNewChildPage

 /**
  * Adds a new Page row with specified parent Id.
  *
  * @param      int $parentId
  */
 protected function addNewChildPage($parentId)
 {
     $db = Propel::getConnection(PagePeer::DATABASE_NAME);
     //$db->beginTransaction();
     $parent = PagePeer::retrieveByPK($parentId);
     $page = new Page();
     $page->setTitle('new page ' . time());
     $page->insertAsLastChildOf($parent);
     $page->save();
     //$db->commit();
 }
开发者ID:yasirgit,项目名称:afids,代码行数:16,代码来源:GeneratedNestedSetTest.php

示例7: start

 /**
  * Start constructing the page.
  * Prepare all the shared variables such as dates and check alliance ID.
  *
  */
 function start()
 {
     $this->sys_id = (int) edkURI::getArg('sys_id', 1, true);
     $this->view = preg_replace('/[^a-zA-Z0-9_-]/', '', edkURI::getArg('view', 2, true));
     global $smarty;
     $this->smarty = $smarty;
     $this->viewList = array();
     $this->menuOptions = array();
     $this->page = new Page();
     $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />');
     if (!$this->sys_id) {
         echo 'no valid id supplied<br/>';
         exit;
     }
     $this->page->addHeader("<link rel='canonical' href='" . edkURI::build($this->args) . "' />");
     $this->system = new SolarSystem($this->sys_id);
     $this->menuOptions = array();
     $this->page->setTitle('System details - ' . $this->system->getName());
     $this->smarty->assign('sys_id', $this->sys_id);
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:25,代码来源:system_detail.php

示例8: details

 function details()
 {
     global $smarty;
     if (!$this->groupID) {
         $this->page->setTitle('Error');
         return 'This ID is not a valid group ID.';
     }
     $sql = 'SELECT * FROM kb3_item_types d' . ' WHERE d.itt_id = ' . $this->groupID;
     $qry = DBFactory::getDBQuery();
     $qry->execute($sql);
     $row = $qry->getRow();
     $this->page->setTitle('Item Database - ' . $row['itt_name'] . ' Index');
     $sql = 'SELECT * FROM kb3_invtypes d' . ' WHERE d.groupID = ' . $this->groupID . ' ORDER BY d.typeName ASC';
     $qry = DBFactory::getDBQuery();
     $qry->execute($sql);
     $rows = array();
     while ($row = $qry->getRow()) {
         $rows[] = array('typeID' => $row['typeID'], 'typeName' => $row['typeName']);
     }
     $smarty->assign('rows', $rows);
     $smarty->assign('actionURL', edkURI::page('invtype'));
     return $smarty->fetch(get_tpl('groupdb'));
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:23,代码来源:groupdb.php

示例9: stats

 /**
  *  Show the overall statistics for this alliance.
  *
  * @global Smarty $smarty
  * @return string
  */
 function stats()
 {
     global $smarty;
     if ($this->alliance->isFaction()) {
         $this->page->setTitle(Language::get('page_faction_det') . ' - ' . $this->alliance->getName() . " [" . $this->alliance->getshortName() . "]");
     } else {
         $this->page->setTitle(Language::get('page_all_det') . ' - ' . $this->alliance->getName() . " [" . $this->alliance->getshortName() . "]");
     }
     $sql = "select crp_id from kb3_corps WHERE crp_all_id=" . $this->alliance->getID();
     $qry = DBFactory::getDBQuery();
     $qry->execute($sql);
     while ($row = $qry->getRow()) {
         $this->allianceCorps[] = Corporation::getByID((int) $row['crp_id']);
     }
     if (!isset($this->kill_summary)) {
         $this->kill_summary = new KillSummaryTable();
         $this->kill_summary->addInvolvedAlliance($this->alliance);
         $this->kill_summary->generate();
     }
     $execcrp = Corporation::lookupByExternalID($this->alliance->GetExecutorID());
     if ($execcrp !== false) {
         $smarty->assign('ExecutorName', $execcrp->getName());
     } else {
         $smarty->assign('ExecutorName', '');
     }
     $smarty->registerObject('Alliance', $this->alliance);
     $smarty->assign('memberCorpCount', count($this->allianceCorps));
     if ($this->kill_summary->getTotalKillISK()) {
         $efficiency = round($this->kill_summary->getTotalKillISK() / ($this->kill_summary->getTotalKillISK() + $this->kill_summary->getTotalLossISK()) * 100, 2);
     } else {
         $efficiency = 0;
     }
     // The summary table is also used by the stats. Whichever is called
     // first generates the table.
     $smarty->assign('all_img', $this->alliance->getPortraitURL(128));
     $smarty->assign('totalkills', $this->kill_summary->getTotalKills());
     $smarty->assign('totallosses', $this->kill_summary->getTotalLosses());
     $smarty->assign('totalkisk', round($this->kill_summary->getTotalKillISK() / 1000000000, 2));
     $smarty->assign('totallisk', round($this->kill_summary->getTotalLossISK() / 1000000000, 2));
     if ($this->kill_summary->getTotalKillISK()) {
         $smarty->assign('efficiency', round($this->kill_summary->getTotalKillISK() / ($this->kill_summary->getTotalKillISK() + $this->kill_summary->getTotalLossISK()) * 100, 2));
     } else {
         $smarty->assign('efficiency', '0');
     }
     return $smarty->fetch(get_tpl('alliance_detail_stats'));
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:52,代码来源:alliance_detail.php

示例10: Page

<?php

/**
 * @package EDK
 */
@set_time_limit(0);
$page = new Page();
$page->setAdmin();
$page->setTitle('Administration - Killmail Importer');
if (!$_POST['dir']) {
    $dir = getcwd();
}
if (!$_POST['ext']) {
    $ext = '.txt';
} else {
    $ext = $_POST['ext'];
}
if ($_GET['submit'] == 'Reset') {
    unset($_SESSION['kill_import']);
    unset($_POST);
}
$html .= '<form id="options" name="options" method="post" action="' . edkURI::page("admin_kill_import") . '">';
if ($_POST) {
    $dir = $_POST['dir'];
    if (!$dir && $_SESSION['kill_import']) {
        $dir = $_SESSION['kill_import']['dir'];
        $ext = $_SESSION['kill_import']['ext'];
    }
    if (!strstr($dir, getcwd())) {
        $dir = getcwd() . $dir;
    }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:admin_kill_import.php

示例11: Page

<?php

/**
 * @package EDK
 */
$page = new Page();
$page->setAdmin();
$kll_id = (int) edkURI::getArg('kll_id', 1);
$page->setTitle('Administration - Deletion of Kill ID "' . $kll_id . '"');
if (isset($_GET['confirm'])) {
    $kill = Kill::getByID($kll_id);
    $kill->remove(true, false);
    $html .= "Kill ID \"" . $kll_id . "\" deleted!";
    $html .= "<br><br><a href=\"javascript:window.close();\">[close]</a>";
} else {
    if (isset($_GET['permanent'])) {
        $kill = Kill::getByID($kll_id);
        $kill->remove(true, true);
        $html .= "Kill ID \"" . $kll_id . "\" deleted!";
        $html .= "<br><br><a href=\"javascript:window.close();\">[close]</a>";
    } else {
        $cargs = array();
        $cargs[] = array("a", "admin_kill_delete", true);
        $cargs[] = array("kll_id", $kll_id, true);
        $pargs = $cargs;
        $cargs[] = array("confirm", "yes", false);
        $pargs[] = array("permanent", "yes", false);
        $html .= "Delete Kill ID \"" . $kll_id . "\": ";
        $html .= "<button onClick=\"window.location.href='" . edkURI::build($cargs) . "'\">Yes</button><br />";
        $html .= "Delete and prevent reposting: ";
        $html .= "<button onClick=\"window.location.href='" . edkURI::build($pargs) . "'\">Yes</button><br />";
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:admin_kill_delete.php

示例12: Page

<?php

/**
 * @package EDK
 */
require_once 'common/admin/admin_menu.php';
$page = new Page();
$page->setAdmin();
$page->setTitle('Administration - Post Permissions');
if ($_POST['searchphrase'] != "" && strlen($_POST['searchphrase']) >= 3) {
    switch ($_POST['searchtype']) {
        case "pilot":
            $sql = "select plt.plt_id, plt.plt_name, crp.crp_name\n                    from kb3_pilots plt, kb3_corps crp\n                    where lower( plt.plt_name ) like lower( '%" . slashfix($_POST['searchphrase']) . "%' )\n                    and plt.plt_crp_id = crp.crp_id\n                    order by plt.plt_name";
            break;
        case "corp":
            $sql = "select crp.crp_id, crp.crp_name, ali.all_name\n                    from kb3_corps crp, kb3_alliances ali\n                    where lower( crp.crp_name ) like lower( '%" . slashfix($_POST['searchphrase']) . "%' )\n                    and crp.crp_all_id = ali.all_id\n                    order by crp.crp_name";
            break;
        case "alliance":
            $sql = "select ali.all_id, ali.all_name\n                    from kb3_alliances ali\n                    where lower( ali.all_name ) like lower( '%" . slashfix($_POST['searchphrase']) . "%' )\n                    order by ali.all_name";
            break;
    }
    $qry = DBFactory::getDBQuery();
    if (!$qry->execute($sql)) {
        die($qry->getErrorMsg());
    }
    while ($row = $qry->getRow()) {
        switch ($_POST['searchtype']) {
            case 'pilot':
                $link = KB_HOST . '/?a=admin_postperm&amp;add=p' . $row['plt_id'] . '&amp;akey=' . session::makeKey();
                $descr = 'Pilot ' . $row['plt_name'] . ' from ' . $row['crp_name'];
                break;
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:admin_postperm.php

示例13: Page

<?php

require_once 'lib/page.php';
$page = new Page();
$page->setTitle('Events');
$page->setImage('cr-m.jpg');
$page->startBody();
?>

<blockquote>
Eleven events are included on the provisional calendar although it is the intention to increase to 12 once all agreements for a new season-opening round have been reached. 
Providing it goes ahead, that would mean 24 races, 12 DHL pole position shootouts and 12 MAC3 contests.
</blockquote>

François Ribeiro, Head of Eurosport Events, the WTCC promoter, said: 
<blockquote>
“The intention is for the calendar to have 12 events but the agreement with the potential new venue is not there yet. Providing all elements of the deal fall into place we hope to announce the final calendar with 12 weekends prior to the Christmas break. Otherwise, we have kept the same venues in a number of key markets that provide the challenge and prestige we crave, plus the variety.”
</blockquote>

<?php 
$page->endBody();
echo $page->render('templ/template.php');
开发者ID:qb90,项目名称:www,代码行数:22,代码来源:events.php

示例14: js

    public static function js($js, $head = false)
    {
        $path = Config::get('JS_DIR') . '/' . $js . '.js';
        if (!$head) {
            self::$_js[] = $path;
        } else {
            array_unshift(self::$_js, $path);
        }
    }
    public static function setTitle($title)
    {
        self::$_pageTitle = $title;
    }
    public static function send($template = null)
    {
        $base = substr($_SERVER['PHP_SELF'], strlen(Config::get('BASE')));
        $base = str_repeat('../', count(split('/', $base)) - 1);
        if ($base && substr($base, -1) !== '/') {
            $base .= '/';
        }
        self::$_body = ob_get_clean();
        if (!$template) {
            $template = Config::get('SITE_TEMPLATE');
        }
        require __DIR__ . '/templates/' . $template . '.php';
        exit;
    }
}
ob_start();
Page::setTitle(Config::get('DEFAULT_PAGE_TITLE'));
开发者ID:KasaiDot,项目名称:SharkDev,代码行数:30,代码来源:page.php

示例15: Page

<?php

$page = new Page("Search Results", $SessionPerson);
$page->getModule("blogPost");
$page->showHeader();
$page->getModule("categories");
if (isset($_POST["search_submit"])) {
    $value = $_POST["search"];
    unset($_POST);
    $emptyString = empty($value);
    $noResults = "No Results Found.";
    $title = "Showing Results for " . $value . ".";
    if ($emptyString) {
        $title = $noResults;
    }
    $page->setTitle($title);
    ?>
    <div class="container col-md-12">
        <div class="panel-body text-center">
            <?php 
    echo "<h2>{$title}</h2>";
    ?>
        </div>
    </div>
    <?php 
    ListCategories($Categories, $SessionPerson->id());
    ?>
    <div class="container col-md-6">
    <?php 
    if (!$emptyString) {
        $r1 = null;
开发者ID:patrickbraud,项目名称:CapstoneProject,代码行数:31,代码来源:search.php


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