]> git.mxchange.org Git - mailer.git/commitdiff
Notice fixed and RewriteEngine enabled in .htaccess
authorRoland Häder <roland@mxchange.org>
Fri, 15 Feb 2008 23:51:52 +0000 (23:51 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 15 Feb 2008 23:51:52 +0000 (23:51 +0000)
.htaccess
inc/modules/guest/what-beg.php
inc/session.php

index b6819a9c4f7667f252313ef295e8d58a92fa18b1..bea521ae53281c68408a2275f4c0fd0750a6ab9d 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -2,6 +2,7 @@ Options -Indexes
 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
index 347b6f4d3ca43a8e038ebddeb3e34208288120ae..887c393f1e5c51d272f1518da28d84ad3924d613 100644 (file)
  ************************************************************************/
 
 // 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;
 }
@@ -49,24 +46,18 @@ ADD_DESCR("guest", basename(__FILE__));
 // 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);
 }
index f977003be9677446edbb7a3c08b1f14050375afe..1d5a04c60b7839f2dcd2527aef3be31b6547e3fd 100644 (file)
@@ -47,15 +47,12 @@ if (empty($VIEW))  $VIEW  = 0;
 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();
 }