if ($template == "member_support_form") {
// Support request of a member
- $ID = bigintval($GLOBALS['userid']);
- $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid='%s' LIMIT 1", array($ID), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid='%s' LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
list($sex, $surname, $family) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$salut = TRANSLATE_SEX($sex);
}
// Base directory
- $BASE = PATH."templates/".GET_LANGUAGE()."/html/";
+ $BASE = sprintf("%stemplates/%s/html/", PATH, GET_LANGUAGE());
$MODE = "";
// Check for admin/guest/member templates
// Remove variable from memory
unset($file2);
- }
+ } // END - if
// Does the special template exists?
if ((!file_exists($file)) || (!is_readable($file))) {
// Reset to default template
- $file = PATH."templates/".GET_LANGUAGE()."/html/".$template.".tpl";
- }
+ $file = sprintf("%stemplates/%s/html/%s.tpl", PATH, GET_LANGUAGE(), $template);
+ } // END - if
// Now does the final template exists?
if ((file_exists($file)) && (is_readable($file))) {