/** * albumselect() * * return the HTML code for a listbox with name $id that contains the list * of all albums * * @param string $id the name of the listbox * @return the HTML code */ function albumselect($id = "album") { global $lang_common; $options = album_selection_options(); $only_empty_albums = only_empty_albums_button(); return <<<EOT <select id="aid" name="{$id}" class="listbox"> <option value="0" selected="selected">{$lang_common['select_album']}</option> {$options} </select> {$only_empty_albums} EOT; }
function form_alb_list_box($text, $name) { global $lang_common; $superCage = Inspekt::makeSuperCage(); if ($superCage->get->keyExists('album')) { $sel_album = $superCage->get->getInt('album'); } elseif ($superCage->post->keyExists('album')) { $sel_album = $superCage->post->getInt('album'); } else { $sel_album = 0; } $options = album_selection_options($sel_album); $only_empty_albums = only_empty_albums_button(); echo <<<EOT <tr> <td class="tableb tableb_alternate" width="50"> {$text} </td> <td class="tableb tableb_alternate" valign="top"> <select name="{$name}" class="listbox"> <option value="">{$lang_common['select_album']}</option> {$options} </select> {$only_empty_albums} </td> </tr> EOT; }