From: Hendrik <nh...@us...> - 2009-06-27 21:54:59
|
Update of /cvsroot/arianne/stendhal_website/content/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5947/content/game Modified Files: cvslog.php Log Message: use a list to improve readability Index: cvslog.php =================================================================== RCS file: /cvsroot/arianne/stendhal_website/content/game/cvslog.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cvslog.php 27 Jun 2009 21:47:51 -0000 1.1 --- cvslog.php 27 Jun 2009 21:54:55 -0000 1.2 *************** *** 12,42 **** <p>Timestamps are in server time.</p> ! <p> <?php for ($day = 1; $day <= 31; $day++) { ! $daystr = $day; ! if ($day < 10) { ! $daystr = '0'.$day; ! } ! $filename = $directory.$month . '-' . $daystr . ".log"; ! if (is_file($filename)) { ! $lines = explode("\n", file_get_contents($filename)); ! for ($i = 0; $i < count($lines); $i++) { ! $line = $lines[$i]; ! ! ## make it pretty, yes this code is ugly. ! if (strpos($line, 'CIA-') > 0) { ! $class = "cia"; ! echo '<span class="'.$class.'">'.htmlspecialchars($line).'</span><br>'."\n"; ! } ! } ! } } ?> ! </p> <?php } else { --- 12,42 ---- <p>Timestamps are in server time.</p> ! <ul> <?php for ($day = 1; $day <= 31; $day++) { ! $daystr = $day; ! if ($day < 10) { ! $daystr = '0'.$day; ! } ! $filename = $directory.$month . '-' . $daystr . ".log"; ! if (is_file($filename)) { ! $lines = explode("\n", file_get_contents($filename)); ! for ($i = 0; $i < count($lines); $i++) { ! $line = $lines[$i]; ! ! ## make it pretty, yes this code is ugly. ! if (strpos($line, 'CIA-') > 0) { ! echo '<li>'.htmlspecialchars($line).'</span><br>'."</li>\n"; ! } ! } ! } } ?> ! </ul> ! <?php } else { |