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