} // END - if
// Nothing is added/remove by default
- $inserted = 0; $removed = 0;
+ $inserted = 0;
+ $removed = 0;
// Prepare SQL queries
$insertSQL = "INSERT INTO `{!_MYSQL_PREFIX!}_filters` (`filter_name`,`filter_function`,`filter_active`) VALUES";
$content = $data;
// Handle failed logins here if not in guest
- //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$data['access_level']}<br />\n";
- if ((($data['type'] == "what") || ($data['type'] == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) {
+ //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={getAction()},what={getWhat()},lvl={$data['access_level']}<br />\n";
+ if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) {
// Handle failure
$content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']);
} // END - if
// Load last module and last online time
$result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
list($mod, $onl) = SQL_FETCHROW($result);
// Maybe first login time?
- if (empty($mod)) $mod = "login";
+ if (empty($mod)) $mod = 'login';
// This will be displayed on welcome page! :-)
if (empty($GLOBALS['last']['module'])) {
$GLOBALS['last']['module'] = $mod; $GLOBALS['last']['online'] = $onl;
} // END - if
- // "what" not set?
- if (empty($GLOBALS['what'])) {
+ // 'what' not set?
+ if (!isWhatSet()) {
// Fix it to default
- $GLOBALS['what'] = "welcome";
- if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
+ 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($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
+ array(getWhat(), detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
} else {
// Destroy session, we cannot update!
destroyUserSession();
// Ok, Cookie-Update done
if ((GET_EXT_VERSION('admins') >= '0.3.0') && (EXT_IS_ACTIVE('admins'))) {
// Check if action GET variable was set
- $action = SQL_ESCAPE($GLOBALS['action']);
- if (!empty($GLOBALS['what'])) {
+ $action = getAction();
+ if (isWhatSet()) {
// Get action value by what-value
- $action = getModeAction('admin', $GLOBALS['what']);
+ $action = getModeAction('admin', getWhat());
} // END - if
// Check for access control line of current menu entry
- $ret = adminsCheckAdminAcl($action, $GLOBALS['what']);
+ $ret = adminsCheckAdminAcl($action, getWhat());
} // END - if
// Return result