$_GET, '_POST' => $_POST) as $ef_src => $ef_vals) {
foreach($ef_idkeys as $ef_k) {
if(!isset($ef_vals[$ef_k])) continue;
if($ef_src == '_POST' && in_array($ef_k, $ef_posttext, true)) continue;
foreach((array)$ef_vals[$ef_k] as $ef_v) {
if(is_array($ef_v) || (!in_array((string)$ef_v, $ef_words, true) && !preg_match('/^-?[0-9]+(,-?[0-9]+)*$/', (string)$ef_v))) accessDenied(_ERROR." (".$ef_k.")");
}
}
}
unset($ef_idkeys, $ef_words, $ef_posttext, $ef_src, $ef_vals, $ef_k, $ef_v);
$adminquery = dbquery("SELECT categories FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE uid = '".USERUID."' LIMIT 1");
list($admincats) = dbrow($adminquery);
if(empty($admincats)) $admincats = "0";
$output = "
";
$panelquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_hidden != '1' AND panel_type = 'A' AND panel_level >= ".uLEVEL." ORDER BY panel_level DESC, panel_order ASC, panel_title ASC");
if(!dbnumrows($panelquery)) $output .= _FATALERROR;
$panellist = array();
while($panel = dbassoc($panelquery)) {
if(!$panel['panel_url']) $panellist[$panel['panel_level']][]= "
".$panel['panel_title']."";
else $panellist[$panel['panel_level']][] = "
".$panel['panel_title']."";
}
foreach($panellist as $accesslevel => $row) {
$output .= implode(" | ", $row)."
";
}
$output .= "
\n";
if($action) {
$panelquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_name = '".escapestring($action)."' AND panel_type = 'A' LIMIT 1");
if(dbnumrows($panelquery)) {
$panel = dbassoc($panelquery);
if((isset($panel['panel_level']) ? $panel['panel_level'] : 0) >= uLEVEL) {
if($panel['panel_url'] && file_exists(_BASEDIR.$panel['panel_url'])) require_once(_BASEDIR.$panel['panel_url']);
else if (file_exists("admin/{$action}.php")) require_once("admin/{$action}.php");
}
else accessDenied( );
}
}
else {
if (file_exists("install"))
$output .= write_error(_SECURITYDELETE);
$adminnotices = "";
$countquery = dbquery("SELECT COUNT(DISTINCT chapid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE validated < 1");
list($count) = dbrow($countquery);
if($count) $adminnotices .= write_message(sprintf(_QUEUECOUNT, $count));
$codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'adminnotices'");
while($code = dbassoc($codequery)) {
eval($code['code_text']);
}
$output .= write_message("Actual time: ". time() );
$output .= write_message("Date format: " . $dateformat);
$output .= write_message(date("$dateformat", time()));
$output .= write_message($adminnotices);
$output .= write_message(_RUNNINGVERSION);
}
$tpl->assign( "output", $output );
$tpl->printToScreen();
dbclose( );
?>