Added error logging support to Error module.
[simplicity.git] / source / lib / simplicity / modules / admin / views / error / index.phtml
blob5ffc42c9872b059b4747fc8250980b991d5c75ff
1 <h1>Errors</h1>
3 <p>This is the error log. Any PHP errors that occur are logged here along with detailed context information.</p>
5 <table style='width:100%'>
6         <tr>
7                 <th style='width:100px'>
8                         &nbsp;
9                 </th>
10                 <th style='width:150px'>
11                         Date
12                 </th>
13                 <th style='width:100px'>
14                         File
15                 </th>
16                 <th style='width:75px'>
17                         Line
18                 </th>
19                 <th>
20                         Error
21                 </th>
22         </tr>
23         <?php foreach ($this->errors as $id => $error) { ?>
24         <tr>
25                 <td><a href='/simplicity/error/details/id/<?php echo $error->id; ?>'>Details</a> - <a id='del<?php echo $error->id; ?>' class='delete' href='#'>Delete</a></td>
26                 <td><?php echo date('d M y H:i:s',$error->date); ?></td>
27                 <td><a class='nolink' title='<?php echo $error->file; ?>' href='#'><?php echo basename($error->file); ?></a></td>
28                 <td><?php echo $error->line; ?></td>
29                 <td><?php echo $error->msg; ?></td>
30         </tr>
31         <?php } ?>
32 </table>
34 <script type="text/javascript">
35         $(function() {
36                 $('a.delete').click(function() {
37                         if (confirm('Are you sure you want to delete this?')) {
38                                 var id = $(this).attr('id').replace('del','');
39                                 var row = $(this).parent('td').parent('tr');
40                                 $.ajax({
41                                         type: 'DELETE',
42                                         url: '/simplicity/error/data/'+id,
43                                         success: function() {
44                                                 row.fadeOut();
45                                         }
46                                 });
47                         }                       
48                 });
49         });                     
50 </script>