X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fadmin%2Fwhat-config_mediadata.php;h=132897acc43b233d222a9d836e817abcab28fa98;hb=53312d69c8cb5b7ea0c85909cb45356ad4f3bb0b;hp=428d0f1cb3435903936ab027039d64f45c544231;hpb=97dbb1a1f2f9e582132bb81c12895503e78e7a59;p=mailer.git
diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php
index 428d0f1cb3..132897acc4 100644
--- a/inc/modules/admin/what-config_mediadata.php
+++ b/inc/modules/admin/what-config_mediadata.php
@@ -1,7 +1,7 @@
time())
- {
+ $STAMP = mktime(0, 0, 0, bigintval(postRequestElement('month')), bigintval(postRequestElement('day')), bigintval(postRequestElement('year')));
+ if ($STAMP > time()) {
// Date is in the future!
- unset($_POST['ok']);
- }
- else
- {
+ unsetPostRequestElement('ok');
+ } else {
// Remove entries
- unset($_POST['day']);
- unset($_POST['month']);
- unset($_POST['year']);
+ unsetPostRequestElement('day');
+ unsetPostRequestElement('month');
+ unsetPostRequestElement('year');
// Remember timestamp
- $_POST['mt_start'] = $STAMP;
+ setPostRequestElement('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))
- {
+ setPostRequestElement('mt_stage', bigintval(postRequestElement('mt_stage')));
+ if (postRequestElement('mt_stage') <= getTotalConfirmedUser()) {
// Not enougth!
- unset($_POST['ok']);
- }
-}
+ unsetPostRequestElement('ok');
+ } // END - if
+} // END - if
-if (isset($_POST['ok']))
-{
+if (isFormSent()) {
// Save data
- ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+ adminSaveSettingsFromPostData();
+} else {
// Start of this exchange
- if ($_CONFIG['mt_start'] > 0)
- {
+ if (getConfig('mt_start') > 0) {
// Only show start
- define('__MT_START', "".MAKE_DATETIME($_CONFIG['mt_start'], "3")."");
- }
- else
- {
+ $content['mt_start'] = '' . generateDateTime(getConfig('mt_start'), 3) . '';
+ } else {
// Make start editable
- define('__MT_START',
- ADD_SELECTION("day" , date("d", time())).
- ADD_SELECTION("month", date("m", time())).
- ADD_SELECTION("year", -1)
- );
+ $content['mt_start'] =
+ addSelectionBox('day' , getDay()).
+ addSelectionBox('month', getMonth()).
+ addSelectionBox('year', -1)
+ ;
}
- // Next stage of this MT
- define('__MT_STAGE', $_CONFIG['mt_stage']);
-
// Load template
- LOAD_TEMPLATE("admin_config_mediadata");
+ loadTemplate('admin_config_mediadata', false, $content);
}
//