@@ 2482-2490 (lines=9) @@ | ||
2479 | * Draws an HTML form select with the given options |
|
2480 | * |
|
2481 | */ |
|
2482 | public function make_select($name,$values,$checked='') |
|
2483 | { |
|
2484 | $output = '<select name="'.$name.'" id="'.$name.'">'; |
|
2485 | foreach($values as $key => $value) { |
|
2486 | $output .= '<option value="'.$key.'" '.(($checked==$key)?'selected="selected"':'').'>'.$value.'</option>'; |
|
2487 | } |
|
2488 | $output .= '</select>'; |
|
2489 | return $output; |
|
2490 | } |
|
2491 | ||
2492 | /** |
|
2493 | * Translates a form date into a more usable format |
@@ 2395-2403 (lines=9) @@ | ||
2392 | * @param string $checked |
|
2393 | * @return string |
|
2394 | */ |
|
2395 | function make_select($name, $values, $checked = '') |
|
2396 | { |
|
2397 | $output = '<select name="'.$name.'" id="'.$name.'">'; |
|
2398 | foreach ($values as $key => $value) { |
|
2399 | $output .= '<option value="'.$key.'" '.(($checked==$key) ? 'selected="selected"' : '').'>'.$value.'</option>'; |
|
2400 | } |
|
2401 | $output .= '</select>'; |
|
2402 | return $output; |
|
2403 | } |
|
2404 | ||
2405 | /** |
|
2406 | * @param $name |