X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_mediadata.php;h=aa1d9a94a2b9c000f7309936059d97eb497fed7e;hp=20e1b5537b2537f9a61f23ac331606bdeb978fce;hb=4c83f0cc7459cad9ec9c1c68963f5365155ee935;hpb=56156f6c4392510cdbe0eb4f2ccefc23b43e2672 diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index 20e1b5537b..aa1d9a94a2 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -40,50 +40,39 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR("admin", __FILE__); -if (isset($_POST['ok'])) -{ +if (IS_FORM_SENT()) { // Test timestamp - $STAMP = mktime(0, 0, 0, bigintval($_POST['month']), bigintval($_POST['day']), bigintval($_POST['year'])); - if ($STAMP > time()) - { + $STAMP = mktime(0, 0, 0, bigintval(REQUEST_POST('month')), bigintval(REQUEST_POST('day')), bigintval(REQUEST_POST('year'))); + if ($STAMP > time()) { // Date is in the future! - unset($_POST['ok']); - } - else - { + REQUEST_UNSET_POST('ok'); + } else { // Remove entries - unset($_POST['day']); - unset($_POST['month']); - unset($_POST['year']); + REQUEST_UNSET_POST(('day')); + REQUEST_UNSET_POST(('month')); + REQUEST_UNSET_POST(('year')); // Remember timestamp - $_POST['mt_start'] = $STAMP; + REQUEST_SET_POST('mt_start', $STAMP); } // Convert some data - $_POST['mt_stage'] = bigintval($_POST['mt_stage']); - if ($_POST['mt_stage'] <= GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true)) - { + REQUEST_SET_POST('mt_stage', bigintval(REQUEST_POST('mt_stage'))); + if (REQUEST_POST('mt_stage') <= GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true)) { // Not enougth! - unset($_POST['ok']); + REQUEST_UNSET_POST('ok'); } } -if (isset($_POST['ok'])) -{ +if (IS_FORM_SENT()) { // Save data - ADMIN_SAVE_SETTINGS($_POST); -} - else -{ + ADMIN_SAVE_SETTINGS_POST(); +} else { // Start of this exchange - if (getConfig('mt_start') > 0) - { + if (getConfig('mt_start') > 0) { // Only show start define('__MT_START', "".MAKE_DATETIME(getConfig('mt_start'), "3").""); - } - else - { + } else { // Make start editable define('__MT_START', ADD_SELECTION("day" , date("d", time())).