Fixed a pile of Windows carriage returns

git-svn-id: file:///svn/phpbb/trunk@222 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
James Atkinson 2001-05-01 19:10:09 +00:00
parent 76453deb61
commit b5743048e7

View file

@ -188,10 +188,9 @@ function language_select($default, $name="language", $dirname="language/")
function theme_select($default) function theme_select($default)
{ {
global $db; global $db;
$sql = "SELECT themes_id, themes_name
$sql = "SELECT themes_id, themes_name FROM ".THEMES_TABLE."
FROM ".THEMES_TABLE." ORDER BY themes_name";
ORDER BY themes_name";
if($result = $db->sql_query($sql)) if($result = $db->sql_query($sql))
{ {
$num = $db->sql_numrows($result); $num = $db->sql_numrows($result);
@ -207,7 +206,7 @@ function theme_select($default)
{ {
$selected = ""; $selected = "";
} }
$theme_select .= "\t<optio value=\"".$rowset[$i]['themes_id']."\"$selected>".stripslashes($rowset[$i]['themes_name'])."</option>\n"; $theme_select .= "\t<option value=\"".$rowset[$i]['themes_id']."\"$selected>".stripslashes($rowset[$i]['themes_name'])."</option>\n";
} }
$theme_select .= "</select>\n"; $theme_select .= "</select>\n";
} }
@ -217,24 +216,20 @@ function theme_select($default)
} }
return($theme_select); return($theme_select);
} }
// //
// Initialise user settings on page load // Initialise user settings on page load
//
function init_userprefs($userdata) function init_userprefs($userdata)
{ {
global $override_user_theme, $template, $sys_template; global $override_user_theme, $template, $sys_template;
global $default_lang, $default_theme, $date_format, $sys_timezone; global $default_lang, $default_theme, $date_format, $sys_timezone;
global $theme; global $theme;
if(!$override_user_themes) if(!$override_user_themes)
{ {
if($userdata['user_id'] != ANONYMOUS || $userdata['user_id'] != DELETED) if($userdata['user_id'] != ANONYMOUS || $userdata['user_id'] != DELETED)
{ {
$theme = setuptheme($userdata['user_theme']); $theme = setuptheme($userdata['user_theme']);
} }
else else
{ {
$theme = setuptheme($default_theme); $theme = setuptheme($default_theme);
} }
@ -255,7 +250,6 @@ function init_userprefs($userdata)
{ {
$sys_timezone = $userdata['user_timezone']; $sys_timezone = $userdata['user_timezone'];
} }
// Setup user's Template // Setup user's Template
if($userdata['user_template'] != '') if($userdata['user_template'] != '')
{ {
@ -265,7 +259,7 @@ function init_userprefs($userdata)
{ {
$template = new Template("templates/".$sys_template); $template = new Template("templates/".$sys_template);
} }
// Include the appropriate language file ... if it exists. // Include the appropriate language file ... if it exists.
if(!strstr($PHP_SELF, "admin")) if(!strstr($PHP_SELF, "admin"))
{ {
@ -285,23 +279,22 @@ function init_userprefs($userdata)
include('../language/lang_'.$default_lang.'.'.$phpEx); include('../language/lang_'.$default_lang.'.'.$phpEx);
} }
} }
return; return;
} }
function setuptheme($theme) function setuptheme($theme)
{ {
global $db; global $db;
$sql = "SELECT * FROM ".THEMES_TABLE." WHERE themes_id = '$theme'";
$sql = "SELECT *
FROM ".THEMES_TABLE."
WHERE themes_id = '$theme'";
if(!$result = $db->sql_query($sql)) if(!$result = $db->sql_query($sql))
{
return(0); return(0);
}
if(!$myrow = $db->sql_fetchrow($result)) if(!$myrow = $db->sql_fetchrow($result))
{
return(0); return(0);
}
return($myrow); return($myrow);
} }
@ -442,4 +435,4 @@ function create_date($format, $gmepoch, $tz)
{ {
return (gmdate($format, $gmepoch + (3600 * $tz))); return (gmdate($format, $gmepoch + (3600 * $tz)));
} }
?> ?>