本文整理汇总了PHP中req函数的典型用法代码示例。如果您正苦于以下问题:PHP req函数的具体用法?PHP req怎么用?PHP req使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了req函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: svg_com
function svg_com($d)
{
if (!function_exists('correct_txt')) {
req('tri');
}
$d = deln($d);
$d = str_replace(" ", ' ', $d);
//eco($d,1);
return correct_txt($d, '', 'svg');
}
示例2: plug_travel
function plug_travel($d, $id)
{
req('pop');
//http://w41k.info/plug/rss1.php?read=74453&preview=full
$ret = rss_read($d);
return $ret;
}
示例3: 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;
}
示例4: ummoay_build
function ummoay_build($p, $o)
{
req('art,tri,pop,spe');
reqp('msqarts');
$tmp = ummoay_template();
$r = req_arts_y($p);
$rtg = list_tags();
if ($r) {
foreach ($r as $k => $v) {
list($id, $day, $msg, $cat, $tag, $lk) = $v;
$day = clean_day_tw($day);
$msg = format_txt($msg, '', '');
$lnk = lka(urlread($id));
$pop = lj('', 'popup_trckpop___' . $id, picto('forum', 16));
$rb[$day] = array('suj' => $cat, 'day' => mkday($day, 'Y/m/d'), 'msg' => $msg, 'url' => $lk, 'open' => popart($id, 'articles') . ' ' . $pop, 'tag' => $rc = $rtg[$id]);
}
}
krsort($rb);
foreach ($rb as $k => $v) {
$rd[nms(100)] .= template_build($tmp, $v);
$rc = $v['tag'];
if ($rc) {
foreach ($rc as $kb => $vb) {
$rd[$kb] .= template_build($tmp, $v);
}
}
}
return make_tabs($rd);
}
示例5: msqt_build_from_template
function msqt_build_from_template($nod, $tmp)
{
req('pop,tri');
list($dr, $nod) = split_right('/', $nod, 0);
if (!$dr) {
$dr = 'users';
}
$r = read_vars('msql/' . $dr . '/', $nod, '');
$mnu = $r['_menus_'];
unset($r['_menus_']);
//$rb=array_keys_r($r,0); asort($rb); $r=conform_order($r,$rb);
if ($r) {
foreach ($r as $k => $v) {
$tpl = $tmp;
if (is_array($v)) {
$n = count($v) - 1;
for ($i = $n; $i >= 0; $i--) {
if ($v[$i]) {
$tpl = str_replace(array('_' . $i, '_' . $mnu[$i]), $v[$i], $tpl);
} else {
$tpl = str_replace(array('_' . $i, '_' . $mnu[$i]), '', $tpl);
}
}
} else {
$tpl = str_replace(array('_0', '_' . $mnu), $v, $tpl);
}
$tpl = str_replace('_key', $k, $tpl);
$ret .= correct_txt($tpl, "", 'codeline');
}
}
return format_txt_r($ret, '', '');
}
示例6: plug_microform
function plug_microform($p, $id)
{
$rid = 'mfr' . randid();
//echo $p.'-'.$id;
$nod = ses('mform', ses('qb') . '_microform_' . $id);
req('pop');
ses('mformj', $rid . '_plug___microform_plug*microform_' . ajx($p) . '_' . $id);
reqp('msql');
$msq = new msql('', $nod);
//table
list($p, $tp) = explode('§', $p);
$rb = mform_mr($p);
//p($rb);
$msq->create($rb);
$ret .= make_form($p, 'mfr' . $id, '_plug___microform_mform*j_' . ajx($p, '') . '_' . $id . '_') . br();
if (auth(4)) {
$ret .= msqlink('users', ses('mform')) . ' ' . btn('txtsmall2', $nod) . ' ';
}
if ($tp == 1) {
$ret .= mform_read($id);
} elseif ($tp) {
$ret .= plugin('msqtemplate', $nod, $tp);
}
return divd($rid, $ret . $bt);
}
示例7: plug_cubes
function plug_cubes($d)
{
req('pop');
$w = currentwidth();
$r = $_SESSION['rqt'];
$cols = 4;
$c = $cols * 3;
$n = count($r);
$nl = ceil($n / $c);
$l = $w / $c;
$cats = array_keys_r($r, 1, 'k');
$clr = cub_clr($cats);
foreach ($r as $k => $v) {
if ($v[11] > 1 && $v[3]) {
$lx = $l * ($v[11] - 1);
//$pub=minimg($v[3],"h").lka(htac($k),$v[2]);
//$pub=make_thumb_d($v[3],round($lx).'/'.round($lx));//
$pub = image('/imgc/' . $v[3], round($lx), round($lx));
$pub = lka(htac($k) . '" title="' . $v[2], $pub);
$ret .= divs(cub_sz($lx, $clr[$v[1]]), $pub);
}
}
//for($ic=0;$ic<$c;$ic++){}
//for($ib=0;$ib<$nl;$ib++){$i++;}
return $ret;
}
示例8: sugg_j
function sugg_j($v1, $v2, $res)
{
req('spe');
$nod = nod('suggest');
$ra = ajxr($res);
$dfb['_menus_'] = array('day', 'ok', 'url', 'mail', 'msg', 'iq');
$r = read_vars('msql/users/', $nod, $dfb);
$lnk = trim($ra[0]);
$alx = sugg_alx($r, $lnk);
$rap = 'popup_plup___suggest_sugg*rapport_' . ajx($ra[1]);
if ($lnk && $alx) {
return lj('txtyl', $rap, nms(56));
}
$ret = sugg_import($lnk);
$r[] = array(date('ymdHi'), '', $lnk, $ra[1], '', ses('iq'));
if ($r[0]) {
$r = msq_reorder($r);
}
if ($lnk && !$alx) {
msql_save('', $nod, $r);
if ($ra[1]) {
sugg_mail($ra[1], $lnk);
}
return lj('txtyl', 'popup_call__3__batch*preview_' . ajx($lnk), nms(56)) . ' ' . $ret;
} else {
return lj('txtyl', $rap, '404 not found');
}
}
示例9: plug_tags
function plug_tags($p, $o)
{
req('mod,spe');
if ($_GET['sources']) {
$r = sql('mail', 'qda', 'k', '');
$go = 'source';
//source
foreach ($r as $k => $v) {
if ($k != 'mail' && trim($k)) {
$reb[preplink($k)] += 1;
}
}
} else {
$cat = $p ? $p : 'tag';
//$reb=tags_list($cat);
$ra = sql('idtag,idart', 'qdta', 'k', '');
arsort($ra);
$rb = sql('id,tag', 'qdt', 'kv', 'cat="' . $cat . '"');
arsort($ra);
foreach ($ra as $k => $v) {
if ($rb[$k]) {
$reb[$rb[$k]] = $v;
}
}
}
if ($o) {
$ret = tags_cloud($reb, 12, 27, ' ', $cat);
} else {
$ret = tg_list($reb, $go);
}
return divc('txtcadr', count($reb) . ' ' . ($p ? $p : 'Tags')) . $ret;
}
示例10: api_j
function api_j($p, $o = '', $res = '')
{
req('api,pop,art,spe,tri,mod');
list($p, $o) = ajxp($res, $p, $o);
$ret = api_call($p, $o);
return $ret;
}
示例11: setMap
public static function setMap(array $_map, array $_arg)
{
$_val = req()->getMap();
unset($_val["context"]);
foreach ($_val as $k => $v) {
$type = $minl = $maxl = $minv = $maxv = STR_EMPTY;
if (isset($_arg[$k])) {
if (isset($_arg[$k]["type"])) {
$type = strtoupper($_arg[$k]["type"]);
}
if (isset($_arg[$k]["minl"])) {
$minl = _2nf($_arg[$k]["minl"]);
}
if (isset($_arg[$k]["maxl"])) {
$maxl = _2nf($_arg[$k]["maxl"]);
}
if (isset($_arg[$k]["minv"])) {
$minv = _2nf($_arg[$k]["minv"]);
}
if (isset($_arg[$k]["maxv"])) {
$maxv = _2nf($_arg[$k]["maxv"]);
}
}
$checked = isset($_map[$k]);
array_push(self::$_map, array(array("value" => $checked ? "Y" : "N", "align" => "center"), $k, $checked ? $_map[$k] : $v, array("value" => isset($_arg[$k]["req"]) && $_arg[$k]["req"] ? "Y" : "N", "align" => "center"), array("value" => $type, "align" => "center"), array("value" => $minl, "align" => "right"), array("value" => $maxl, "align" => "right"), array("value" => $minv, "align" => "right"), array("value" => $maxv, "align" => "right")));
}
}
示例12: environ_build
function environ_build($id, $o)
{
req('spe,art');
//,mod,pop,tri
$ret = environ_art($id);
$ib = ib_of_id($id);
if ($ib) {
$ret .= divc('', divc('txtcadr', 'parent') . environ_art($ib));
}
$r = art_tags($id);
//pr($r);
if ($r) {
foreach ($r as $k => $v) {
foreach ($v as $ka => $va) {
$ret .= divc('txtcadr', $ka);
$rb = tag_arts($ka, $k, 7);
if ($rb) {
foreach ($rb as $kb => $vb) {
$ret .= environ_art($kb);
}
}
}
}
}
$r = art_opts($id);
//pr($r);
foreach ($r as $k => $v) {
if (is_numeric($v)) {
$t = divc('txtcadr', $k);
$d = environ_art($v);
$ret .= divc('', $t . $d);
}
}
return $ret;
}
示例13: getHtml
/**
* Display the exception html
*/
public function getHtml()
{
if (req()->isAjax() || PHP_SAPI == "cli") {
echo $this->getMessage() . "\n\n" . $this->getTraceAsString();
return;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Error</title>
</head>
<body>
<h1>Well, something is going wrong!</h1>
<h3 style="color:red;"><?php
echo nl2br(s($this->getMessage()));
?>
</h3>
<pre><?php
echo $this->getTraceAsString();
?>
</pre>
</body>
</html>
<?php
}
示例14: plug_negcss
function plug_negcss($p, $o)
{
if ($n = $_SESSION['prmb'][5]) {
$nod = ses(qb) . '_auto';
} else {
$nod = ses(qb) . '_design_' . $_SESSION['prmd'];
}
$f = 'css/' . $nod . '_neg.css';
$tima = ftime('css/' . $nod . '.css', 'ymdhi');
$timb = ftime($f, 'ymdhi');
if ($tima > $timb) {
req('styl');
if ($n = $_SESSION['prmb'][5]) {
if ($n < 4) {
$r = msql_read('system', 'default_css_' . $n);
} elseif (is_numeric($n)) {
$r = msql_read('design', 'public_design_' . $n);
}
} else {
$r = msql_read('design', $nod);
}
$clr = $_SESSION['clrs'][$_SESSION['prmd']];
foreach ($clr as $k => $v) {
if ($v) {
$klr[$k] = invert_color($v, 0);
}
}
$_SESSION['clrs'][$_SESSION['prmd']] = $klr;
build_css($f, $r);
}
}
示例15: get_filter
public function get_filter()
{
global $CONFIG;
#each filter remembered in session linking to controller.action
$session_key = '_filter_' . $this->fw->G['controller.action'];
$sfilter = $_SESSION[$session_key];
if (!is_array($sfilter)) {
$sfilter = array();
}
$f = req('f');
if (!is_array($f)) {
$f = array();
}
#if not forced filter
if (!reqs('dofilter')) {
$f = array_merge($sfilter, $f);
}
#paging
if (!preg_match("/^\\d+\$/", $f['pagenum'])) {
$f['pagenum'] = 0;
}
if (!preg_match("/^\\d+\$/", $f['pagesize'])) {
$f['pagesize'] = $CONFIG['MAX_PAGE_ITEMS'];
}
#save in session for later use
$_SESSION[$session_key] = $f;
$this->list_filter = $f;
return $f;
}