<?php
ob_start();
error_reporting(0);
// settingz

//daily pay aka mone
$pay = 25;

$sitename = "Grublox";
$version = 1.1;

$devmode = true;
// enable this when the site should be in debug mode (like showing errors and things to fix)
// disable this when its on the public site
// (pls)

if($devmode) {
     error_reporting(E_ALL);
}

// if ur gonna use the availablegameservers array please pick a random gameserver from the array or else we would put all stress on 1 gameserver

$AvailableGameservers = [
     "1" => "127.0.0.1"
];
// No ports? NO BITCHES
// default is 64989 NOOB

$gameSettings = [
     "privatekey" => "-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDhO7uhMz3jBLoSB/SHWhnE5tVxn7P6BlirPVrZEWVUxjyC5ybhZpyjL/r6KBlvhgyn67h2t3gNL043K0uXDAFXCIOWopR6e3fUybie8jI8mJQR1/rWbdcSK/UdSA4IDTULOz/PQxd/U75cy6AHlkpF1YqyMaNMNQsHyV7lbcNXGQIDAQABAoGAMRcf0galGnHRTFTHiyisLSpSoy03wOrZMJlyz5TnDQ8X6UAQTVhcE4VFonhS8ue4onDSB639UIJa/dNF6moHcFP+vh8I2eEdpmPPSkIpB+Y1iYiJGRVbWkbEAPCy/UFGrqAsp2a0rk1BAYuaPwVeXRL72mU0ml2OsdY14liCP7ECQQDnHSetgyNzfDUJ/hUABWaLdWewAOHk/R4rPNtd/lFNd8m/mExOqOF6BCHJ/fpYTec1f6K8ysrsYwA+uGqNd64DAkEA+Xx5wBu36z6EsjiaHyL6VtySiJDCTv2pHzfeU4Q+mBi7ciH2mZnmAZlGdzTAU8EcbrRvkmY9tuT5wtvzIHI5swJBAJB8fa3Qan1sjYwtuNtGhRFy2NwD8TXDuPS3Gz3sHNAdr5eEk1Ap7KznoGgzzCsgqQedQBRfg/W8/w43JQZEaBkCQDINQu/Dn9ZWKJEIwgLVJZwfjFZRlGn8gd19e+ENevFQpOp03eBa+8X+ViC8OImVCHs9P9UDJgZ3UZRCRDiSMfkCQQC7HpVCnGc6sH/+gD9IiN3i8+UMDhMRjnam4VdujgkeDqXCvJZdehpKEQvtLqnGYFmhe7wLRenR6J8zlj02W4Nv
-----END RSA PRIVATE KEY-----"
];

$soapIp = $AvailableGameservers[array_rand($AvailableGameservers,1)];

$soapcfg = [
     "ip" => $soapIp,
     "port" => 64989,
     "url" => "sierraf.tk"
];

$site = [
     "url" => "https://".$_SERVER["HTTP_HOST"]
];

$pagename = ucfirst(str_replace(".php", "", str_replace("/", "", $_SERVER['DOCUMENT_URI'] ?? $_SERVER['PHP_SELF'])));

$maintainers = array("Mario1", "qzip", "nolanwhy");

$clientdevs = array("Invent", "Mario1");

$donators = array('"very"broken ps3', "«John»");

$arraybackground = array('win7.png', 'win8.png', 'epic.png', 'yosemite.png', 'aurora.png', 'tiger.png', 'fish.png', 'baconbloxii.png', 'win81yellow.jpg');

$youtubefunnies = array('bitqf13QU7Q', 'Z_V6yKKIk5U', '2tHl6O5Sp8w', '-5WcDfKndxU', 'cwyTleTL06Y','Rr8XkF5TBLU','kQvlOulY9SI','vVdvTnhkTO8', 'D3GOh7FLDbA', '6utdxDQpoY8', '4i_ZPFptf5c');

if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
     $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}

$sql = [
     "dbname" => "GruBlox",
     "host" => "localhost",
     "port" => 3306,
     "user" => "root",
     "pass" => ""
];

try {
     $con = new PDO("mysql:dbname=".$sql["dbname"].";host=".$sql["host"].";port=".$sql["port"], $sql["user"], $sql["pass"]);
     $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
     unset($sql);
} catch (PDOException $e) {
     die("Connection failed: " . $e->getMessage());
}
