Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'database.php'
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Tecovel</title>
- <link href="css/style.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
- function pergunta(id) {
- var resposta;
- resposta = confirm('Realmente deseja excluir este item?');
- if (resposta == true){
- location.href='remBanLanc.php?delete='+id;
- }
- }
- </script>
- </head>
- <body>
- <div id="todo">
- <div id="menu">
- <ul>
- <li>Banner Lançamentos
- <ul>
- <li><a href="#">Adicionar</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div id="conteudo">
- <table>
- <tr>
- <td>Id</td>
- <td>Arquivo</td>
- <?php
- $resultado = $con->query("SELECT * FROM TB_banners WHERE tipo='2'");
- if ($resultado->rowCount() > 0) {
- foreach ($resultado as $row) {
- echo "<tr>";
- echo "<td>" . $row['id'] . "</td>";
- echo "<td>" . $row['arquivo'] . "</td>";
- echo "<td><button onclick='perguntar(\"" . $row['id'] . "\");'>Remover</button></td>";
- echo "</tr>";
- }
- }
- ?>
- </tr>
- </table>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement