New We are sorting MAX channels into categories and territories. Read the news
Public channel ID 77808495355358

ProPrint

Принт на одежде

Open in MAX

Posts for the period

By reactions

Search and the whole feed — after free registration. Custom dates — with a subscription; the channel owner sees them for free. Sorting by reactions — with a subscription. Sign up

Loading…

<?php foreach ($students as $s): ?>
<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>
Views: 5
Go to post Open in MAX Report an inaccuracy
<?php
$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>
Views: 4
Go to post Open in MAX Report an inaccuracy
VKontakte Telegram Odnoklassniki
Favorites at datool.ru

Follow the channel in your account

Sign up at datool.ru to add the channel “ProPrint” to favorites and track its metrics.

Sign up
For channel owners

Verify your channel

Sign in or sign up at datool.ru, then add our bot to the channel following the instructions in your account. Once ownership is verified, the lock disappears and channel management becomes available.

Sign in or sign up

Report an inaccuracy

Describe what needs fixing. If you have a source, add a link.

You are leaving datool.ru

The link leads to an external website. datool.ru is not responsible for its content — check the address before entering passwords or payment details.

Redirecting in 10 s

Go