aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_selects.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-07-14 14:43:31 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-07-14 14:43:31 +0000
commitd03de47b51173dac761e4fdf6e7004661a5565ac (patch)
tree1a066dd0a714ca000fe009a1a9a298a3cf264e79 /phpBB/includes/functions_selects.php
parentc4a926b4e201380a45e0c4ebe76fba49fa6b42f1 (diff)
downloadforums-d03de47b51173dac761e4fdf6e7004661a5565ac.tar
forums-d03de47b51173dac761e4fdf6e7004661a5565ac.tar.gz
forums-d03de47b51173dac761e4fdf6e7004661a5565ac.tar.bz2
forums-d03de47b51173dac761e4fdf6e7004661a5565ac.tar.xz
forums-d03de47b51173dac761e4fdf6e7004661a5565ac.zip
Gone but not forgotten ... what's not forgotten? who said that? shut up Paul
git-svn-id: file:///svn/phpbb/trunk@2672 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_selects.php')
-rw-r--r--phpBB/includes/functions_selects.php111
1 files changed, 0 insertions, 111 deletions
diff --git a/phpBB/includes/functions_selects.php b/phpBB/includes/functions_selects.php
deleted file mode 100644
index 9207094348..0000000000
--- a/phpBB/includes/functions_selects.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-/***************************************************************************
- * function_selects.php
- * -------------------
- * begin : Saturday, Feb 13, 2001
- * copyright : (C) 2001 The phpBB Group
- * email : support@phpbb.com
- *
- * $Id$
- *
- *
- ***************************************************************************/
-
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- *
- ***************************************************************************/
-
-//
-// Pick a language, any language ...
-//
-function language_select($default, $select_name = "language", $dirname="language")
-{
- global $phpEx;
-
- $dir = opendir($dirname);
-
- $lang = array();
- while ( $file = readdir($dir) )
- {
- if ( ereg("^lang_", $file) && !is_file($dirname . "/" . $file) && !is_link($dirname . "/" . $file) )
- {
- $filename = trim(str_replace("lang_", "", $file));
- $displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename);
- $displayname = preg_replace("/\[(.*?)_(.*)\]/", "[ \\1 - \\2 ]", $displayname);
- $lang[$displayname] = $filename;
- }
- }
-
- closedir($dir);
-
- @asort($lang);
- @reset($lang);
-
- $lang_select = '<select name="' . $select_name . '">';
- while ( list($displayname, $filename) = @each($lang) )
- {
- $selected = ( strtolower($default) == strtolower($filename) ) ? ' selected="selected"' : '';
- $lang_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
- }
- $lang_select .= '</select>';
-
- return $lang_select;
-}
-
-//
-// Pick a template/theme combo,
-//
-function style_select($default_style, $select_name = "style", $dirname = "templates")
-{
- global $db;
-
- $sql = "SELECT themes_id, style_name
- FROM " . THEMES_TABLE . "
- ORDER BY template_name, themes_id";
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql);
- }
-
- $style_select = '<select name="' . $select_name . '">';
- while ( $row = $db->sql_fetchrow($result) )
- {
- $selected = ( $row['themes_id'] == $default_style ) ? ' selected="selected"' : '';
-
- $style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';
- }
- $style_select .= "</select>";
-
- return $style_select;
-}
-
-//
-// Pick a timezone
-//
-function tz_select($default, $select_name = 'timezone')
-{
- global $sys_timezone, $lang;
-
- if ( !isset($default) )
- {
- $default == $sys_timezone;
- }
- $tz_select = '<select name="' . $select_name . '">';
-
- while( list($offset, $zone) = @each($lang['tz']) )
- {
- $selected = ( $offset == $default ) ? ' selected="selected"' : '';
- $tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
- }
- $tz_select .= '</select>';
-
- return $tz_select;
-}
-
-?> \ No newline at end of file