]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-autopurge.php
Anonymity/privacy extension 'removeip' added
[mailer.git] / inc / modules / admin / what-autopurge.php
index 5ff646d568d7688d903781c52991b66116857466..cc27e516e5a25da5902072241206ebab09a35b02 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
+
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
        // Data was submitted so we store it
-}
- else
-{
+       ADMIN_SAVE_SETTINGS($_POST);
+} else {
        // Setup constants for the template
-       switch ($CONFIG['ap_inactive'])
-       {
-               case 'Y': define('__YES_IN', " checked"); define('__NO_IN', "");         break;
-               case 'N': define('__YES_IN', "");         define('__NO_IN', " checked"); break;
+       switch ($_CONFIG['autopurge_inactive']) {
+               case 'Y':
+                       define('__YES_IN', " checked=\"checked\"");
+                       define('__NO_IN' , "");
+                       break;
+
+               case 'N':
+                       define('__YES_IN', "");
+                       define('__NO_IN' , " checked=\"checked\"");
+                       break;
        }
-       switch ($CONFIG['ap_unconfirmed'])
-       {
-               case 'Y': define('__YES_UN', " checked"); define('__NO_UN', "");         break;
-               case 'N': define('__YES_UN', "");         define('__NO_UN', " checked"); break;
+
+       switch ($_CONFIG['autopurge_unconfirmed']) {
+               case 'Y':
+                       define('__YES_UN', " checked=\"checked\"");
+                       define('__NO_UN' , "");
+                       break;
+
+               case 'N':
+                       define('__YES_UN', "");
+                       define('__NO_UN' , " checked=\"checked\"");
+                       break;
        }
-       define('__AP_IN_SINCE', $CONFIG['ap_in_since']);
-       define('__AP_IN_TIME' , $CONFIG['ap_in_time']);
-       define('__AP_UN_TIME' , $CONFIG['ap_un_time']);
+
+       define('__AP_IN_SINCE', $_CONFIG['ap_inactive_since']);
+       define('__AP_IN_TIME' , $_CONFIG['ap_in_time']);
+       define('__AP_UN_TIME' , $_CONFIG['ap_un_time']);
 
        // Output template
        LOAD_TEMPLATE("admin_config_autopurge");