inicio
This commit is contained in:
2025-05-05 11:03:01 -06:00
commit c73e3f2327
185 changed files with 17573 additions and 0 deletions

5
public/.htaccess Normal file
View File

@@ -0,0 +1,5 @@
RewriteEngine On
RewriteBase /IMPORTADORES/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

View File

@@ -0,0 +1 @@
vehiculo,identificador_fiscal,id_transportista
1 vehiculo identificador_fiscal id_transportista

View File

@@ -0,0 +1,11 @@
clave_identificador,nombre,rfc,curp,telefono,caat,pais_id,estado_id,ciudad_id,domicilio
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
1 clave_identificador nombre rfc curp telefono caat pais_id estado_id ciudad_id domicilio
2
3
4
5
6
7
8
9
10
11

41
public/index.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
// Carga conexión a la base de datos y funciones de entorno
require_once __DIR__ . '/../config/database.php';
require_once __DIR__ . '/../app/helpers/env.php';
loadEnv();
// Captura la ruta limpia desde .htaccess
$url = $_GET['url'] ?? '';
$segments = explode('/', trim($url, '/'));
// Determina controlador y método
$controllerName = $segments[0] ?: 'home'; // por defecto 'home'
$methodName = $segments[1] ?? 'index';
$params = array_slice($segments, 2);
// Ruta del archivo controlador
$controllerFile = __DIR__ . '/../app/controllers/' . $controllerName . '.php';
if (file_exists($controllerFile)) {
require_once $controllerFile;
if (function_exists($methodName)) {
call_user_func_array($methodName, $params);
} else {
echo "❌ Método '$methodName' no encontrado en el controlador '$controllerName'.";
}
} else {
echo "❌ Controlador '$controllerName' no encontrado.";
}
// ejemplo de router dinámico
if ($controllerName === 'sistemas' && $methodName === 'guardar_usuario') {
require_once __DIR__ . '/../app/controllers/sistemas.php';
guardar_usuario();
exit;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

33
public/ver_opinion.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
session_start();
// 🚨 Paso 1: Validar sesión de usuario
if (!isset($_SESSION['usuario_id'])) {
http_response_code(403);
echo "Acceso denegado. Debes iniciar sesión.";
exit;
}
// 🚨 Paso 2: Validar parámetro
if (!isset($_GET['file']) || empty($_GET['file'])) {
http_response_code(400);
echo "Archivo no especificado.";
exit;
}
$archivo = basename($_GET['file']); // Previene path traversal (../)
$ruta = realpath(__DIR__ . '/../storage/opiniones/' . $archivo);
// 🚨 Paso 3: Validar que el archivo exista y esté dentro del folder permitido
$directorioPermitido = realpath(__DIR__ . '/../storage/opiniones/');
if (!$ruta || !file_exists($ruta) || strpos($ruta, $directorioPermitido) !== 0) {
http_response_code(404);
echo "Archivo no encontrado o fuera de rango.";
exit;
}
// ✅ Paso 4: Mostrar el archivo
header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename="' . $archivo . '"');
readfile($ruta);
exit;