Skip to content

Commit

Permalink
Fixing a bug where date sorting is incorrect, this changes the graph …
Browse files Browse the repository at this point in the history
…image name and will require the graph directory to be cleared
  • Loading branch information
Jeffrey Ness committed Jan 2, 2011
1 parent f70fd10 commit 6335bb3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions htdocs/history.php
Expand Up @@ -40,7 +40,7 @@
if ($file != "." && $file != "..") {
$file = explode("-", $file);
if ($file[0] == "$type" && $file[1] != 'current.jpg') {
$year = explode(".", $file[3]);
$year = explode('.', $file[3]);
$files[]="$file[0]-$file[1]-$file[2]-$file[3]";
}
}
Expand All @@ -50,16 +50,13 @@
array_multisort(&$files,SORT_DESC);

foreach ($files as $file) {

$date=explode('.', $file);
$date=$date[0];
$timestamp=explode("-",$date);
$timestamp=explode("-",$date[0]);
$timestamp="$timestamp[1]-$timestamp[2]-$timestamp[3]";

echo "<h2 class='trigger'><a href='#'><font color='blue' size='2' face='Arial, Helvetica, sans-serif'><b>$timestamp</b></font> <font size='1' color='blue' face='Arial, Helvetica, sans-serif'>Show/Hide Raw</font></a></h2>";
echo '<div class="toggle_container">';
echo '<div class="block">';
echo "<pre>" . `cat ./raw/$date.txt` . "</pre>";
echo "<pre>" . `cat ./raw/$date[0].txt` . "</pre>";
echo '</div></div>';

echo "<img src=graphs/$file><br><br>...<br>";
Expand Down

0 comments on commit 6335bb3

Please sign in to comment.