<?php function site_main() { show_info(); count_info(); } else { main_title_open(); main_title_close(); main_text_open(); main_text_close(); } } ?>
- wiec tak chciałbym aby wszystkie teledyski wyświetlały się na jednej stronie - chodzi mi o to żeby pobierały się nazwy z bazy i były do nich linki . Jak to zrobic?
<?php # wyswietlanie teledysku function show_info() { $id = (int) $id; $query = "SELECT * FROM $info_tbl WHERE id=$id"; if($a==0) { $title = 'bląd!'; $text = 'Nie ma teledysku o takim numerze w bazie danych! '.$mess['e0']; } else { $title = $r['title']; $count = $r['opened']; $text = $r['text']; $date = $r['date']; $author = $r['author']; $text = make_clickable($text); $print = 'print.php?what=infopage&id='.$id; } if(is_login()=='yes') { $link_a = '<a href="admin.php?op=info&cmd=edit&id='.$id.'&goto=index.php" title="edit" class="t_main">E</a>'; $link_b = '<a href="admin.php?op=info&cmd=del&id='.$id.'&goto=index.php" title="delete" class="t_main">D</a>'; $title = $title.' <b>···</b> (<b> '.$link_a.'</b> | <b>'.$link_b.' </b>)'; } main_title_open(); main_title_close(); main_text_open($author, $date, $comment, $comment_num, $print); echo '<html><center> <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/'.$text.'"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/'.$text.'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"> </embed></object> </html><br /> </center>'; } function count_info() { $query = "SELECT opened FROM $info_tbl WHERE id=$id"; $count = $r['opened']; $count++; $query = "UPDATE $info_tbl SET opened=$count WHERE id=$id"; } ?>