One Hat Cyber Team
Your IP :
216.73.216.55
Server IP :
5.189.175.239
Server :
Linux panel.gemx-ai.com 5.14.0-570.19.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 4 04:00:24 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
farmersapp
/
loans.farmersapp.store
/
includes
/
View File Name :
footer.php
<?php /** * Footer Template * Farmers Loan Management System */ ?> <?php if (isLoggedIn()): ?> </main> <!-- Close main container --> <!-- Footer --> <footer class="footer mt-auto py-3 bg-light border-top"> <div class="container-fluid"> <div class="row align-items-center"> <div class="col-md-6"> <span class="text-muted"> © <?php echo date('Y'); ?> <?php echo APP_NAME; ?>. All rights reserved. </span> </div> <div class="col-md-6 text-end"> <span class="text-muted"> <i class="fas fa-database me-1"></i> <?php try { $db = Database::getInstance(); $version = $db->getVersion(); echo "MySQL " . explode('-', $version)[0]; } catch (Exception $e) { echo "Database Connected"; } ?> | <i class="fas fa-server me-1"></i> PHP <?php echo PHP_VERSION; ?> | <i class="fas fa-clock me-1"></i> <?php echo round(microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'], 3); ?>s </span> </div> </div> </div> </footer> </div> <!-- Close content --> </div> <!-- Close wrapper --> <?php else: ?> </div> <!-- Close public-layout --> <?php endif; ?> <!-- Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <!-- DataTables --> <script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script> <!-- Select2 --> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <!-- Flatpickr --> <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script> <!-- Chart.js --> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <!-- Custom JavaScript --> <script src="<?php echo ASSETS_URL; ?>/js/main.js"></script> <!-- Page-specific JavaScript --> <?php if (isset($page_js)): ?> <script src="<?php echo ASSETS_URL; ?>/js/<?php echo $page_js; ?>"></script> <?php endif; ?> <!-- Initialize components --> <script> 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); }); // Initialize DataTables $('.datatable').DataTable({ responsive: true, pageLength: 25, language: { search: "_INPUT_", searchPlaceholder: "Search..." } }); // Initialize Select2 $('.select2').select2({ theme: 'bootstrap-5', width: '100%' }); // Initialize date pickers $('.datepicker').flatpickr({ dateFormat: "Y-m-d", allowInput: true }); // Initialize datetime pickers $('.datetimepicker').flatpickr({ enableTime: true, dateFormat: "Y-m-d H:i", allowInput: true }); // Sidebar toggle $('#sidebarToggle').click(function() { $('#sidebar').toggleClass('active'); $('#content').toggleClass('active'); }); // Theme toggle $('.theme-toggle').click(function() { const currentTheme = document.documentElement.getAttribute('data-theme'); const newTheme = currentTheme === 'dark' ? 'light' : 'dark'; document.documentElement.setAttribute('data-theme', newTheme); document.cookie = `theme=${newTheme}; path=/; max-age=31536000`; const icon = $(this).find('i'); if (newTheme === 'dark') { icon.removeClass('fa-moon').addClass('fa-sun'); } else { icon.removeClass('fa-sun').addClass('fa-moon'); } // Dispatch theme change event const event = new CustomEvent('themeChange', { detail: { theme: newTheme } }); document.dispatchEvent(event); }); // Load notifications function loadNotifications() { $.ajax({ url: '/api/notifications', method: 'GET', success: function(response) { if (response.success && response.notifications.length > 0) { const notificationList = $('.notification-list'); notificationList.empty(); response.notifications.forEach(function(notification) { const notificationItem = ` <a href="${notification.url || '#'}" class="dropdown-item notification-item ${notification.is_read ? '' : 'unread'}"> <div class="d-flex w-100 justify-content-between"> <h6 class="mb-1">${notification.title}</h6> <small class="text-muted">${notification.time_ago}</small> </div> <p class="mb-1">${notification.message}</p> </a> `; notificationList.append(notificationItem); }); } } }); } // Load notifications on page load if ($('.notification-panel').length) { loadNotifications(); } // Auto-refresh notifications every 30 seconds setInterval(loadNotifications, 30000); // Handle form submissions with loading state $('form').on('submit', function() { const submitBtn = $(this).find('button[type="submit"]'); if (submitBtn.length) { submitBtn.prop('disabled', true); submitBtn.html('<i class="fas fa-spinner fa-spin me-2"></i> Processing...'); } }); // Handle AJAX errors globally $(document).ajaxError(function(event, jqxhr, settings, thrownError) { if (jqxhr.status === 401) { // Unauthorized - redirect to login window.location.href = '/login?redirect=' + encodeURIComponent(window.location.pathname); } else if (jqxhr.status === 403) { // Forbidden showToast('You do not have permission to perform this action', 'error'); } else if (jqxhr.status === 419) { // CSRF token mismatch showToast('Session expired. Please refresh the page.', 'error'); setTimeout(() => location.reload(), 2000); } else if (jqxhr.status === 422) { // Validation errors const errors = jqxhr.responseJSON?.errors; if (errors) { Object.keys(errors).forEach(field => { const input = $(`[name="${field}"]`); if (input.length) { input.addClass('is-invalid'); const feedback = input.next('.invalid-feedback'); if (feedback.length) { feedback.text(errors[field][0]); } else { input.after(`<div class="invalid-feedback">${errors[field][0]}</div>`); } } }); showToast('Please fix the errors in the form', 'error'); } } else if (jqxhr.status === 500) { // Server error showToast('An internal server error occurred. Please try again later.', 'error'); } }); // Global showToast function window.showToast = function(message, type = 'info', duration = 5000) { const toastContainer = $('.toast-container'); if (!toastContainer.length) { $('body').append('<div class="toast-container position-fixed top-0 end-0 p-3" style="z-index: 9999"></div>'); } const toastId = 'toast-' + Date.now(); const toast = $(` <div id="${toastId}" class="toast align-items-center text-bg-${type} border-0" role="alert" aria-live="assertive" aria-atomic="true"> <div class="d-flex"> <div class="toast-body"> ${message} </div> <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button> </div> </div> `); $('.toast-container').append(toast); const bsToast = new bootstrap.Toast(toast[0]); bsToast.show(); // Auto remove after duration setTimeout(() => { bsToast.hide(); setTimeout(() => toast.remove(), 300); }, duration); }; // Handle offline/online status window.addEventListener('online', function() { showToast('You are back online', 'success'); }); window.addEventListener('offline', function() { showToast('You are offline. Some features may not work.', 'warning'); }); // Prevent form resubmission on page refresh if (window.history.replaceState) { window.history.replaceState(null, null, window.location.href); } // Scroll to top button const scrollBtn = $('<button class="btn btn-primary scroll-to-top"><i class="fas fa-chevron-up"></i></button>'); $('body').append(scrollBtn); scrollBtn.click(function() { $('html, body').animate({ scrollTop: 0 }, 300); }); $(window).scroll(function() { if ($(this).scrollTop() > 300) { scrollBtn.fadeIn(); } else { scrollBtn.fadeOut(); } }); // Initialize performance monitoring if (typeof initPerformanceMonitor === 'function') { initPerformanceMonitor(); } }); </script> <!-- System Status Indicator --> <div class="system-status position-fixed bottom-0 start-0 p-2" style="z-index: 9998"> <div class="d-flex align-items-center"> <div class="status-indicator bg-success rounded-circle me-2" style="width: 8px; height: 8px;"></div> <small class="text-muted">System Online</small> </div> </div> <!-- Debug Information (Development Only) --> <?php if (defined('ENVIRONMENT') && ENVIRONMENT === 'development'): ?> <div class="debug-info position-fixed bottom-0 start-50 translate-middle-x p-2 bg-dark text-white rounded-top" style="z-index: 9997"> <small> Memory: <?php echo round(memory_get_usage(true) / 1024 / 1024, 2); ?>MB | Queries: <?php echo isset($GLOBALS['query_count']) ? $GLOBALS['query_count'] : 'N/A'; ?> | Time: <?php echo round(microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'], 3); ?>s </small> </div> <?php endif; ?> </body> </html> <?php // End output buffering and flush ob_end_flush(); ?>