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


PHP Head::generate方法代码示例

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


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

示例1: head

 function head()
 {
     require_once "head.php";
     $head = new Head();
     $head->info = $this->headVars;
     return $head->generate();
 }
开发者ID:Bossgod,项目名称:3ch,代码行数:7,代码来源:page.php

示例2: list

    }
    if ($res) {
        list($s, $h) = split('-', $res);
    }
    $s = $s ? $s : 640;
    if ($id) {
        req(str_replace('-', ',', $id));
    }
    $ret = call_user_func_array($va, array($opt, $optb, $res));
}
$eye = array('art', 'popart', 'popartmod');
if ($eye[$n]) {
    eye();
}
if ($tt && $pp) {
    $t = $tt;
}
if ($t == 'pagup') {
    $ret = pagup($ret);
} elseif ($t) {
    $ret = popup($t, $ret, $s, $p);
}
//
if (Head::$add) {
    Head::add('meta', array('http-equiv', 'Content-Type', 'text/html; charset=' . $_SESSION['enc']));
    echo Head::generate();
} else {
    header('Content-Type:text/html; charset=' . $_SESSION['enc']);
}
echo utf($ret);
mysql_close();
开发者ID:philum,项目名称:cms,代码行数:31,代码来源:ajax.php

示例3: array

#--render
Head::add('tag', array('title', $d ? $d : 'plugin'));
Head::add('meta', array('http-equiv', 'Content-Type', 'text/html; charset=' . $_SESSION['enc']));
Head::add('rel', array('shortcut icon', uicon('copy_16', 'picol/16', '/')));
//Head::add('code','<base'.atb('href',$host).' />');
Head::add('meta', array('name', 'generator', 'philum_' . $_SESSION['philum']));
Head::add('csslink', '/css/_global.css');
Head::add('csslink', '/css/_pictos.css');
Head::add('csslink', '/css/_admin.css');
Head::add('csslink', '/css/_classic.css');
//if($_SESSION['prmb'][5])$nod=$_SESSION['qb'].'_auto';
//else $nod=$_SESSION['qb'].'_design_'.$_SESSION['prmd'];
//Head::add('csslink','/css/'.$nod.'.css');
Head::add('jslink', '/progb/ajx.js');
Head::add('jslink', '/progb/utils.js');
Head::add('jscode', 'cutat="' . $_SESSION['jbuffer'] . '"; flow="0";');
Head::add('jscode', $_SESSION['jscode']);
if ($d) {
    $content = load_plug($d, $p, $o);
}
$ret = Head::generate();
$ret .= '<body onmousemove="popslide(event)" onclick="clpop(event);" spellcheck="false" onload="' . $_SESSION['onload'] . '">' . "\n";
$ret .= divd('clbub', '');
$ret .= plug_menu($d, $p, $o, $dr);
$ret .= divd('content', $content);
$ret .= hidden('', 'socket', '');
$ret .= divd('popup', '');
$ret .= divd('popw', '');
$ret .= '</body>';
echo utf($ret);
mysql_close();
开发者ID:philum,项目名称:cms,代码行数:31,代码来源:plug.php

示例4: update

 function update($resno = 0, $rebuild = 0)
 {
     global $path, $mysql;
     require_once CORE_DIR . "/postform.php";
     require_once CORE_DIR . "/page/head.php";
     $postform = new PostForm();
     $head = new Head();
     $this->update_cache();
     //Muh speed increase (for when the function calls itself). Otherwise call Log->update_cache() manually.
     $find = false;
     $resno = (int) $resno;
     $log = $this->cache;
     if ($resno) {
         if (!isset($log[$resno])) {
             $this->update(0, $rebuild);
             // the post didn't exist, just rebuild the indexes
             return;
         } else {
             if ($log[$resno]['resto']) {
                 $this->update($log[$resno]['resto'], $rebuild);
                 // $resno is a reply, try rebuilding the parent
                 return;
             }
         }
     }
     if ($resno) {
         $treeline = array($resno);
         //if(!$treeline=$mysql->query("select * from ".SQLLOG." where root>0 and no=".$resno." order by root desc")){echo S_SQLFAIL;}
     } else {
         $treeline = $log['THREADS'];
         //if(!$treeline=$mysql->query("select * from ".SQLLOG." where root>0 order by root desc")){echo S_SQLFAIL;}
     }
     //Finding the last entry number
     if (!($result = $mysql->query("select max(no) from " . SQLLOG))) {
         echo S_SQLFAIL;
     }
     $row = $mysql->fetch_array($result);
     $lastno = (int) $row[0];
     $mysql->free_result($result);
     $counttree = count($treeline);
     //$counttree=mysql_num_rows($treeline);
     if (!$counttree) {
         $logfilename = PHP_SELF2;
         $dat = $head->generate() . $postform->format($resno);
         $this->print_page($logfilename, $dat);
     }
     if (UPDATE_THROTTLING >= 1) {
         $update_start = time();
         touch("updatelog.stamp", $update_start);
         $low_priority = false;
         clearstatcache();
         if (@filemtime(PHP_SELF) > $update_start - UPDATE_THROTTLING) {
             $low_priority = true;
             //touch($update_start . ".lowprio");
         } else {
             touch(PHP_SELF, $update_start);
         }
         // 	$mt = @filemtime(PHP_SELF);
         //  	touch($update_start . ".$mt.highprio");
     }
     //using CACHE_TTL method
     if (CACHE_TTL >= 1) {
         if ($resno) {
             $logfilename = RES_DIR . $resno . PHP_EXT;
         } else {
             $logfilename = PHP_SELF2;
         }
         //if(USE_GZIP == 1) $logfilename .= '.html';
         // if the file has been made and it's younger than CACHE_TTL seconds ago
         clearstatcache();
         if (file_exists($logfilename) && filemtime($logfilename) > time() - CACHE_TTL) {
             // save the post to be rebuilt later
             rebuildqueue_add($resno);
             // if it's a thread, try again on the indexes
             if ($resno && !$rebuild) {
                 $this->update();
             }
             // and we don't do any more rebuilding on this request
             return true;
         } else {
             // we're gonna update it now, so take it out of the queue
             rebuildqueue_remove($resno);
             // and make sure nobody else starts trying to update it because it's too old
             touch($logfilename);
         }
     }
     for ($page = 0; $page < $counttree; $page += PAGE_DEF) {
         $head->info['page']['title'] = "/" . BOARD_DIR . "/" . ($resno && !empty($log[$resno]['sub']) ? " - " . $log[$resno]['sub'] : '') . " - " . TITLE;
         $dat = $head->generate();
         $dat .= $postform->format($resno);
         if (!$resno) {
             $st = $page;
         }
         $dat .= '<form name= "delform" action="' . PHP_SELF_ABS . '" method="post">';
         for ($i = $st; $i < $st + PAGE_DEF; $i++) {
             list($_unused, $no) = each($treeline);
             if (!$no) {
                 break;
             }
             //This won't need needed once the extra fluff is dealt with as we can just use the Index class.
//.........这里部分代码省略.........
开发者ID:Bossgod,项目名称:3ch,代码行数:101,代码来源:log.php


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