Next wave of lesser getMessage() usage and more EL
[mailer.git] / inc / modules / admin / what-config_mediadata.php
index 7d7a403aaa9585742b285d0878ae64c350f3d843..dbacb56b841fe94cde72c7e0bdf8ad57eb3d69c2 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 09/28/2003 *
- * ================                             Last change: 02/12/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 09/28/2003 *
+ * ===================                          Last change: 02/12/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-                                            *
@@ -17,7 +17,8 @@
  * 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                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  ************************************************************************/
 
 // 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', __FILE__);
+addMenuDescription('admin', __FILE__);
 
-if (IS_FORM_SENT()) {
+if (isFormSent()) {
        // Test timestamp
-       $STAMP = mktime(0, 0, 0, bigintval(REQUEST_POST('month')), bigintval(REQUEST_POST('day')), bigintval(REQUEST_POST('year')));
+       $STAMP = mktime(0, 0, 0, bigintval(postRequestParameter('month')), bigintval(postRequestParameter('day')), bigintval(postRequestParameter('year')));
        if ($STAMP > time()) {
                // Date is in the future!
-               REQUEST_UNSET_POST('ok');
+               unsetPostRequestParameter('ok');
        } else {
                // Remove entries
-               REQUEST_UNSET_POST(('day'));
-               REQUEST_UNSET_POST(('month'));
-               REQUEST_UNSET_POST(('year'));
+               unsetPostRequestParameter('day');
+               unsetPostRequestParameter('month');
+               unsetPostRequestParameter('year');
 
                // Remember timestamp
-               REQUEST_SET_POST('mt_start', $STAMP);
+               setPostRequestParameter('mt_start', $STAMP);
        }
 
        // Convert some data
-       REQUEST_SET_POST('mt_stage', bigintval(REQUEST_POST('mt_stage')));
-       if (REQUEST_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!
-               REQUEST_UNSET_POST('ok');
+               unsetPostRequestParameter('ok');
        }
 }
 
-if (IS_FORM_SENT()) {
+if (isFormSent()) {
        // Save data
-       ADMIN_SAVE_SETTINGS_POST();
+       adminSaveSettingsFromPostData();
 } else {
        // Start of this exchange
        if (getConfig('mt_start') > 0) {
                // Only show start
-               define('__MT_START', "<strong>".generateDateTime(getConfig('mt_start'), "3")."</strong>");
+               $content['mt_start'] = '<strong>' . generateDateTime(getConfig('mt_start'), 3) . '</strong>';
        } 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', getConfig('mt_stage'));
-
        // Load template
-       LOAD_TEMPLATE("admin_config_mediadata");
+       loadTemplate('admin_config_mediadata', false, $content);
 }
 
 //