+ if (empty($DATA['last_module'])) $DATA['last_module'] = 'login';
+
+ // This will be displayed on welcome page! :-)
+ if (empty($GLOBALS['last']['module'])) {
+ $GLOBALS['last']['module'] = $DATA['last_module']; $GLOBALS['last']['online'] = $DATA['last_online'];
+ } // END - if
+
+ // 'what' not set?
+ if (!isWhatSet()) {
+ // Fix it to default
+ setWhat('welcome');
+ if (getConfig('index_home') != '') setWhatFromConfig('index_home');
+ } // END - if
+
+ // Update last module / online time
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', `last_online`=UNIX_TIMESTAMP(), `REMOTE_ADDR`='%s' WHERE `userid`=%s LIMIT 1",
+ array(
+ getWhat(),
+ detectRemoteAddr(),
+ getUserId()
+ ), __FUNCTION__, __LINE__);
+ } else {
+ // Destroy session, we cannot update!
+ destroyUserSession();
+ }
+
+ // Free the result
+ SQL_FREERESULT($result);
+}
+
+// Filter for checking admin ACL
+function FILTER_CHECK_ADMIN_ACL () {
+ // Extension not installed so it's always allowed to access everywhere!
+ $ret = true;
+
+ // Ok, Cookie-Update done
+ if ((GET_EXT_VERSION('admins') >= '0.3.0') && (EXT_IS_ACTIVE('admins'))) {
+ // Check if action GET variable was set
+ $action = getAction();
+ if (isWhatSet()) {
+ // Get action value by what-value
+ $action = getModeAction('admin', getWhat());
+ } // END - if