Initial commit: Proyecto Portal ePromos completo con documentación unificada y seguridad base

This commit is contained in:
Isaac Aracena
2026-05-09 12:46:24 -04:00
commit c44f1a69f1
65 changed files with 7223 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
header('Content-Type: application/json; charset=utf-8');
require_once __DIR__ . '/../admin/db.php';
$rasca_id = (int)($_GET['rasca_id'] ?? 0);
if ($rasca_id <= 0) { echo json_encode(['error'=>'rasca_id inválido']); exit; }
$stmt = $conn->prepare("SELECT rasca_id,nombre,banner_1,banner_2,banner_3,banner_4,background_image,fullscreen_icon,fg_image,bg_image FROM rasca_config WHERE rasca_id=?");
$stmt->bind_param("i", $rasca_id);
$stmt->execute();
$cfg = $stmt->get_result()->fetch_assoc();
if(!$cfg){
// Fallbacks por defecto
$cfg = [
'rasca_id'=>$rasca_id,'nombre'=>'Rasca',
'banner_1'=>'/ruleta/img/BANNER-1.png','banner_2'=>'/ruleta/img/BANNER-2.png',
'banner_3'=>'/ruleta/img/BANNER-3.png','banner_4'=>'/ruleta/img/BANNER-4.png',
'background_image'=>null,'fullscreen_icon'=>'/ruleta/img/fullscreen-icon.png',
'fg_image'=>null,'bg_image'=>null
];
}
echo json_encode($cfg, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);