}
if ((!isset($NAV_DEPTH)) && (!$return)) {
$NAV_DEPTH = 0;
- $prefix = "<DIV class=\"you_are_here\">".YOU_ARE_HERE." <STRONG><A class=\"you_are_here\" href=\"".URL."/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</A></STRONG>";
+ $prefix = "<div class=\"you_are_here\">".YOU_ARE_HERE." <strong><a class=\"you_are_here\" href=\"".URL."/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
} else {
if (!$return) $NAV_DEPTH++;
$prefix = "";
return $ret;
} elseif (((GET_EXT_VERSION("sql_patches") >= "0.2.3") && (getConfig('youre_here') == "Y")) || ((IS_ADMIN()) && ($modCheck == "admin"))) {
// Output HTML code
- $OUT = $prefix."<STRONG><A class=\"you_are_here\" href=\"".URL."/modules.php?module=".$modCheck."&".$type."=".$search.$LINK_ADD."\">".$ret."</A></STRONG>\n";
+ $OUT = $prefix."<strong><a class=\"you_are_here\" href=\"".URL."/modules.php?module=".$modCheck."&".$type."=".$search.$LINK_ADD."\">".$ret."</a></strong>\n";
// Can we close the you-are-here navigation?
//* DEBUG: */ echo __LINE__."*".$type."/".$GLOBALS['what']."*<br />\n";
$test = (FILE_READABLE($test_inc));
if ($test) {
if ((!empty($wht)) && (($wht == $sub_what))) {
- $content = "<STRONG>";
+ $content = "<strong>";
}
// Navigation link
- $content .= "<A name=\"menu\" class=\"menu_blur\" href=\"".URL."/modules.php?module=".$GLOBALS['module']."&what=".$sub_what.ADD_URL_DATA("")."\" target=\"_self\">";
+ $content .= "<a name=\"menu\" class=\"menu_blur\" href=\"".URL."/modules.php?module=".$GLOBALS['module']."&what=".$sub_what.ADD_URL_DATA("")."\" target=\"_self\">";
} else {
- $content .= "<I>";
+ $content .= "<em>";
}
// Menu title
$content .= getConfig('menu_blur_spacer') . $sub_title;
if ($test) {
- $content .= "</A>";
+ $content .= "</a>";
} else {
- $content .= "</I>";
+ $content .= "</em>";
}
if ((!empty($wht)) && (($wht == $sub_what))) {
- $content .= "</STRONG>";
+ $content .= "</strong>";
}
$wht = $sub_what; $cnt++;
// Prepare array
$OUT = "";
while (list($value, $comment) = SQL_FETCHROW($result))
{
- $OUT .= " <OPTION value=\"".$value."\"";
+ $OUT .= " <option value=\"".$value."\"";
if ($_POST['max_mails'] == $value) $OUT .= " selected=\"selected\"";
$OUT .= ">".$value." ".PER_DAY;
if (!empty($comment)) $OUT .= " (".$comment.")";
- $OUT .= "</OPTION>\n";
+ $OUT .= "</option>\n";
}
define('__MAX_RECEIVE_OPTIONS', $OUT);
$OUT = "";
while (list($value, $comment) = SQL_FETCHROW($result))
{
- $OUT .= " <OPTION value=\"".$value."\"";
+ $OUT .= " <option value=\"".$value."\"";
if ($default == $value) $OUT .= " selected=\"selected\"";
$OUT .= ">".$value." ".PER_DAY;
if (!empty($comment)) $OUT .= " (".$comment.")";
- $OUT .= "</OPTION>\n";
+ $OUT .= "</option>\n";
}
define('__MAX_RECEIVE_OPTIONS', $OUT);
SQL_FREERESULT($result);
}
}
//
-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
$sub_mem = MEMBER_CHANGED_DATA;
// Output success message
- $content = "<SPAN class=\"member_done\">".MYDATA_MAIL_SENT."</SPAN>";
+ $content = "<span class=\"member_done\">".MYDATA_MAIL_SENT."</span>";
break;
default:
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
- $content = "<SPAN class=\"member_failed\">".UNKNOWN_MODULE."</SPAN>";
+ $content = "<span class=\"member_failed\">".UNKNOWN_MODULE."</span>";
break;
} // END - switch
} else {
// Could not load profile data
- $content = "<SPAN class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</SPAN>";
+ $content = "<span class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</span>";
}
} else {
// Passwords mismatch
- $content = "<SPAN class=\"member_failed\">".MEMBER_PASSWORD_ERROR."</SPAN>";
+ $content = "<span class=\"member_failed\">".MEMBER_PASSWORD_ERROR."</span>";
}
} else {
// Could not load profile
- $content = "<SPAN class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</SPAN>";
+ $content = "<span class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</span>";
}
// Send email to user if required
$content = CANNOT_SEND_ADMIN_MAILS;
} else {
// No mail to admin
- $content = "<SPAN class=\"member_done\">".MYDATA_MAIL_SENT."</SPAN>";
+ $content = "<span class=\"member_done\">".MYDATA_MAIL_SENT."</span>";
}
} // END - if
// Free memory
SQL_FREERESULT($result);
- } elseif (GET_EXT_VERSION("sql_patches") == "") {
+ } elseif ((GET_EXT_VERSION("sql_patches") == "") && ($MODE != "admin")) {
// No sql_patches installed!
LOAD_URL("admin.php");
}
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
if (is_array($id) && is_array($name) && sizeof($id) == sizeof($name)) {
// Both are arrays
foreach ($id as $idx => $value) {
- $ret .= "<OPTION value=\"".$value."\"";
+ $ret .= "<option value=\"".$value."\"";
if ($default == $value) $ret .= " selected checked";
- $ret .= ">".$name[$idx]."</OPTION>\n";
+ $ret .= ">".$name[$idx]."</option>\n";
} // END - foreach
} // END - if
} else {
$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)) {
if (empty($special)) $add = "";
- $ret .= "<OPTION value=\"".$value."\"";
+ $ret .= "<option value=\"".$value."\"";
if ($default == $value) $ret .= " selected checked";
if (!empty($add)) $add = " (".$add.")";
- $ret .= ">".$title.$add."</OPTION>\n";
+ $ret .= ">".$title.$add."</option>\n";
} // END - while
// Free memory
SQL_FREERESULT($result);
} else {
// No data found
- $ret = "<OPTION value=\"x\">".SELECT_NONE."</OPTION>\n";
+ $ret = "<option value=\"x\">".SELECT_NONE."</option>\n";
}
}
$OUT = "";
foreach ($CATS['id'] as $key => $value) {
if (strlen($CATS['name'][$key]) > 20) $CATS['name'][$key] = substr($CATS['name'][$key], 0, 17)."...";
- $OUT .= " <OPTION value=\"".$value."\">".$CATS['name'][$key]." (".$CATS['uids'][$key]." ".USER_IN_CAT.")</OPTION>\n";
+ $OUT .= " <option value=\"".$value."\">".$CATS['name'][$key]." (".$CATS['uids'][$key]." ".USER_IN_CAT.")</option>\n";
}
} else {
// No cateogries are defined yet