blog+contacto php listo

This commit is contained in:
2026-09-20 13:28:57 -03:00
parent cd67fca3dc
commit cfb97b486e
24 changed files with 8970 additions and 165 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
require_once '../config/db.php';
// Verificar si el usuario está logueado
function verificarAuth() {
if (!isset($_SESSION['admin_id'])) {
header('Location: login.php');
exit;
}
}
// Obtener datos del admin logueado
function getAdminActual() {
global $pdo;
$stmt = $pdo->prepare("SELECT id, nombre, email FROM admin_users WHERE id = ?");
$stmt->execute([$_SESSION['admin_id']]);
return $stmt->fetch();
}
?>