) && (
set_session('admin_last', time())
) && (
- set_session('admin_to', bigintval($_POST['timeout']))
+ set_session('admin_to', bigintval(REQUEST_POST('timeout')))
)
);
}
$OUT .= "</select>\n";
} else {
// No menus???
- $OUT = ADMIN_PROBLEM_NO_MENU;
+ $OUT = getMessage('ADMIN_PROBLEM_NO_MENU');
}
// Return output
return $OUT;
}
+// Wrapper for $_POST and ADMIN_SAVE_SETTINGS
+function ADMIN_SAVE_SETTINGS_POST () {
+ // Get the array
+ $POST = REQUEST_POST_ARRAY();
+
+ // Call the lower function
+ ADMIN_SAVE_SETTINGS($POST);
+}
+
// Save settings to the database
-function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="config=0", $translateComma=array(), $alwaysAdd=false) {
+function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement = "config=0", $translateComma = array(), $alwaysAdd = false) {
// Prepare all arrays, variables
$DATA = array();
$skip = false;
$handle = opendir(sprintf("%sinc/modules/%s/", constant('PATH'), $menu)) or mxchange_die("Cannot load menu ".$menu."!");
// Init the selection box
- $OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">\n <option value=\"\">".IS_TOP_MENU."</option>\n";
+ $OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">\n <option value=\"\">{--IS_TOP_MENU--}</option>\n";
// Walk through all files
while ($file = readdir($handle)) {
//* DEBUG: */ echo "a:".$title."<br />";
// Return link
- return "<a href=\"{!URL!}/modules.php?module=admin&what=".$wht."&u_id=".$uid."\" title=\"{--ADMIN_USER_PROFILE_TITLE--}\">".$title."</a>";
+ return "<a href=\"{!URL!}/modules.php?module=admin&what=".$wht."&uid=".$uid."\" title=\"{--ADMIN_USER_PROFILE_TITLE--}\">".$title."</a>";
}
// Check "logical-area-mode"
} // END - if
// Is the raw userid set?
- if ($_POST['uid_raw'][$id] > 0) {
+ if (REQUEST_POST('uid_raw', $id) > 0) {
// Generate subject
$subjectLine = constant('MEMBER_'.strtoupper($subject).'_'.strtoupper($table).'_SUBJECT');
}
// Send email out
- SEND_EMAIL($_POST['uid_raw'][$id], $subjectLine, $mail);
+ SEND_EMAIL(REQUEST_POST('uid_raw', $id), $subjectLine, $mail);
} // END - if
// Generate subject
// Send admin notification out
if (!empty($subjectPart)) {
- SEND_ADMIN_NOTIFICATION($subjectLine, "admin_".$mode."_".strtolower($subjectPart)."_".$table, $content, $_POST['uid_raw'][$id]);
+ SEND_ADMIN_NOTIFICATION($subjectLine, "admin_".$mode."_".strtolower($subjectPart)."_".$table, $content, REQUEST_POST('uid_raw', $id));
} else {
- SEND_ADMIN_NOTIFICATION($subjectLine, "admin_".$mode."_".$table, $content, $_POST['uid_raw'][$id]);
+ SEND_ADMIN_NOTIFICATION($subjectLine, "admin_".$mode."_".$table, $content, REQUEST_POST('uid_raw', $id));
}
}
} // END - foreach
// Add other columns as well
- foreach ($_POST as $key => $entries) {
+ foreach (REQUEST_POST_ARRAY() as $key => $entries) {
// Skip id, raw userid and 'do_$mode'
if (!in_array($key, array($idColumn, 'uid_raw', ('do_'.$mode)))) {
// Are there brackets () at the end?
$idList = "";
foreach ($IDs as $id => $sel) {
// Is there a userid?
- if (isset($_POST['uid_raw'][$id])) {
+ if (REQUEST_ISSET_POST(('uid_raw', $id))) {
// Load all data from that id
$result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
array($table, $idColumn, $id), __FILE__, __LINE__);
$SQL = sprintf("UPDATE `{!_MYSQL_PREFIX!}_ SET",
SQL_ESCAPE($table)
);
- foreach ($_POST as $key => $entries) {
+ foreach (REQUEST_POST_ARRAY() as $key => $entries) {
// Skip raw userid which is always invalid
if ($key == "uid_raw") {
// Continue with next field