aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart van Bragt <bartvb@users.sourceforge.net>2004-10-21 13:15:01 +0000
committerBart van Bragt <bartvb@users.sourceforge.net>2004-10-21 13:15:01 +0000
commitc5e40db2a07f3e2a432dee409eafc038313302d5 (patch)
treeb9abb7dcfe3af6892fdd9dc0e8716ea55ca380ec
parente5b8ff94049e69bfc1276c54cd433ba51e3241bc (diff)
downloadforums-c5e40db2a07f3e2a432dee409eafc038313302d5.tar
forums-c5e40db2a07f3e2a432dee409eafc038313302d5.tar.gz
forums-c5e40db2a07f3e2a432dee409eafc038313302d5.tar.bz2
forums-c5e40db2a07f3e2a432dee409eafc038313302d5.tar.xz
forums-c5e40db2a07f3e2a432dee409eafc038313302d5.zip
Removed duplicate declaration of build_cfg_template()
git-svn-id: file:///svn/phpbb/trunk@5006 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/adm/admin_board.php61
1 files changed, 1 insertions, 60 deletions
diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php
index c9b3257436..b590150080 100644
--- a/phpBB/adm/admin_board.php
+++ b/phpBB/adm/admin_board.php
@@ -512,64 +512,5 @@ function board_disable($value)
return '<input type="radio" name="config[board_disable]" value="1"' . $board_disable_yes . ' /> ' . $user->lang['YES'] . '&nbsp;&nbsp;<input type="radio" name="config[board_disable]" value="0"' . $board_disable_no . ' /> ' . $user->lang['NO'] . '<br /><input class="post" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $new['board_disable_msg'] . '" />';
}
-function build_cfg_template($tpl_type, $config_key, $options = '')
-{
- global $new, $user;
-
- $tpl = '';
- $name = 'config[' . $config_key . ']';
-
- switch ($tpl_type[0])
- {
- case 'text':
- case 'password':
- $size = (int) $tpl_type[1];
- $maxlength = (int) $tpl_type[2];
-
- $tpl = '<input class="post" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />';
- break;
-
- case 'dimension':
- $size = (int) $tpl_type[1];
- $maxlength = (int) $tpl_type[2];
-
- $tpl = '<input class="post" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" /> x <input class="post" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" />';
- break;
-
- case 'textarea':
- $rows = (int) $tpl_type[1];
- $cols = (int) $tpl_type[2];
-
- $tpl = '<textarea name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>';
- break;
- case 'radio':
- $key_yes = ($new[$config_key]) ? ' checked="checked"' : '';
- $key_no = (!$new[$config_key]) ? ' checked="checked"' : '';
-
- $tpl_type_cond = explode('_', $tpl_type[1]);
- $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
-
- $tpl_no = '<input type="radio" name="' . $name . '" value="0"' . $key_no . ' />' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']);
- $tpl_yes = '<input type="radio" name="' . $name . '" value="1"' . $key_yes . ' />' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']);
-
- $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '&nbsp;&nbsp;' . $tpl_no : $tpl_no . '&nbsp;&nbsp;' . $tpl_yes;
- break;
-
- case 'select':
- eval('$s_options = ' . str_replace('{VALUE}', $new[$config_key], $options) . ';');
- $tpl = '<select name="' . $name . '">' . $s_options . '</select>';
- break;
-
- case 'custom':
- eval('$tpl = ' . str_replace('{VALUE}', $new[$config_key], $options) . ';');
- break;
-
- default:
- break;
- }
-
- return $tpl;
-}
-
-?> \ No newline at end of file
+?>