Vista información general
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||||
|
|
||||||
@@ -9,13 +8,11 @@ require_once __DIR__ . '/../helpers/crypto.php';
|
|||||||
require_once __DIR__ . '/../helpers/bitacoras.php';
|
require_once __DIR__ . '/../helpers/bitacoras.php';
|
||||||
require_once __DIR__ . '/../helpers/env.php';
|
require_once __DIR__ . '/../helpers/env.php';
|
||||||
|
|
||||||
|
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use PHPMailer\PHPMailer\Exception;
|
use PHPMailer\PHPMailer\Exception;
|
||||||
|
|
||||||
loadEnv();
|
loadEnv();
|
||||||
|
|
||||||
|
|
||||||
function dashboard() {
|
function dashboard() {
|
||||||
if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'agente_aduanal') {
|
if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'agente_aduanal') {
|
||||||
header("Location: /IMPORTADORES/login");
|
header("Location: /IMPORTADORES/login");
|
||||||
@@ -31,8 +28,6 @@ function dashboard() {
|
|||||||
include __DIR__ . '/../../views/agentes/dashboard.php';
|
include __DIR__ . '/../../views/agentes/dashboard.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function importadores_activos() {
|
function importadores_activos() {
|
||||||
if (!($_SESSION['usuario_id'] ?? false) || $_SESSION['tipo_usuario'] !== 'agente_aduanal') {
|
if (!($_SESSION['usuario_id'] ?? false) || $_SESSION['tipo_usuario'] !== 'agente_aduanal') {
|
||||||
header('Location: /IMPORTADORES/login');
|
header('Location: /IMPORTADORES/login');
|
||||||
@@ -55,7 +50,6 @@ function importadores_activos() {
|
|||||||
include __DIR__ . '/../../views/agentes/importadores_activos.php';
|
include __DIR__ . '/../../views/agentes/importadores_activos.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function solicitudes_pendientes() {
|
function solicitudes_pendientes() {
|
||||||
if (!($_SESSION['usuario_id'] ?? false) || $_SESSION['tipo_usuario'] !== 'agente_aduanal') {
|
if (!($_SESSION['usuario_id'] ?? false) || $_SESSION['tipo_usuario'] !== 'agente_aduanal') {
|
||||||
header('Location: /IMPORTADORES/login');
|
header('Location: /IMPORTADORES/login');
|
||||||
@@ -79,12 +73,8 @@ function solicitudes_pendientes() {
|
|||||||
include __DIR__ . '/../../views/agentes/solicitudes_pendientes.php';
|
include __DIR__ . '/../../views/agentes/solicitudes_pendientes.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function aprobar_solicitud()
|
function aprobar_solicitud()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$conn = getConnection();
|
$conn = getConnection();
|
||||||
$id = $_GET['id'] ?? null;
|
$id = $_GET['id'] ?? null;
|
||||||
|
|
||||||
@@ -129,7 +119,7 @@ function aprobar_solicitud()
|
|||||||
if (!$stmtInsert) {
|
if (!$stmtInsert) {
|
||||||
die("❌ Error al crear usuario: " . print_r(sqlsrv_errors(), true));
|
die("❌ Error al crear usuario: " . print_r(sqlsrv_errors(), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actualizar solicitud
|
// Actualizar solicitud
|
||||||
$sqlUpdate = "UPDATE solicitudes_importadores
|
$sqlUpdate = "UPDATE solicitudes_importadores
|
||||||
SET request_status = 'approved', approval_date = GETDATE(), approved_by = ?
|
SET request_status = 'approved', approval_date = GETDATE(), approved_by = ?
|
||||||
@@ -185,7 +175,6 @@ function aprobar_solicitud()
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function activos() {
|
function activos() {
|
||||||
|
|
||||||
if (!($_SESSION['usuario_id'] ?? false)) {
|
if (!($_SESSION['usuario_id'] ?? false)) {
|
||||||
@@ -214,7 +203,6 @@ function activos() {
|
|||||||
include __DIR__ . '/../../views/agentes/importadores_activos.php';
|
include __DIR__ . '/../../views/agentes/importadores_activos.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function toggle_estado() {
|
function toggle_estado() {
|
||||||
|
|
||||||
|
|
||||||
@@ -252,6 +240,4 @@ function toggle_estado() {
|
|||||||
|
|
||||||
header("Location: /IMPORTADORES/agentes/activos");
|
header("Location: /IMPORTADORES/agentes/activos");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5,9 +5,34 @@ require_once __DIR__ . '/../helpers/crypto.php';
|
|||||||
|
|
||||||
function index()
|
function index()
|
||||||
{
|
{
|
||||||
|
$conn = getConnection();
|
||||||
|
|
||||||
|
$id_usuario = $_SESSION['usuario_id'] ?? null;
|
||||||
|
|
||||||
|
if (!$id_usuario) {
|
||||||
|
die("ID de usuario no disponible en la sesión.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM informacion_general WHERE id_usuario = ?";
|
||||||
|
$params = [$id_usuario];
|
||||||
|
|
||||||
|
$stmt = sqlsrv_query($conn, $sql, $params);
|
||||||
|
|
||||||
|
if ($stmt === false) {
|
||||||
|
die(print_r(sqlsrv_errors(), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
$datos = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC);
|
||||||
|
|
||||||
include __DIR__ . '/../../views/configuracion/dashboard_configuracion.php';
|
include __DIR__ . '/../../views/configuracion/dashboard_configuracion.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function editar()
|
||||||
|
{
|
||||||
|
include __DIR__ . '/../../views/configuracion/editar.php';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function automatizaciones()
|
function automatizaciones()
|
||||||
{
|
{
|
||||||
include __DIR__ . '/../../views/configuracion/automatizaciones.php';
|
include __DIR__ . '/../../views/configuracion/automatizaciones.php';
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ function validar()
|
|||||||
|
|
||||||
$emailEncrypted = encrypt($email);
|
$emailEncrypted = encrypt($email);
|
||||||
|
|
||||||
|
// Obtenemos el usuario
|
||||||
$sql = "SELECT id_usuario, nombre, email, password_hash, tipo_usuario, activo
|
$sql = "SELECT id_usuario, nombre, email, password_hash, tipo_usuario, activo
|
||||||
FROM usuarios_sistema
|
FROM usuarios_sistema WHERE email = ?";
|
||||||
WHERE email = ?";
|
|
||||||
$stmt = sqlsrv_query($conn, $sql, [$emailEncrypted]);
|
$stmt = sqlsrv_query($conn, $sql, [$emailEncrypted]);
|
||||||
|
|
||||||
if ($stmt && $row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
|
if ($stmt && $row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
|
||||||
@@ -54,6 +55,38 @@ function validar()
|
|||||||
|
|
||||||
registrarBitacora($conn, $row['id_usuario'], $email, $ip, 1, 'Login exitoso');
|
registrarBitacora($conn, $row['id_usuario'], $email, $ip, 1, 'Login exitoso');
|
||||||
|
|
||||||
|
// Buscar RFC y teléfono desde solicitudes_importadores
|
||||||
|
$sqlSolicitudes = "SELECT rfc, phone FROM solicitudes_importadores WHERE email = ?";
|
||||||
|
$stmtSolicitudes = sqlsrv_query($conn, $sqlSolicitudes, [$email]);
|
||||||
|
|
||||||
|
if ($stmtSolicitudes && $solRow = sqlsrv_fetch_array($stmtSolicitudes, SQLSRV_FETCH_ASSOC)) {
|
||||||
|
// Desencriptar RFC
|
||||||
|
$rfc = strtoupper(decrypt(trim($solRow['rfc'])));
|
||||||
|
|
||||||
|
// Validar teléfono (ej. 123 4567890)
|
||||||
|
$telefono = trim($solRow['phone']);
|
||||||
|
if (!preg_match('/^\d{3}\s\d{7}$/', $telefono)) {
|
||||||
|
$telefono = null; // o puedes dejarlo como ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$nombreUsuario = decrypt($row['nombre']);
|
||||||
|
|
||||||
|
$sqlCheck = "SELECT COUNT(*) AS total FROM informacion_general WHERE id_usuario = ?";
|
||||||
|
$stmtCheck = sqlsrv_query($conn, $sqlCheck, [$row['id_usuario']]);
|
||||||
|
$checkRow = sqlsrv_fetch_array($stmtCheck, SQLSRV_FETCH_ASSOC);
|
||||||
|
|
||||||
|
if ($checkRow['total'] == 0) {
|
||||||
|
$sqlInsert = "INSERT INTO informacion_general (id_usuario, nombre, rfc, telefono, correo)
|
||||||
|
VALUES (?, ?, ?, ?, ?)";
|
||||||
|
$paramsInsert = [$row['id_usuario'], $nombreUsuario, $rfc, $telefono, $email];
|
||||||
|
sqlsrv_query($conn, $sqlInsert, $paramsInsert);
|
||||||
|
} else {
|
||||||
|
$sqlUpdate = "UPDATE informacion_general SET rfc = ?, telefono = ? WHERE id_usuario = ?";
|
||||||
|
$paramsUpdate = [$rfc, $telefono, $row['id_usuario']];
|
||||||
|
sqlsrv_query($conn, $sqlUpdate, $paramsUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
// Redirección por rol
|
// Redirección por rol
|
||||||
if ($row['tipo_usuario'] === 'importador') {
|
if ($row['tipo_usuario'] === 'importador') {
|
||||||
header('Location: /IMPORTADORES/importadores/dashboard');
|
header('Location: /IMPORTADORES/importadores/dashboard');
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||||
|
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use PHPMailer\PHPMailer\Exception;
|
use PHPMailer\PHPMailer\Exception;
|
||||||
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../../config/database.php';
|
require_once __DIR__ . '/../../config/database.php';
|
||||||
|
|
||||||
function index() {
|
function index() {
|
||||||
include __DIR__ . '/../../views/registro/form.php';
|
include __DIR__ . '/../../views/registro/form.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../helpers/crypto.php';
|
require_once __DIR__ . '/../helpers/crypto.php';
|
||||||
|
|
||||||
require_once __DIR__ . '/../helpers/env.php';
|
require_once __DIR__ . '/../helpers/env.php';
|
||||||
loadEnv();
|
loadEnv();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function enviar() {
|
function enviar() {
|
||||||
// Validar reCAPTCHA
|
// Validar reCAPTCHA
|
||||||
$captchaResponse = $_POST['g-recaptcha-response'] ?? '';
|
$captchaResponse = $_POST['g-recaptcha-response'] ?? '';
|
||||||
@@ -82,7 +75,6 @@ function enviar() {
|
|||||||
die("❌ Archivo inválido. Solo se permiten PDFs.");
|
die("❌ Archivo inválido. Solo se permiten PDFs.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Guardar archivo
|
// Guardar archivo
|
||||||
$nombreArchivo = uniqid() . '_' . basename($archivo['name']);
|
$nombreArchivo = uniqid() . '_' . basename($archivo['name']);
|
||||||
$rutaDestino = __DIR__ . '/../../storage/opiniones/' . $nombreArchivo;
|
$rutaDestino = __DIR__ . '/../../storage/opiniones/' . $nombreArchivo;
|
||||||
@@ -98,32 +90,32 @@ function enviar() {
|
|||||||
|
|
||||||
if ($stmt === false) {
|
if ($stmt === false) {
|
||||||
die(print_r(sqlsrv_errors(), true));
|
die(print_r(sqlsrv_errors(), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$mail = new PHPMailer(true);
|
$mail = new PHPMailer(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Configuración SMTP
|
// Configuración SMTP
|
||||||
$mail->isSMTP();
|
$mail->isSMTP();
|
||||||
$mail->Host = 'secure.emailsrvr.com';
|
$mail->Host = 'secure.emailsrvr.com';
|
||||||
$mail->SMTPAuth = true;
|
$mail->SMTPAuth = true;
|
||||||
$mail->Username = 'noreply@aduanasoft.com.mx';
|
$mail->Username = 'noreply@aduanasoft.com.mx';
|
||||||
$mail->Password = $_ENV['SMTP_PASS']; // desde el .env
|
$mail->Password = $_ENV['SMTP_PASS']; // desde el .env
|
||||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||||
$mail->Port = 587;
|
$mail->Port = 587;
|
||||||
|
|
||||||
// Correo remitente y destinatario
|
// Correo remitente y destinatario
|
||||||
$mail->setFrom('noreply@aduanasoft.com.mx', 'SIIH | AduanaSoft');
|
$mail->setFrom('noreply@aduanasoft.com.mx', 'SIIH | AduanaSoft');
|
||||||
$mail->addAddress($email); // destinatario principal
|
$mail->addAddress($email); // destinatario principal
|
||||||
|
|
||||||
// Formato y contenido
|
// Formato y contenido
|
||||||
$mail->CharSet = 'UTF-8';
|
$mail->CharSet = 'UTF-8';
|
||||||
$mail->isHTML(true);
|
$mail->isHTML(true);
|
||||||
$mail->Subject = 'Confirmación de solicitud de registro | SIIH';
|
$mail->Subject = 'Confirmación de solicitud de registro | SIIH';
|
||||||
|
|
||||||
$fechaRegistro = date('d/m/Y H:i');
|
$fechaRegistro = date('d/m/Y H:i');
|
||||||
// Consulta configuración institucional
|
|
||||||
|
// Consulta configuración institucional
|
||||||
$sqlConf = "SELECT TOP 1 * FROM configuracion_sistema";
|
$sqlConf = "SELECT TOP 1 * FROM configuracion_sistema";
|
||||||
$stmtConf = sqlsrv_query($conn, $sqlConf);
|
$stmtConf = sqlsrv_query($conn, $sqlConf);
|
||||||
$conf = sqlsrv_fetch_array($stmtConf, SQLSRV_FETCH_ASSOC);
|
$conf = sqlsrv_fetch_array($stmtConf, SQLSRV_FETCH_ASSOC);
|
||||||
@@ -134,43 +126,41 @@ try {
|
|||||||
$color1 = explode(',', $conf['colores_primarios'] ?? '#003366,#0055A5')[0];
|
$color1 = explode(',', $conf['colores_primarios'] ?? '#003366,#0055A5')[0];
|
||||||
$color2 = explode(',', $conf['colores_primarios'] ?? '#003366,#0055A5')[1];
|
$color2 = explode(',', $conf['colores_primarios'] ?? '#003366,#0055A5')[1];
|
||||||
|
|
||||||
$mail->Body = "
|
$mail->Body = "
|
||||||
<div style='font-family: Segoe UI, sans-serif; background-color: #f4f6f9; padding: 40px;'>
|
<div style='font-family: Segoe UI, sans-serif; background-color: #f4f6f9; padding: 40px;'>
|
||||||
<div style='max-width: 600px; margin: auto; background: #fff; border: 1px solid #ddd; border-radius: 10px; overflow: hidden;'>
|
<div style='max-width: 600px; margin: auto; background: #fff; border: 1px solid #ddd; border-radius: 10px; overflow: hidden;'>
|
||||||
<div style='background: linear-gradient(to right, #FFF, $color2); padding: 20px; text-align: center;'>
|
<div style='background: linear-gradient(to right, #FFF, $color2); padding: 20px; text-align: center;'>
|
||||||
<img src='http://{$_SERVER['HTTP_HOST']}/IMPORTADORES/public/$logoUrl' alt='Logo $siglas' style='height: 140px;'>
|
<img src='http://{$_SERVER['HTTP_HOST']}/IMPORTADORES/public/$logoUrl' alt='Logo $siglas' style='height: 140px;'>
|
||||||
<h2 style='color: #fff; margin-top: 10px;'>Confirmación de Registro</h2>
|
<h2 style='color: #fff; margin-top: 10px;'>Confirmación de Registro</h2>
|
||||||
|
</div>
|
||||||
|
<div style='padding: 30px; color: #333;'>
|
||||||
|
<p style='font-size: 16px;'>¡Hola!</p>
|
||||||
|
<p style='font-size: 15px;'>Tu solicitud de registro ha sido recibida exitosamente en <strong>$nombrePlataforma</strong>.</p>
|
||||||
|
|
||||||
|
<hr style='margin: 20px 0;'>
|
||||||
|
|
||||||
|
<p><strong>📋 Empresa:</strong> " . htmlspecialchars($_POST['company_name']) . "</p>
|
||||||
|
<p><strong>📞 Teléfono:</strong> " . htmlspecialchars($telefono) . "</p>
|
||||||
|
<p><strong>🕓 Fecha de registro:</strong> $fechaRegistro</p>
|
||||||
|
|
||||||
|
<hr style='margin: 20px 0;'>
|
||||||
|
|
||||||
|
<p style='font-size: 14px;'>Un agente aduanal revisará tu información y te notificará por este medio cuando tu solicitud sea aprobada.</p>
|
||||||
|
<p style='font-size: 14px;'>Por favor, mantente atento a tu correo (y revisa también tu carpeta de spam o promociones).</p>
|
||||||
|
|
||||||
|
<p style='margin-top: 30px; font-size: 13px; color: #888;'>Este es un mensaje automático enviado por el sistema de registro de importadores.</p>
|
||||||
|
</div>
|
||||||
|
<div style='background: #f1f1f1; text-align: center; padding: 15px; font-size: 12px; color: #666;'>
|
||||||
|
© " . date('Y') . " $siglas · Desarrollado por AduanaSoft
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style='padding: 30px; color: #333;'>
|
|
||||||
<p style='font-size: 16px;'>¡Hola!</p>
|
|
||||||
<p style='font-size: 15px;'>Tu solicitud de registro ha sido recibida exitosamente en <strong>$nombrePlataforma</strong>.</p>
|
|
||||||
|
|
||||||
<hr style='margin: 20px 0;'>
|
|
||||||
|
|
||||||
<p><strong>📋 Empresa:</strong> " . htmlspecialchars($_POST['company_name']) . "</p>
|
|
||||||
<p><strong>📞 Teléfono:</strong> " . htmlspecialchars($telefono) . "</p>
|
|
||||||
<p><strong>🕓 Fecha de registro:</strong> $fechaRegistro</p>
|
|
||||||
|
|
||||||
<hr style='margin: 20px 0;'>
|
|
||||||
|
|
||||||
<p style='font-size: 14px;'>Un agente aduanal revisará tu información y te notificará por este medio cuando tu solicitud sea aprobada.</p>
|
|
||||||
<p style='font-size: 14px;'>Por favor, mantente atento a tu correo (y revisa también tu carpeta de spam o promociones).</p>
|
|
||||||
|
|
||||||
<p style='margin-top: 30px; font-size: 13px; color: #888;'>Este es un mensaje automático enviado por el sistema de registro de importadores.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div style='background: #f1f1f1; text-align: center; padding: 15px; font-size: 12px; color: #666;'>
|
";
|
||||||
© " . date('Y') . " $siglas · Desarrollado por AduanaSoft
|
|
||||||
</div>
|
$mail->send();
|
||||||
</div>
|
} catch (Exception $e) {
|
||||||
</div>
|
error_log("Error al enviar correo: {$mail->ErrorInfo}");
|
||||||
";
|
}
|
||||||
|
|
||||||
$mail->send();
|
|
||||||
} catch (Exception $e) {
|
|
||||||
error_log("Error al enviar correo: {$mail->ErrorInfo}");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include __DIR__ . '/../../views/registro/gracias.php';
|
include __DIR__ . '/../../views/registro/gracias.php';
|
||||||
}
|
}
|
||||||
23
informacion_general.txt
Normal file
23
informacion_general.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
CREATE TABLE informacion_general (
|
||||||
|
id_info INT PRIMARY KEY IDENTITY,
|
||||||
|
id_usuario INT,
|
||||||
|
clave VARCHAR(100),
|
||||||
|
tipo_identificador VARCHAR(100),
|
||||||
|
nombre NVARCHAR(255),
|
||||||
|
rfc NVARCHAR(13),
|
||||||
|
curp VARCHAR(18),
|
||||||
|
calle NVARCHAR(255),
|
||||||
|
num_exterior VARCHAR(20),
|
||||||
|
num_interior VARCHAR(20),
|
||||||
|
ciudad NVARCHAR(100),
|
||||||
|
colonia NVARCHAR(100),
|
||||||
|
pais NVARCHAR(100),
|
||||||
|
codigo_postal VARCHAR(10),
|
||||||
|
municipio NVARCHAR(100),
|
||||||
|
estado NVARCHAR(100),
|
||||||
|
telefono VARCHAR(50),
|
||||||
|
fax VARCHAR(50),
|
||||||
|
correo NVARCHAR(100),
|
||||||
|
observaciones TEXT,
|
||||||
|
FOREIGN KEY (id_usuario) REFERENCES usuarios_sistema(id_usuario)
|
||||||
|
);
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
include __DIR__ . '/../partials/sidebar_configuracion.php';
|
include __DIR__ . '/../partials/sidebar_configuracion.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
<head>
|
<head>
|
||||||
@@ -86,132 +87,134 @@ include __DIR__ . '/../partials/sidebar_configuracion.php';
|
|||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<label class="col-md-2 col-form-label">Clave:</label>
|
<label class="col-md-2 col-form-label">Clave:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['clave'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
<label class="col-md-2 col-form-label">Tipo de identificador:</label>
|
<label class="col-md-2 col-form-label">Tipo de identificador:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['tipo_identificador'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Nombre:</label>
|
<label class="col-md-2 col-form-label">Nombre:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="text" class="form-control">
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['nombre'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">RFC:</label>
|
<label class="col-md-2 col-form-label">RFC:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['rfc'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
<label class="col-md-1 col-form-label">CURP:</label>
|
<label class="col-md-1 col-form-label">CURP:</label>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['curp'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Calle:</label>
|
<label class="col-md-2 col-form-label">Calle:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['calle'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Núm. Exterior:</label>
|
<label class="col-md-2 col-form-label">Núm. Exterior:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['num_exterior'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4"></div>
|
<div class="col-md-4"></div>
|
||||||
|
|
||||||
<label class="col-md-2 col-form-label">Núm. Interior:</label>
|
<label class="col-md-2 col-form-label">Núm. Interior:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['num_interior'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Ciudad / Localidad:</label>
|
<label class="col-md-2 col-form-label">Ciudad / Localidad:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['ciudad'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
<label class="col-md-1 col-form-label">Colonia:</label>
|
<label class="col-md-1 col-form-label">Colonia:</label>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['colonia'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">País:</label>
|
<label class="col-md-2 col-form-label">País:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['pais'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3"></div>
|
<div class="col-md-3"></div>
|
||||||
|
|
||||||
<label class="col-md-2 col-form-label">Código Postal:</label>
|
<label class="col-md-2 col-form-label">Código Postal:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['codigo_postal'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Municipio:</label>
|
<label class="col-md-2 col-form-label">Municipio:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['municipio'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
<label class="col-md-1 col-form-label">Estado:</label>
|
<label class="col-md-1 col-form-label">Estado:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['estado'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Teléfonos:</label>
|
<label class="col-md-2 col-form-label">Teléfono:</label>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['telefono'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
<label class="col-md-1 col-form-label">Fax:</label>
|
<label class="col-md-1 col-form-label">Fax:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" class="form-control" value="" readonly>
|
<input type="text" class="form-control" value="<?= htmlspecialchars($datos['fax'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Correo:</label>
|
<label class="col-md-2 col-form-label">Correo:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="email" class="form-control" value="" readonly>
|
<input type="email" class="form-control" value="<?= htmlspecialchars($datos['correo'] ?? '') ?>" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-md-2 col-form-label">Observaciones:</label>
|
<label class="col-md-2 col-form-label">Observaciones:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<textarea class="form-control" rows="3" readonly></textarea>
|
<textarea class="form-control" rows="3" readonly><?= htmlspecialchars($datos['observaciones'] ?? '') ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex; justify-content: right;">
|
||||||
|
<a href="/IMPORTADORES/configuracion/editar" class="btn btn-success mb-3">✏️ Editar Información</a>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
221
views/configuracion/editar.php
Normal file
221
views/configuracion/editar.php
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
<?php
|
||||||
|
include __DIR__ . '/../partials/sidebar_configuracion.php';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Dashboard | Configuración</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Segoe UI', sans-serif;
|
||||||
|
background-color: #f4f6f9;
|
||||||
|
}
|
||||||
|
.sidebar {
|
||||||
|
width: 220px;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #343a40;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
padding-top: 56px; /* Alineado con la altura de la navbar */
|
||||||
|
z-index: 1040; /* Asegura que esté por encima del contenido */
|
||||||
|
}
|
||||||
|
.sidebar .nav-link {
|
||||||
|
font-weight: bold;
|
||||||
|
color: white;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
.sidebar .nav-link:hover,
|
||||||
|
.sidebar .nav-link.active {
|
||||||
|
background-color: #495057;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
margin-top: 56px; /* Ajusta debajo de navbar */
|
||||||
|
padding: 40px 20px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: #f4f6f9; /* Asegura fondo uniforme */
|
||||||
|
transition: margin-left 0.3s ease;
|
||||||
|
}
|
||||||
|
.navbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1050;
|
||||||
|
}
|
||||||
|
/* A partir de dispositivos medianos (>=768px), deja espacio lateral */
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.content {
|
||||||
|
margin-left: 250px; /* Ancho del sidebar */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* En móviles, sin margen lateral */
|
||||||
|
@media (max-width: 767.98px) {
|
||||||
|
.content {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
.sidebar .nav-link {
|
||||||
|
font-weight: normal;
|
||||||
|
color: #343a40;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.sidebar .nav-link:hover,
|
||||||
|
.sidebar .nav-link.active {
|
||||||
|
background-color: #e9ecef;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
label {font-weight: bold;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<h4 class="mb-4">✏️ Editar Información</h4>
|
||||||
|
<div class="card shadow-sm p-4 mb-4 bg-white">
|
||||||
|
<form>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<label class="col-md-2 col-form-label">Clave:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
|
<label class="col-md-2 col-form-label">Tipo de identificador:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Nombre:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">RFC:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
|
<label class="col-md-1 col-form-label">CURP:</label>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<input type="text" class="form-control" value="" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Calle:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Núm. Exterior:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4"></div>
|
||||||
|
|
||||||
|
<label class="col-md-2 col-form-label">Núm. Interior:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Ciudad / Localidad:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
|
<label class="col-md-1 col-form-label">Colonia:</label>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">País:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
|
||||||
|
<label class="col-md-2 col-form-label">Código Postal:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Municipio:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
|
<label class="col-md-1 col-form-label">Estado:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Teléfono:</label>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
|
<label class="col-md-1 col-form-label">Fax:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Correo:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<input type="email" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-md-2 col-form-label">Observaciones:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<textarea class="form-control" rows="3"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; justify-content: right;">
|
||||||
|
<button type="submit" class="btn btn-primary">💾 Guardar Cambios</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user