Cytat
- application/x-httpd-php top_lista_edycja.php
- PHP script text
- <?
- $query = "SELECT rtp_id, rtp_user_id, rtp_title, rtp_autor, rtp_poz, rtp_last_poz, rtp_date_added, rtp_date_top, rtp_comment FROM radio_top_lista ORDER BY rtp_title";
- $sql = mysql_query($query);
- if(mysql_num_rows($sql) > 0){
- $i = 1;
- $lista_top = "";
- while($row = mysql_fetch_array($sql)){
- if($row['rtp_user_id'] == 0){
- $user_name = "Gość";
- }else{
- $query2 = "SELECT u_login FROM users WHERE u_id=$row[rtp_user_id]";
- $sql2 = mysql_query($query2);
- $row2 = mysql_fetch_array($sql2);
- $user_name = $row2['u_login'];
- }
- $lista_top .= "
- <table width='333' align='right' class='results_table'>
- <tr>
- <td width='307'>
- <a href='/szczegoly_piosenki/$row[rtp_id]/polskie_radio_manchester.html' class='art_title_link' title='Szczegoly piosenki' target='_blank'>$i. ".stripslashes($row['rtp_autor'])." - ".stripslashes($row['rtp_title'])."</a>
- </td>
- <td align='center' class='art_text'>Edytuj</td>
- <td align='center' class='art_text'>
- <a onClick=\"java script:switch_del_form('del_$row[rtp_id]');\">Usuń</a>
- </td>
- </tr>
- <tr>
- <td colspan='3'>
- <div id='del_$row[rtp_id]' style='display:none;'>
- <form action='/strefa_dj/edycja_top_listy/polskie_radio_manchester.html' method='post'>
- <input type='hidden' name='rtp_id' value='$row[rtp_id]'/>
- <p align='center' style='color:red;' class='art_text'>
- Czy jesteś pewien şe chcesz usunąć tą pozycję?<br>
- <input type='button' onClick=\"java script:switch_del_form('del_$row[rtp_id]');\" class='button_input'/>
-
- <input type='submit' value='Tak' name='usun_pozycje' class='button_input'/>
- </p>
- </form>
- </div>
- </td>
- </tr>
- </table>
- ";
- $i++;
- }
- }else{
- $lista_top = "<p align='center' class='art_title'>Aktualnie brak utworów w top liście.</p>";
- }
- echo $lista_top;
- ?>
- <script type="text/javascript">
- <!--
- function switch_del_form(form_id){
- var formDiv = document.getElementById(form_id);
- if(formDiv.display == "none"){
- formDiv.display = "block";
- }else{
- formDiv.display = "none";
- }
- }
- -->
- </script>