Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/statistic/logadmin.phtml |
<?php
function checkColorLog($level) {
if ($level == "CRIT") {
return "red";
}
if ($level == "ERR") {
return "red";
}
if ($level == "INFO") {
return "black";
}
if ($level == "WARN") {
return "#cc9900";
}
}
?> <div class="table-box">
<div class="col-md-12 header-single-line">
<div class="col-md-5 header-single no-space-top"><?php echo $this->titlePage; ?></div>
<div class="col-md-7 no-space-top"><?php echo $this->render("alert.phtml"); ?></div>
</div>
<div class="col-md-12 text-center">
Afficher par
<div class="btn-group">
<a class="btn btn-primary" href='<?php echo $this->baseUrl;?>/backoffice/statistic/logadmin/nb/100/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>' >100</a>
<a class="btn btn-primary" href='<?php echo $this->baseUrl;?>/backoffice/statistic/logadmin/nb/200/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>' >200</a>
<a class="btn btn-primary" href='<?php echo $this->baseUrl;?>/backoffice/statistic/logadmin/nb/300/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>' >300</a>
<a class="btn btn-primary" href='<?php echo $this->baseUrl;?>/backoffice/statistic/logadmin/nb/500/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>' >500</a>
<button class="btn btn-danger btn-modal" data-toggle="ajaxModalDelete" data-linkok="<?php echo $this->baseUrl;?>/backoffice/statistic/logadminclean" ><span class="glyphicon glyphicon-trash"></span> Supprimer l'historique</button>
</div>
</div>
<?php echo $this->paginationControl($this->paginator, 'All', 'pagination.phtml'); ?>
<table class="display table" id="supplierTable" width="100%">
<thead>
<tr>
<th><a href="<?php echo $this->baseUrl; ?>/backoffice/statistic/logadmin/col/DATE_LOG/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>">Date</a></th>
<th><a href="<?php echo $this->baseUrl; ?>/backoffice/statistic/logadmin/col/LEVEL_NAME/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>">Type</a></th>
<th><a href="<?php echo $this->baseUrl; ?>/backoffice/statistic/logadmin/col/CONTROLLER/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>">Controller</a></th>
<th><a href="<?php echo $this->baseUrl; ?>/backoffice/statistic/logadmin/col/MESSAGE/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>">Message</a></th>
<th><a href="<?php echo $this->baseUrl; ?>/backoffice/statistic/logadmin/col/IP/page/<?php echo $this->paginator->getCurrentPageNumber(); ?>">IP</a></th>
</tr>
</thead>
<tbody>
<?php foreach($this->paginator as $row) { ?>
<tr style="color: <?php echo checkColorLog($row->LEVEL_NAME); ?>">
<td><?php
$myDate = new Zend_Date(strtotime($row->DATE_LOG));
$mois = array('','Jan.', 'F�v.', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil.', 'Ao�t', 'Sept.', 'Oct.', 'Nov.', 'D�c.');
$moisComplet = array('','Janvier', 'F�vrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Ao�t', 'Septembre', 'Octobre', 'Novembre', 'D�cembre');
echo $myDate->toString("dd").' '.$moisComplet[(int)$myDate->toString('MM')].' '.$myDate->toString("YYYY").' '.$myDate->toString("HH").":".$myDate->toString("mm").":".$myDate->toString("ss");
?></td>
<td><?php echo $row->LEVEL_NAME; ?></td>
<td><?php echo $row->CONTROLLER; ?></td>
<td ><?php echo $row->MESSAGE ; ?></td>
<td ><?php echo $row->IP ; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php echo $this->paginationControl($this->paginator, 'All', 'pagination.phtml'); ?>
</div>