X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_mediadata.php;h=849e8792d9355479816b2061c46ad9fa9e12ef80;hb=eb301334eb0960dd060cc0d59e6021260a41f835;hp=5af3aa5d29ac3cda617828bbde31cad6f63cffd9;hpb=b73c135350d7ed266c0cac680105707139bd892d;p=mailer.git
diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php
index 5af3aa5d29..849e8792d9 100644
--- a/inc/modules/admin/what-config_mediadata.php
+++ b/inc/modules/admin/what-config_mediadata.php
@@ -10,9 +10,14 @@
* -------------------------------------------------------------------- *
* Kurzbeschreibung : *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -32,71 +37,56 @@
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+addMenuDescription('admin', __FILE__);
-if (isset($_POST['ok']))
-{
+if (isFormSent()) {
// 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(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;
+ setRequestPostElement('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))
- {
+ setRequestPostElement('mt_stage', bigintval(postRequestElement('mt_stage')));
+ if (postRequestElement('mt_stage') <= countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true)) {
// Not enougth!
- unset($_POST['ok']);
+ unsetPostRequestElement('ok');
}
}
-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' , date('d', time())).
+ addSelectionBox('month', date('m', time())).
+ 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);
}
//