| @@ 92-108 (lines=17) @@ | ||
| 89 | * |
|
| 90 | * @return |
|
| 91 | */ |
|
| 92 | function &show_selection() { |
|
| 93 | $ret = "<select size='" . $this -> size() . "' name='$this->value()'>"; |
|
| 94 | if ($this -> emptyselect) { |
|
| 95 | $ret .= "<option value='" . $this -> value() . "'>----------------------</option>"; |
|
| 96 | } |
|
| 97 | foreach ($this -> filelist as $content) { |
|
| 98 | $opt_selected = ""; |
|
| 99 | ||
| 100 | if ( $content[0] == $this -> selected() ) { |
|
| 101 | $opt_selected = "selected='selected'"; |
|
| 102 | } |
|
| 103 | $ret .= "<option value='" . $content . "' $opt_selected>" . $content . "</option>"; |
|
| 104 | } |
|
| 105 | $ret .= "</select>"; |
|
| 106 | ||
| 107 | return $ret; |
|
| 108 | } |
|
| 109 | ||
| 110 | /** |
|
| 111 | * SpotList::getListTypeAsArray() |
|
| @@ 34-50 (lines=17) @@ | ||
| 31 | $this -> type = $type; |
|
| 32 | } |
|
| 33 | ||
| 34 | function &getarray($this_array) { |
|
| 35 | $ret="<select size='" . $this -> size() . "' name='$this->value()'>"; |
|
| 36 | if ($this -> emptyselect) { |
|
| 37 | $ret .= "<option value='" . $this -> value() . "'>----------------------</option>"; |
|
| 38 | } |
|
| 39 | foreach ($this_array as $content) { |
|
| 40 | $opt_selected=""; |
|
| 41 | ||
| 42 | if ($content[0] == $this -> selected()) { |
|
| 43 | $opt_selected="selected='selected'"; |
|
| 44 | } |
|
| 45 | $ret .= "<option value='" . $content . "' $opt_selected>" . $content . "</option>"; |
|
| 46 | } |
|
| 47 | $ret .= "</select>"; |
|
| 48 | ||
| 49 | return $ret; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Private to be called by other parts of the class |
|