Файл: _modules/admin/tk/index.php
Строк: 32
<?php
# mark core v1.0
# author Drk in
# date 24.10.19
# core
require_once ( $_SERVER['DOCUMENT_ROOT']."/_core/system.php" );
$s = isset( $_GET['s'] ) ? system::abs($_GET['s']): 0;
# meta
$title = 'Тикеты » Мобильные WAP сайты';
$description = system::check($config['description']);
$keywords = system::check($config['keywords']);
$tl = 'Тикеты';
# adm
system::adm();
# head
require_once ( head );
echo '<div class ="touch"> <a href ="?"> Все</a> | <a href ="?&s=1"> Открытые</a> | <a href ="?&s=2"> Закрытые</a> </div>';
if ($s == 1)$sr = 'WHERE hide = 0';
if ($s == 2)$sr = 'WHERE hide = 1';
if ($s == 0)$sr = null;
$cn = DB :: $dbh -> querySingle("SELECT count(id) FROM tk {$sr} ");
if($cn == 0)echo '<div class="err">Cписок пуст!</div>';
$page = new page($cn);
$limit = $cn > $page -> elements ? $page -> limit : null;
$query = DB :: $dbh -> query("SELECT id FROM tk {$sr} ORDER BY id {$limit}");
while ($act = $query -> fetch()):
$act = cache_tk::check($act['id']);
echo '
<div class ="touch"><img src ="'.ico.'tk1.png">
<a href ="'.site.'admin/tk/id'.$act['id'].'"> '.system::num(system::check($act['name']),20).'</a>
[ID: '.$act['id'].' | '.($act['hide'] == 0 ? '<font color="blue"> Открыт</font>':'<font color="red">Закрыт</font>').'
| '.($act['hide'] == 1 ? '<a href ="'.site.'admin/tk/hide/id'.$act['id'].'">Открыть</a>':'<a href ="'.site.'admin/tk/hide/id'.$act['id'].'">Закрыть</a>').' | '.system::time($act['time']).']
<br>
'.system::num(system::check($act['message']),86).'
</div>
';
endwhile;
$page -> get($s == 0 ? '?':'?&s='.$s.'&');
echo '
<a href="'.site.'admin" class="touch">« Назад</a>
';
# foot
require_once ( foot ) ;
?>