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 /
assets /
js /
Delete
Unzip
Name
Size
Permission
Date
Action
main.js
6.2
KB
-rw-r--r--
2025-11-13 19:12
Save
Rename
// Car Owner Management System - Main JavaScript document.addEventListener('DOMContentLoaded', function() { // Initialize tooltips var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl); }); // Initialize popovers var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')); var popoverList = popoverTriggerList.map(function (popoverTriggerEl) { return new bootstrap.Popover(popoverTriggerEl); }); // Auto-hide alerts after 5 seconds setTimeout(function() { var alerts = document.querySelectorAll('.alert:not(.alert-permanent)'); alerts.forEach(function(alert) { var bsAlert = new bootstrap.Alert(alert); bsAlert.close(); }); }, 5000); // Form validation var forms = document.querySelectorAll('.needs-validation'); Array.prototype.slice.call(forms).forEach(function(form) { form.addEventListener('submit', function(event) { if (!form.checkValidity()) { event.preventDefault(); event.stopPropagation(); } form.classList.add('was-validated'); }, false); }); // File upload preview handleFileUploads(); // Confirm dialogs handleConfirmDialogs(); // Application step navigation handleStepNavigation(); }); function handleFileUploads() { var fileInputs = document.querySelectorAll('input[type="file"]'); fileInputs.forEach(function(input) { input.addEventListener('change', function(e) { var file = e.target.files[0]; if (file) { var reader = new FileReader(); reader.onload = function(e) { var preview = document.getElementById(input.id + '_preview'); if (preview) { preview.src = e.target.result; preview.style.display = 'block'; } }; reader.readAsDataURL(file); // Update label text var label = document.querySelector('label[for="' + input.id + '"]'); if (label) { label.textContent = file.name; } } }); }); } function handleConfirmDialogs() { var confirmButtons = document.querySelectorAll('[data-confirm]'); confirmButtons.forEach(function(button) { button.addEventListener('click', function(e) { var message = button.getAttribute('data-confirm'); if (!confirm(message)) { e.preventDefault(); return false; } }); }); } function handleStepNavigation() { var stepButtons = document.querySelectorAll('.step-nav'); stepButtons.forEach(function(button) { button.addEventListener('click', function(e) { var targetStep = button.getAttribute('data-step'); showStep(targetStep); }); }); } function showStep(stepNumber) { // Hide all steps var steps = document.querySelectorAll('.application-step'); steps.forEach(function(step) { step.style.display = 'none'; }); // Show target step var targetStep = document.getElementById('step-' + stepNumber); if (targetStep) { targetStep.style.display = 'block'; } // Update step indicators updateStepIndicators(stepNumber); } function updateStepIndicators(currentStep) { var indicators = document.querySelectorAll('.step'); indicators.forEach(function(indicator, index) { var stepNum = index + 1; indicator.classList.remove('active', 'completed'); if (stepNum < currentStep) { indicator.classList.add('completed'); } else if (stepNum == currentStep) { indicator.classList.add('active'); } }); } function validateStep(stepNumber) { var step = document.getElementById('step-' + stepNumber); if (!step) return false; var requiredFields = step.querySelectorAll('[required]'); var isValid = true; requiredFields.forEach(function(field) { if (!field.value.trim()) { field.classList.add('is-invalid'); isValid = false; } else { field.classList.remove('is-invalid'); } }); return isValid; } function nextStep(currentStep) { if (validateStep(currentStep)) { showStep(currentStep + 1); } else { showAlert('Please fill in all required fields.', 'danger'); } } function prevStep(currentStep) { showStep(currentStep - 1); } function showAlert(message, type = 'info') { var alertHtml = ` <div class="alert alert-${type} alert-dismissible fade show" role="alert"> ${message} <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> `; var alertContainer = document.getElementById('alert-container'); if (alertContainer) { alertContainer.innerHTML = alertHtml; } } function formatCurrency(amount) { return 'PKR ' + amount.toLocaleString(); } function copyToClipboard(text) { navigator.clipboard.writeText(text).then(function() { showAlert('Copied to clipboard!', 'success'); }); } // AJAX helper function function makeRequest(url, method = 'GET', data = null) { return fetch(url, { method: method, headers: { 'Content-Type': 'application/json', 'X-Requested-With': 'XMLHttpRequest' }, body: data ? JSON.stringify(data) : null }) .then(response => response.json()) .catch(error => { console.error('Request failed:', error); showAlert('An error occurred. Please try again.', 'danger'); }); } // Loading state management function showLoading(element) { element.disabled = true; element.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>Loading...'; } function hideLoading(element, originalText) { element.disabled = false; element.innerHTML = originalText; }