Tul xxx Tul
User / IP
:
216.73.217.33
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
/
emprendo.com.co
/
public_html
/
ccyne
/
api
/
Viewing: generate-pdf.php
<?php require '../vendor/autoload.php'; use Dompdf\Dompdf; use Dompdf\Options; function getSpanishDate($dateStr = null) { $timestamp = $dateStr ? strtotime($dateStr) : time(); $months = [ 1 => 'enero', 2 => 'febrero', 3 => 'marzo', 4 => 'abril', 5 => 'mayo', 6 => 'junio', 7 => 'julio', 8 => 'agosto', 9 => 'septiembre', 10 => 'octubre', 11 => 'noviembre', 12 => 'diciembre' ]; $day = date('j', $timestamp); $monthNum = (int)date('n', $timestamp); $year = date('Y', $timestamp); return "Bogotá, $day de " . $months[$monthNum] . " de $year"; } function formatSpanishDateRange($start, $end) { if(!$start || !$end) return ''; $months = [ 1 => 'Enero', 2 => 'Febrero', 3 => 'Marzo', 4 => 'Abril', 5 => 'Mayo', 6 => 'Junio', 7 => 'Julio', 8 => 'Agosto', 9 => 'Septiembre', 10 => 'Octubre', 11 => 'Noviembre', 12 => 'Diciembre' ]; $startTimestamp = strtotime($start); $endTimestamp = strtotime($end); $startDay = date('j', $startTimestamp); $startMonth = (int)date('n', $startTimestamp); $startYear = date('Y', $startTimestamp); $endDay = date('j', $endTimestamp); $endMonth = (int)date('n', $endTimestamp); $endYear = date('Y', $endTimestamp); if ($startYear === $endYear) { if ($startMonth === $endMonth) { if ($startDay === $endDay) { return "el $startDay de " . $months[$startMonth] . " de $startYear"; } return "entre el $startDay y el $endDay de " . $months[$startMonth] . " de $startYear"; } return "entre el $startDay de " . $months[$startMonth] . " y el $endDay de " . $months[$endMonth] . " de $startYear"; } return "entre el $startDay de " . $months[$startMonth] . " de $startYear y el $endDay de " . $months[$endMonth] . " de $endYear"; } include 'db.php'; $slug = $_GET['slug']; // Fetch Account $query = $conn->query("SELECT * FROM accounts WHERE slug='$slug'"); $account = $query->fetch_assoc(); if(!$account) { die("Account not found"); } $id = $account['id']; $items = $conn->query("SELECT * FROM account_items WHERE account_id=$id"); $payments = $conn->query("SELECT * FROM payments WHERE account_id=$id"); // Fetch Settings $settings = []; $qSet = $conn->query("SELECT setting_key, setting_value FROM settings"); while($row = $qSet->fetch_assoc()){ $settings[$row['setting_key']] = $row['setting_value']; } $prestadorNombre = $settings['prestador_nombre'] ?? 'CyNe Producciones'; $prestadorDoc = $settings['prestador_doc'] ?? ''; $prestadorNit = $settings['prestador_nit'] ?? ''; $prestadorTel = $settings['prestador_tel'] ?? ''; $prestadorCorreo = $settings['prestador_correo'] ?? 'cyne@emprendo.com.co'; if (empty($prestadorCorreo) || $prestadorCorreo === 'nevin@emprendo.com.co') { $prestadorCorreo = 'cyne@emprendo.com.co'; } $prestadorDir = $settings['prestador_dir'] ?? ''; $bancos = []; if(isset($settings['bancos'])) { $decoded = json_decode($settings['bancos'], true); if(is_array($decoded)) { $bancos = $decoded; } else { $decodedStr = json_decode(stripslashes($settings['bancos']), true); if(is_array($decodedStr)) $bancos = $decodedStr; } } $firmaBase64 = $settings['firma'] ?? ''; $typeText = isset($account['type']) && $account['type'] == 'cotizacion' ? 'Cotización' : 'Cuenta de Cobro'; $docText = isset($account['type']) && $account['type'] == 'cotizacion' ? 'esta cotización' : 'esta cuenta de cobro'; // Fetch Logo locally to speed up generation massively $logoPath = '../assets/img/isologo.png'; $logoData = file_get_contents($logoPath); $logoBase64 = 'data:image/png;base64,' . base64_encode($logoData); $projectStart = !empty($account['start_date']) ? $account['start_date'] : date("Y-m-d", strtotime($account['created_at'])); $projectEnd = !empty($account['end_date']) ? $account['end_date'] : date("Y-m-d", strtotime($account['created_at'])); $dateRangeText = formatSpanishDateRange($projectStart, $projectEnd); $html = ' <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>'.$typeText.' - '.$account['customer_name'].'</title> <style> body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; color: #333; margin: 0; padding: 0; } .header-table { width: 100%; margin-bottom: 20px; } .header-table td { vertical-align: top; } .logo { width: 120px; } .provider-header { text-align: right; font-size: 12px; line-height: 1.5; } .doc-title { font-size: 24px; font-weight: bold; color: #000; margin-top: 10px; margin-bottom: 5px; } .doc-id { font-size: 14px; color: #000; font-weight: bold; } .customer-info { margin-bottom: 20px; } .customer-info strong { display: block; font-size: 14px; margin-bottom: 5px; } .customer-info p { margin: 0 0 5px 0; } .oath-paragraph { line-height: 1.6; text-align: justify; margin-bottom: 30px; } .items-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; } .items-table th { background: #333; color: #fff; padding: 10px; text-align: left; } .items-table th.text-right { text-align: right; } .items-table td { padding: 10px; border-bottom: 1px solid #eee; } .items-table td.text-right { text-align: right; } .totals-table { width: 100%; max-width: 300px; float: right; border-collapse: collapse; } .totals-table td { padding: 5px 10px; text-align: right; } .totals-table tr.total-row { font-weight: bold; font-size: 16px; color: #2e7d32; border-top: 1px solid #ddd; } .provider-details { margin-top: 60px; clear: both; } .provider-details h4 { color: #000; font-size: 14px; margin-bottom: 10px; text-transform: uppercase; } .provider-details p { margin: 2px 0; } .banks-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; margin-top: 10px; font-size: 12px; } .banks-table th { font-weight: bold; text-align: left; padding: 5px; } .banks-table td { padding: 5px; } .signature-section { margin-top: 50px; } .signature-img { max-height: 100px; display: block; margin-bottom: 5px; } .signature-line { border-top: 1px solid #000; width: 300px; margin-bottom: 5px; } .signature-text { font-size: 12px; } </style> </head> <body> <table class="header-table"> <tr> <td style="width: 50%;"> <img src="'.$logoBase64.'" class="logo"> <div class="doc-title">'.$typeText.'</div> <div class="doc-id">'.date("Ymd", strtotime($account['created_at'])).'-'.str_pad($account['id'], 4, '0', STR_PAD_LEFT).'</div> </td> <td class="provider-header"> '.$prestadorDir.'<br> https://emprendo.com.co/cyne/<br> '.$prestadorCorreo.'<br> (57) '.$prestadorTel.' </td> </tr> </table> <div class="customer-info"> <p>Señores</p> <strong>'.$account['customer_name'].'</strong> <p>NIT/CC: '.$account['doc_number'].'</p> </div> <div class="oath-paragraph"> Yo, <strong>'.$prestadorNombre.'</strong>, identificado con <strong>'.$prestadorDoc.'</strong> y registrado en el RUT con número <strong>'.$prestadorNit.'</strong>, me permito presentar la siguiente '.$docText.' por concepto de <strong>'.$account['notes'].'</strong>, realizado '.$dateRangeText.' en la ciudad de Bogotá. </div> <table class="items-table"> <thead> <tr> <th>Concepto / Detalle</th> <th class="text-right">Cantidad/Horas</th> <th class="text-right">Valor Unitario</th> <th class="text-right">Total</th> </tr> </thead> <tbody>'; $subtotal = 0; while($item = $items->fetch_assoc()) { $lineTotal = ($item['quantity'] * $item['unit_price']) - $item['discount_amount']; $subtotal += $lineTotal; $html .= '<tr> <td>'.$item['description'].'</td> <td class="text-right">'.number_format($item['quantity'], 2).'</td> <td class="text-right">$ '.number_format($item['unit_price'], 2).'</td> <td class="text-right">$ '.number_format($lineTotal, 2).'</td> </tr>'; } $html .= '</tbody> </table> <table class="totals-table"> <tr> <td>Subtotal:</td> <td>$ '.number_format($account['subtotal'], 2).'</td> </tr> <tr> <td>Descuento:</td> <td>$ '.number_format($account['discount_total'], 2).'</td> </tr> <tr class="total-row"> <td>Total:</td> <td>$ '.number_format($account['total'], 2).'</td> </tr> </table> <div class="provider-details"> <h4>Datos del Prestador del Servicio:</h4> <p><strong>Nombre:</strong> '.$prestadorNombre.'</p> <p><strong>Documento de identidad:</strong> '.$prestadorDoc.'</p> <p><strong>NIT:</strong> '.$prestadorNit.' / <strong>Teléfono:</strong> '.$prestadorTel.'</p> <p><strong>Correo electrónico:</strong> '.$prestadorCorreo.'</p> <p><strong>Dirección:</strong> '.$prestadorDir.'</p> </div> <div class="provider-details"> <h4>Forma de Pago:</h4> <table class="banks-table"> <thead> <tr> <th>Forma de pago</th> <th>Tipo de cuenta</th> <th>Entidad bancaria</th> <th>Número de cuenta</th> <th>A nombre de</th> </tr> </thead> <tbody>'; foreach($bancos as $banco) { $html .= '<tr> <td>Por consignación o transferencia</td> <td>'.$banco['tipo'].'</td> <td><strong>'.$banco['entidad'].'</strong></td> <td>'.$banco['numero'].'</td> <td>'.$banco['nombre'].'</td> </tr>'; } $html .= '</tbody> </table> </div> <div class="oath-paragraph" style="margin-top:20px;"> Declaro bajo la gravedad de juramento que los servicios aquí descritos fueron prestados efectivamente, y que los valores cobrados corresponden a lo pactado con la entidad. </div> <div class="signature-section"> <p>Atentamente,</p><br> '.($firmaBase64 ? '<img src="'.$firmaBase64.'" class="signature-img">' : '<br><br>').' <div class="signature-line"></div> <div class="signature-text"> '.$prestadorNombre.'<br> '.$prestadorDoc.'<br> '.getSpanishDate($account['created_at']).' </div> </div> </body> </html>'; $options = new Options(); $options->set('isRemoteEnabled', true); $dompdf = new Dompdf($options); $dompdf->loadHtml($html); $dompdf->setPaper('A4', 'portrait'); $dompdf->render(); $dompdf->stream("CyNe_".$typeText."_".$account['slug'].".pdf", ["Attachment" => false]); ?>
Coded With 💗 by
0x6ick