]> git.mxchange.org Git - mailer.git/blobdiff - modules.php
Some rewrites
[mailer.git] / modules.php
index 0b111174af4508e3aaa7040b9fd4e310e3154a5e..5a372e0fc40bc68f76c8aba021783bbcc9550ef3 100644 (file)
 require("inc/libs/security_functions.php");
 
 // Init "action" and "what"
-global $what, $action, $startTime;
 $GLOBALS['startTime'] = microtime(true);
 $GLOBALS['output_mode'] = 0;
-$GLOBALS['what'] = ""; $GLOBALS['action'] = "";
+$GLOBALS['what']   = "";
+$GLOBALS['action'] = "";
 $GLOBALS['userid'] = 0;
 
+// Needed include files
+require("inc/config.php");
+
 // Fix missing module to "index"
-if (empty($_GET['module'])) $_GET['module'] = "index";
+if (!REQUEST_ISSET_GET(('module'))) REQUEST_SET_GET('module', "index");
 
 // Secure action/what if present
-if (!empty($_GET['action'])) $GLOBALS['action'] = secureString($_GET['action']);
-if (!empty($_GET['what']))   $GLOBALS['what']   = secureString($_GET['what']);
+if (REQUEST_ISSET_GET(('action'))) $GLOBALS['action'] = secureString(REQUEST_GET('action'));
+if (REQUEST_ISSET_GET(('what')))   $GLOBALS['what']   = secureString(REQUEST_GET('what'));
 
 // Secure the module name (very important line!)
-$GLOBALS['module'] = secureString($_GET['module']);
-
-// Needed include files
-require("inc/config.php");
+$GLOBALS['module'] = secureString(REQUEST_GET('module'));
 
 // Check if logged in
 if (IS_MEMBER()) {