本文整理汇总了PHP中Head::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Head::add方法的具体用法?PHP Head::add怎么用?PHP Head::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Head
的用法示例。
在下文中一共展示了Head::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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>';
}
示例3: 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>';
}
示例4: 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;
}
示例5: 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();
}
示例6: plug_slides
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"));
}
示例7: plug_icocss
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);
}
示例8: 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>';
}
示例9: plug_arts
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, '', ''))));
}
示例10: plug_svgjs
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));
}
示例11: clrpckr_js_r
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());
}
示例12: plug_statsee
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));
}
示例13: render
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>';
}
示例14: plug_pad
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);
}
示例15: render
function render()
{
$id = idfy($this->name);
JS::loadjQuery(false);
if ($this->available_values) {
JS::lib('jquery/jquery.bgiframe.min');
JS::lib('jquery/jquery-plugin-ajaxqueue');
JS::lib('jquery/jquery.autocomplete.min');
Head::add('jquery.autocomplete', 'css-lib');
JS::raw('$(function(){$("#' . $id . '").autocomplete(["' . join('","', $this->available_values) . '"], {width: 320,max: 4,highlight: false,multiple: true,multipleSeparator: " ",scroll: true,scrollHeight: 300})});');
}
$r = ($this->label === false ? '' : '<label for="' . $id . '">' . $this->label . '</label>') . '<input name="' . $this->name . '" id="' . $id . '" class="text tags' . ($this->validate ? ' ' . $this->validate : '') . '" value="' . $this->value . '" />' . ($this->description ? '<span class="description">' . $this->description . '</span>' : '');
return '<span class="formelem">' . $r . '</span>';
}