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


PHP Page::header方法代码示例

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


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

示例1: array

 $P = array('data' => $request);
 if (!Notify::errors()) {
     include __DIR__ . DS . 'task.ignite.substance.php';
     include __DIR__ . DS . 'task.fields.php';
     $header = array('Title' => $title, 'Link' => $link, 'Description' => trim($description) !== "" ? Text::parse(trim($description), '->encoded_json') : false, 'Author' => $author, 'Content Type' => Request::post('content_type', 'HTML'), 'Fields' => !empty($field) ? Text::parse($field, '->encoded_json') : false);
     $_ = POST . DS . $segment . DS . Date::slug($date) . '_' . implode(',', $kind) . '_' . $slug . $extension;
     // Ignite
     if (!$id) {
         Page::header($header)->content($content)->saveTo($_);
         if (!empty($css) && $css !== $config->defaults->{$segment . '_css'} || !empty($js) && $js !== $config->defaults->{$segment . '_js'}) {
             File::write(Converter::ES($css) . "\n\n" . SEPARATOR . "\n\n" . Converter::ES($js))->saveTo(CUSTOM . DS . Date::slug($date) . $extension);
             Weapon::fire(array('on_custom_update', 'on_custom_construct'), array($G, $P));
         }
         // Repair
     } else {
         Page::header($header)->content($content)->saveTo($post->path);
         File::open($post->path)->renameTo(File::B($_));
         $custom_ = CUSTOM . DS . Date::slug($post->date->W3C);
         if (file_exists($custom_ . $extension_o)) {
             Weapon::fire('on_custom_update', array($G, $P));
             if (trim(File::open($custom_ . $extension_o)->read()) === "" || trim(File::open($custom_ . $extension_o)->read()) === SEPARATOR || empty($css) && empty($js) || $css === $config->defaults->{$segment . '_css'} && $js === $config->defaults->{$segment . '_js'}) {
                 // Always delete empty custom CSS and JavaScript file(s) ...
                 File::open($custom_ . $extension_o)->delete();
                 Weapon::fire('on_custom_destruct', array($G, $P));
             } else {
                 File::write(Converter::ES($css) . "\n\n" . SEPARATOR . "\n\n" . Converter::ES($js))->saveTo($custom_ . $extension_o);
                 File::open($custom_ . $extension_o)->renameTo(Date::slug($date) . $extension);
                 Weapon::fire('on_custom_repair', array($G, $P));
             }
         } else {
             if (!empty($css) && $css !== $config->defaults->{$segment . '_css'} || !empty($js) && $js !== $config->defaults->{$segment . '_js'}) {
开发者ID:yiannisSt,项目名称:mecha-cms,代码行数:31,代码来源:route.post.php

示例2: Page

<?php

//Obligatoire
$niveauSecu = 'log';
//Niveaux de sécurité (voir $session->authPage() )
include '../include/config.inc';
//TODO: rendre generique les inc.php ou .inc , par cq on prefereras les .inc.php
require_once 'config.inc.php';
$page = new Page();
$page->header('Système de paiement', 'buckutt');
?>
<link rel="stylesheet" type="text/css" href="<?php 
echo $config['baseUrl'];
?>
/fantomette/buckutt.style.css" />
<link type="text/css" href="css/flick/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js">
</script>
<script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js">
</script>
<?php 
error_reporting(E_ERROR);
//$url = 'http://buckutt.dyndns.org/server/';
//TODO:rendre plus propre ca :
$url = $config['SERVER']['URL'];
// En fonction des pages, on appel ou non les wsdl utiles
//TODO: revoir avec le fichier de configuration
$wsdlSADMIN = $url . 'SADMIN.class.php?wsdl';
if ($needSBUY) {
    $wsdlSBUY = $url . 'SBUY.class.php?wsdl';
}
开发者ID:buckutt,项目名称:Archives,代码行数:31,代码来源:header.inc.php

示例3: isset

$raiz = isset($raiz) ? $raiz : "../../../";
require_once $raiz . 'librerias/iMobile/Configuracion.cnf.php';
/**
 * Create a new Php object.
 */
$j = new Container();
/**
 * Config 'html' and 'head' tag.
 */
$j->head()->title('Examples');
/**
 * Create and config a page object.
 */
$p = new Page('examples');
$p->theme('b')->title('Examples');
$p->header()->theme('a');
$p->header()->addButton('Home', './', '', 'home');
//Get the Button Added and Set Attributes
$p->header()->items()->get(1)->attribute('data-iconpos', 'notext')->attribute('rel', 'external');
/**
 * Create and config a new listview object and add Items.
 */
$list1 = new Listview();
$list1->splitIcon('search')->splitTheme('c');
$list1->addDivider('Beginner', '2')->inset(true);
$list1->addBasic('Basic Example', 'example-1.php');
$list1->items()->get(1)->add('<a href="example-1.php" rel="external" target="_blank"></a>');
$list1->addBasic('Adding Pages', 'example-2.php');
$list1->items()->get(2)->add('<a href="example-2.php" rel="external" target="_blank"></a>');
$list1->addDivider('Intermediate', '3');
$list1->addBasic('Adding Objects', 'example-3.php');
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:31,代码来源:index.php

示例4: array

<?php

Weapon::fire('preview_before', array($P, $P));
$page = Page::header(array('Title' => Request::post('title', $speak->untitled . ' ' . date('Y/m/d H:i:s'), false), 'Content Type' => Request::post('content_type', 'HTML', false)))->content(Request::post('content', Config::speak('notify_empty', strtolower($speak->contents)), false))->read();
Weapon::fire('preview_title_before', array($P, $P));
echo '<h2 class="preview-title preview-article-title">' . $page['title'] . '</h2>';
Weapon::fire('preview_title_after', array($P, $P));
Weapon::fire('preview_content_before', array($P, $P));
echo '<div class="preview-content preview-article-content p">' . $page['content'] . '</div>';
Weapon::fire('preview_content_after', array($P, $P));
echo '</div>';
Weapon::fire('preview_after', array($P, $P));
开发者ID:yiannisSt,项目名称:mecha-cms,代码行数:12,代码来源:article.php

示例5: array

            Notify::error($speak->notify_invalid_email);
            Guardian::memorize($request);
        }
        $email = Text::parse($email, '->broken_entity');
        // Check for empty message content
        if (trim($message) === "") {
            Notify::error(Config::speak('notify_error_empty_field', $speak->message));
            Guardian::memorize($request);
        }
        $P = array('data' => $request);
        if (!Notify::errors()) {
            $header = array('Name' => $name, 'Email' => $email, 'URL' => $url, 'Status' => $request['status'], 'Content Type' => Request::post('content_type', 'HTML'), 'Fields' => !empty($field) ? Text::parse($field, '->encoded_json') : false);
            $_ = RESPONSE . DS . $segment . DS . Date::slug($request['post']) . '_' . Date::slug($rid) . '_' . ($request['parent'] ? Date::slug($request['parent']) : '0000-00-00-00-00-00') . $extension;
            // Ignite
            if (!$id) {
                Page::header($header)->content($message)->saveTo($_);
                // Repair
            } else {
                Page::open($response->path)->header($header)->content($message)->save();
                File::open($response->path)->renameTo(File::B($_));
            }
            Notify::success(Config::speak('notify_success_' . ($id ? 'updated' : 'created'), $speak->{$segment}) . ($extension === '.txt' ? ' <a class="pull-right" href="' . call_user_func('Get::' . $post . 'Anchor', $request['post'])->url . '#' . $segment . '-' . $rid . '" target="_blank"><i class="fa fa-eye"></i> ' . $speak->view . '</a>' : ""));
            Weapon::fire(array('on_' . $segment . '_update', 'on_' . $segment . '_' . ($id ? 'repair' : 'construct')), array($G, $P));
            Guardian::kick($config->manager->slug . '/' . $segment . '/repair/id:' . $rid . $config->url_query);
        }
    }
    Shield::lot(array('segment' => array($segment, $post)))->attach('manager');
});
/**
 * Response Killer
 * ---------------
开发者ID:AdeHaze,项目名称:mecha-cms,代码行数:31,代码来源:route.response.php

示例6: render

 /**
  * Render shortcodes.
  *
  * @param  string     $content The content to render.
  * @param  array      $options Options to be passed to the renderer.
  * @param  null|Page  $page    Null or an instance of \Grav\Common\Page.
  *
  * @return string              The modified contents.
  */
 public function render($content, $options = [], $page = null)
 {
     // Build an anonymous function to pass to twig `render` method
     $function = function ($tag, $body, $arguments) use($options, $page) {
         if (isset($this->shortcodes[$tag])) {
             $options = isset($options[$tag]) ? $options[$tag] : [];
         }
         $event = new Event(['body' => $body, 'options' => new Data(array_replace_recursive($options, $arguments)), 'grav' => self::getGrav(), 'shortcodes' => $this, 'page' => $page, 'tag' => $tag]);
         return $event;
     };
     // Wrapper for shortcodes filter function
     $filter_function = function ($name, $content, $context, $env) {
         return $this->filterShortcode($name, $content, $context, $env);
     };
     // Process in-page shortcodes Twig
     $name = '@Shortcodes:' . $page->path();
     $this->loader->setTemplate($name, $content);
     $vars = ['__shortcodes' => $function, '__shortcodes_filter' => $filter_function];
     try {
         $page_default = $this->page;
         $this->page = $page;
         $output = $this->twig->render($name, $vars);
     } catch (\Twig_Error_Loader $e) {
         throw new \RuntimeException($e->getRawMessage(), 404, $e);
     }
     $shortcodes = isset($page->header()->shortcodes) ? $page->header()->shortcodes : [];
     if (isset($shortcodes['extra'])) {
         /** @var Cache $cache */
         $cache = self::getGrav()['cache'];
         $cache_id = md5('shortcodes' . $page->id() . $cache->getKey());
         $cache->save($cache_id, $shortcodes['extra']);
     }
     $this->page = $page_default;
     return $output;
 }
