// Load security stuff here
require('inc/libs/security_functions.php');
-// Init "action" and "what"
+// Init start time
$GLOBALS['startTime'] = microtime(true);
+
+// Init output mode and module
$GLOBALS['output_mode'] = 0;
-$GLOBALS['what'] = '';
-$GLOBALS['action'] = '';
$GLOBALS['module'] = '';
// Needed include files
// Check if logged in
if (IS_MEMBER()) {
// Is still logged in so we welcome him with his name
- $result = SQL_QUERY_ESC("SELECT surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1",
+ array(getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load surname and family's name and build the username
list($s, $f) = SQL_FETCHROW($result);
$check = checkModulePermissions($GLOBALS['module']);
switch ($check)
{
- case 'admin_only':
- case 'mem_only':
- case 'done':
+ case 'cache_miss': // The cache is gone
+ case 'admin_only': // Admin-only access
+ case 'mem_only': // Member-only access
+ case 'done': // All fine!
// Does the module exists on local file system?
if ((isFileReadable(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
// Module is valid, active and located on the local disc...