[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: print.php
<?php require_once '../config/database.php'; require_once '../config/functions.php'; requireAuth(); // Allow all authenticated users $payment_id = $_GET['id'] ?? ''; if (!$payment_id) { header("Location: /dashboard.php"); exit; } // Get payment details $stmt = $pdo->prepare(" SELECT p.*, c.name as client_name, c.phone as client_phone, u.full_name as representative_name FROM payments p JOIN clients c ON p.client_id = c.id JOIN users u ON p.representative_id = u.id WHERE p.id = ? "); $stmt->execute([$payment_id]); $payment = $stmt->fetch(); if (!$payment) { header("Location: /financial/transactions.php?error=payment_not_found"); exit; } ?> <!DOCTYPE html> <html lang="ar" dir="rtl"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>طباعة إيصال <?= htmlspecialchars($payment['receipt_number']) ?></title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.rtl.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"> <style> @media print { .no-print { display: none !important; } body { margin: 0; padding: 0; } } .thermal-width { max-width: 320px; margin: 0 auto; font-family: 'Courier New', monospace; } .thermal-header { text-align: center; border-bottom: 2px dashed #333; padding-bottom: 10px; margin-bottom: 15px; } .thermal-line { border-top: 1px dashed #ccc; margin: 10px 0; } .thermal-footer { text-align: center; border-top: 2px dashed #333; padding-top: 10px; margin-top: 15px; } .thermal-meta { display: flex; justify-content: space-between; margin: 5px 0; font-size: 13px; } .thermal-amount { text-align: center; font-size: 18px; font-weight: bold; margin: 15px 0; padding: 10px; border: 2px solid #333; } </style> </head> <body class="bg-light"> <div class="container-fluid mt-4"> <!-- Action buttons --> <div class="row no-print mb-4"> <div class="col-12 text-center"> <button class="btn btn-primary btn-lg me-3" onclick="window.print()"> <i class="fas fa-print me-2"></i>طباعة الإيصال </button> <a href="/dashboard.php" class="btn btn-success btn-lg me-3"> <i class="fas fa-home me-2"></i>العودة للرئيسية </a> <a href="/payments/create.php" class="btn btn-info btn-lg"> <i class="fas fa-plus me-2"></i>دفعة جديدة </a> </div> </div> <!-- Thermal Receipt --> <div class="thermal-width bg-white p-3 shadow rounded"> <!-- Header --> <div class="thermal-header"> <h4 class="mb-1">حسابات عربية بن فريش</h4> <h5 class="mb-0">إيصال استلام</h5> </div> <!-- Meta Information --> <div class="thermal-meta"> <span>رقم الإيصال:</span> <span><?= htmlspecialchars($payment['receipt_number']) ?></span> </div> <div class="thermal-meta"> <span>التاريخ:</span> <span><?= date('Y-m-d H:i', strtotime($payment['created_at'])) ?></span> </div> <div class="thermal-meta"> <span>المندوب:</span> <span><?= htmlspecialchars($payment['representative_name']) ?></span> </div> <div class="thermal-meta"> <span>العميل:</span> <span><?= htmlspecialchars($payment['client_name']) ?></span> </div> <div class="thermal-meta"> <span>الهاتف:</span> <span><?= htmlspecialchars($payment['client_phone']) ?></span> </div> <!-- Amount --> <div class="thermal-amount"> المبلغ المستلم<br> <?= formatCurrency($payment['amount']) ?> </div> <div class="thermal-line"></div> <!-- Balance Information --> <div class="thermal-meta"> <span>الرصيد السابق:</span> <span><?= formatCurrency($payment['previous_balance']) ?></span> </div> <div class="thermal-meta"> <span>المبلغ المدفوع:</span> <span><?= formatCurrency($payment['amount']) ?></span> </div> <div class="thermal-meta"> <span><strong>الرصيد الحالي:</strong></span> <span><strong><?= formatCurrency($payment['new_balance']) ?></strong></span> </div> <!-- Footer --> <div class="thermal-footer"> <p class="mb-1"><strong>شكراً لتعاملكم معنا</strong></p> <p class="mb-0"><small>للاستفسار: اتصل بالمندوب</small></p> </div> </div> <!-- WhatsApp Share --> <div class="row no-print mt-4"> <div class="col-12 text-center"> <?php if (hasRole('accountant')): ?> <a href="<?= generatePaymentWhatsAppURL($payment, $payment['client_phone']) ?>" target="_blank" class="btn btn-success btn-lg"> <i class="fab fa-whatsapp me-2"></i>إرسال عبر واتساب </a> <?php endif; ?> </div> </div> </div> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285