| Server IP : 193.86.120.172 / Your IP : 216.73.216.215 Web Server : Apache/2.4.63 (Unix) System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64 User : kubec ( 1026) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /volume1/web/hotellesnizatisi_cz/new/ |
Upload File : |
<?php
require_once __DIR__ . '/includes/auth.php';
$user = require_section('fotky');
header('Content-Type: application/json');
$input = json_decode(file_get_contents('php://input'), true);
$ids = $input['ids'] ?? [];
if (!is_array($ids) || !$ids) {
http_response_code(400);
echo json_encode(['ok' => false]);
exit;
}
$stmt = db()->prepare('UPDATE web_fotky SET poradi = ? WHERE id = ?');
$poradi = 1;
foreach ($ids as $id) {
$stmt->execute([$poradi, (int) $id]);
$poradi++;
}
echo json_encode(['ok' => true]);