$barWidthPerHour = 24; // must be the same as in the CSS file, plus 1 for the border ?> <style> div.graphic-log td, div.graphic-log div.bar { min-height: <?php echo max(20, $barHeight * count($devices)); ?> px; } </style> <div class="graphic-log"> <?php $page = $_GET['page']; printLogFileLines("graphic-logs.php", $page); ?> <table> <thead> <tr> <th>Day</th> <th colspan="24">Time</th> </tr> <tr> <th></th> <?php for ($i = 0; $i < 24; ++$i) { print " <th class=\"h\">{$i}</th>\n"; } ?> </tr>
<div class="log"> <?php $page = $_GET['page']; printLogFileLines("logs.php", $page); ?> <table> <thead> <tr> <th>Time</th> <th>Device</th> <th>Event</th> </tr> </thead> <tbody> <?php if ($page) { foreach ($oldLogFilesPrintf as $candidate) { $candidateFile = sprintf($candidate, $page); if (substr($candidateFile, -3) === ".gz") { $logFh = @gzopen($candidateFile, "r"); } else { $logFh = @fopen($candidateFile, "r"); } if ($logFh) { break; } } } else { $logFh = @fopen($logFile, "r"); } if ($logFh) {