[*] style
This commit is contained in:
1 parent
2b2fae626a
commit
30d612e52b
2 files changed
+7
-7
No files matched your search
+2
-1
@@ -23,6 +23,7 @@
|
|||||||
use Core\Models\User;
|
use Core\Models\User;
|
||||||
|
|
||||||
require_once __DIR__ . '/inc/header.php';
|
require_once __DIR__ . '/inc/header.php';
|
||||||
|
global $USER;
|
||||||
?>
|
?>
|
||||||
<div class="pageheader">
|
<div class="pageheader">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
@@ -93,7 +94,7 @@
|
|||||||
<td><?= date('d.m.Y H:i:s', $elUser['last_active']); ?></td>
|
<td><?= date('d.m.Y H:i:s', $elUser['last_active']); ?></td>
|
||||||
<td><?= $elUser['date_created'] ? date('d.m.Y H:i:s', strtotime($elUser['date_created'])) : '-'; ?></td>
|
<td><?= $elUser['date_created'] ? date('d.m.Y H:i:s', strtotime($elUser['date_created'])) : '-'; ?></td>
|
||||||
<td><?= $elUser['date_updated'] ? date('d.m.Y H:i:s', strtotime($elUser['date_updated'])) : '-'; ?></td>
|
<td><?= $elUser['date_updated'] ? date('d.m.Y H:i:s', strtotime($elUser['date_updated'])) : '-'; ?></td>
|
||||||
<td><a class="btn btn-primary" href="login.php?loginAs=<?= $elUser['id']; ?>">Войти</a></td>
|
<td><?php if ($USER->isAdmin()) { ?><a class="btn btn-primary" href="login.php?loginAs=<?= $elUser['id']; ?>">Войти</a> <?php } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,9 +123,9 @@
|
|||||||
|| self::getAge($name) > CACHE_TTL
|
|| self::getAge($name) > CACHE_TTL
|
||||||
|| !file_exists(self::$cacheDir . md5($name) . '.tmp')) {
|
|| !file_exists(self::$cacheDir . md5($name) . '.tmp')) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -169,9 +169,9 @@
|
|||||||
self::$quantityWrite++;
|
self::$quantityWrite++;
|
||||||
if (file_put_contents(self::$cacheDir . md5($name) . '.tmp', base64_encode(serialize($arValue)))) {
|
if (file_put_contents(self::$cacheDir . md5($name) . '.tmp', base64_encode(serialize($arValue)))) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,7 +181,6 @@
|
|||||||
*/
|
*/
|
||||||
public static function flush(): bool
|
public static function flush(): bool
|
||||||
{
|
{
|
||||||
sendTelegram('Произведена очистка кэша' . PHP_EOL . 'IP: ' . SystemFunctions::getOS());
|
|
||||||
$di = new \RecursiveDirectoryIterator(self::$cacheDir, \FilesystemIterator::SKIP_DOTS);
|
$di = new \RecursiveDirectoryIterator(self::$cacheDir, \FilesystemIterator::SKIP_DOTS);
|
||||||
$ri = new \RecursiveIteratorIterator($di, \RecursiveIteratorIterator::CHILD_FIRST);
|
$ri = new \RecursiveIteratorIterator($di, \RecursiveIteratorIterator::CHILD_FIRST);
|
||||||
foreach ($ri as $file) {
|
foreach ($ri as $file) {
|
||||||
@@ -233,7 +232,7 @@
|
|||||||
{
|
{
|
||||||
$return_size = 0;
|
$return_size = 0;
|
||||||
foreach (scandir(self::$cacheDir) as $file) {
|
foreach (scandir(self::$cacheDir) as $file) {
|
||||||
if ($file == '.' or $file == '..') {
|
if ($file === '.' || $file === '..') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$return_size = $return_size + filesize(self::$cacheDir . $file);
|
$return_size = $return_size + filesize(self::$cacheDir . $file);
|
||||||
|
|||||||
Reference in new issue
Block a user