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