PSS('$1')))"); function FmtSelectVar($args) { $opt = ParseArgs($args); list($name, $options, $selected) = $opt['']; $options = preg_split("/, */", $options); $out = ""; return $out; } ## This function creates specialized ordering functions needed to ## (more efficiently) perform sorts on arbitrary sets of criteria. function CreateOrderFunction($order) { global $MB_Encoding; $code = ''; foreach(preg_split('/[\\s,|]+/',mb_strtolower($order, $MB_Encoding),-1,PREG_SPLIT_NO_EMPTY) as $o) { if (substr($o,0,1)=='-') { $r='-'; $o=substr($o,1); } else $r=''; if (preg_match('/\\W/',$o)) continue; $code .= "\$c=strcasecmp(@\$x['$o'],@\$y['$o']); if (\$c!=0) return $r\$c;\n"; } $code .= "return 0;\n"; return create_function('$x,$y',$code); } ## FmtPits2List creates a table of PITS issues according to various ## criteria. function FmtPits2List($fmt,$pagename,$opt) { global $AutoSuspendDaysInactive, $Now, $PITSCache, $MB_Encoding; SDV($AutoSuspendDaysInactive, 0); $opt = array_merge($opt,@$_REQUEST); $pitslist = ListPages('/^PITS\\.\\d+$/'); $terms = preg_split('/((?
\$Name : {$p['type']}
",$p['name']) ."
{$p['statut']} " ."{$p['priorite']} " ." {$p['sommaire']}
\n"); if(@$opt['count'] && $cnt>$opt['count']) break; } return implode('',$out); } function Priority2($pagename, $x, $value) { global $MB_Encoding; $tn = MakePageName($pagename, 'Templates'); $fields = PageTextVar($tn, $x); $fields = preg_split("/, */", mb_strtolower($fields, $MB_Encoding)); $found = array_search(mb_strtolower(trim($value), $MB_Encoding), $fields); if($found === false) return count($fields); return $found; }