From b8bd71fdfd3cb753dec16133ccc4dd53f1b1d161 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Mon, 22 May 2023 13:24:17 +0300 Subject: [PATCH] Delete api directory --- api/CloseJob.php | 66 --------------------------------------- api/UpdatePlayerCount.php | 59 ---------------------------------- 2 files changed, 125 deletions(-) delete mode 100644 api/CloseJob.php delete mode 100644 api/UpdatePlayerCount.php diff --git a/api/CloseJob.php b/api/CloseJob.php deleted file mode 100644 index eaa9081..0000000 --- a/api/CloseJob.php +++ /dev/null @@ -1,66 +0,0 @@ -prepare('SELECT COUNT(*) FROM accesstokens WHERE accesstoken=:accesstoken'); - $grublock->bindParam(':accesstoken', $accesstoken); - $grublock->execute(); - $yestroll = $grublock->fetchColumn(); - if ($yestroll == '1') { - $weneedstuff = $con->prepare('SELECT placeid,hasgrabbedplace,hasbeeninvalidated,ip,jobid FROM accesstokens WHERE accesstoken=:accesstoken'); - $weneedstuff->bindParam(':accesstoken', $accesstoken); - $weneedstuff->execute(); - $okfine = $weneedstuff->fetch(PDO::FETCH_BOTH); - $hasbeeninvalidated = $okfine['hasbeeninvalidated']; - $jobid = $okfine['jobid']; - $yesjob = $con->prepare('SELECT hasended FROM jobs WHERE jobid=:jobid'); - $yesjob->bindParam(':jobid', $jobid); - $yesjob->execute(); - $yessjob = $yesjob->fetch(PDO::FETCH_BOTH); - $hasended = $yessjob['hasended']; - if ($hasbeeninvalidated == '0' && $hasended == '0') { - $itslikeohcoolthathappened = $okfine['placeid']; - $ipfromaccesstoken2 = $okfine['ip']; - if ($devmode == "true") { - $ip = $_SERVER['REMOTE_ADDR']; - - } elseif ($devmode == "false") { - $ip = $_SERVER["HTTP_CF_CONNECTING_IP"]; - } - if ($ip == "::1") { - $ip = '127.0.0.1'; - } - if ($ip == $ipfromaccesstoken2) { - $trolling4k = '1'; - $yessss = $con->prepare('UPDATE accesstokens SET hasbeeninvalidated = :hasbeeninvalidated AND hasgrabbedplace = :hasgrabbedplace WHERE accesstoken=:accesstoken'); - $yessss->bindParam(':hasbeeninvalidated', $trolling4k); - $yessss->bindParam(':hasgrabbedplace', $trolling4k); - $yessss->bindParam(':accesstoken', $accesstoken); - $yessss->execute(); - $jobupdatingtime = $con->prepare('UPDATE jobs SET hasended = :hasended WHERE jobid=:jobid AND placeid=:placeid'); - $jobupdatingtime->bindParam(':hasended', $trolling4k); - $jobupdatingtime->bindParam(':jobid', $jobid); - $jobupdatingtime->bindParam(':placeid', $itslikeohcoolthathappened); - $jobupdatingtime->execute(); - $RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap($ipfromaccesstoken2, 64989); - $RCCServiceSoap->CloseJob($jobid); - $playercount = '0'; - $jobupdatingtime = $con->prepare('UPDATE games SET playercount = :playercount WHERE id=:id'); - $jobupdatingtime->bindParam(':playercount', $playercount); - $jobupdatingtime->bindParam(':id', $itslikeohcoolthathappened); - $jobupdatingtime->execute(); - echo 'OK'; - } - } else { - header("content-type: text/html"); - echo ''; - die(); - } - } else { - header("content-type: text/html"); - echo ''; - die(); - } -} diff --git a/api/UpdatePlayerCount.php b/api/UpdatePlayerCount.php deleted file mode 100644 index 9500de1..0000000 --- a/api/UpdatePlayerCount.php +++ /dev/null @@ -1,59 +0,0 @@ -prepare('SELECT COUNT(*) FROM accesstokens WHERE accesstoken=:accesstoken'); - $forthebestofgrublox->bindParam(':accesstoken', $accesstoken); - $forthebestofgrublox->execute(); - $yesdoit = $forthebestofgrublox->fetchColumn(); - if ($yesdoit == '1') { - $yesstuff = $con->prepare('SELECT placeid,hasgrabbedplace,hasbeeninvalidated,ip,jobid FROM accesstokens WHERE accesstoken=:accesstoken'); - $yesstuff->bindParam(':accesstoken', $accesstoken); - $yesstuff->execute(); - $alanfackler = $yesstuff->fetch(PDO::FETCH_BOTH); - $placeid = $alanfackler['placeid']; - $jobid = $alanfackler['jobid']; - $ipfromaccesstoken3 = $alanfackler['ip']; - $hasgrabbedplace = $alanfackler['hasgrabbedplace']; - $hasbeeninvalidated = $alanfackler['hasbeeninvalidated']; - $twentyfourteen = $con->prepare('SELECT hasended FROM jobs WHERE jobid=:jobid AND placeid=:placeid'); - $twentyfourteen->bindParam(':jobid', $jobid); - $twentyfourteen->bindParam(':placeid', $placeid); - $twentyfourteen->execute(); - $twentysixteen = $twentyfourteen->fetch(PDO::FETCH_BOTH); - $hasended = $twentysixteen['hasended']; - if ($hasended == '0' && $hasbeeninvalidated == '0') { - if ($devmode == "true") { - $ip = $_SERVER['REMOTE_ADDR']; - - } elseif ($devmode == "false") { - $ip = $_SERVER["HTTP_CF_CONNECTING_IP"]; - } - if ($ip == "::1") { - $ip = '127.0.0.1'; - } - if ($ipfromaccesstoken3 == $ip) { - $trolling8k = '1'; - $yessss = $con->prepare('UPDATE games SET playercount = :playercount WHERE id=:id'); - $yessss->bindParam(':playercount', $playercount); - $yessss->bindParam(':id', $placeid); - $yessss->execute(); - echo 'OK'; - } else { - header("content-type: text/html"); - echo ''; - die(); - } - } else { - header("content-type: text/html"); - echo ''; - die(); - } - } else { - header("content-type: text/html"); - echo ''; - die(); - } -}