Init Git Prod Mars 2026
This commit is contained in:
commit
d81efe93b1
362 files changed
+86627
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/_bootstrap.php';
|
||||
require_auth_json(['client','praticien','secretaire','admin']);
|
||||
|
||||
$compteId = (int)($_SESSION['compte_id'] ?? 0);
|
||||
if ($compteId <= 0) json_response(['ok'=>false,'error'=>'auth_required'], 401);
|
||||
|
||||
$stmt = $pdo->prepare("SELECT msg_unread, rdv_unread FROM push_badge_counters WHERE compte_id = ?");
|
||||
$stmt->execute([$compteId]);
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC) ?: ['msg_unread'=>0,'rdv_unread'=>0];
|
||||
|
||||
$msg = (int)($row['msg_unread'] ?? 0);
|
||||
$rdv = (int)($row['rdv_unread'] ?? 0);
|
||||
|
||||
json_response([
|
||||
'ok' => true,
|
||||
'msg_unread' => $msg,
|
||||
'rdv_unread' => $rdv,
|
||||
'total' => $msg + $rdv,
|
||||
]);
|
||||
Reference in new issue
Block a user