OwlCyberSecurity - MANAGER
Edit File: index.php
<?php include("../../includes/config.php"); verificarLogado(); include("../../includes/head.php"); $query = $db->prepare("SELECT * FROM game ORDER BY idg DESC"); $query->execute(); $result = $query->fetchAll(PDO::FETCH_ASSOC); ?> <h1>Games</h1> <br> <br> <a href="form-adicionar.php" class="btn btn-default pull-left">Adicionar</a> <a href="../../sair.php" class="btn btn-default pull-right">Sair</a> <br> <br> <table width="100%" border="0" class="table table-striped table-hover"> <tr> <th>ID</th> <th>NOME</th> <th>DT. PUBLICAÇÃO</th> <th class="text-center">VER GAME</th> <th>TIPO</th> <th>ATUALIZADO EM</th> <th>AÇÃO</th> </tr> <?php foreach($result as $item) { $st = ""; if(strtotime($item['data_publicar']) > time() ){ $st = "background: #FFCCCC"; } ?> <tr style="<?=$st?>"> <td><?=$item['idg']?></td> <td><?=$item['game']?></td> <td><?= date("d/m/Y H:i", strtotime($item['data_publicar']))?></td> <td class="text-center"><a href="http://www.kawaiigames.net/game/<?=$item['url']?>" target="_blank">Link</a></td> <td><?=$item['tipo']?></td> <td><?=$item['updated_at'] ? date("d/m/Y H:i", strtotime($item['updated_at'])) : ' - '?></td> <td> <a href="excluir.php?id=<?=$item['idg']?>">Excluir</a> | <a href="form-editar.php?id=<?=$item['idg']?>">Editar</a> </td> </tr> <?php }//foreach ?> </table>