fix keepalive

This commit is contained in:
2023-01-29 21:35:43 +01:00
parent f983b2a2c5
commit 726d10c9be

View File

@@ -194,17 +194,20 @@ if (!empty($_GET['verify'])&&!empty($_POST['kod'])){
exit();
}
if (!empty($_GET['keepalive'])){
$kod = $_SESSION['kod'];
$stmt6 = $mysqli->prepare("Select ID FROM Streams WHERE Code = ? OR AdminCode = ?;");
$stmt6->bind_param('ss', $kod, $kod);
$stmt6->execute();
$stmt6->store_result();
if ($stmt6->num_rows > 0)
{
$stmt7 = $mysqli->prepare("Update Connections SET TimestampPing=CURRENT_TIMESTAMP, TimePing = ? FROM WHERE StreamID = ?;");
$stmt7->bind_param("si", date("Y.n.d H:i:s"), $streamidcko);
while($stmt6->fetch()){
$stmt7 = $mysqli->prepare("UPDATE Connections SET TimestampPing=CURRENT_TIMESTAMP, TimePing = ? WHERE PHPSessID = ?;");
$stmt7->bind_param("ss", date("Y.n.d H:i:s"), session_id());
$stmt7->execute();
$stmt7->store_result();
}
}
exit();
}
if (!empty($_GET['chat'])){