X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_mediadata.php;h=8cc45de27c5dec5de2590a3a8a79961b00a6737f;hb=80769d81cc67b9213ea436e07365982fb3e7600d;hp=20e1b5537b2537f9a61f23ac331606bdeb978fce;hpb=ac04130f9ccbaba51d7d7992d8a10c38db776eee;p=mailer.git
diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php
index 20e1b5537b..8cc45de27c 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(postRequestParameter('month')), bigintval(postRequestParameter('day')), bigintval(postRequestParameter('year')));
+ if ($STAMP > time()) {
// Date is in the future!
- unset($_POST['ok']);
- }
- else
- {
+ unsetPostRequestParameter('ok');
+ } else {
// Remove entries
- unset($_POST['day']);
- unset($_POST['month']);
- unset($_POST['year']);
+ unsetPostRequestParameter('day');
+ unsetPostRequestParameter('month');
+ unsetPostRequestParameter('year');
// Remember timestamp
- $_POST['mt_start'] = $STAMP;
+ setPostRequestParameter('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))
- {
+ setPostRequestParameter('mt_stage', bigintval(postRequestParameter('mt_stage')));
+ if (postRequestParameter('mt_stage') <= getTotalConfirmedUser()) {
// Not enougth!
- unset($_POST['ok']);
- }
-}
+ unsetPostRequestParameter('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 (getConfig('mt_start') > 0)
- {
+ if (getConfig('mt_start') > 0) {
// Only show start
- define('__MT_START', "".MAKE_DATETIME(getConfig('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', getConfig('mt_stage'));
-
// Load template
- LOAD_TEMPLATE("admin_config_mediadata");
+ loadTemplate('admin_config_mediadata', false, $content);
}
//