- $_GET['what'] was used in sponsor extension, fixed to $GLOBALS['what'] because
$GLOBALS is secured and $_GET only a bit
- Constant ORDER_ALLOWED_UNKNOWN added
- Template "admin_data_saved" is now deprecated
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "541");
+define('CURR_SVN_REVISION', "542");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
define('ORDER_ALLOWED_RECEIVE_3', "</STRONG> Mailbuchungen aufgeben.");
define('MEMBER_ORDER_MAX_ALLOWED', "Maximale Mailbuchungen");
define('ORDER_ALLOED_MAX', "Sie können solange Mailbuchungen aufgeben, bis alle Mitglieder nicht mehr empfangsbereit sind.");
+define('ORDER_ALLOWED_UNKNOWN', "Fehler in Konfiguration erkannt! Bitte den Administrator benachrichtigen.");
define('MEMBER_ORDER_ALLOWED_EXHAUSTED', "Sie können keine weiteren Mails mehr versenden, oder stellen Sie bitte den Empfang höher ein.");
define('MEMBER_MIN_RECS_1', "Minimum:");
define('MEMBER_MIN_RECS_2', "");
SQL_FREERESULT($result);
// Yes, he is!
- if (($_GET['what'] == "add_sponsor") || ($NO_UPDATE))
+ if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE))
{
// Already found!
$ALREADY = true;
// Add new sponsor, first add more data
$DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time();
$DATA['keys'][] = "status";
- if ((!$NO_UPDATE) && (IS_ADMIN()) && ($_GET['what'] == "add_sponsor"))
+ if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor"))
{
// Only allowed for admin
$DATA['values'][] = "PENDING";
$DATA[] = $_COOKIE['sponsorpass'];
// Saving data was completed... ufff...
- switch ($_GET['what'])
+ switch ($GLOBALS['what'])
{
case "account": // Change account data
if ($EMAIL)
break;
default: // Unknown sponsor what value!
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $_GET['what']));
- $MSG = SPONSOR_UNKNOWN_WHAT_1.$_GET['what'].SPONSOR_UNKNOWN_WHAT_2;
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what']));
+ $MSG = SPONSOR_UNKNOWN_WHAT_1.$GLOBALS['what'].SPONSOR_UNKNOWN_WHAT_2;
$templ = ""; $subj = "";
break;
}
// to the old address
// First to old address
- switch ($_GET['what'])
+ switch ($GLOBALS['what'])
{
case "account": // Change account data
$email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);
CACHE_PURGE_ADMIN_MENU(0, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel]);
// Load template
- LOAD_TEMPLATE("admin_data_saved");
+ LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
break;
case "del": // Delete menu
} // END - foreach
// Load template
- LOAD_TEMPLATE("admin_data_saved");
+ LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
break;
default: // Unexpected action
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__);
}
- LOAD_TEMPLATE("admin_data_saved");
+ LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
break;
case "del": // Delete menu
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
}
- LOAD_TEMPLATE("admin_data_saved");
+ LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
break;
case "status": // Change access levels
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
}
- LOAD_TEMPLATE("admin_data_saved");
+ LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
break;
default: // Unexpected action
}
// Load template
- LOAD_TEMPLATE("admin_data_saved");
-}
- else
-{
- if ((!empty($_GET['act'])) && (!empty($_GET['tid'])) && (!empty($_GET['fid'])))
- {
+ LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
+} else {
+ if ((!empty($_GET['act'])) && (!empty($_GET['tid'])) && (!empty($_GET['fid']))) {
+ // Init
+ $tid = ""; $fid = "";
+
// Get IDs
- if (!empty($_GET['w']))
- {
+ if (!empty($_GET['w'])) {
// Sub menus selected
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND sort='%s' LIMIT 1",
array(bigintval($_GET['act']), bigintval($_GET['tid'])), __FILE__, __LINE__);
array(bigintval($_GET['act']), bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- }
- else
- {
+ } else {
// Main menu selected
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
array(bigintval($_GET['tid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
}
- if ((!empty($tid)) && (!empty($fid)))
- {
+ if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
$result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
$result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
- }
+ } // END - -fi
}
if (!empty($SUB))
-<TABLE border="0" cellspacing="0" cellpadding="0" width="450"
- class="admin_table dashed">
- <TR>
- <TD class="admin_done" height="14" colspan="3"></TD>
- </TR>
- <TR>
- <TD class="admin_done" rowspan="3" width="7"> </TD>
- <TD class="admin_done" align="center"><SPAN class="admin_done2">{--SAVING_DATA--}...</SPAN> <STRONG><SPAN
- class="admin_done">{--SAVING_DONE--}</SPAN></STRONG></TD>
- <TD class="admin_done" rowspan="3" width="7"> </TD>
- </TR>
- <TR>
- <TD class="admin_done" height="14" colspan="3"></TD>
- </TR>
-</TABLE>
\ No newline at end of file
+<!-- DEPRECATED! //-->