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
conn = $conn; $this->logger = Logger::getInstance(); } public static function getInstance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; } public function getSystemStatus() { try { $status = [ 'server' => $this->getServerInfo(), 'php' => $this->getPHPInfo(), 'database' => $this->getDatabaseInfo(), 'disk' => $this->getDiskInfo(), 'memory' => $this->getMemoryInfo(), 'performance' => $this->getPerformanceMetrics() ]; // Log system status check $this->logger->info("System status check completed"); return $status; } catch (Exception $e) { $this->logger->error("Failed to get system status: {message}", ['message' => $e->getMessage()]); throw $e; } } private function getServerInfo() { return [ 'os' => PHP_OS, 'server_software' => $_SERVER['SERVER_SOFTWARE'], 'server_name' => $_SERVER['SERVER_NAME'], 'server_addr' => $_SERVER['SERVER_ADDR'], 'server_port' => $_SERVER['SERVER_PORT'], 'document_root' => $_SERVER['DOCUMENT_ROOT'], 'server_protocol' => $_SERVER['SERVER_PROTOCOL'], 'https' => isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on', 'time' => date('Y-m-d H:i:s'), 'timezone' => date_default_timezone_get() ]; } private function getPHPInfo() { return [ 'version' => PHP_VERSION, 'sapi' => PHP_SAPI, 'extensions' => get_loaded_extensions(), 'max_execution_time' => ini_get('max_execution_time'), 'memory_limit' => ini_get('memory_limit'), 'post_max_size' => ini_get('post_max_size'), 'upload_max_filesize' => ini_get('upload_max_filesize'), 'max_input_time' => ini_get('max_input_time'), 'display_errors' => ini_get('display_errors'), 'error_reporting' => ini_get('error_reporting') ]; } private function getDatabaseInfo() { try { // Get MySQL version $version_result = mysqli_query($this->conn, 'SELECT VERSION() as version'); $version = mysqli_fetch_assoc($version_result)['version']; // Get database size $size_query = "SELECT table_schema AS 'database', ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS 'size_mb' FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "' GROUP BY table_schema"; $size_result = mysqli_query($this->conn, $size_query); $size = mysqli_fetch_assoc($size_result)['size_mb']; // Get table count $tables_query = "SELECT COUNT(*) as count FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "'"; $tables_result = mysqli_query($this->conn, $tables_query); $table_count = mysqli_fetch_assoc($tables_result)['count']; // Get connection info $stats = mysqli_get_connection_stats($this->conn); return [ 'version' => $version, 'database_name' => DB_NAME, 'database_size_mb' => $size, 'table_count' => $table_count, 'connection_stats' => $stats ]; } catch (Exception $e) { $this->logger->error("Failed to get database info: {message}", ['message' => $e->getMessage()]); return [ 'error' => $e->getMessage() ]; } } private function getDiskInfo() { $root_path = dirname(dirname(__FILE__)); return [ 'total_space' => disk_total_space($root_path), 'free_space' => disk_free_space($root_path), 'used_space' => disk_total_space($root_path) - disk_free_space($root_path), 'usage_percent' => round((1 - (disk_free_space($root_path) / disk_total_space($root_path))) * 100, 2) ]; } private function getMemoryInfo() { return [ 'memory_usage' => memory_get_usage(true), 'memory_peak_usage' => memory_get_peak_usage(true), 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')) ]; } private function getPerformanceMetrics() { try { // Get average response time $response_times = $this->getAverageResponseTime(); // Get error rates $error_rates = $this->getErrorRates(); // Get request statistics $request_stats = $this->getRequestStatistics(); return [ 'response_time' => $response_times, 'error_rates' => $error_rates, 'request_stats' => $request_stats ]; } catch (Exception $e) { $this->logger->error("Failed to get performance metrics: {message}", ['message' => $e->getMessage()]); return [ 'error' => $e->getMessage() ]; } } private function getAverageResponseTime() { $sql = "SELECT AVG(duration) as avg_duration, MIN(duration) as min_duration, MAX(duration) as max_duration FROM performance_logs WHERE created_at >= DATE_SUB(NOW(), INTERVAL 1 HOUR)"; $result = mysqli_query($this->conn, $sql); return mysqli_fetch_assoc($result); } private function getErrorRates() { $sql = "SELECT COUNT(*) as total_errors FROM system_logs WHERE level = 'error' and created_at >= DATE_SUB(NOW(), INTERVAL 24 HOUR)"; $result = mysqli_query($this->conn, $sql); return mysqli_fetch_assoc($result); } private function getRequestStatistics() { $sql = "SELECT COUNT(*) as total_requests, COUNT(DISTINCT ip_address) as unique_visitors, COUNT(DISTINCT session_id) as unique_sessions FROM access_logs WHERE created_at >= DATE_SUB(NOW(), INTERVAL 24 HOUR)"; $result = mysqli_query($this->conn, $sql); return mysqli_fetch_assoc($result); } private function convertToBytes($value) { $unit = strtolower(substr($value, -1)); $number = substr($value, 0, -1); switch ($unit) { case 'g': $number *= 1024; case 'm': $number *= 1024; case 'k': $number *= 1024; } return $number; } public function checkSystemHealth() { try { $issues = []; $status = $this->getSystemStatus(); // Check disk space if ($status['disk']['usage_percent'] > 90) { $issues[] = [ 'type' => 'critical', 'component' => 'disk', 'message' => 'Disk usage is above 90%' ]; } elseif ($status['disk']['usage_percent'] > 80) { $issues[] = [ 'type' => 'warning', 'component' => 'disk', 'message' => 'Disk usage is above 80%' ]; } // Check memory usage $memory_usage_percent = ($status['memory']['memory_usage'] / $status['memory']['memory_limit']) * 100; if ($memory_usage_percent > 90) { $issues[] = [ 'type' => 'critical', 'component' => 'memory', 'message' => 'Memory usage is above 90%' ]; } elseif ($memory_usage_percent > 80) { $issues[] = [ 'type' => 'warning', 'component' => 'memory', 'message' => 'Memory usage is above 80%' ]; } // Check database connection if (isset($status['database']['error'])) { $issues[] = [ 'type' => 'critical', 'component' => 'database', 'message' => 'Database connection error: ' . $status['database']['error'] ]; } // Check error rates if ($status['performance']['error_rates']['total_errors'] > 100) { $issues[] = [ 'type' => 'critical', 'component' => 'errors', 'message' => 'High error rate detected' ]; } // Log health check results if (!empty($issues)) { foreach ($issues as $issue) { if ($issue['type'] === 'critical') { $this->logger->critical("System health issue: {message}", ['message' => $issue['message']]); } else { $this->logger->warning("System health issue: {message}", ['message' => $issue['message']]); } } } else { $this->logger->info("System health check passed"); } return [ 'healthy' => empty($issues), 'issues' => $issues ]; } catch (Exception $e) { $this->logger->error("Failed to check system health: {message}", ['message' => $e->getMessage()]); throw $e; } } } // Example usage: // $monitor = SystemMonitor::getInstance(); // $status = $monitor->getSystemStatus(); // $health = $monitor->checkSystemHealth(); ?>