]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-rallyes.php
More fixes from profi-concept for extension loading, guest/member menu and smaller...
[mailer.git] / inc / modules / member / what-rallyes.php
index 6a95c086fe8fff098ff41cc3176aa60bd8725283..0f8fcc58fe80995247e15d45f35dc6cd999239a3 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_LOGGED_IN())
-{
-       LOAD_URL(URL."/modules.php?module=index");
-}
- elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN()))
-{
+} elseif (!IS_MEMBER()) {
+       LOAD_URL("modules.php?module=index");
+} elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye");
        return;
 }
 
 // Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
 
 OUTPUT_HTML("<DIV align=\"center\">");
 
@@ -73,7 +68,7 @@ if (SQL_NUMROWS($result) == 1)
                define('__RALLYE_EXTRAS', RALLYE_HAS_EXPIRED);
                $expired = true;
        }
-        elseif (time() >= ($end - ONE_DAY))
+        elseif (time() >= ($end - $_CONFIG['one_day']))
        {
                // Rallye will expire in less one day!
                define('__RALLYE_EXTRAS', RALLYE_EXPIRE_ONE_DAY);