' . safeHTMLstr($l['body']) . ''; } else { warn('Unable to find message'); } } elseif (isset($_GET['lid']) && ctype_digit($_GET['lid'])) { $q = "SELECT `" . OCC_TABLE_EMAIL_QUEUE . "`.`id`, `" . OCC_TABLE_EMAIL_QUEUE . "`.`sent`, `" . OCC_TABLE_EMAIL_QUEUE . "`.`tries`, `" . OCC_TABLE_EMAIL_QUEUE . "`.`to`, `" . OCC_TABLE_EMAIL_QUEUE . "`.`subject` FROM `" . OCC_TABLE_EMAIL_QUEUE . "`, `" . OCC_TABLE_LOG . "` WHERE `" . OCC_TABLE_LOG . "`.`logid`='" . safeSQLstr($_GET['lid']) . "' AND `" . OCC_TABLE_LOG . "`.`datetime`=`" . OCC_TABLE_EMAIL_QUEUE . "`.`queued` ORDER BY `id`"; $r = ocsql_query($q) or err('Unable to retrieve log entries'); if (mysql_num_rows($r) > 0) { $displayed = true; print '
ID | Sent | To | Subject |
---|---|---|---|
' . safeHTMLstr($l['id']) . ' | '; if (!empty($l['sent'])) { print $l['sent']; } else { print 'Failed to send'; $failed++; } print ' | ' . safeHTMLstr($l['to']) . ' | ' . safeHTMLstr($l['subject']) . " |
Log entries are shown in Coordinated Universal Time (UTC)
'; if ($failed > 0) { print ' '; } } else { warn('No messages found'); } } else { warn('Invalid ID'); } printFooter(); ?>