function print_sidebar($current_page) { $pages = array('Ĉiuj', '', '3ZZZ Radio', 'esPodkasto', 'Ĉi Tie Nun', 'Ĉina Radio Internacia', 'Junula Radio Internacia', 'NASKa Podkasto', 'Panama Radio', 'Panama Raporto', 'Parolu Mondo', 'Podkasto Per Poŝtelefono', 'Pola Radio', 'Radio Aktiva', 'Radio Esperanto', 'Radio Havana Kubo', 'Radio Internacia', 'Radio Vatikana', 'Radio Verda', 'Radio ZAM', 'Tuj', 'Varsovia Vento', '', 'Pri Podkastaro'); print '<div class="maldekstre">'; print '<ul>'; foreach ($pages as $page) { if ($page == $current_page) { // highlight this text, don't make link print '<li><strong>' . $page . '</strong>'; } else { if ($page == '') { // draw separator by restarting list print '</ul><ul>'; } else { // convert A B Ĉ -> a_b_%C4%89.php if ($page == 'Ĉiuj') { // link to index page $link = ''; } else { $link = str_replace(" ", "-", convert_to_h_system(mb_strtolower($page, "UTF-8"))) . '.php'; } // absolute addressing to promote use of new shiny domain print '<li><a href="http://www.podkastaro.org/' . $link . '">' . $page . '</a>'; } } } print '</ul>'; print '</div>'; }
public function print_html($is_home_page = False) { if ($is_home_page) { $station_name = convert_to_h_system(mb_strtolower($this->station_name)); $station_link = 'http://www.podkastaro.org/' . str_replace(" ", "-", $station_name) . '.php'; $title = '<a href="' . $station_link . '">' . $this->station_name . '</a>'; } else { $title = $this->station_name; } $prepared_div = <<<EOT <div class="programo"> <h3>{$title}: {$this->episode_name}</h3> <p>{$this->description}</p> <p><em>{$this->pretty_date}</em></p> EOT; $finish = "</div>"; if ($this->mp3 != "") { $player = <<<EOT <object type="application/x-shockwave-flash" data="dewplayer.swf" width="200" height="20" name="dewplayerclassic"> <param name="movie" value="dewplayer.swf"> <param name="flashvars" value="mp3={$this->mp3}"> </object> EOT; $prepared_div = $prepared_div . $player; } $prepared_div = $prepared_div . "</div>"; print $prepared_div; }