#!/usr/bin/php -q echo "
ErrorWarningSystem
\n"; $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; require_once "$docroot/webGui/include/ColorCoding.php"; $log = "/var/log/vfio-pci"; if (file_exists($log) && filesize($log)) { $lines = file($log); foreach ($lines as $line) { $span = "span"; foreach ($match as $type) foreach ($type['text'] as $text) if (preg_match("/$text/i",$line)) {$span = "span class='{$type['class']}'"; break 2;} echo "<$span>".htmlspecialchars(trim($line))."\n"; } } ?>