show all ' . safeHTMLstr($type) . ' entries
'; } // Get email entries with failed messages $failedMessageAR = array(); $q = "SELECT `queued` FROM `" . OCC_TABLE_EMAIL_QUEUE . "` WHERE `sent` IS NULL GROUP BY `queued`"; $r = ocsql_query($q) or err('Unable to retrieve email log entries'); while ($l = mysql_fetch_assoc($r)) { $failedMessageAR[] = $l['queued']; } // retrieve entries $q = "SELECT * FROM `" . OCC_TABLE_LOG . "` WHERE `type`" . (empty($type) ? "!='sql'" : ("='" . safeSQLstr($type) . "'")) . " ORDER BY `datetime` DESC" . $limit; $r = ocsql_query($q) or err('Unable to retrieve log entries'); if (mysql_num_rows($r) == 0) { warn('No log entries were found'); } // display entries print 'Date / Time | Type | Entry |
---|---|---|
'; if (!empty($l['extra'])) { // extra stuff? if so link it in print '' . safeHTMLstr($l['datetime']) . ''; } else { print safeHTMLstr($l['datetime']); } print ' | ' . safeHTMLstr($l['type']); if (($l['type'] == 'email') && in_array($l['datetime'], $failedMessageAR)) { print ' – failed'; } print ' | ' . safeHTMLstr($l['entry']) . " |
Log entries are shown in Coordinated Universal Time (UTC)
'; } printFooter(); ?>