本文整理汇总了PHP中Head类的典型用法代码示例。如果您正苦于以下问题:PHP Head类的具体用法?PHP Head怎么用?PHP Head使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Head类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: head
function head()
{
require_once "head.php";
$head = new Head();
$head->info = $this->headVars;
return $head->generate();
}
示例2: head
function head($noHead)
{
require_once CORE_DIR . "/page/head.php";
$head = new Head();
$head->info['page']['title'] = "/" . BOARD_DIR . "/ - Management Panel";
echo $head->generateAdmin($noHead);
}
示例3: getPreAuthPage
private function getPreAuthPage()
{
$mainTag = new Html();
$head = new Head();
$head->addChild("\n <title>Admin page</title>\n <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n <link rel='shortcut icon' href='images/system/favicon.ico' type='image/x-icon'/>\n <link rel='stylesheet' type='text/css' href='/src/front/style/style-less.css'/>\n <script type='text/javascript' src='/src/front/js/fixies.js'></script>\n <script type='text/javascript' src='/src/front/js/ext/jquery.js'></script>\n <script type='text/javascript' src='/src/front/js/ext/jquery-1.10.2.js'></script>\n <script type='text/javascript' src='/src/front/js/ext/tinycolor.js'></script>\n <script type='text/javascript' src='/src/front/js/v-utils.js'></script>\n <script type='text/javascript' src='/src/front/js/utils.js'></script>\n <script type='text/javascript' src='/src/front/js/admin.js'></script>\n <script type='text/javascript' src='/src/front/js/components/vCore-effects.js'></script>\n ");
$body = new Body();
$body->addChild("\n <div class='admin_auth_container' >\n <div class='auth_header f-20'>Авторизация</div>\n <label class='f-15' for='user'>User</label>\n <input id='user'>\n <label class='f-15' for='password'>Password</label>\n <input id='password' type='password'>\n <button class='button f-20 input_hover'>Войти</button>\n </div>\n <script type='text/javascript'>\n /*inputHoverModule.update();*/\n </script>\n ");
return $mainTag->addChildList([$head, $body]);
}
示例4: getHtml
public function getHtml()
{
$html = new Html();
$head = new Head();
$head->addChild("\n <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n <meta http-equiv='cache-control' content='max-age=0' />\n <meta http-equiv='cache-control' content='no-cache' />\n <meta http-equiv='expires' content='0' />\n <meta http-equiv='expires' content='Tue, 01 Jan 1980 1:00:00 GMT' />\n <meta http-equiv='pragma' content='no-cache' />\n <link rel='stylesheet' type='text/css' href='/src/front/style/admin-page.css'>\n ");
$head->addChild(Components::getMenu());
$head->addChildList($this->getHeadContent());
$body = new Body();
$body->addChildList($this->getGeneralContent());
return $this->pagePrefix . $html->addChildList([$head, $body])->getHtml();
}
示例5: build
function build()
{
$head = new Head();
$head->meta();
$head->conditional_styles();
$head->stylesheets();
$head->scripts();
$head->rss_xml();
$head->user_scripts();
$head->output();
$head->add_ons();
}
示例6: show
public function show()
{
// sitemap
$this->controller->setView('SitemapView');
$sitemap = $this->controller->display();
// legal notice
$left = array_key_exists('legal_notice', $this->config) ? $this->config['legal_notice'] : '';
$left = '<div class="col-md-6 col-md-offset-2"><p>' . $left . '</p></div>';
$right = '<div class="col-md-2"><p class="pull-right"><a href="#">Back to top</a></p></div>';
// social
$social = '';
$general = Config::getInstance()->getGeneralArray('general');
if (array_key_exists('social', $general) && $general['social']) {
$buttons = Social::getInstance()->socialButtons('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], Head::getInstance()->getTitle());
$span = floor(6 / count($buttons));
foreach ($buttons as $b) {
$social .= '<div class="col-xs-2 col-md-' . $span . ' text-center">' . $b . '</div>';
}
$x = floor((8 - count($buttons)) / 2);
$social = '<div class="row"><div class="col-md-offset-2 col-md-' . $x . '"></div>' . $social . '</div>';
}
// powered by
$poweredby = '';
if (isset($this->config['poweredby'])) {
$poweredby = '<p class="poweredby text-center">' . $this->config['poweredby'] . '</p>';
$poweredby = '<div class="row"><div class="col-md-8 col-md-offset-2">' . $poweredby . '</div></div>';
}
// put it together
return $sitemap . '<div class="footer-inner row">' . $left . $right . '</div>' . $social . $poweredby;
}
示例7: render
/**
* Outputs the code and content for the accordion
* @return string
*/
public function render()
{
global $SITE, $CONFIG;
JS::loadjQuery();
JS::raw('$(function() {$(".ui-accordion-container").accordion({ header: "h3" ' . ($this->params ? ',' . $this->params : '') . '});});');
Head::add($CONFIG->UI->jQuery_theme . '/jquery-ui-*', 'css-lib');
Head::add('.ui-accordion-container li {width: 100%;}', 'css-raw');
$r = '<ol class="ui-accordion-container">';
$mode = 0;
$title = false;
$selected = false;
$i = 0;
foreach ($this->tabs as $arg) {
if ($mode == 0) {
$title = $arg;
$mode = 1;
} else {
$r .= '
<li>
<h3><a href="#">' . $title . '</a></h3>
<div>' . $arg . '</div>
</li>';
$mode = 0;
$selected = false;
$title = false;
$i++;
}
}
return $r . '</ol>';
}
示例8: getInstance
/**
* returns the instance created by its first invoke.
*
* @return Head
*/
public static function getInstance()
{
if (null === self::$instance) {
self::$instance = new self();
}
return self::$instance;
}
示例9: visit
/**
* @param AbstractModel $model
* @param null $arg unused
* @param boolean $bool indicates whether to use section tag or not
* @return mixed
*/
public function visit(AbstractModel $model, $arg, $bool)
{
if (array_key_exists('style', $model->config)) {
Head::getInstance()->link($model->config['style']);
}
return $model->accept($this, $arg, $bool);
}
示例10: plug_rssin
function plug_rssin($u)
{
req('pop,art,tri,spe');
Head::add('jslink', '/prog/utils.js');
if ($_GET['rssurl']) {
foreach ($_GET as $k => $v) {
if ($k == "rssurl") {
$u = $v;
} else {
$u .= '&' . $k . '=' . $v;
}
}
}
$u = str_replace('http://', '', $u);
if ($u) {
$alx = alx();
$rss = load_xml('http://' . $u, 1);
$ret .= bal('h1', lkt('', 'http://' . $u, preplink($u)));
$ret .= lkt("", '/?plug=rssin&rssurl=' . $u, picto('url'));
foreach ($rss as $k => $v) {
if ($v[1]) {
$ret .= pane_base($v[1], $v[0], "", rss_date($v[2]), "", $v[3], $alx);
}
}
}
return $ret;
}
示例11: getHead
protected function getHead($css = false, $index = true)
{
$head = new Head();
$head->title = $this->title;
$head->meta("Content-Type", "text/html; charset=utf-8", true);
if ($this->meta_desc) {
$head->meta("description", $this->meta_desc, false);
}
if ($this->meta_key) {
$head->meta("keywords", $this->meta_key, false);
}
$head->meta("viewport", "width=device-width", false);
$head->meta("robots", $index ? "index, follow" : "noindex, nofollow", false);
$head->favicon = "img/main/favicon.ico";
$head->css = $css;
return $head;
}
示例12: render
function render()
{
JS::loadjQuery();
JS::lib('viewslider');
JS::raw('$(function(){$("div.viewslider-view").closest(".formdiv").viewslider();});');
Head::add('viewslider/viewslider', 'css-lib');
return '<div class="formsection viewslider-view"><h3>' . $this->header . '</h3>' . implode('', flatten($this->elements)) . '</div>';
}
示例13: run
function run()
{
global $Templates, $DB, $Controller;
Head::add('booking', 'css-lib');
$Objects = $Controller->get($DB->booking_items->asList(array('parent' => array('0', '')), 'id', false, false, 'place ASC'));
$this->setContent('main', listify(array_map(create_function('$a', 'return $a->link();'), $Objects)));
$Templates->render();
}
示例14: plug_memstorage
function plug_memstorage($d)
{
Head::add('jscode', mstr_j());
$ret .= ljb('txtbox', 'mem_recap()', '', 'echo') . br() . br();
$ret .= divd('cbk', '') . br();
//$ret.=txarea('cbk','',60,10);
return $ret;
}
示例15: render
function render()
{
$id = idfy($this->name);
JS::loadjQuery();
Head::add('$(function(){$(".sortable_list").sortable({axis:"y"});});', 'js-raw');
$val = (array) $this->value;
array_walk($val, array($this, 'addHiddenFormField'));
return '<span class="formelem">' . ($this->label === false ? '' : '<label for"' . $id . '">' . $this->label . '</label>') . listify($val, 'sortable_list' . ($this->validate ? ' ' . $this->validate : '')) . (strpos($this->validate, 'required') !== false ? '<span class="reqstar">*</span>' : '') . ($this->description ? '<span class="description">' . $this->description . '</span>' : '') . '</span>';
}