DirectoryIndex index.php\r
\r
<IfModule mod_rewrite.c>\r
+ RewriteEngine On\r
RewriteRule ^cms/(.*)/wht/(.*)$ modules.php?module=$1&what=$2 [L]\r
RewriteRule ^cms/(.*)/act/(.*)$ modules.php?module=$1&action=$2 [L]\r
RewriteRule ^cms/(.*)$ modules.php?module=$1 [L]\r
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
return;
}
// Prepare constants
define('__BEG_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points']));
define('__BEG_POINTS_MAX', TRANSLATE_COMMA($CONFIG['beg_points_max']));
-if ($ref > 0)
-{
+if ($GLOBALS['refid'] > 0) {
// Take referral ID from URL/Cookie
define('__BEG_UID' , $ref);
-}
- else
-{
+} else {
// Take default referral ID
define('__BEG_UID' , $CONFIG['def_refid']);
}
-if (function_exists('CREATE_FANCY_TIME'))
-{
+if (function_exists('CREATE_FANCY_TIME')) {
define('__BEG_TIMEOUT' , CREATE_FANCY_TIME($CONFIG['beg_timeout']));
define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME($CONFIG['beg_uid_timeout']));
-}
- else
-{
+} else {
define('__BEG_TIMEOUT ' , round($CONFIG['beg_timeout'] / 60)." ".MINUTES);
define('__BEG_UID_TIMEOUT', round($CONFIG['beg_uid_timeout'] / 60)." ".MINUTES);
}
if (($VIEW == 1) && ($_SERVER['PHP_SELF'])) return;
// Session management initalization
-if (empty($PHPSESSID))
-{
+if (empty($PHPSESSID)) {
// This fixes some strange session cookie problems
if (empty($_COOKIE['PHPSESSID'])) unset($_COOKIE['PHPSESSID']);
@session_start();
$PHPSESSID = @session_id();
-}
- else
-{
+} else {
@session_id($PHPSESSID);
@session_start();
}