本文整理汇总了PHP中PRR函数的典型用法代码示例。如果您正苦于以下问题:PHP PRR函数的具体用法?PHP PRR怎么用?PHP PRR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PRR函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FmtPageList
function FmtPageList($fmt, $pagename, $opt)
{
global $GroupPattern, $FmtV, $FPLFunctions;
# if (isset($_REQUEST['q']) && $_REQUEST['q']=='') $_REQUEST['q']="''";
$rq = htmlspecialchars(stripmagic(@$_REQUEST['q']), ENT_NOQUOTES);
$FmtV['$Needle'] = $opt['o'] . ' ' . $rq;
if (preg_match("!^({$GroupPattern}(\\|{$GroupPattern})*)?/!i", $rq, $match)) {
$opt['group'] = @$match[1];
$rq = substr($rq, strlen(@$match[1]) + 1);
}
$opt = array_merge($opt, ParseArgs($opt['o'] . ' ' . $rq), @$_REQUEST);
if (@($opt['req'] && !$opt['-'] && !$opt[''] && !$opt['+'] && !$opt['q'])) {
return;
}
$matches = array();
$fmtfn = @$FPLFunctions[$opt['fmt']];
if (!function_exists($fmtfn)) {
$fmtfn = 'FPLByGroup';
}
$out = $fmtfn($pagename, $matches, $opt);
$FmtV['$MatchCount'] = count($matches);
$GLOBALS['SearchIncl'] = array_merge((array) @$opt[''], (array) @$opt['+']);
$GLOBALS['SearchExcl'] = array_merge((array) $opt['-']);
$GLOBALS['SearchGroup'] = @$opt['group'];
if ($fmt != '$MatchList') {
$FmtV['$MatchList'] = $out;
$out = FmtPageName($fmt, $pagename);
}
if ($out[0] == '<') {
return '<div>' . Keep($out) . '</div>';
}
PRR();
return $out;
}
示例2: FmtPageList
function FmtPageList($outfmt, $pagename, $opt) {
global $GroupPattern, $FmtV, $PageListArgPattern,
$FPLFormatOpt, $FPLFunctions;
# get any form or url-submitted request
$rq = htmlspecialchars(stripmagic(@$_REQUEST['q']), ENT_NOQUOTES);
# build the search string
$FmtV['$Needle'] = $opt['o'] . ' ' . $rq;
# Handle "group/" at the beginning of the form-submitted request
if (preg_match("!^($GroupPattern(\\|$GroupPattern)*)?/!i", $rq, $match)) {
$opt['group'] = @$match[1];
$rq = substr($rq, strlen(@$match[1])+1);
}
$opt = array_merge($opt, ParseArgs($opt['o'], $PageListArgPattern));
# merge markup options with form and url
if (@$opt['request'])
$opt = array_merge($opt, ParseArgs($rq, $PageListArgPattern), @$_REQUEST);
# non-posted blank search requests return nothing
if (@($opt['req'] && !$opt['-'] && !$opt[''] && !$opt['+'] && !$opt['q']))
return '';
# terms and group to be included and excluded
$GLOBALS['SearchIncl'] = array_merge((array)@$opt[''], (array)@$opt['+']);
$GLOBALS['SearchExcl'] = (array)@$opt['-'];
$GLOBALS['SearchGroup'] = @$opt['group'];
$fmt = @$opt['fmt']; if (!$fmt) $fmt = 'default';
$fmtopt = @$FPLFormatOpt[$fmt];
if (!is_array($fmtopt)) {
if ($fmtopt) $fmtopt = array('fn' => $fmtopt);
elseif (@$FPLFunctions[$fmt])
$fmtopt = array('fn' => $FPLFunctions[$fmt]);
else $fmtopt = $FPLFormatOpt['default'];
}
$fmtfn = @$fmtopt['fn'];
if (!is_callable($fmtfn)) $fmtfn = $FPLFormatOpt['default']['fn'];
$matches = array();
$opt = array_merge($fmtopt, $opt);
$out = $fmtfn($pagename, $matches, $opt);
$FmtV['$MatchCount'] = count($matches);
if ($outfmt != '$MatchList')
{ $FmtV['$MatchList'] = $out; $out = FmtPageName($outfmt, $pagename); }
if ($out[0] == '<') $out = Keep($out);
return PRR($out);
}
示例3: PmFormMarkup
function PmFormMarkup($pagename, $target, $args)
{
global $PmFormTemplatesFmt;
$target_opt = PmFormConfig($pagename, $target);
$markup_opt = ParseArgs($args);
$markup_opt['target'] = $target;
$opt = array_merge($target_opt, $markup_opt);
if (@$opt['form']) {
$form = RetrieveAuthSection($pagename, $opt['form'], $PmFormTemplatesFmt);
}
$form_opt = PmFormTemplateDefaults($pagename, $form);
$opt = array_merge($form_opt, $target_opt, $markup_opt);
$form = PVSE(FmtTemplateVars($form, $opt));
return PRR($form);
}
示例4: pmcal
//.........这里部分代码省略.........
if ($onedate != 'false' && ($lyear != $year || $lmonth != $month || $lday != $iday)) {
$onedatedone = 0;
$lyear = $year;
$lmonth = $month;
$lday = $iday;
}
if (!$onedatedone) {
$formatteddate = strftime($textdatefmt, mktime(0, 0, 0, $month, $iday, pmcal_year($year)));
$formattedtextcal = sprintf($textacalfmt, $acal);
if ($textlinks != 'false') {
$todaycl = "";
if ($istoday) {
$todaycl = sprintf(" {$PmCalPrefix}include%stodaytextlink {$PmCalPrefix}includetodaytextlink", $cal);
}
if ($textlinks == 'nolinks') {
$out .= sprintf("{$PmCalACALTextLinkMark}%%class='{$PmCalPrefix}include%stextlink {$PmCalPrefix}includetextlink{$todaycl}'%%[=%s %s=]\n", $acal, $formatteddate, $formattedtextcal);
} else {
$out .= sprintf("{$PmCalACALTextLinkMark}%%class='{$PmCalPrefix}include%stextlink {$PmCalPrefix}includetextlink{$todaycl}'%%[[%s|[=%s %s=]]]\n", $acal, $pmcalincpagename, $formatteddate, $formattedtextcal);
}
}
if ($onedate != 'false') {
$onedatedone = 1;
}
} elseif ($onedate == "showcals") {
$formattedtextcal = sprintf($textacalfmt, $acal);
if ($textlinks != 'false') {
$todaycl = "";
if ($istoday) {
$todaycl = sprintf(" {$PmCalPrefix}sbuinclude%stodaytextlink {$PmCalPrefix}subincludetodaytextlink", $cal);
}
if ($textlinks == 'nolinks') {
$out .= sprintf("{$PmCalSubACALTextLinkMark}%%class='{$PmCalPrefix}subinclude%stextlink {$PmCalPrefix}subincludetextlink{$todaycl}'%%[=%s=]\n", $cal, $formattedtextcal);
} else {
$out .= sprintf("{$PmCalSubACALTextLinkMark}%%class='{$PmCalPrefix}subinclude%stextlink {$PmCalPrefix}subincludetextlink{$todaycl}'%%[[%s|[=%s=]]]\n", $cal, $pmcalincpagename, $formattedtextcal);
}
}
}
if ($includes != 'false') {
$MaxIncludes++;
$out .= sprintf("(:include %s %s=%s:)\n", $pmcalincpagename, $parasorlines, $otherlinesparas);
}
if ($zebra != 'false' && $zebraflag) {
$out .= "(:divend:)\n";
}
if ($zebraflag) {
$zebraflag = 0;
} else {
$zebraflag = 1;
}
} else {
if ($caltype == "normal") {
if ($includes != 'false') {
$formattedcal = sprintf($acalfmt, $acal);
$todaycl = "";
if ($istoday) {
$todaycl = sprintf(" {$PmCalPrefix}include%stoday {$PmCalPrefix}includetoday", $cal);
}
$out .= sprintf("%%class='{$PmCalPrefix}include%s {$PmCalPrefix}include{$todaycl}'%%[[%s|%s]]\n", $acal, $pmcalincpagename, $formattedcal);
$MaxIncludes++;
$out .= sprintf("(:include %s %s=%s:)\n", $pmcalincpagename, $parasorlines, $normallinesparas);
}
}
}
}
}
}
if ($reverse == 'true') {
$iday--;
} else {
$iday++;
}
$d++;
}
// Output null cells, the empty cells after the last day
// of the month.
//
if ($caltype == 'normal') {
$dayindex = ($d + 7 - $weekstart) % 7;
if ($dayindex != 0) {
for ($i = $dayindex; $i < 7; $i++) {
$ctype = "cell";
$out .= "(:{$ctype} class='{$PmCalPrefix}null':)\n";
}
}
// End the calendar table
//
$out .= "(:tableend:)\n";
}
if ($reverse == 'true') {
$year = $prevyear;
$month = $prevmonth;
} else {
$year = $nextyear;
$month = $nextmonth;
}
}
//end of month loop
PRR();
return $out;
}
示例5: FmtPageList
function FmtPageList($outfmt, $pagename, $opt)
{
global $GroupPattern, $FmtV, $PageListArgPattern, $FPLFormatOpt, $FPLFunctions;
# get any form or url-submitted request
$rq = PHSC(stripmagic(@$_REQUEST['q']), ENT_NOQUOTES);
# build the search string
$FmtV['$Needle'] = $opt['o'] . ' ' . $rq;
# Handle "group/" at the beginning of the form-submitted request
if (preg_match("!^({$GroupPattern}(\\|{$GroupPattern})*)?/!i", $rq, $match)) {
$opt['group'] = @$match[1];
$rq = substr($rq, strlen(@$match[1]) + 1);
}
$opt = array_merge($opt, ParseArgs($opt['o'], $PageListArgPattern));
# merge markup options with form and url
if (@$opt['request'] && @$_REQUEST) {
$rkeys = preg_grep('/^=/', array_keys($_REQUEST), PREG_GREP_INVERT);
if ($opt['request'] != '1') {
list($incl, $excl) = GlobToPCRE($opt['request']);
if ($excl) {
$rkeys = array_diff($rkeys, preg_grep("/{$excl}/", $rkeys));
}
if ($incl) {
$rkeys = preg_grep("/{$incl}/", $rkeys);
}
}
$cleanrequest = array();
foreach ($rkeys as $k) {
$cleanrequest[$k] = stripmagic($_REQUEST[$k]);
}
$opt = array_merge($opt, ParseArgs($rq, $PageListArgPattern), $cleanrequest);
}
# non-posted blank search requests return nothing
if (@($opt['req'] && !$opt['-'] && !$opt[''] && !$opt['+'] && !$opt['q'])) {
return '';
}
# terms and group to be included and excluded
$GLOBALS['SearchIncl'] = array_merge((array) @$opt[''], (array) @$opt['+']);
$GLOBALS['SearchExcl'] = (array) @$opt['-'];
$GLOBALS['SearchGroup'] = @$opt['group'];
$fmt = @$opt['fmt'];
if (!$fmt) {
$fmt = 'default';
}
$fmtopt = @$FPLFormatOpt[$fmt];
if (!is_array($fmtopt)) {
if ($fmtopt) {
$fmtopt = array('fn' => $fmtopt);
} elseif (@$FPLFunctions[$fmt]) {
$fmtopt = array('fn' => $FPLFunctions[$fmt]);
} else {
$fmtopt = $FPLFormatOpt['default'];
}
}
$fmtfn = @$fmtopt['fn'];
if (!is_callable($fmtfn)) {
$fmtfn = $FPLFormatOpt['default']['fn'];
}
$matches = array();
$opt = array_merge($fmtopt, $opt);
$out = $fmtfn($pagename, $matches, $opt);
$FmtV['$MatchCount'] = count($matches);
if ($outfmt != '$MatchList') {
$FmtV['$MatchList'] = $out;
$out = FmtPageName($outfmt, $pagename);
}
if ($out[0] == '<') {
$out = Keep($out);
}
return PRR($out);
}