Update config.php

This commit is contained in:
nolanwhy 2023-05-06 09:39:11 +02:00
parent c3a75df759
commit 73cf1bd59a
1 changed files with 23 additions and 8 deletions

View File

@ -4,6 +4,14 @@ error_reporting(0);
ini_set('extension', 'soap');
// settingz
$sql = [
"dbname" => "GruBlox",
"host" => "localhost",
"port" => 3306,
"user" => "root",
"pass" => ""
];
$settings = file_get_contents(dirname(__DIR__).'/settings.json');
$settings = json_decode($settings, true);
//daily pay aka mone
@ -19,11 +27,26 @@ $version = 1.1;
$dscInvite = "//discord.gg/NvFmZnu8hT";
$devmode = true;
if(str_contains($_SERVER["HTTP_HOST"],'localhost')) {
$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) {
$developer = "";
// developer, you can add your own code to check if its useragent, ip address or just the request uri if you are using port.
// please put it in only one line so its better.
/* nolanwhy */ if(str_contains($_SERVER["HTTP_HOST"],'localhost:81')){$developer = "nolanwhy";}
// end
if(!empty($developer)) {
if($developer == "nolanwhy") {
$sql["pass"] = "NeverGonnaGiveYouUp!?69fg-";
}
}
error_reporting(E_ALL);
}
@ -76,14 +99,6 @@ 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);