Update PlaceLauncher.php
This commit is contained in:
parent
fdf5e7b23b
commit
f00dbe6530
|
|
@ -43,6 +43,11 @@ if ($momentoftruth == 1) {
|
||||||
$checkifjobalreadyexists->execute();
|
$checkifjobalreadyexists->execute();
|
||||||
$okcheck = $checkifjobalreadyexists->fetchColumn();
|
$okcheck = $checkifjobalreadyexists->fetchColumn();
|
||||||
if ($okcheck == 1) {
|
if ($okcheck == 1) {
|
||||||
|
$passedplacelauncher = '1';
|
||||||
|
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token');
|
||||||
|
$hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher);
|
||||||
|
$hahatroll->bindParam(':token', $token);
|
||||||
|
$hahatroll->execute();
|
||||||
$getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid AND isonline=:isonline');
|
$getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid AND isonline=:isonline');
|
||||||
$getjobforalready->bindParam(':placeid', $placeid);
|
$getjobforalready->bindParam(':placeid', $placeid);
|
||||||
$getjobforalready->bindParam(':isonline', $helppdo);
|
$getjobforalready->bindParam(':isonline', $helppdo);
|
||||||
|
|
@ -52,15 +57,17 @@ if ($momentoftruth == 1) {
|
||||||
$response = [
|
$response = [
|
||||||
"jobId" => $jobid,
|
"jobId" => $jobid,
|
||||||
"status" => $status,
|
"status" => $status,
|
||||||
"joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
"joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||||
"authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx",
|
"authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||||
"authenticationTicket" => $token,
|
"authenticationTicket" => $token,
|
||||||
"message" => $allstatus[$status]
|
"message" => $allstatus[$status]
|
||||||
];
|
];
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
} else if ($okcheck == 0) {
|
} else if ($okcheck == 0) {
|
||||||
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = 1 WHERE token=:token');
|
$passedplacelauncher = '1';
|
||||||
$hahatroll->bindParam(':token', $token);
|
$hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token');
|
||||||
|
$hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher);
|
||||||
|
$hahatroll->bindParam(':token', $token);
|
||||||
$hahatroll->execute();
|
$hahatroll->execute();
|
||||||
function generateRandomJobId() {
|
function generateRandomJobId() {
|
||||||
$chars = '0123456789abcdefghijklmnopqrstuvwxyz';
|
$chars = '0123456789abcdefghijklmnopqrstuvwxyz';
|
||||||
|
|
@ -207,8 +214,8 @@ game:GetService("RunService"):Run()
|
||||||
$response = [
|
$response = [
|
||||||
"jobId" => $jobid,
|
"jobId" => $jobid,
|
||||||
"status" => $status,
|
"status" => $status,
|
||||||
"joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
"joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid,
|
||||||
"authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx",
|
"authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx",
|
||||||
"authenticationTicket" => $token,
|
"authenticationTicket" => $token,
|
||||||
"message" => $allstatus[$status]
|
"message" => $allstatus[$status]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue