| @@ 815-827 (lines=13) @@ | ||
| 812 | * @todo This is English language specific implementation. |
|
| 813 | * It should be adapted for the other languages. |
|
| 814 | */ |
|
| 815 | public static function get_alphabet_options($selected_letter = '') |
|
| 816 | { |
|
| 817 | $result = ''; |
|
| 818 | for ($i = 65; $i <= 90; $i ++) { |
|
| 819 | $letter = chr($i); |
|
| 820 | $result .= '<option value="'.$letter.'"'; |
|
| 821 | if ($selected_letter == $letter) { |
|
| 822 | $result .= ' selected="selected"'; |
|
| 823 | } |
|
| 824 | $result .= '>'.$letter.'</option>'; |
|
| 825 | } |
|
| 826 | return $result; |
|
| 827 | } |
|
| 828 | ||
| 829 | /** |
|
| 830 | * Get the options withing a select box within the given values |
|
| @@ 836-848 (lines=13) @@ | ||
| 833 | * @param int Default value |
|
| 834 | * @return string HTML select options |
|
| 835 | */ |
|
| 836 | public static function get_numeric_options($min, $max, $selected_num = 0) |
|
| 837 | { |
|
| 838 | $result = ''; |
|
| 839 | for ($i = $min; $i <= $max; $i ++) { |
|
| 840 | $result .= '<option value="'.$i.'"'; |
|
| 841 | if (is_int($selected_num)) |
|
| 842 | if ($selected_num == $i) { |
|
| 843 | $result .= ' selected="selected"'; |
|
| 844 | } |
|
| 845 | $result .= '>'.$i.'</option>'; |
|
| 846 | } |
|
| 847 | return $result; |
|
| 848 | } |
|
| 849 | ||
| 850 | /** |
|
| 851 | * This public function displays an icon |
|