@@ 2326-2334 (lines=9) @@ | ||
2323 | * @param string $checked |
|
2324 | * @return string |
|
2325 | */ |
|
2326 | function make_select($name, $values, $checked = '') |
|
2327 | { |
|
2328 | $output = '<select name="'.$name.'" id="'.$name.'">'; |
|
2329 | foreach ($values as $key => $value) { |
|
2330 | $output .= '<option value="'.$key.'" '.(($checked==$key) ? 'selected="selected"' : '').'>'.$value.'</option>'; |
|
2331 | } |
|
2332 | $output .= '</select>'; |
|
2333 | return $output; |
|
2334 | } |
|
2335 | ||
2336 | /** |
|
2337 | * @param $name |
@@ 2484-2492 (lines=9) @@ | ||
2481 | * Draws an HTML form select with the given options |
|
2482 | * |
|
2483 | */ |
|
2484 | public function make_select($name,$values,$checked='') |
|
2485 | { |
|
2486 | $output = '<select name="'.$name.'" id="'.$name.'">'; |
|
2487 | foreach($values as $key => $value) { |
|
2488 | $output .= '<option value="'.$key.'" '.(($checked==$key)?'selected="selected"':'').'>'.$value.'</option>'; |
|
2489 | } |
|
2490 | $output .= '</select>'; |
|
2491 | return $output; |
|
2492 | } |
|
2493 | ||
2494 | /** |
|
2495 | * Translates a form date into a more usable format |