Permalink
Browse files

Move function

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1235 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent a561252 commit 098b74b660886c1dbce999b00512604ad2bb5067 jakubvrana committed Nov 9, 2009
Showing with 18 additions and 18 deletions.
  1. +18 −18 adminer/include/functions.inc.php
@@ -75,24 +75,6 @@ function checkbox($name, $value, $checked, $label = "", $onclick = "") {
return (strlen($label) ? "<label for='checkbox-$id'>$return" . h($label) . "</label>" : $return);
}
-/** Generate HTML radio list
-* @param string
-* @param array
-* @param string
-* @param string true for no onchange, false for radio
-* @return string
-*/
-function html_select($name, $options, $value = "", $onchange = true) {
- if ($onchange) {
- return "<select name='" . h($name) . "'" . (is_string($onchange) ? " onchange=\"$onchange\"" : "") . ">" . optionlist($options, $value) . "</select>";
- }
- $return = "";
- foreach ($options as $key => $val) {
- $return .= "<label><input type='radio' name='" . h($name) . "' value='" . h($key) . "'" . ($key == $value ? " checked" : "") . ">" . h($val) . "</label>";
- }
- return $return;
-}
-
/** Generate list of HTML options
* @param array array of strings or arrays (creates optgroup)
* @param mixed
@@ -115,6 +97,24 @@ function optionlist($options, $selected = null, $use_keys = false) {
return $return;
}
+/** Generate HTML radio list
+* @param string
+* @param array
+* @param string
+* @param string true for no onchange, false for radio
+* @return string
+*/
+function html_select($name, $options, $value = "", $onchange = true) {
+ if ($onchange) {
+ return "<select name='" . h($name) . "'" . (is_string($onchange) ? " onchange=\"$onchange\"" : "") . ">" . optionlist($options, $value) . "</select>";
+ }
+ $return = "";
+ foreach ($options as $key => $val) {
+ $return .= "<label><input type='radio' name='" . h($name) . "' value='" . h($key) . "'" . ($key == $value ? " checked" : "") . ">" . h($val) . "</label>";
+ }
+ return $return;
+}
+
/** Get list of values from database
* @param string
* @param mixed

0 comments on commit 098b74b

Please sign in to comment.