@@ 647-659 (lines=13) @@ | ||
644 | * @todo This is English language specific implementation. |
|
645 | * It should be adapted for the other languages. |
|
646 | */ |
|
647 | public static function get_alphabet_options($selected_letter = '') |
|
648 | { |
|
649 | $result = ''; |
|
650 | for ($i = 65; $i <= 90; $i ++) { |
|
651 | $letter = chr($i); |
|
652 | $result .= '<option value="'.$letter.'"'; |
|
653 | if ($selected_letter == $letter) { |
|
654 | $result .= ' selected="selected"'; |
|
655 | } |
|
656 | $result .= '>'.$letter.'</option>'; |
|
657 | } |
|
658 | return $result; |
|
659 | } |
|
660 | ||
661 | /** |
|
662 | * Get the options withing a select box within the given values |
|
@@ 668-680 (lines=13) @@ | ||
665 | * @param int Default value |
|
666 | * @return string HTML select options |
|
667 | */ |
|
668 | public static function get_numeric_options($min, $max, $selected_num = 0) |
|
669 | { |
|
670 | $result = ''; |
|
671 | for ($i = $min; $i <= $max; $i ++) { |
|
672 | $result .= '<option value="'.$i.'"'; |
|
673 | if (is_int($selected_num)) |
|
674 | if ($selected_num == $i) { |
|
675 | $result .= ' selected="selected"'; |
|
676 | } |
|
677 | $result .= '>'.$i.'</option>'; |
|
678 | } |
|
679 | return $result; |
|
680 | } |
|
681 | ||
682 | /** |
|
683 | * This public function displays an icon |