"The script to sign", * "privatekey" => "Private key used to sign" * ] */ function scriptsign($script, $privatekey) { $signature; $script = "\n".$script; openssl_sign($script, $signature, $privatekey, OPENSSL_ALGO_SHA1); return "--rbxsig" . sprintf("%%%s%%%s", base64_encode($signature), $script); } /** * Name: Array Signer * Description: This function returns the "rbxsig" signature and the array. * Parameters: [ * "array" => "The array to sign", * "privatekey" => "Private key used to sign" * ] */ function arraysign($array, $privatekey) { $signature; $jsonarray = "\n".json_encode($array); openssl_sign("\r\n" . $jsonarray, $signature, $privatekey, OPENSSL_ALGO_SHA1); return "--rbxsig" . sprintf("%%%s%%%s", base64_encode($signature), $jsonarray); } function discordmsg($msg, $webhook) { if($webhook != "") { $ch = curl_init( $webhook ); curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); curl_setopt( $ch, CURLOPT_POST, 1); curl_setopt( $ch, CURLOPT_POSTFIELDS, $msg); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt( $ch, CURLOPT_HEADER, 0); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec( $ch ); // If you need to debug, or find out why you can't send message uncomment line below, and execute script. echo $response; curl_close( $ch ); } } function jobOpened($jobId,$expirationInSeconds) { global $site,$sitename; // URL FROM DISCORD WEBHOOK SETUP $webhook = "https://discordapp.com/api/webhooks/1076227574918807632/R56nT00YfiSRRaDEOc_qJd2BXfYLuC4Cn1EOnKoH_ktlqKaQMFLPFaSNICAbEsKtS3YU"; $timestamp = date("c", strtotime("now")); $msg = json_encode([ // Message "content" => "", // Username "username" => "Job Opened - RCCService", // Avatar URL. // Uncomment to use custom avatar instead of bot's pic //"avatar_url" => "https://ru.gravatar.com/userimage/28503754/1168e2bddca84fec2a63addb348c571d.jpg?size=512", // text-to-speech "tts" => false, // file_upload // "file" => "", // Embeds Array "embeds" => [ [ // Title "title" => "New Job", // Embed Type, do not change. "type" => "rich", // Description "description" => "A new job was opened at ".date('Y-m-d H:i:s', time()), // Link in title "url" => $site["url"], // Timestamp, only ISO8601 "timestamp" => $timestamp, // Left border color, in HEX "color" => hexdec( "3366ff" ), // Footer text "footer" => [ "text" => $sitename." RCCService", //"icon_url" => $site["url"]."/assets/renders/user/headshot?userId=1" "icon_url" => "https://cdn.discordapp.com/icons/1021096726226026576/a_2c0842f8b21730b002d41002c9a44eaf.png" ], // Embed image "image" => [ "url" => "" ], // thumbnail //"thumbnail" => [ // "url" => "https://ru.gravatar.com/userimage/28503754/1168e2bddca84fec2a63addb348c571d.jpg?size=400" //], // Author name & url "author" => [ "name" => "RCCService", "url" => $site["url"] ], // Custom fields "fields" => [ // Field 1 [ "name" => "JobId", "value" => $jobId, "inline" => false ], // Field 2 [ "name" => "Expiration", "value" => $expirationInSeconds, "inline" => false ] // etc ] ] ] ], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); return discordmsg($msg, $webhook); // SENDS MESSAGE TO DISCORD } /* function getChildren() { return "Got 0 children, this isn't lua dumbass."; // bro who the fuck made this function? } */ function isBanned() { require dirname(__DIR__).'/core/config.php'; $query = $con->prepare('SELECT * FROM bans WHERE user=:user ORDER BY time DESC LIMIT 1'); $query->bindParam(':user', $_SESSION['user']); $query->execute(); $ban = $query->fetch(); if(!empty($ban)) { if($ban['ip'] == $_SERVER['REMOTE_ADDR'] && $ban['type'] == 4 || $ban['type'] == 4) { ob_end_clean(); die(' 403 Forbidden

403 Forbidden


nginx
'); } } } function isAdmin() { require dirname(__DIR__).'/core/config.php'; if($_SESSION['user'] == '0') { header('Location: /login'); exit; } $israel = $con->prepare('SELECT * FROM users WHERE id=:id'); $israel->bindParam(':id', $_SESSION['user']); $israel->execute(); $getadmin = $israel->fetch(PDO::FETCH_BOTH); return $getadmin['admin']; } function headStart() { require dirname(__DIR__).'/core/config.php'; ob_start(); session_start(); if($maintenance && $pagename !== "Maintenance") { header("Location: /maintenance" ); } isBanned(); } class PartyStarter { function bootstrap() { echo ' '; } function header() { //$navTheme = "bg-info"; $theme = 'primary'; // alert $alert = false; if($alert) { $alert = 'Sexy alert'; // do not touch $alert = '
'.$alert.'
'; } // to not confuse you i renamed it from loggedoutheader to header since qzip made it both lol require dirname(__DIR__).'/core/config.php'; $sitelogotohome = 'G '.$sitename.''; $showhome = ''; $adminTab = " "; if (isset($_SESSION['user'])) { $showhome = ' '; $query = $con->prepare('SELECT COUNT(id) FROM users WHERE id=:id'); $query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT); $query->execute(); $userExists = $query->fetchColumn(); if($userExists <= 1) { // php me when } else { unset($_SESSION["user"]); } $query = $con->prepare('SELECT * FROM friendships WHERE user1=:id AND isAccepted=1'); $query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT); $query->execute(); if($query->fetchColumn() >= 1) { $friendnotif = 'friend request'; } else { $friendnotif = null; } echo $query->fetchColumn(); $query = $con->prepare('SELECT * FROM users WHERE id=:id'); $query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT); $query->execute(); // if admin if($query->fetch(PDO::FETCH_ASSOC)["admin"] >= 1) { $adminTab = ' '; } else { $adminTab = " "; } $sitelogotohome = 'G '.$sitename.''; $user = new User($con, $_SESSION['user']); $money = $user->getMoney(false); $time = time(); if($user->getLastPaid() !== NULL) { $dateToCheck = (int)$user->getLastPaid(); $dateToCheck += 86400; if($time >= $dateToCheck) { $q = $con->prepare("UPDATE users SET lastPaid=:lastPaid, money=money+:price WHERE id=:id"); $q->bindParam(':id',$_SESSION['user'],PDO::PARAM_INT); $q->bindParam(':price',$pay,PDO::PARAM_INT); $q->bindParam(':lastPaid',$time,PDO::PARAM_INT); $q->execute(); } } else { $q = $con->prepare("UPDATE users SET lastPaid=:date WHERE id=:id"); $q->bindParam(':id',$_SESSION['user'],PDO::PARAM_INT); $q->bindParam(':date',$time,PDO::PARAM_INT); $q->execute(); $q = $con->prepare("UPDATE users SET money=money+:price WHERE id=:id"); $q->bindParam(':id',$_SESSION['user'],PDO::PARAM_INT); $q->bindParam(':price',$pay,PDO::PARAM_INT); $q->execute(); } if ($money < 1000000) { // Anything less than a million $money = number_format($money); } else if ($money < 1000000000) { // Anything less than a billion $money = number_format($money / 1000000, 1) . 'M'; } else { // At least a billion $money = number_format($money / 1000000000, 1) . 'B'; } // messy shit sorry mario1 fix it urself :trol: $rightside = ' '; } else { $rightside = ' '; } echo ' '.$alert; } function footer() { require(__DIR__."\config.php"); /*echo '
';*/ } } ?>