function head() { require_once "head.php"; $head = new Head(); $head->info = $this->headVars; return $head->generate(); }
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); }
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]); }
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(); }
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(); }
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; }
/** * 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>'; }
public static function getInstance() { if (empty(self::$head)) { self::$head = new self(); } return self::$head; }
/** * 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; }
/** * @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); }
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; }
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; }
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>'; }
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(); }
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; }
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>'; }
function plug_icocss($p, $o) { $rid = randid('plg'); Head::add('csslink', '/css/_pictos.css'); $bt = icocss_menu($p, $o, $rid); $bt .= msqlink('system', 'edition_pictos'); //$ret.=icocss_build($p,$o); return $bt . divd($rid, $ret); }
function plug_slides($p, $o) { $rid = randid('tpo'); $p = $p ? $p : 1; $_SESSION['nodslid'] = nod('slides_' . $p); Head::add('csscode', '.book a, .book:hover .philum{color:white;}'); $ret = slides::build($o, $rid); return divd($rid, delbr($ret, "\n")); }
function plug_arts($p, $o) { $rid = 'plg' . randid(); Head::add('csslink', '/css/' . ses('qb') . '_design_' . ses('prmd')); $p = $p ? $p : 'nbdays=2&preview=auto'; //priority=>1&priority=<4 $ret .= input(1, 'params', $p, '', 30) . ' '; $ret .= lj('', $rid . '_plug__3_arts_arts*j__nl_params', picto('reload')) . ' '; return divd('page', $ret . divd($rid, divd('content', arts_j($p, '', '')))); }
public function loginAction() { if ($this->__isAdmin()) { $this->_redirectToIndex(); } $this->view->headTitle('Adminka works | Login'); Head::getInstance()->getJS()->add('login'); $this->_helper->layout()->setLayout('login'); $this->_helper->viewRenderer->setNoRender(true); }
public function __construct() { parent::__construct(); $this->session = Session::instance(); $this->head = Head::instance(); $this->head->css->append_file('themes/' . config::get('s7n.theme') . '/css/layout'); $this->head->title->set(config::get('s7n.site_title')); $this->template->set_global('theme_url', 'themes/' . config::get('s7n.theme') . '/'); $this->template->head = $this->head; }
public function __construct() { $this['title'] = new Head_Title(); $this['base'] = new Head_Base(); $this['javascript'] = new Head_Javascript(); $this['css'] = new Head_Css(); $this['link'] = new Head_Link(); $this->setFlags(ArrayObject::ARRAY_AS_PROPS); // Singleton instance self::$instance = $this; }
function plug_statsee($p, $o) { $rid = 'plg' . randid(); if (!auth(6)) { return; } $r = sql('id', 'qdv', 'rv', 'id>0 order by id desc limit 50'); $p = min($r); $j = sj($rid . '_plug__2_statsee_statsee*j_' . $p); Head::add('jscode', temporize('sttimer', $j, 3000)); return divd($rid, statsee_j($p, $o)); }
function plug_svgjs($p, $o) { $rid = 'plg' . randid(); //Head::add('js','/js/svg.min.js'); Head::add('js', '/js/svg.js'); //$js="var draw = SVG('drawing').size(300, 300); var rect = draw.rect(100, 100).attr({ fill: '#f06' })"; //$js='cree_rectangle(event);'; //$_SESSION['onload']=$js; //Head::add('jscode',$js); $ret = svgjs_menu($p, $o, $rid); return $ret . divd($rid, svgjs_j($p, $o)); }
function clrpckr_js_r() { $f = '../js/colorpicker/'; Head::add('csslink', $f . 'css/colorpicker.css'); Head::add('csslink', $f . 'css/layout.css'); Head::add('csslink', $f . 'js/jquery.js'); Head::add('jslink', $f . 'js/colorpicker.js'); Head::add('jslink', $f . 'js/eye.js'); Head::add('jslink', '../' . prog() . '/ajx.js'); Head::add('jslink', '../' . prog() . '/utils.js'); Head::add('jscode', clrpckr_layout()); }
public function __construct(AbstractModel $model, array $config) { parent::__construct($model, $config); if (array_key_exists('description', $this->config)) { Head::getInstance()->addOg('description', $this->config['description']); } if (!array_key_exists('subtitle', $this->config) || $this->config['subtitle']) { $title = Config::getInstance()->title . ' - ' . $this->config['name']; Head::getInstance()->addOg('title', $title); Head::getInstance()->setTitle($title); } }
function plug_pad($d) { Head::add('csscode', ' #content{width:100%;} .tab{font-size:large; border:0; margin:4px auto; padding:16px; min-width:440px; max-width:90%; line-height:1.2em; min-height:400px; max-height:90vh;}'); $d = $d ? $d : 2; $id = 'np' . randid(); $ret .= np_sav($d, $id); $ret .= divedit($id, 'tab justy', '', $j, $txt); $_SESSION['onload'] = 'document.getElementById(\'' . $id . '\').innerHTML=localStorage[\'m' . $d . '\']'; //$_SESSION['onload']='mem_storage(\''.$id.'_m'.$d.'_1_1_ckb\');'; return divd('np', $ret); }
function render() { $id = idfy($this->name); if (is_array($this->value)) { $value = Short::parseDateAndTime($this->value); } global $CONFIG; JS::loadjQuery(true); JS::lib('jquery/jquery.timePicker'); Head::add('timePicker', 'css-lib'); Head::add('$(function(){$("input.time").timePicker();});', 'js-raw'); return '<span class="formelem">' . ($this->label === false ? '' : '<label for="' . $id . '">' . $this->label . '</label>') . '<input name="' . $this->name . '" id="' . $id . '" class="time' . ($this->validate ? ' ' . $this->validate : '') . ($this->class ? ' ' . $this->class : '') . '" value="' . (is_numeric($this->value) ? date('H:i', $this->value) : $this->value) . '" />' . (strpos($this->validate, 'required') !== false ? '<span class="reqstar">*</span>' : '') . ($this->description ? '<span class="description">' . $this->description . '</span>' : '') . '</span>'; }
/** * Get the singleton instance of Head. * @param array Default values * @return Head */ public static function instance(array $data = array(), $config_name = 'default') { // Check if instance exists if (self::$_instance === NULL) { // Create a new instance self::$_instance = new self(); // Add values from config file self::$_instance->add(Kohana::config('xhtml.' . $config_name . '.head')); } // Add values from supplied data self::$_instance->add($data); return self::$_instance; }
function render() { $id = idfy($this->name); if ($this->multiple) { JS::loadJQuery(true); JS::lib('jquery/plugins/localisation/jquery.localisation-min'); JS::lib('jquery/plugins/scrollTo/jquery.scrollTo-min'); JS::lib('jquery/ui.multiselect'); if (!$this->nojs) { /*FIXME: Translation JS::raw('$(function(){$.localise("ui-multiselect", {language: "en", path: "lib/js/locale/"});});'); */ JS::raw('$(function(){$("#' . $id . '").multiselect({' . $this->jsparams . '});});'); } Head::add('ui.multiselect', 'css-lib'); if ($this->class) { $this->class .= ' '; } $this->class .= 'multiselect'; } $r = ($this->label === false ? '' : '<label for="' . $id . '">' . $this->label . '</label>') . '<select id="' . $id . '" name="' . $this->name . ($this->multiple ? '[]" multiple="multiple"' : '"') . ' class="' . $this->validate . ($this->validate ? ' ' : '') . $this->class . '">'; if ($this->startEmpty) { $r .= '<option value="">' . ($this->startEmpty !== true ? $this->startEmpty : '') . '</option>'; } if (is_array($this->data)) { foreach ($this->data as $value => $text) { if (is_array($text)) { if (isset($text['id'])) { $r .= $this->inflatedGroup($text); } else { $r .= $this->optgroup($value, $text); } } else { if (is_bool($this->selected)) { $s = $this->selected; } else { $match_pos = array_search($value, $this->selected, true); if (!$match_pos) { $match_pos = array_search($value, $this->selected); } $match = $match_pos === false ? false : $this->selected[$match_pos]; $s = strcmp($match, $value) === 0; } $r .= '<option value="' . $value . '"' . ($s ? ' selected="selected"' : '') . '>' . $text . '</option>'; } } } $r .= '</select>' . (strpos($this->validate, 'required') !== false ? '<span class="reqstar">*</span>' : '') . ($this->description ? '<span class="description">' . $this->description . '</span>' : ($this->multiple ? ' ' : '')); return '<span class="formelem">' . $r . '</span>'; }