PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 131
0) { $backup_content .= "-- Dumping data for table `$table`\n"; while ($row = mysqli_fetch_row($result)) { $backup_content .= "INSERT INTO `$table` VALUES ("; foreach ($row as $key => $value) { if ($value === null) { $backup_content .= "NULL"; } else { $backup_content .= "'" . mysqli_real_escape_string($conn, $value) . "'"; } if ($key < (count($row) - 1)) { $backup_content .= ","; } } $backup_content .= ");\n"; } $backup_content .= "\n"; } } $backup_content .= "\nSET FOREIGN_KEY_CHECKS=1;\n"; // Write backup file if (file_put_contents($filename, $backup_content) === false) { throw new Exception("Failed to write backup file"); } // Create backup record in database $sql = "INSERT INTO backups (filename, created_by) VALUES (?, ?)"; $stmt = mysqli_prepare($conn, $sql); if (!$stmt) { throw new Exception("Failed to prepare statement: " . mysqli_error($conn)); } mysqli_stmt_bind_param($stmt, "si", $backup_filename, $_SESSION['user_id']); if (!mysqli_stmt_execute($stmt)) { throw new Exception("Failed to record backup in database: " . mysqli_error($conn)); } $success = "Backup created successfully"; logEvent('backup', "Created new database backup", 'info'); } catch (Exception $e) { if (isset($filename) && file_exists($filename)) { unlink($filename); } $error = $e->getMessage(); logEvent('backup', "Backup creation failed: " . $e->getMessage(), 'error'); } break; case 'restore_backup': try { $backup_id = (int)$_POST['backup_id']; // Get backup file $sql = "SELECT filename FROM backups WHERE id = ?"; $stmt = mysqli_prepare($conn, $sql); if (!$stmt) { throw new Exception("Failed to prepare statement: " . mysqli_error($conn)); } mysqli_stmt_bind_param($stmt, "i", $backup_id); if (!mysqli_stmt_execute($stmt)) { throw new Exception("Failed to execute statement: " . mysqli_error($conn)); } $result = mysqli_stmt_get_result($stmt); if (!$backup = mysqli_fetch_assoc($result)) { throw new Exception("Backup not found"); } $filename = $backup_dir . $backup['filename']; if (!file_exists($filename)) { throw new Exception("Backup file not found"); } // Read and execute backup file $sql = file_get_contents($filename); if ($sql === false) { throw new Exception("Failed to read backup file"); } mysqli_autocommit($conn, false); if (mysqli_multi_query($conn, $sql)) { do { if ($result = mysqli_store_result($conn)) { mysqli_free_result($result); } } while (mysqli_next_result($conn)); if (mysqli_error($conn)) { throw new Exception(mysqli_error($conn)); } mysqli_commit($conn); $success = "Database restored successfully"; logEvent('backup', "Database restored from backup", 'info'); } else { throw new Exception(mysqli_error($conn)); } } catch (Exception $e) { mysqli_rollback($conn); $error = "Failed to restore database: " . $e->getMessage(); logEvent('backup', "Restore failed: " . $e->getMessage(), 'error'); } finally { mysqli_autocommit($conn, true); } break; case 'delete_backup': try { $backup_id = (int)$_POST['backup_id']; // Get backup file $sql = "SELECT filename FROM backups WHERE id = ?"; $stmt = mysqli_prepare($conn, $sql); if (!$stmt) { throw new Exception("Failed to prepare statement: " . mysqli_error($conn)); } mysqli_stmt_bind_param($stmt, "i", $backup_id); if (!mysqli_stmt_execute($stmt)) { throw new Exception("Failed to execute statement: " . mysqli_error($conn)); } $result = mysqli_stmt_get_result($stmt); if (!$backup = mysqli_fetch_assoc($result)) { throw new Exception("Backup not found"); } $filename = $backup_dir . $backup['filename']; if (file_exists($filename) && !unlink($filename)) { throw new Exception("Failed to delete backup file"); } // Delete record from database $sql = "DELETE FROM backups WHERE id = ?"; $stmt = mysqli_prepare($conn, $sql); if (!$stmt) { throw new Exception("Failed to prepare statement: " . mysqli_error($conn)); } mysqli_stmt_bind_param($stmt, "i", $backup_id); if (!mysqli_stmt_execute($stmt)) { throw new Exception("Failed to delete backup record: " . mysqli_error($conn)); } $success = "Backup deleted successfully"; logEvent('backup', "Deleted backup: {$backup['filename']}", 'info'); } catch (Exception $e) { $error = $e->getMessage(); logEvent('backup', "Delete failed: " . $e->getMessage(), 'error'); } break; } } } // Get backups list with pagination $page = isset($_GET['page']) ? (int)$_GET['page'] : 1; $limit = 10; $offset = ($page - 1) * $limit; // Get total backups count $total_result = mysqli_query($conn, "SELECT COUNT(*) as total FROM backups"); if (!$total_result) { throw new Exception("Failed to get total backups count: " . mysqli_error($conn)); } $total_row = mysqli_fetch_assoc($total_result); $total_pages = ceil($total_row['total'] / $limit); // Get backups list $backups_query = "SELECT b.*, u.username as created_by_name FROM backups b LEFT JOIN users u ON b.created_by = u.id ORDER BY b.created_at DESC LIMIT ?, ?"; $stmt = mysqli_prepare($conn, $backups_query); if (!$stmt) { throw new Exception("Failed to prepare statement: " . mysqli_error($conn)); } mysqli_stmt_bind_param($stmt, "ii", $offset, $limit); if (!mysqli_stmt_execute($stmt)) { throw new Exception("Failed to execute statement: " . mysqli_error($conn)); } $backups = mysqli_stmt_get_result($stmt); $db_size = '0 MB'; // Default value $size_query = "SELECT SUM(data_length + index_length) AS total_size FROM information_schema.tables WHERE table_schema = ?"; $stmt = mysqli_prepare($conn, $size_query); if ($stmt) { mysqli_stmt_bind_param($stmt, "s", $dbname); // <- Ini penting! $dbname = DB_NAME; // Assign variabel dulu setelah bind_param if (mysqli_stmt_execute($stmt)) { mysqli_stmt_bind_result($stmt, $total_size); mysqli_stmt_fetch($stmt); $db_size = formatBytes($total_size); } mysqli_stmt_close($stmt); } // } catch (Exception $e) { // $error = $e->getMessage(); // logEvent('backup', "Error in backup page: " . $e->getMessage(), 'error'); // } // Prepare content $content = '
Database Information
Database Size

' . $db_size . '

Total Backups

' . $total_row['total'] . '

Last Backup

'; $last_backup = mysqli_fetch_assoc(mysqli_query($conn, "SELECT created_at FROM backups ORDER BY created_at DESC LIMIT 1")); $content .= $last_backup ? date('d/m/Y H:i', strtotime($last_backup['created_at'])) : 'Never'; $content .= '

Backup Schedule

Manual

Backup History
'; if ($backups && mysqli_num_rows($backups) > 0) { while ($backup = mysqli_fetch_assoc($backups)) { $file_path = '../backups/' . $backup['filename']; $file_size = file_exists($file_path) ? formatBytes(filesize($file_path)) : 'N/A'; $content .= ' '; } } else { $content .= ' '; } $content .= '
Backup Date File Name Size Created By Actions
' . date('d/m/Y H:i:s', strtotime($backup['created_at'])) . ' ' . htmlspecialchars($backup['filename']) . ' ' . $file_size . ' ' . htmlspecialchars($backup['created_by_name']) . '
No backups found

Create your first backup to protect your data

'; // Add pagination if needed if ($total_pages > 1) { $content .= ' '; } $content .= '
'; ?> <?php echo $pageTitle ?? 'Admin Panel'; ?> Travel Umroh