fix keepalive
This commit is contained in:
11
index.php
11
index.php
@@ -194,16 +194,19 @@ if (!empty($_GET['verify'])&&!empty($_POST['kod'])){
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if (!empty($_GET['keepalive'])){
|
if (!empty($_GET['keepalive'])){
|
||||||
|
$kod = $_SESSION['kod'];
|
||||||
$stmt6 = $mysqli->prepare("Select ID FROM Streams WHERE Code = ? OR AdminCode = ?;");
|
$stmt6 = $mysqli->prepare("Select ID FROM Streams WHERE Code = ? OR AdminCode = ?;");
|
||||||
$stmt6->bind_param('ss', $kod, $kod);
|
$stmt6->bind_param('ss', $kod, $kod);
|
||||||
$stmt6->execute();
|
$stmt6->execute();
|
||||||
$stmt6->store_result();
|
$stmt6->store_result();
|
||||||
if ($stmt6->num_rows > 0)
|
if ($stmt6->num_rows > 0)
|
||||||
{
|
{
|
||||||
$stmt7 = $mysqli->prepare("Update Connections SET TimestampPing=CURRENT_TIMESTAMP, TimePing = ? FROM WHERE StreamID = ?;");
|
while($stmt6->fetch()){
|
||||||
$stmt7->bind_param("si", date("Y.n.d H:i:s"), $streamidcko);
|
$stmt7 = $mysqli->prepare("UPDATE Connections SET TimestampPing=CURRENT_TIMESTAMP, TimePing = ? WHERE PHPSessID = ?;");
|
||||||
$stmt7->execute();
|
$stmt7->bind_param("ss", date("Y.n.d H:i:s"), session_id());
|
||||||
$stmt7->store_result();
|
$stmt7->execute();
|
||||||
|
$stmt7->store_result();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user