HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux vgpudjuxex 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: cod67 (1010)
PHP: 8.2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /var/www/cod67/data/www/cod67.ru/public_html/similar1/panel.php
<?php
$config = require __DIR__ . '/config.php';
if (!isset($_GET['pass']) || $_GET['pass'] !== $config['panel_password']) die("Требуется пароль: ?pass=ВАШ_ПАРОЛЬ");


$daily = json_decode(file_get_contents(__DIR__.'/stats/daily.json'), true);
$monthly = json_decode(file_get_contents(__DIR__.'/stats/monthly.json'), true);
$logDir = __DIR__.'/stats/logs';
$logs = glob($logDir.'/*.log');


// Определяем недоступные сайты по логам
$unavailable = [];
foreach ($logs as $log) {
foreach (explode("\n", file_get_contents($log)) as $line)
if (strpos($line, 'Недоступен:') !== false)
$unavailable[] = trim(explode('Недоступен:', $line)[1]);
}
?>
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Статистика редиректов</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body{font-family:Arial;padding:20px;}
table{border-collapse:collapse;margin-bottom:40px;}
td,th{border:1px solid #ccc;padding:6px 10px;}
.red{background:#ffdddd !important;}
pre{background:#eee;padding:10px;}
</style>
</head>
<body>
<h1>Статистика редиректов</h1>


<h2>Сегодня (<?= $daily['date'] ?>)</h2>
<table>
<tr><th>URL</th><th>Переходов</th></tr>
<?php foreach ($daily['links'] as $url=>$count): ?>
<tr class="<?= in_array($url,$unavailable)?'red':'' ?>">
<td><?= $url ?></td>
<td><?= $count ?></td>
</tr>
<?php endforeach; ?>
</table>


<h2>Месяц (<?= $monthly['month'] ?>)</h2>
<table>
<tr><th>URL</th><th>Переходов</th></tr>
<?php foreach ($monthly['links'] as $url=>$count): ?>
<tr class="<?= in_array($url,$unavailable)?'red':'' ?>">
<td><?= $url ?></td>
<td><?= $count ?></td>
</tr>
<?php endforeach; ?>
</table>


<h2>График переходов за месяц</h2>
<canvas id="chart" width="600" height="200"></canvas>


<script>
const labels = <?= json_encode(array_keys($monthly['links'])) ?>;
const data = <?= json_encode(array_values($monthly['links'])) ?>;


new Chart(document.getElementById('chart'), {
type: 'bar',
data: {
labels: labels,
datasets: [{
label: 'Переходов',
data: data
}]
}
});
</script>


<h2>Логи</h2>
<?php foreach ($logs as $log): ?>
<h3><?= basename($log) ?></h3>
<pre><?= htmlspecialchars(file_get_contents($log)) ?></pre>
<?php endforeach; ?>


</body>
</html>