diff options
Diffstat (limited to 'phpBB/profile.php')
-rw-r--r-- | phpBB/profile.php | 151 |
1 files changed, 0 insertions, 151 deletions
diff --git a/phpBB/profile.php b/phpBB/profile.php index c1f54201b3..a3ef9e2219 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -35,157 +35,6 @@ init_userprefs($userdata); // // -// Page specific functions -// - -function language_select($default, $dirname="language/") -{ - global $phpEx; - - $dir = opendir($dirname); - - $lang_select = "<select name=\"language\">\n"; - while ($file = readdir($dir)) - { - if (ereg("^lang_", $file)) - { - $filename = str_replace("lang_", "", $file); - $filename = str_replace(".$phpEx", "", $filename); - $displayname = preg_replace("/(.*)_(.*)/", "\\1 [ \\2 ]", $filename); - $selected = (strtolower($default) == strtolower($filename)) ? " selected" : ""; - $lang_select .= " <option value=\"$filename\"$selected>".ucwords($displayname)."</option>\n"; - } - } - $lang_select .= "</select>\n"; - - closedir($dir); - - return $lang_select; -} -// NOTE: This function should check is_dir($file), however the is_dir function seems to be buggy on my -// system so its not currently implemented that way -// - James -function template_select($default) -{ - $dir = opendir("templates"); - - $template_select = "<select name=\"template\">\n"; - while($file = readdir($dir)) - { - unset($selected); - - if($file != "." && $file != ".." && $file != "CVS") - { - if($file == $default) - { - $selected = " selected"; - } - $template_select .= "<option value=\"$file\"$selected>$file</option>\n"; - } - } - $template_select .= "</select>"; - - closedir($dir); - - return($template_select); -} -function theme_select($default) -{ - global $db, $board_config, $lang; - - $sql = "SELECT themes_id, themes_name - FROM " . THEMES_TABLE . " - WHERE themes_name LIKE '" . $board_config['default_template'] . "-%' - ORDER BY themes_name"; - if($result = $db->sql_query($sql)) - { - $num = $db->sql_numrows($result); - $rowset = $db->sql_fetchrowset($result); - - if($num) - { - $theme_select = "<select name=\"theme\">\n"; - for($i = 0; $i < $num; $i++) - { - if(stripslashes($rowset[$i]['themes_name']) == $default || $rowset[$i]['themes_id'] == $default) - { - $selected = " selected"; - } - else - { - $selected = ""; - } - $theme_select .= "\t<option value=\"" . $rowset[$i]['themes_id'] ."\"$selected>" . stripslashes($rowset[$i]['themes_name']) . "</option>\n"; - } - $theme_select .= "</select>\n"; - } - else - { - $theme_select = "<select name=\"theme\"><option value=\"-1\">" . $lang['No_themes'] . "</option></select>"; - } - } - else - { - message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql); - } - return($theme_select); -} -function tz_select($default) -{ - global $sys_timezone; - - if(!isset($default)) - { - $default == $sys_timezone; - } - $tz_select = "<select name=\"timezone\">"; - $tz_array = array( - "-12" => "(GMT -12:00 hours) Eniwetok, Kwajalein", - "-11" => "(GMT -11:00 hours) Midway Island, Samoa", - "-10" => "(GMT -10:00 hours) Hawaii", - "-9" => "(GMT -9:00 hours) Alaska", - "-8" => "(GMT -8:00 hours) Pacific Time (US & Canada)", - "-7" => "(GMT -7:00 hours) Mountain Time (US & Canada)", - "-6" => "(GMT -6:00 hours) Central Time (US & Canada), Mexico City", - "-5" => "(GMT -5:00 hours) Eastern Time (US & Canada), Bogota, Lima, Quito", - "-4" => "(GMT -4:00 hours) Atlantic Time (Canada), Caracas, La Paz", - "-3.5" => "(GMT -3:30 hours) Newfoundland", - "-3" => "(GMT -3:00 hours) Brazil, Buenos Aires, Georgetown", - "-2" => "(GMT -2:00 hours) Mid-Atlantic, Ascension Is., St. Helena, ", - "-1" => "(GMT -1:00 hours) Azores, Cape Verde Islands", - "0" => "(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia", - "+1" => "(GMT +1:00 hours) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome", - "+2" => "(GMT +2:00 hours) Kaliningrad, South Africa, Warsaw", - "+3" => "(GMT +3:00 hours) Baghdad, Riyadh, Moscow, Nairobi", - "+3.5" => "(GMT +3:30 hours) Tehran", - "+4" => "(GMT +4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi", - "+4.5" => "(GMT +4:30 hours) Kabul", - "+5" => "(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent", - "+5.5" => "(GMT +5:30 hours) Bombay, Calcutta, Madras, New Delhi", - "+6" => "(GMT +6:00 hours) Almaty, Colombo, Dhaka", - "+7" => "(GMT +7:00 hours) Bangkok, Hanoi, Jakarta", - "+8" => "(GMT +8:00 hours) Beijing, Chongqing, Hong Kong, Perth, Singapore, Taipei", - "+9" => "(GMT +9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk", - "+9.5" => "(GMT +9:30 hours) Adelaide, Darwin", - "+10" => "(GMT +10:00 hours) Guam, Melbourne, Papua New Guinea, Sydney, Vladivostok", - "+11" => "(GMT +11:00 hours) Magadan, New Caledonia, Solomon Islands", - "+12" => "(GMT +12:00 hours) Auckland, Wellington, Fiji, Kamchatka, Marshall Island"); - - while(list($offset, $zone) = each($tz_array)) - { - $selected = ($offset == $default) ? " selected" : ""; - $tz_select .= "\t<option value=\"$offset\"$selected>$zone</option>\n"; - } - $tz_select .= "</select>\n"; - - return($tz_select); -} - -// -// End of functions defns -// - -// // Start of program proper // if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) |