includes/functions.php
changeset 382 2ccb55995aef
parent 381 b4751b55ee92
child 387 92664d2efab8
--- a/includes/functions.php	Sun Jan 27 23:44:02 2008 -0500
+++ b/includes/functions.php	Sun Jan 27 23:45:53 2008 -0500
@@ -4051,35 +4051,41 @@
   
   foreach ( $profile as $i => $entry )
   {
-    $html .= "<tr><th colspan=\"2\">Event $i</th></tr>";
+    $html .= "<!-- ########################################################## -->\n<tr>\n  <th colspan=\"2\">Event $i</th>\n</tr>";
     
-    $html .= '<tr>';
-    $html .= '<td class="row2">Event:</td>';
-    $html .= '<td class="row1">' . htmlspecialchars($entry['point']) . '</td>';
-    $html .= '</tr>';
+    $html .= '<tr>' . "\n";
+    $html .= '  <td class="row2">Event:</td>' . "\n";
+    $html .= '  <td class="row1">' . htmlspecialchars($entry['point']) . '</td>' . "\n";
+    $html .= '</tr>' . "\n";
     
     $time = $entry['time'] - $time_start;
     
-    $html .= '<tr>';
-    $html .= '<td class="row2">Time since start:</td>';
-    $html .= '<td class="row1">' . $time . 's</td>';
-    $html .= '</tr>';
+    $html .= '<tr>' . "\n";
+    $html .= '  <td class="row2">Time since start:</td>' . "\n";
+    $html .= '  <td class="row1">' . $time . 's</td>' . "\n";
+    $html .= '</tr>' . "\n";
     
     $time = $entry['time'] - $time_last;
+    if ( $time < 0.0001 )
+      $time = 'Marginal';
+    else
+      $time = "{$time}s";
     
-    $html .= '<tr>';
-    $html .= '<td class="row2">Time since last event:</td>';
-    $html .= '<td class="row1">' . $time . 's</td>';
-    $html .= '</tr>';
+    $html .= '<tr>' . "\n";
+    $html .= '  <td class="row2">Time since last event:</td>' . "\n";
+    $html .= '  <td class="row1">' . $time . '</td>' . "\n";
+    $html .= '</tr>' . "\n";
     
     if ( $entry['backtrace'] )
     {
-      $html .= '<tr>';
-      $html .= '<td class="row2">Called from:</td>';
-      $html .= '<td class="row1">' . htmlspecialchars($entry['backtrace']) . '</td>';
-      $html .= '</tr>';
+      $html .= '<tr>' . "\n";
+      $html .= '  <td class="row2">Called from:</td>' . "\n";
+      $html .= '  <td class="row1">' . htmlspecialchars($entry['backtrace']) . '</td>' . "\n";
+      $html .= '</tr>' . "\n";
     }
     
+    $html .= "\n";
+    
     $time_last = $entry['time'];
   }
   $html .= '</table></div>';