summaryrefslogtreecommitdiff
path: root/includes/sys_template.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/sys_template.php')
-rw-r--r--includes/sys_template.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php
index 2c7f4f22..893d2d7e 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -22,4 +22,15 @@ function html_options($name, $options, $selected = "") {
return $html;
}
+
+function html_select_key($name, $rows, $selected) {
+ $html = '<select name="' . $name . '">';
+ foreach ($rows as $key => $row)
+ if (($key == $selected) || ($row == $selected))
+ $html .= '<option value="' . $key . '" selected="selected">' . $row . '</option>';
+ else
+ $html .= '<option value="' . $key . '">' . $row . '</option>';
+ $html .= '</select>';
+ return $html;
+}
?> \ No newline at end of file