includes/functions.php
changeset 382 2ccb55995aef
parent 381 b4751b55ee92
child 387 92664d2efab8
equal deleted inserted replaced
381:b4751b55ee92 382:2ccb55995aef
  4049   
  4049   
  4050   $time_start = $time_last = $profile[0]['time'];
  4050   $time_start = $time_last = $profile[0]['time'];
  4051   
  4051   
  4052   foreach ( $profile as $i => $entry )
  4052   foreach ( $profile as $i => $entry )
  4053   {
  4053   {
  4054     $html .= "<tr><th colspan=\"2\">Event $i</th></tr>";
  4054     $html .= "<!-- ########################################################## -->\n<tr>\n  <th colspan=\"2\">Event $i</th>\n</tr>";
  4055     
  4055     
  4056     $html .= '<tr>';
  4056     $html .= '<tr>' . "\n";
  4057     $html .= '<td class="row2">Event:</td>';
  4057     $html .= '  <td class="row2">Event:</td>' . "\n";
  4058     $html .= '<td class="row1">' . htmlspecialchars($entry['point']) . '</td>';
  4058     $html .= '  <td class="row1">' . htmlspecialchars($entry['point']) . '</td>' . "\n";
  4059     $html .= '</tr>';
  4059     $html .= '</tr>' . "\n";
  4060     
  4060     
  4061     $time = $entry['time'] - $time_start;
  4061     $time = $entry['time'] - $time_start;
  4062     
  4062     
  4063     $html .= '<tr>';
  4063     $html .= '<tr>' . "\n";
  4064     $html .= '<td class="row2">Time since start:</td>';
  4064     $html .= '  <td class="row2">Time since start:</td>' . "\n";
  4065     $html .= '<td class="row1">' . $time . 's</td>';
  4065     $html .= '  <td class="row1">' . $time . 's</td>' . "\n";
  4066     $html .= '</tr>';
  4066     $html .= '</tr>' . "\n";
  4067     
  4067     
  4068     $time = $entry['time'] - $time_last;
  4068     $time = $entry['time'] - $time_last;
  4069     
  4069     if ( $time < 0.0001 )
  4070     $html .= '<tr>';
  4070       $time = 'Marginal';
  4071     $html .= '<td class="row2">Time since last event:</td>';
  4071     else
  4072     $html .= '<td class="row1">' . $time . 's</td>';
  4072       $time = "{$time}s";
  4073     $html .= '</tr>';
  4073     
       
  4074     $html .= '<tr>' . "\n";
       
  4075     $html .= '  <td class="row2">Time since last event:</td>' . "\n";
       
  4076     $html .= '  <td class="row1">' . $time . '</td>' . "\n";
       
  4077     $html .= '</tr>' . "\n";
  4074     
  4078     
  4075     if ( $entry['backtrace'] )
  4079     if ( $entry['backtrace'] )
  4076     {
  4080     {
  4077       $html .= '<tr>';
  4081       $html .= '<tr>' . "\n";
  4078       $html .= '<td class="row2">Called from:</td>';
  4082       $html .= '  <td class="row2">Called from:</td>' . "\n";
  4079       $html .= '<td class="row1">' . htmlspecialchars($entry['backtrace']) . '</td>';
  4083       $html .= '  <td class="row1">' . htmlspecialchars($entry['backtrace']) . '</td>' . "\n";
  4080       $html .= '</tr>';
  4084       $html .= '</tr>' . "\n";
  4081     }
  4085     }
       
  4086     
       
  4087     $html .= "\n";
  4082     
  4088     
  4083     $time_last = $entry['time'];
  4089     $time_last = $entry['time'];
  4084   }
  4090   }
  4085   $html .= '</table></div>';
  4091   $html .= '</table></div>';
  4086   
  4092