home
/
u529748449
/
domains
/
borabilhete.com
/
public_html
➕ New
📤 Upload
✎ Editing:
index.php
← Back
<?php include 'admin/conexao.php'; ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Eventos Disponíveis</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="public/css/baseingressos.css"> <link rel="stylesheet" href="public/css/evento.css"> <link rel="stylesheet" href="public/css/header.css"> <link rel="stylesheet" href="public/css/footer.css"> </head> <body> <?php include __DIR__ . '/public/includes/header.php'; ?> <h2>Escolha um Evento</h2> <ul> <?php // Função para gerar slug function gerarSlug($nome) { $slug = strtolower(trim($nome)); $slug = iconv('UTF-8', 'ASCII//TRANSLIT', $slug); // remove acentos $slug = preg_replace('/[^a-z0-9\s-]/', '', $slug); // remove caracteres especiais $slug = preg_replace('/[\s-]+/', '-', $slug); // troca espaços por hífen return $slug; } $sql = "SELECT id, nome, data, local FROM eventos ORDER BY data ASC"; $result = $conn->query($sql); while ($evento = $result->fetch_assoc()) { $data = date('d/m/Y H:i', strtotime($evento['data'])); $slug = gerarSlug($evento['nome']); $link = "public/evento/{$slug}.php"; echo "<li> <strong>{$evento['nome']}</strong><br> Data: $data<br> Local: {$evento['local']}<br> <a href='$link'>Selecionar</a> </li><br>"; } ?> </ul> </body> </html>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel