<?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- *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 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 ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))
-{
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-}
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
+} // END - if
+
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+addYouAreHereLink('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(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 ($CONFIG['mt_start'] > 0)
- {
+ if (getConfig('mt_start') > 0) {
// Only show start
- define('__MT_START', "<STRONG>".MAKE_DATETIME($CONFIG['mt_start'], "3")."</STRONG>");
- }
- else
- {
+ $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' , 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);
}
//