开发者ID:Sommerregen,项目名称:grav-plugin-shortcodes,代码行数:44,代码来源:Shortcodes.php

示例7: Php

 */
/**
 * Include the iMobile class.
 */
include '../lib/iMobile.php';
/**
 * Create a new Php object.
 */
$iMobile = new Php();
/**
 * Create a new page object.
 */
$p = new Page('simple-xml');
$p->theme('b');
$p->title('Cars');
$bt = $p->header()->addButton('', 'index.php', 'b', 'home', false, false, true);
$bt->rel('external')->attribute('data-iconpos', 'notext');
/**
 * Adding Listview to page.
 */
$lv = $p->addContent(new Listviem(), true);
$lv->filter(true);
/**
 * Reading XML;
 */
$xml = @simplexml_load_file('cars.xml') or die("error loading xml file.");
foreach ($xml->brandGroup as $brandGroup) {
    /**
     * Adding Dividers.
     */
    $lv->addDivider($brandGroup->name);
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:31,代码来源:simple-xml.php

示例8:

 function __construct()
 {
     parent::__construct();
     $this->getData();
     parent::header('baseMVC - Delete "' . $this->title . '"');
 }
开发者ID:rootkowski,项目名称:baseMVC,代码行数:6,代码来源:delete.php

示例9: Container

/**
 * Example 2 - Adding Pages
 * @package iMobile
 * @filesource
 */
/**
 * Create a new Php object.
 */
$j = new Container();
/**
 * Create a new Page object and populate it
 */
$p = new Page('example-2');
$p->theme('b');
$p->title('Example 2');
$p->header()->addButton('Example 1', 'example-1.php', 'a', 'arrow-l');
$p->header()->addButton('Example 3', 'example-3.php', 'b', 'arrow-r');
$p->header()->theme('a');
$p->addContent('<h1>Adding Pages</h1>');
$p->addContent('<p>In this example we create a Page,');
$p->addContent(' add content and Buttons to the Header.');
$p->addContent(' After we add the page to Container object.</p>');
$p->addContent('<a href="index.php" data-role="button" data-theme="a">Home</a>');
$p->addContent('<a href="example-3.php" data-role="button">Example 3</a>');
$p->footer()->title('Example 2 Footer');
$p->footer()->position('fixed');
$p->footer()->theme('a');
/**
 * Add the page to Container object.
 */
$j->addPage($p);
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:31,代码来源:example-2.php

示例10: function

require 'config.php';
require PATH_ROOT . '/lib/class_page.php';
require PATH_ROOT . '/lib/class_login.php';
require PATH_ROOT . '/lib/class_imetos.php';
require PATH_ROOT . '/lib/class_station.php';
require PATH_ROOT . '/lib/class_sensor.php';
require PATH_ROOT . '/lib/class_config.php';
require PATH_ROOT . '/lib/class_ftp.php';
require PATH_ROOT . '/lib/class_users.php';
require PATH_ROOT . '/lib/class_reports.php';
require PATH_ROOT . '/lib/class_log.php';
//
require PATH_ROOT . '/lib/functions_standard.php';
require_once PATH_ROOT . '/lib/vendor/autoload.php';
$router = new \Klein\Klein();
Page::header();
// API Klein https://github.com/klein/klein.php/wiki/Api
//controllers
/*
$router->with('/users', function () use ($router) {
   $router->respond('GET', '/?', function ($request, $response) {
       // listado de todos los usuarios
       $_POST['action']='listUsers';
   });

   $router->respond('GET', '/[:userid]', function ($request, $response) {
       // Muestra solo un usuario
       $_POST['action']='listUser';
       if(isset($request->userid)) $_POST['userid']=$request->userid;
   });
   
开发者ID:pjg711,项目名称:alerta-sondas-detenidas,代码行数:30,代码来源:index.php

示例11: __construct

 function __construct()
 {
     parent::__construct();
     Page::header('baseMVC - Blog');
 }
开发者ID:rootkowski,项目名称:baseMVC,代码行数:5,代码来源:blog.php

示例12: isset

error_reporting(E_ALL);
ini_set('display_errors', '1');
$raiz = isset($raiz) ? $raiz : "../../../";
require_once $raiz . 'librerias/iMobile/Configuracion.cnf.php';
$j = new Container();
/**
 * Config 'html' and 'head' tag.
 */
$j->head()->title('Example 5');
/**
 * Create and config a page object.
 */
$p = new Page('example-5');
$p->theme('b')->title('Example 5');
$p->header()->theme('a')->add(new Button('', array(new Attribute('data-iconpos', 'notext')), array(), 'a', 'index.php', '', 'home'));
//Get the Button Added and Set Attributes
$p->header()->items()->get(1)->attribute('data-iconpos', 'notext')->attribute('rel', 'external');
/**
 * Create and config a new Navbar object and add items.
 */
$nav = $p->header()->add(new Navbar(), true);
$nav->add(new Button('', array(), array(), 'a', 'example-1.php', 'EX1', '', false));
$nav->add(new Button('', array(), array(), 'a', 'example-2.php', 'Ex2', '', false));
$nav->add(new Button('', array(), array(), 'a', 'example-3.php', 'EX3', '', false));
$nav->add(new Button('', array(), array(), 'a', 'example-4.php', 'EX4', '', false));
$nav->add(new Button('', array(), array(), 'a', '#', 'EX5', '', true));
/**
 * Configure page footer (Footer).
 */
$p->footer()->addButton('EX1', 'example-1.php', '', 'arrow-l');
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:30,代码来源:example-5.php

示例13:

 function __construct()
 {
     parent::__construct();
     parent::header('baseMVC - ' . $_SESSION['fullname'] . ' - Manage Your Content');
 }
开发者ID:rootkowski,项目名称:baseMVC,代码行数:5,代码来源:manage.php

示例14: getView

 function getView()
 {
     $this->fetchData();
     Page::header('baseMVC - Edit "' . $this->article_data['title'] . '"');
     $this->view('edit_view', $this->article_data);
 }
开发者ID:rootkowski,项目名称:baseMVC,代码行数:6,代码来源:edit.php

示例15: time

 $post = Date::format($article->time, 'Y-m-d-H-i-s');
 $id = (int) time();
 $parent = Request::post('parent');
 $P = array('data' => $request);
 $name = strip_tags($request['name']);
 $email = Text::parse($request['email'], '->broken_entity');
 $url = isset($request['url']) ? $request['url'] : false;
 $parser = strip_tags(Request::post('content_type', $config->html_parser));
 $message = $request['message'];
 $field = Request::post('fields', array());
 include DECK . DS . 'workers' . DS . 'task.field.1.php';
 // Temporarily disallow image(s) in comment to prevent XSS
 $message = strip_tags($message, '<br><img>' . ($parser === 'HTML' ? '<a><abbr><b><blockquote><code><del><dfn><em><i><ins><p><pre><span><strong><sub><sup><time><u><var>' : ""));
 $message = preg_replace('#(\\!\\[.*?\\]\\(.*?\\))#', '`$1`', $message);
 $message = preg_replace('#<img(\\s[^<>]*?)>#', '&lt;img$1&gt;', $message);
 Page::header(array('Name' => $name, 'Email' => $email, 'URL' => $url, 'Status' => Guardian::happy() ? 'pilot' : 'passenger', 'Content Type' => $parser, 'Fields' => !empty($field) ? Text::parse($field, '->encoded_json') : false, 'UA' => Get::UA(), 'IP' => Get::IP()))->content($message)->saveTo(RESPONSE . DS . $post . '_' . Date::format($id, 'Y-m-d-H-i-s') . '_' . ($parent ? Date::format($parent, 'Y-m-d-H-i-s') : '0000-00-00-00-00-00') . $extension);
 Notify::success(Config::speak('notify_success_submitted', $speak->comment));
 if ($extension === '.hold') {
     Notify::info($speak->notify_info_comment_moderation);
 }
 Weapon::fire('on_comment_update', array($P, $P));
 Weapon::fire('on_comment_construct', array($P, $P));
 if ($config->comment_notification_email) {
     $mail = '<p>' . Config::speak('comment_notification', $article->url . '#' . sprintf($comment_id, Date::format($id, 'U'))) . '</p>';
     $mail .= '<p><strong>' . $name . ':</strong></p>';
     $mail .= $parser !== 'HTML' ? Text::parse($message, '->html') : $message;
     $mail .= '<p>' . Date::format($id, 'Y/m/d H:i:s') . '</p>';
     // Sending email notification ...
     if (!Guardian::happy()) {
         if (Notify::send($request['email'], $config->author_email, $speak->comment_notification_subject, $mail, 'comment:')) {
             Weapon::fire('on_comment_notification_construct', array($request, $config->author_email, $speak->comment_notification_subject, $mail));
开发者ID:razordaze,项目名称:mecha-cms,代码行数:31,代码来源:task.comment.php


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