log.php 878 B

1234567891011121314151617181920212223242526272829303132
  1. <!-- start log messages -->
  2. <table width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
  3. <tr>
  4. <th style="background:black;color:white;" colspan="5">
  5. Дневник на приложението
  6. </th>
  7. </tr>
  8. <tr style="background-color: #ccc;">
  9. <th style="width:120px">Време</th>
  10. <th>Ниво</th>
  11. <th>Категория</th>
  12. <th>Съобщение</th>
  13. </tr>
  14. <?php
  15. foreach($data as $index=>$log)
  16. {
  17. $color=($index%2)?'#F5F5F5':'#EBF8FE';
  18. $message='<pre>'.CHtml::encode(wordwrap($log[0])).'</pre>';
  19. $time=date('H:i:s.',$log[3]).(int)(($log[3]-(int)$log[3])*1000000);
  20. echo <<<EOD
  21. <tr style="background:{$color}">
  22. <td align="center">{$time}</td>
  23. <td>{$log[1]}</td>
  24. <td>{$log[2]}</td>
  25. <td>{$message}</td>
  26. </tr>
  27. EOD;
  28. }
  29. ?>
  30. </table>
  31. <!-- end of log messages -->