Initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
require_once __DIR__ . '/../inc/auth.php';
|
||||
$session = auth_require('owner', 'engineer');
|
||||
|
||||
$pdo = getDB();
|
||||
|
||||
$stmt = $pdo->query("SELECT * FROM shs_records ORDER BY id DESC LIMIT 1");
|
||||
$shs = $stmt->fetch();
|
||||
|
||||
echo json_encode($shs ?: ['error' => 'Нет данных']);
|
||||
Reference in New Issue
Block a user