Linux spg1.cloudpowerdns.com 5.14.0-611.34.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 18 05:51:10 EST 2026 x86_64
LiteSpeed
Server IP : 176.9.63.151 & Your IP : 216.73.217.60
Domains :
Cant Read [ /etc/named.conf ]
User : fastear1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
fastear1 /
new.ads /
libs /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
email.php
15.43
KB
-rw-r--r--
2025-11-13 20:40
functions.php
4.2
KB
-rw-r--r--
2025-11-13 21:38
qrcode.php
5.18
KB
-rw-r--r--
2025-11-13 19:57
wp-blog-header.php
2.74
KB
-r--r--r--
2026-04-01 03:43
wp-cron.php
2.74
KB
-rw-r--r--
2026-04-01 03:43
Save
Rename
<?php // Utility Functions function sanitize($data) { if ($data === null) { return ''; } return htmlspecialchars(strip_tags(trim($data))); } function validateEmail($email) { return filter_var($email, FILTER_VALIDATE_EMAIL); } function generateCaptcha() { $num1 = rand(1, 20); $num2 = rand(1, 20); $_SESSION['captcha_answer'] = $num1 + $num2; return "$num1 + $num2 = ?"; } function verifyCaptcha($answer) { return isset($_SESSION['captcha_answer']) && (int)$answer === $_SESSION['captcha_answer']; } function hashPassword($password) { return password_hash($password, PASSWORD_DEFAULT); } function verifyPassword($password, $hash) { return password_verify($password, $hash); } function generateRandomString($length = 10) { return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length); } function uploadFile($file, $destination, $allowedTypes = ['jpg', 'jpeg', 'png', 'gif']) { if (!isset($file['tmp_name']) || empty($file['tmp_name'])) { return ['success' => false, 'message' => 'No file uploaded']; } $fileInfo = pathinfo($file['name']); $extension = strtolower($fileInfo['extension']); if (!in_array($extension, $allowedTypes)) { return ['success' => false, 'message' => 'Invalid file type']; } if ($file['size'] > MAX_FILE_SIZE) { return ['success' => false, 'message' => 'File too large']; } $fileName = generateRandomString(20) . '.' . $extension; $filePath = $destination . $fileName; if (move_uploaded_file($file['tmp_name'], $filePath)) { return ['success' => true, 'filename' => $fileName]; } return ['success' => false, 'message' => 'Upload failed']; } function redirect($url) { header("Location: $url"); exit(); } function setFlashMessage($type, $message) { $_SESSION['flash'][$type] = $message; } function getFlashMessage($type) { if (isset($_SESSION['flash'][$type])) { $message = $_SESSION['flash'][$type]; unset($_SESSION['flash'][$type]); return $message; } return null; } function isLoggedIn() { return isset($_SESSION['user_id']); } function isAdmin() { return isset($_SESSION['admin_id']); } function requireLogin() { if (!isLoggedIn()) { redirect(SITE_URL . '/login.php'); } } function requireAdmin() { if (!isAdmin()) { redirect(SITE_URL . '/admin/login.php'); } } function formatDate($date) { return date('M d, Y', strtotime($date)); } function formatDateTime($datetime) { return date('M d, Y h:i A', strtotime($datetime)); } function getVehiclePrice($vehicleType, $db) { $key = 'qr_price_' . strtolower($vehicleType); $result = $db->fetch("SELECT setting_value FROM settings WHERE setting_key = ?", [$key]); return $result ? (int)$result['setting_value'] : 0; } function sendEmail($to, $subject, $body, $isHTML = true) { // Use EmailNotification class if available if (class_exists('EmailNotification')) { // For basic emails, we'll use a simple template $headers = [ 'From: ' . (defined('FROM_NAME') ? FROM_NAME : 'Car Management System') . ' <' . (defined('FROM_EMAIL') ? FROM_EMAIL : 'noreply@localhost') . '>', 'Reply-To: ' . (defined('FROM_EMAIL') ? FROM_EMAIL : 'noreply@localhost'), 'Content-Type: ' . ($isHTML ? 'text/html' : 'text/plain') . '; charset=UTF-8', 'MIME-Version: 1.0' ]; // Handle mail server errors gracefully $result = @mail($to, $subject, $body, implode("\r\n", $headers)); if (!$result) { error_log("Email failed to send to: $to, Subject: $subject"); // For localhost development, return true to avoid breaking application if (strpos($_SERVER['HTTP_HOST'], 'localhost') !== false || strpos($_SERVER['HTTP_HOST'], '127.0.0.1') !== false) { error_log("Development mode: Email sending skipped for localhost"); return true; } } return $result; } // Fallback for basic functionality return true; } ?>