Renamed templates, more usage of EL
[mailer.git] / inc / modules / admin / what-config_register2.php
index e87b9668b2341afb4c4431b23ece0847e629c860..32f87c17edf19670e94ae982892ec6fe192b1085 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/12/2003 *
- * ===============                              Last change: 11/29/2005 *
+ * Mailer v0.2.1-FINAL                                Start: 10/12/2003 *
+ * ===================                          Last change: 11/29/2005 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-config_register2.php                        *
  * -------------------------------------------------------------------- *
  *          Adapted from what-config_reg.php                            *
  * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * 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);
-}
-
-global $link;
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+       die();
+} // END - if
 
 // Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+addYouAreHereLink('admin', __FILE__);
 
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
-if (isset($_POST['ok']))
-{
+if (isFormSent()) {
        // Calculate timestamp from selections...
-       $_POST['ip_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout", $_POST);
-       $_POST['least_cats'] = round($_POST['least_cats']);
+       setPostRequestParameter('ip_timeout', createEpocheTimeFromSelections('ip_timeout', postRequestArray()));
+       setPostRequestParameter('least_cats', round(postRequestParameter('least_cats')));
 
        // Save settings
-       ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+       adminSaveSettingsFromPostData();
+} else {
        // Remember stuff in constants
-       define('LEAST_CATS_VALUE'   , round($CONFIG['least_cats']));
-       define('__CFG_SHOW_REFID'   , ADD_SELECTION("yn", $CONFIG['display_refid']   , "display_refid"));
-       define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['ip_timeout']   , "ip_timeout", "Dhm"));
-       define('__CFG_DBL_EMAIL'    , ADD_SELECTION("yn", $CONFIG['check_double_email']       , "check_double_email"));
-       define('__CFG_DBL_PASS'     , ADD_SELECTION("yn", $CONFIG['check_double_pass']        , "check_double_pass"));
-       define('__CFG_CAT_DEFAULT'  , ADD_SELECTION("yn", $CONFIG['register_default'], "register_default"));
+       $content['display_refid']                    = addSelectionBox('yn', getDisplayRefid()                 , 'display_refid');
+       $content['ip_timeout']                       = createConfigurationTimeSelections('ip_timeout', 'Dhm');
+       $content['check_double_email']               = addSelectionBox('yn', getCheckDoubleEmail()             , 'check_double_email');
+       $content['register_default']                 = addSelectionBox('yn', getRegisterDefault()              , 'register_default');
+       $content['register_generate_password_empty'] = addSelectionBox('yn', getRegisterGeneratePasswordEmpty(), 'register_generate_password_empty');
 
        // Load normal template
-       LOAD_TEMPLATE("admin_config_register2");
+       loadTemplate('admin_config_register2', false, $content);
 }
-CLOSE_TABLE();
-//
+
+// [EOF]
 ?>