}
}
//
-function IS_MEMBER()
-{
+function IS_MEMBER () {
global $status, $LAST, $cacheArray;
if (!is_array($LAST)) $LAST = array();
$ret = false;
} // END - if
// Fix "deleted" cookies first
- FIX_DELETED_COOKIES(array('userid','u_hash','lifetime'));
+ FIX_DELETED_COOKIES(array('userid', 'u_hash'));
// Are cookies set?
- if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash')) && (isSessionVariableSet('lifetime')) && (defined('COOKIE_PATH')))
- {
+ if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash'))) {
// Cookies are set with values, but are they valid?
$result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
- array($GLOBALS['userid']), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ array($GLOBALS['userid']), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) == 1) {
// Load data from cookies
list($password, $status, $mod, $onl) = SQL_FETCHROW($result);
$valPass = generatePassString($password);
// Transfer last module and online time
- if ((!empty($mod)) && (empty($LAST['module']))) { $LAST['module'] = $mod; $LAST['online'] = $onl; }
+ if ((!empty($mod)) && (empty($LAST['module']))) {
+ $LAST['module'] = $mod;
+ $LAST['online'] = $onl;
+ } // END - if
// So did we now have valid data and an unlocked user?
//* DEBUG: */ echo $valPass."<br />".get_session('u_hash')."<br />";
// Maybe got locked etc.
//* DEBUG: */ echo __LINE__."!!!<br />";
destroy_user_session();
-
- // Reset userid
- $GLOBALS['userid'] = 0;
}
} else {
// Cookie data is invalid!
//* DEBUG: */ echo __LINE__."***<br />";
destroy_user_session();
-
- // Reset userid
- $GLOBALS['userid'] = 0;
}
// Free memory
// Cookie data is invalid!
//* DEBUG: */ echo __LINE__."///<br />";
destroy_user_session();
-
- // Reset userid
- $GLOBALS['userid'] = 0;
}
// Cache status
return $ret;
}
//
-function ADD_OPTION_LINES($table, $id, $name, $default="",$special="",$where="") {
+function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where="") {
$ret = "";
if ($table == "/ARRAY/") {
// Selection from array
$ORDER = $name.$SPEC;
if ($table == "country") $ORDER = $special;
$result = SQL_QUERY_ESC("SELECT %s, %s".$SPEC." FROM "._MYSQL_PREFIX."_%s ".$where." ORDER BY %s",
- array($id, $ORDER, $table, $name), __FILE__, __LINE__);
+ array($id, $ORDER, $table, $name), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option
while (list($value, $title, $add) = SQL_FETCHROW($result)) {