diff options
author | gweltas <gweltas@piwigo.org> | 2004-02-19 00:31:09 +0000 |
---|---|---|
committer | gweltas <gweltas@piwigo.org> | 2004-02-19 00:31:09 +0000 |
commit | 78df1f97d366e5f9e4115c658ad91fab70717f29 (patch) | |
tree | 518126d0a8728d9a2c81155e6ce6527b74fbaf92 /template/default/htmlfunctions.inc.php | |
parent | 19b4964996483b51338deedbdf1dafc6d7ec16d8 (diff) |
Split of langage files
git-svn-id: http://piwigo.org/svn/trunk@364 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | template/default/htmlfunctions.inc.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/template/default/htmlfunctions.inc.php b/template/default/htmlfunctions.inc.php index cd4df188a..170defc46 100644 --- a/template/default/htmlfunctions.inc.php +++ b/template/default/htmlfunctions.inc.php @@ -232,4 +232,34 @@ function display_category( $category, $indent ) } } } + +function make_jumpbox($value, $selected, $usekeys=false) +{ + $boxstring = ''; + $nb = sizeof( $value); + $keys = ($usekeys?array_keys($value):$value); + $value = ($usekeys?array_values($value):$value); + for ( $i = 0; $i < $nb; $i++ ) + { + $boxstring .= '<option value="'.$keys[$i].'"'; + if ($selected == $keys[$i]) $boxstring .=' selected="selected"'; + $boxstring .='>'.$value[$i].'</option>'; + } + return $boxstring; +} + +function make_radio($name, $value, $selected, $usekeys=false) +{ + $boxstring = ''; + $nb = sizeof( $value); + $keys = ($usekeys?array_keys($value):$value); + $value = ($usekeys?array_values($value):$value); + for ( $i = 0; $i < $nb; $i++ ) + { + $boxstring .= '<input type="radio" name="'.$name.'" value="'.$keys[$i].'"'; + if ($selected == $keys[$i]) $boxstring .=' checked'; + $boxstring .='/>'.$value[$i]; + } + return $boxstring; +} ?> |