The section failed to load.
The data did not refresh — the previous period is still shown.
Dashboard
22 October — 28 October 2026
Loading…
Audience growth
0subscribers in the period
The number of subscribers did not change in the period
Quality index
Views and reach
Subscriber engagement
Citation index
The citation index has not been calculated yet: it will appear after the nightly calculation once other channels mention the channel.
When and how much it posts
Post formats
Every post is a dot
Higher means more views, bigger means more reactions. Click a dot to open the post.
Period totals
Click a metric to see it across the period below
Ads in the channel
Top posts
By views for the period
Posts by day
Pale bars are days, the line is the 7-day average: you can see whether the channel is speeding up or slowing down
Data updated at 20:36 Moscow time. Views are the current counts of posts published on those days; average reach counts posts older than two days. How the quality index is calculated
Posts for the period
Loading…
<option value="<?= $s['id'] ?>"><?= htmlspecialchars($s['name']) ?></option>
<?php endforeach; ?>
</select>
<input type="date" name="visit_date" value="<?= date('Y-m-d') ?>" required>
<select name="status" required>
<option value="came">Пришёл</option>
<option value="absent">Не пришёл</option>
<option value="warned">Предупредил</option>
</select>
<button>Сохранить</button>
</form>
<table>
<tr><th>Дата</th><th>Ученик</th><th>Статус</th></tr>
<?php foreach ($visits as $v): ?>
<tr>
<td><?= htmlspecialchars($v['visit_date']) ?></td>
<td><?= htmlspecialchars($v['name']) ?></td>
<td><?= htmlspecialchars($v['status']) ?></td>
</tr>
<?php endforeach; ?>
</table>
</section>
<section>
<h2>Оплата</h2>
<form method="post">
<input type="hidden" name="action" value="add_payment">
<select name="student_id" required>
<option value="">Выберите ученика</option>
<?php foreach ($students as $s): ?>
<option value="<?= $s['id'] ?>"><?= htmlspecialchars($s['name']) ?></option>
<?php endforeach; ?>
</select>
<input type="date" name="pay_date" value="<?= date('Y-m-d') ?>" required>
<input type="number" step="0.01" name="amount" placeholder="Сумма" required>
<input name="comment" placeholder="Комментарий">
<button>Добавить оплату</button>
</form>
<p class="total">Всего поступило: <?= number_format($total, 2) ?> ₽</p>
<table>
<tr><th>Дата</th><th>Ученик</th><th>Сумма</th><th>Комментарий</th></tr>
<?php foreach ($payments as $p): ?>
<tr>
<td><?= htmlspecialchars($p['pay_date']) ?></td>
<td><?= htmlspecialchars($p['name']) ?></td>
<td><?= number_format($p['amount'], 2) ?> ₽</td>
<td><?= htmlspecialchars($p['comment']) ?></td>
</tr>
<?php endforeach; ?>
</table>
</section>
</main>
</body>
</html>
$db = new PDO('sqlite:' . __DIR__ . '/akita.db');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->exec("
CREATE TABLE IF NOT EXISTS students (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
phone TEXT,
telegram TEXT,
note TEXT
);
CREATE TABLE IF NOT EXISTS visits (
id INTEGER PRIMARY KEY AUTOINCREMENT,
student_id INTEGER NOT NULL,
visit_date TEXT NOT NULL,
status TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS payments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
student_id INTEGER NOT NULL,
pay_date TEXT NOT NULL,
amount REAL NOT NULL,
comment TEXT
);
CREATE TABLE IF NOT EXISTS subscriptions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
student_id INTEGER NOT NULL,
lessons_total INTEGER NOT NULL,
start_date TEXT NOT NULL,
end_date TEXT
);
");
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$action = $_POST['action'] ?? '';
if ($action === 'add_student') {
$stmt = $db->prepare("INSERT INTO students (name, phone, telegram, note) VALUES (?, ?, ?, ?)");
$stmt->execute([$_POST['name'], $_POST['phone'], $_POST['telegram'], $_POST['note']]);
}
if ($action === 'add_visit') {
$stmt = $db->prepare("INSERT INTO visits (student_id, visit_date, status) VALUES (?, ?, ?)");
$stmt->execute([$_POST['student_id'], $_POST['visit_date'], $_POST['status']]);
}
if ($action === 'add_payment') {
$stmt = $db->prepare("INSERT INTO payments (student_id, pay_date, amount, comment) VALUES (?, ?, ?, ?)");
$stmt->execute([$_POST['student_id'], $_POST['pay_date'], $_POST['amount'], $_POST['comment']]);
}
header('Location: index.php');
exit;
}
$students = $db->query("SELECT * FROM students ORDER BY name")->fetchAll(PDO::FETCH_ASSOC);
$visits = $db->query("
SELECT v.*, s.name
FROM visits v
JOIN students s ON s.id = v.student_id
ORDER BY v.visit_date DESC
LIMIT 50
")->fetchAll(PDO::FETCH_ASSOC);
$payments = $db->query("
SELECT p.*, s.name
FROM payments p
JOIN students s ON s.id = p.student_id
ORDER BY p.pay_date DESC
LIMIT 50
")->fetchAll(PDO::FETCH_ASSOC);
$total = $db->query("SELECT COALESCE(SUM(amount), 0) FROM payments")->fetchColumn();
?>
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Акита — учёт тренера</title>
<style>
body { font-family: system-ui, sans-serif; margin: 0; background: #f4f5f7; color: #222; }
header { background: #111827; color: #fff; padding: 16px; }
h1 { margin: 0; font-size: 20px; }
main { padding: 16px; max-width: 900px; margin: auto; }
section { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
h2 { margin-top: 0; font-size: 18px; }
form { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
input, select, button { padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; width: 100%; box-sizing: border-box; }
button { background: #2563eb; color: #fff; border: 0; cursor: pointer; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { padding: 8px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px; }
.total { font-size: 18px; font-weight: 700; }
</style>
</head>
<body>
<header>
<h1>Акита — учёт тренера</h1>
</header>
<main>
<section>
<h2>Добавить ученика</h2>
<form method="post">
<input type="hidden" name="action" value="add_student">
<input name="name" placeholder="ФИО ученика" required>
<input name="phone" placeholder="Телефон">
<input name="telegram" placeholder="Telegram">
<input name="note" placeholder="Примечание">
<button>Добавить</button>
</form>
</section>
<section>
<h2>Отметить посещение</h2>
<form method="post">
<input type="hidden" name="action" value="add_visit">
<select name="student_id" required>
<option value="">Выберите ученика</option>
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…