улучшена структура кода
This commit is contained in:
1 parent
c5f165b199
commit
df2f8fe03d
1 file changed
+55
-55
+55
-55
@@ -1,62 +1,62 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'].'/inc/bootstrap.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/bootstrap.php';
|
||||||
if(!CUSer::is_admin()) {
|
if (!CUSer::is_admin()) {
|
||||||
die('403 - Access denied');
|
die('403 - Access denied');
|
||||||
}
|
}
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'].'/inc/header.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.php';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<!-- Header BG Table -->
|
<!-- Header BG Table -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4>Журнал событий</h4>
|
<h4>Журнал событий</h4>
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
<code>CEvents</code>
|
<code>CEvents</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-borderless table-header-bg">
|
<table class="table table-striped table-borderless table-header-bg">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center" style="width: 50px;">ID</th>
|
<th class="text-center" style="width: 50px;">ID</th>
|
||||||
<th style="width: 220px;">Дата</th>
|
<th style="width: 220px;">Дата</th>
|
||||||
<th>Событие</th>
|
<th>Событие</th>
|
||||||
<th style="width: 130px;">Тип события</th>
|
<th style="width: 130px;">Тип события</th>
|
||||||
<th >Модуль</th>
|
<th>Модуль</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
CPagination::execute($_REQUEST['page'], CEvents::count(), $CONFIG['PAGINATION_LIMIT']);
|
CPagination::execute($_REQUEST['page'], CEvents::count(), $CONFIG['PAGINATION_LIMIT']);
|
||||||
$limit = CPagination::getLimit();
|
$limit = CPagination::getLimit();
|
||||||
?>
|
?>
|
||||||
<?php foreach(CEvents::getEvents('', $limit, 'DESC') as $event): ?>
|
<?php foreach (CEvents::getEvents('', $limit, 'DESC') as $event): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center"><?php echo $event['id']; ?></td>
|
<td class="text-center"><?php echo $event['id']; ?></td>
|
||||||
<td><?php echo date("d.m.Y H:i:s", $event['time']); ?></td>
|
<td><?php echo date("d.m.Y H:i:s", $event['time']); ?></td>
|
||||||
<td><?php echo $event['message']; ?></td>
|
<td><?php echo $event['message']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="<?php echo getClassNameByEventType($event['type']); ?>"><?php echo $event['type']; ?></span>
|
<span class="<?php echo getClassNameByEventType($event['type']); ?>"><?php echo $event['type']; ?></span>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $event['module']; ?></td>
|
<td><?php echo $event['module']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php CPagination::show('page'); ?>
|
<?php CPagination::show('page'); ?>
|
||||||
</div>
|
</div>
|
||||||
<!-- .card-block -->
|
<!-- .card-block -->
|
||||||
</div>
|
</div>
|
||||||
<!-- .card -->
|
<!-- .card -->
|
||||||
<!-- End Header BG Table -->
|
<!-- End Header BG Table -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'].'/inc/footer.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.php';
|
||||||
?>
|
?>
|
||||||
Reference in new issue
Block a user