]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-beg2.php
More calls of DEBUG_LOG() added
[mailer.git] / inc / modules / member / what-beg2.php
index d2eca69e263c3bf4ce337f8ef168223771de121e..d3ce12bbc0794456bc5b08352f8fec96ef01e264 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-}
- elseif (!IS_MEMBER())
-{
+} elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
-}
- elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
        return;
 }
 
 // Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
 
 // Autopurge installed?
 $LAST = "%s"; $ONLINE = "";
-if (EXT_IS_ACTIVE("autopurge"))
-{
+if (EXT_IS_ACTIVE("autopurge")) {
        // Use last online timestamp to keep inactive members away from here
-       $LAST   = " AND last_online >= %s";
-       $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
+       $LAST   = " AND last_online >= (UNIX_TIMESTAMP() - %s)";
+       $ONLINE = $_CONFIG['ap_inactive_since'];
 }
 
 // Let's check if there are some points left we can "pay"...