<script> $("#accordion").accordion(); $("#dialog").dialog({ autoOpen : false, width : 650, height : 530, buttons : [{ text : "Zamknij", click : function() { $(this).dialog("close"); } },] }); // Link to open the dialog $("#dialog-link").click(function(event) { $("#dialog").dialog("open"); event.preventDefault(); }); </script>
i kolejny
$lista = $lz -> lista(); echo ' <tr> <th class="tg-031e">Numer</th> <th class="tg-031e">Nazwa</th> <th class="tg-031e">Kto doał</th> <th class="tg-031e">Link z YouTube</th> '; } else { echo ' <th class="tg-031e">Stan</th> <th class="tg-031e">Usuń</th> </tr>'; }; foreach ($lista as $element) { if ($element['stan'] == 'T') { $kupione = 'Pobrane'; } else { $kupione = 'Czeka'; } echo ' <tr> <td class="tg-031e">' . $element['id'] . '</td> <td class="tg-031e">' . $element['nazwa'] . '</td> <td class="tg-031e">' . $element['dodal'] . '</td> <td class="tg-031e"><a href="#" id="dialog-link" class="">Podgląd</a></td> '; } else { echo ' <td class="tg-031e"><a href="index.php?akcja=zmien&id=' . $element['id'] . '"> ' . $kupione . ' </a></td> <td class="tg-031e"><a href="index.php?akcja=usun&id=' . $element['id'] . '"> Usuń </a></td> </tr>'; }; } echo '</table></div> <div id="dialog" title="Dialog Title"> <iframe width="560" height="315" src="//www.youtube.com/embed/'. $element['yt'] .'?rel=0" frameborder="0" allowfullscreen></iframe> </div>'; ?>
Odśwież