************************************************************************/
// 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())
-{
+} 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__));
-OUTPUT_HTML("</FONT><br />");
// 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"...