"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('