diff --git a/src/admin/bans.php b/src/admin/bans.php index 6f16f16..48d3de9 100644 --- a/src/admin/bans.php +++ b/src/admin/bans.php @@ -22,26 +22,26 @@ // if post request if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { - if (isset($_POST["ban"])) { - $user = Util::securevar($_POST["ban"]); - } - if (isset($_POST["reason"])) { - $reason = Util::securevar($_POST["reason"]); - } + if (isset($_POST["ban"])) { + $user = Util::securevar($_POST["ban"]); + } + if (isset($_POST["reason"])) { + $reason = Util::securevar($_POST["reason"]); + } - if (isset($user)) { - Util::adminCheck(); - $uid = $user; + if (isset($user)) { + Util::adminCheck(); + $uid = $user; - if ($reason === " " || $reason === "" || empty($reason)) { - $reason = "none"; - } + if ($reason === " " || $reason === "" || empty($reason)) { + $reason = "none"; + } - $admin->setBannreason($reason, $uid); - $admin->setBanned($uid); + $admin->setBannreason($reason, $uid); + $admin->setBanned($uid); - header("location: bans.php"); - } + header("location: bans.php"); + } } ?> @@ -111,14 +111,14 @@ + ?> uid <= $max && $row->uid >= $min) : ?> @@ -128,19 +128,19 @@ uid), - PATHINFO_EXTENSION + Util::getavatar($row->uid), + PATHINFO_EXTENSION ); - $name = $row->uid . "." . $ext; - ?> + $name = $row->uid . "." . $ext; + ?> + Util::getavatar($row->uid) + ); ?>" download=""> + Util::getavatar($row->uid) + ); ?>"> uid); ?> diff --git a/src/admin/codes.php b/src/admin/codes.php index f1f405e..766a3ed 100644 --- a/src/admin/codes.php +++ b/src/admin/codes.php @@ -22,72 +22,72 @@ // Handle POST requests if (Util::securevar($_SERVER['REQUEST_METHOD']) === 'POST') { - if (isset($_POST['genInv'])) { - $geninv = Util::securevar($_POST['genInv']); - if (isset($geninv)) { - Util::suppCheck(); - $admin->getInvCodeGen($username); + if (isset($_POST['genInv'])) { + $geninv = Util::securevar($_POST['genInv']); + if (isset($geninv)) { + Util::suppCheck(); + $admin->getInvCodeGen($username); + } + header("location: codes.php"); } - header("location: codes.php"); - } - - if (isset($_POST['delInv'])) { - $delinv = Util::securevar($_POST['delInv']); - if (isset($delinv)) { - Util::suppCheck(); - $admin->delInvCode($delinv); + + if (isset($_POST['delInv'])) { + $delinv = Util::securevar($_POST['delInv']); + if (isset($delinv)) { + Util::suppCheck(); + $admin->delInvCode($delinv); + } + header("location: codes.php"); } - header("location: codes.php"); - } - - if (isset($_POST['flushInvs'])) { - $delinv = Util::securevar($_POST['flushInvs']); - if (isset($delinv)) { - Util::adminCheck(); - $admin->flushInvCode(); + + if (isset($_POST['flushInvs'])) { + $delinv = Util::securevar($_POST['flushInvs']); + if (isset($delinv)) { + Util::adminCheck(); + $admin->flushInvCode(); + } + header("location: codes.php"); } - header("location: codes.php"); - } - // Handle Subscription Generation - if (isset($_POST["genSub"])) { - $gen1 = Util::securevar($_POST["genSub"]); - if (isset($gen1)) { - $admin->getSubCodeGen($username); + // Handle Subscription Generation + if (isset($_POST["genSub"])) { + $gen1 = Util::securevar($_POST["genSub"]); + if (isset($gen1)) { + $admin->getSubCodeGen($username); + } + header("location: codes.php"); } - header("location: codes.php"); - } - if (isset($_POST["genSub2"])) { - $gen2 = Util::securevar($_POST["genSub2"]); - if (isset($gen2)) { - $admin->getSubCodeGen3M($username); + if (isset($_POST["genSub2"])) { + $gen2 = Util::securevar($_POST["genSub2"]); + if (isset($gen2)) { + $admin->getSubCodeGen3M($username); + } + header("location: codes.php"); } - header("location: codes.php"); - } - if (isset($_POST["genSub3"])) { - $gen3 = Util::securevar($_POST["genSub3"]); - if (isset($gen3)) { - $admin->getSubCodeGentrail($username); + if (isset($_POST["genSub3"])) { + $gen3 = Util::securevar($_POST["genSub3"]); + if (isset($gen3)) { + $admin->getSubCodeGentrail($username); + } + header("location: codes.php"); } - header("location: codes.php"); - } - if (isset($_POST["delSub"])) { - $delsub = Util::securevar($_POST["delSub"]); - if (isset($delsub)) { - $admin->delsubcode($delsub); + if (isset($_POST["delSub"])) { + $delsub = Util::securevar($_POST["delSub"]); + if (isset($delsub)) { + $admin->delsubcode($delsub); + } + header("location: codes.php"); } - header("location: codes.php"); - } - if (isset($_POST["flushSub"])) { - $flushsub = Util::securevar($_POST["flushSub"]); - if (isset($flushsub)) { - $admin->flushsubcodes(); + if (isset($_POST["flushSub"])) { + $flushsub = Util::securevar($_POST["flushSub"]); + if (isset($flushsub)) { + $admin->flushsubcodes(); + } + header("location: codes.php"); } - header("location: codes.php"); - } } ?> diff --git a/src/admin/gift.php b/src/admin/gift.php index 3bbbf59..bc807a8 100644 --- a/src/admin/gift.php +++ b/src/admin/gift.php @@ -19,19 +19,19 @@ // if post request if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { - if (isset($_POST["giftsub"])) { - $giftsub = Util::securevar($_POST["giftsub"]); - } - if (isset($_POST["days"])) { - $time = Util::securevar($_POST["days"]); - } + if (isset($_POST["giftsub"])) { + $giftsub = Util::securevar($_POST["giftsub"]); + } + if (isset($_POST["days"])) { + $time = Util::securevar($_POST["days"]); + } - if (isset($giftsub)) { - $name = $giftsub; - $sub = $admin->subcheckbyusername($name); - $admin->giftsub($name, $sub, $time); - } - header("location: gift.php"); + if (isset($giftsub)) { + $name = $giftsub; + $sub = $admin->subcheckbyusername($name); + $admin->giftsub($name, $sub, $time); + } + header("location: gift.php"); } ?> diff --git a/src/admin/index.php b/src/admin/index.php index 6d57a65..01a4115 100644 --- a/src/admin/index.php +++ b/src/admin/index.php @@ -23,135 +23,135 @@ // Handle POST request if ($_SERVER["REQUEST_METHOD"] === "POST") { - if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { - if (isset($_POST["SystemStatus"])) { - $Systemstatus = Util::securevar($_POST["SystemStatus"]); - } - if (isset($_POST["SystemMaint"])) { - $SystemMaint = Util::securevar($_POST["SystemMaint"]); - } - if (isset($_POST["SystemVersion"])) { - $SystemVersion = Util::securevar($_POST["SystemVersion"]); - } - if (isset($_POST["invite"])) { - $invite = Util::securevar($_POST["invite"]); - } - if (isset($_POST['Systemfreeze'])) { - $Systemfreeze = Util::securevar($_POST['Systemfreeze']); - } - if (isset($_POST['flushchat'])) { - $flushchat = Util::securevar($_POST['flushchat']); - } - if (isset($_POST['shoutbox'])) { - $shoutbox = Util::securevar($_POST['shoutbox']); - } - if (isset($_POST['setnews'])) { - $news = Util::securevar($_POST['setnews']); - } - if (isset($_POST['invwave'])) { - $invwave = Util::securevar($_POST['invwave']); - } - if (isset($_POST['discordlinking'])) { - $discordlinking = Util::securevar($_POST['discordlinking']); - } - if (isset($_POST['discordrelinking'])) { - $discordrelinking = Util::securevar($_POST['discordrelinking']); - } - if (isset($_POST['discordlogging'])) { - $discordlogging = Util::securevar($_POST['discordlogging']); - } - - if (isset($_POST['service'])) { - $service = Util::securevar($_POST['service']); - } - - if (isset($_POST['setkey'])) { - $key = Util::securevar($_POST['site_key']); - } - - if (isset($_POST['setsecret'])) { - $secret = Util::securevar($_POST['site_secret']); - } - - if (isset($_POST['setcolor'])) { - $embed = Util::securevar($_POST['embed_color']); - } - - if (isset($_POST['captcha_option'])) { - $option = Util::securevar($_POST['captcha_option']); - } - - - Util::adminCheck(); - - if (isset($Systemstatus)) { - $admin->setSystemStatus(); - } - - if (isset($SystemMaint)) { - $admin->setSystemMaint(); - } - - if (isset($SystemVersion)) { - $ver = floatval(Util::securevar($_POST["version"])); - $admin->setSystemVersion($ver); - } - - if (isset($invite)) { - $admin->setinvite(); - } - - if (isset($news)) { - $news = Util::securevar($_POST["msg"]); - $admin->setnews($news); - } - - if (isset($Systemfreeze)) { - $admin->setSystemfreeze(); - } - - if (isset($flushchat)) { - $admin->flushchat(); - } - - if (isset($shoutbox)) { - $admin->setshoutbox(); - } - - if (isset($invwave)) { - $admin->invwave(); - } - if (isset($discordlinking)) { - $admin->setDiscordLink(); - } - if (isset($discordrelinking)) { - $admin->setDiscordReLink(); - } - if (isset($discordlogging)) { - $admin->setDiscordLogging(); - } - if (isset($option)) { - $admin->setCaptchaSystem($option); - } - if (isset($key)) { - $admin->setCaptchaKey($key); - } - if (isset($secret)) { - $admin->setCaptchaSecret($secret); - } - if (isset($embed)) { - $admin->changeEmbedColor($embed); - } - - - - header("location: system.php"); - } - - - - - header("location: index.php"); + if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { + if (isset($_POST["SystemStatus"])) { + $Systemstatus = Util::securevar($_POST["SystemStatus"]); + } + if (isset($_POST["SystemMaint"])) { + $SystemMaint = Util::securevar($_POST["SystemMaint"]); + } + if (isset($_POST["SystemVersion"])) { + $SystemVersion = Util::securevar($_POST["SystemVersion"]); + } + if (isset($_POST["invite"])) { + $invite = Util::securevar($_POST["invite"]); + } + if (isset($_POST['Systemfreeze'])) { + $Systemfreeze = Util::securevar($_POST['Systemfreeze']); + } + if (isset($_POST['flushchat'])) { + $flushchat = Util::securevar($_POST['flushchat']); + } + if (isset($_POST['shoutbox'])) { + $shoutbox = Util::securevar($_POST['shoutbox']); + } + if (isset($_POST['setnews'])) { + $news = Util::securevar($_POST['setnews']); + } + if (isset($_POST['invwave'])) { + $invwave = Util::securevar($_POST['invwave']); + } + if (isset($_POST['discordlinking'])) { + $discordlinking = Util::securevar($_POST['discordlinking']); + } + if (isset($_POST['discordrelinking'])) { + $discordrelinking = Util::securevar($_POST['discordrelinking']); + } + if (isset($_POST['discordlogging'])) { + $discordlogging = Util::securevar($_POST['discordlogging']); + } + + if (isset($_POST['service'])) { + $service = Util::securevar($_POST['service']); + } + + if (isset($_POST['setkey'])) { + $key = Util::securevar($_POST['site_key']); + } + + if (isset($_POST['setsecret'])) { + $secret = Util::securevar($_POST['site_secret']); + } + + if (isset($_POST['setcolor'])) { + $embed = Util::securevar($_POST['embed_color']); + } + + if (isset($_POST['captcha_option'])) { + $option = Util::securevar($_POST['captcha_option']); + } + + + Util::adminCheck(); + + if (isset($Systemstatus)) { + $admin->setSystemStatus(); + } + + if (isset($SystemMaint)) { + $admin->setSystemMaint(); + } + + if (isset($SystemVersion)) { + $ver = floatval(Util::securevar($_POST["version"])); + $admin->setSystemVersion($ver); + } + + if (isset($invite)) { + $admin->setinvite(); + } + + if (isset($news)) { + $news = Util::securevar($_POST["msg"]); + $admin->setnews($news); + } + + if (isset($Systemfreeze)) { + $admin->setSystemfreeze(); + } + + if (isset($flushchat)) { + $admin->flushchat(); + } + + if (isset($shoutbox)) { + $admin->setshoutbox(); + } + + if (isset($invwave)) { + $admin->invwave(); + } + if (isset($discordlinking)) { + $admin->setDiscordLink(); + } + if (isset($discordrelinking)) { + $admin->setDiscordReLink(); + } + if (isset($discordlogging)) { + $admin->setDiscordLogging(); + } + if (isset($option)) { + $admin->setCaptchaSystem($option); + } + if (isset($key)) { + $admin->setCaptchaKey($key); + } + if (isset($secret)) { + $admin->setCaptchaSecret($secret); + } + if (isset($embed)) { + $admin->changeEmbedColor($embed); + } + + + + header("location: system.php"); + } + + + + + header("location: index.php"); } ?> @@ -169,7 +169,7 @@
getSystemData()->status == "Online" + $System->getSystemData()->status == "Online" ) : ?>
@@ -181,7 +181,7 @@
getSystemData()->status == "Offline" + $System->getSystemData()->status == "Offline" ) : ?>
@@ -199,7 +199,7 @@
getSystemData()->maintenance == "-" + $System->getSystemData()->maintenance == "-" ) : ?>
@@ -211,7 +211,7 @@
getSystemData()->maintenance == "UNDER" + $System->getSystemData()->maintenance == "UNDER" ) : ?>
@@ -239,7 +239,7 @@
getSystemData()->discordlinking == "0" + $System->getSystemData()->discordlinking == "0" ) : ?>
@@ -267,7 +267,7 @@
getSystemData()->relinkdiscord == "0" + $System->getSystemData()->relinkdiscord == "0" ) : ?>
@@ -295,7 +295,7 @@
getSystemData()->discordlogging == "0" + $System->getSystemData()->discordlogging == "0" ) : ?>
@@ -327,8 +327,8 @@
getSystemData()->version - ); ?>
+ $System->getSystemData()->version + ); ?>

Loader version

@@ -350,7 +350,7 @@
getSystemData()->invites == "0" + $System->getSystemData()->invites == "0" ) : ?>
@@ -378,7 +378,7 @@
getSystemData()->frozen == "1" + $System->getSystemData()->frozen == "1" ) : ?>
@@ -397,8 +397,8 @@
getUserCount() - ); ?>
+ $user->getUserCount() + ); ?>

Total Users

@@ -412,8 +412,8 @@
getNewUser() - ); ?>
+ $user->getNewUser() + ); ?>

Latest User

@@ -427,8 +427,8 @@
getBannedUserCount() - ); ?>
+ $user->getBannedUserCount() + ); ?>

Banned Users

@@ -446,7 +446,7 @@
System Status
getSystemData()->status == "Online" + $System->getSystemData()->status == "Online" ) : ?>
@@ -456,8 +456,8 @@

Active Subs: getActiveUserCount() - ); ?>

+ $user->getActiveUserCount() + ); ?>

@@ -465,7 +465,7 @@
getSystemData()->status == "Offline" + $System->getSystemData()->status == "Offline" ) : ?>
@@ -475,8 +475,8 @@

Active Subs: getActiveUserCount() - ); ?>

+ $user->getActiveUserCount() + ); ?>

@@ -496,8 +496,8 @@
"> + Util::securevar($_SERVER["PHP_SELF"]) + ); ?>">
Settings

Set System version

diff --git a/src/admin/logs.php b/src/admin/logs.php index 4bdbab0..9cc198a 100644 --- a/src/admin/logs.php +++ b/src/admin/logs.php @@ -56,12 +56,12 @@ action; - if (strpos($action, 'Generated an inv:') === 0) { - Util::display('Generated an inv: ' . substr($action, strlen('Generated an inv:')) . ''); - } else { - Util::display($action); - } - ?> + if (strpos($action, 'Generated an inv:') === 0) { + Util::display('Generated an inv: ' . substr($action, strlen('Generated an inv:')) . ''); + } else { + Util::display($action); + } + ?>
diff --git a/src/admin/userinvites.php b/src/admin/userinvites.php index 9d2a758..59ff96d 100644 --- a/src/admin/userinvites.php +++ b/src/admin/userinvites.php @@ -21,17 +21,17 @@ // if post request if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { - if (isset($_POST["username"])) { - $username = Util::securevar($_POST["username"]); - } - if (isset($_POST["invites"])) { - $invites = Util::securevar($_POST["invites"]); - } + if (isset($_POST["username"])) { + $username = Util::securevar($_POST["username"]); + } + if (isset($_POST["invites"])) { + $invites = Util::securevar($_POST["invites"]); + } - if (isset($username)) { - $admin->giftinvites($username, $invites); - } - header("location: userinvites.php"); + if (isset($username)) { + $admin->giftinvites($username, $invites); + } + header("location: userinvites.php"); } ?> diff --git a/src/admin/users.php b/src/admin/users.php index 4672001..5d8ff9b 100644 --- a/src/admin/users.php +++ b/src/admin/users.php @@ -1,68 +1,68 @@ /getUserArray(); +$userList = $admin->getUserArray(); - Util::banCheck(); - Util::checktoken(); - Util::suppCheck(); - Util::head("Admin Panel"); +Util::banCheck(); +Util::checktoken(); +Util::suppCheck(); +Util::head("Admin Panel"); - // if post request - if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { - if (isset($_POST["resetHWID"])) { - $hwid = Util::securevar($_POST["resetHWID"]); - } - if (isset($_POST["setsupp"])) { - $supp = Util::securevar($_POST["setsupp"]); - } - if (isset($_POST["setBanned"])) { - $ban = Util::securevar($_POST["setBanned"]); - } - if (isset($_POST["setAdmin"])) { - $adminuser = Util::securevar($_POST["setAdmin"]); - } +// if post request +if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { + if (isset($_POST["resetHWID"])) { + $hwid = Util::securevar($_POST["resetHWID"]); + } + if (isset($_POST["setsupp"])) { + $supp = Util::securevar($_POST["setsupp"]); + } + if (isset($_POST["setBanned"])) { + $ban = Util::securevar($_POST["setBanned"]); + } + if (isset($_POST["setAdmin"])) { + $adminuser = Util::securevar($_POST["setAdmin"]); + } - if (isset($hwid)) { - Util::suppCheck(); - $rowUID = $hwid; - $admin->resetHWID($rowUID); - } + if (isset($hwid)) { + Util::suppCheck(); + $rowUID = $hwid; + $admin->resetHWID($rowUID); + } - if (isset($ban)) { - Util::adminCheck(); - $rowUID = $ban; - $admin->setBanned($ban); - } + if (isset($ban)) { + Util::adminCheck(); + $rowUID = $ban; + $admin->setBanned($ban); + } - if (isset($supp)) { - Util::adminCheck(); - $rowUID = $supp; - $admin->setsupp($rowUID); - } + if (isset($supp)) { + Util::adminCheck(); + $rowUID = $supp; + $admin->setsupp($rowUID); + } - if (isset($adminuser)) { - Util::adminCheck(); - $rowUID = $adminuser; - $admin->setAdmin($rowUID); - } + if (isset($adminuser)) { + Util::adminCheck(); + $rowUID = $adminuser; + $admin->setAdmin($rowUID); + } - header("location: users.php"); - } - ?> + header("location: users.php"); +} +?> @@ -100,14 +100,14 @@ + if (isset($_GET["min"]) && isset($_GET["max"])) { + $min = Util::securevar($_GET["min"]); + $max = Util::securevar($_GET["max"]); + } + ?> uid <= $max && $row->uid >= $min) : ?> @@ -117,8 +117,8 @@ uid), PATHINFO_EXTENSION); - $name = $row->uid . "." . $ext; - ?> + $name = $row->uid . "." . $ext; + ?> @@ -141,9 +141,9 @@ getSubStatus($row->username); ?> 0) : ?> 600) { - $days = 'LT'; + $days = 'LT'; } - ?> + ?> @@ -154,10 +154,10 @@

- hwid !== NULL) { - Util::display($row->hwid); + hwid !== null) { + Util::display($row->hwid); } else { - Util::Display('No HWID found.'); + Util::Display('No HWID found.'); } ?>

diff --git a/src/app/models/ApiModel.php b/src/app/models/ApiModel.php index 8327624..04e0d23 100644 --- a/src/app/models/ApiModel.php +++ b/src/app/models/ApiModel.php @@ -279,5 +279,5 @@ protected function getWhitelistedIPs(): array return []; } } - + } diff --git a/src/app/models/SystemModel.php b/src/app/models/SystemModel.php index 3493d10..3e62c18 100644 --- a/src/app/models/SystemModel.php +++ b/src/app/models/SystemModel.php @@ -14,25 +14,25 @@ protected function SystemData() $this->prepare('SELECT * FROM `system`'); $this->statement->execute(); $result = $this->statement->fetch(); - + // Status $result->status = (int) $result->status === 0 ? 'Online' : 'Offline'; - + // Maintenance $result->maintenance = (int) $result->maintenance === 0 ? '-' : 'UNDER'; - + // Discord Linking $result->discordlinking = (int) $result->discordlinking; - + // Discord Logging $result->discordlogging = (int) $result->discordlogging; - + // Discord Re-Link $result->relinkdiscord = (int) $result->relinkdiscord; - + // Auth captcha $result->cap_service = (int) $result->cap_service; - + // Auth captcha name based on cap_service value switch ($result->cap_service) { case 1: @@ -48,10 +48,10 @@ protected function SystemData() $result->cap_name = 'Disabled'; break; } - + return $result; } - + protected function getCaptcha() { $this->prepare('SELECT * FROM `system`'); diff --git a/src/auth/logout.php b/src/auth/logout.php index b4910a6..896ee2a 100644 --- a/src/auth/logout.php +++ b/src/auth/logout.php @@ -4,7 +4,7 @@ Session::init(); -$user = new UserController; +$user = new UserController(); $user->logoutUser(); -Util::redirect('/auth/login.php'); \ No newline at end of file +Util::redirect('/auth/login.php'); diff --git a/src/banned.php b/src/banned.php index 193af0a..ea6bf87 100644 --- a/src/banned.php +++ b/src/banned.php @@ -2,7 +2,7 @@ require_once 'app/require.php'; -$user = new UserController; +$user = new UserController(); Session::init(); if (!Session::isLogged()) { diff --git a/src/download.php b/src/download.php index d62baf8..6576141 100644 --- a/src/download.php +++ b/src/download.php @@ -2,14 +2,18 @@ require_once 'app/require.php'; require_once 'app/controllers/SystemController.php'; -$user = new UserController; -$System = new SystemController; +$user = new UserController(); +$System = new SystemController(); Session::init(); -if (!Session::isLogged()) { Util::redirect('/auth/login.php'); } +if (!Session::isLogged()) { + Util::redirect('/auth/login.php'); +} Util::banCheck(); -if ($user->getSubStatus() < 1) { Util::redirect('/'); } +if ($user->getSubStatus() < 1) { + Util::redirect('/'); +} $System = Util::randomCode(35); diff --git a/src/includes/head.nav.inc.php b/src/includes/head.nav.inc.php index 95f9269..02024c6 100644 --- a/src/includes/head.nav.inc.php +++ b/src/includes/head.nav.inc.php @@ -25,5 +25,3 @@ function display_top_nav($title)
'); } - -?> diff --git a/src/index.php b/src/index.php index 5051f11..1bf608f 100644 --- a/src/index.php +++ b/src/index.php @@ -2,7 +2,7 @@ require_once "app/require.php"; require_once "app/controllers/SystemController.php"; -require_once ("includes/head.nav.inc.php"); +require_once("includes/head.nav.inc.php"); $user = new UserController(); @@ -10,7 +10,7 @@ Session::init(); if (!Session::isLogged()) { - Util::redirect("/auth/login.php"); + Util::redirect("/auth/login.php"); } $username = Session::get("username"); @@ -36,7 +36,7 @@
getSystemData()->maintenance == "-" + $System->getSystemData()->maintenance == "-" ) : ?>
@@ -48,7 +48,7 @@
getSystemData()->maintenance == "UNDER" + $System->getSystemData()->maintenance == "UNDER" ) : ?>
@@ -67,8 +67,8 @@
getSystemData()->version - ); ?>
+ $System->getSystemData()->version + ); ?>

Loader version

@@ -87,7 +87,7 @@
Systems
getSystemData()->status == "Online" + $System->getSystemData()->status == "Online" ) : ?>
@@ -103,7 +103,7 @@
getSystemData()->status == "Offline" + $System->getSystemData()->status == "Offline" ) : ?>
@@ -200,9 +200,9 @@
- 0) : ?> +if ($loginfails > 0) : ?>
Security Warning: failed login attempts diff --git a/src/user/log.php b/src/user/log.php index 56f550e..8f6c755 100644 --- a/src/user/log.php +++ b/src/user/log.php @@ -9,7 +9,7 @@ Session::init(); if (!Session::isLogged()) { - Util::redirect("/auth/login.php"); + Util::redirect("/auth/login.php"); } $uid = Session::get("uid"); @@ -22,12 +22,12 @@ if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { - if (isset($_POST["password"])) { - $submittedPassword = Util::securevar($_POST["password"]); - $error = $user->flush($submittedPassword); - } - header('Location: log.php'); - exit; + if (isset($_POST["password"])) { + $submittedPassword = Util::securevar($_POST["password"]); + $error = $user->flush($submittedPassword); + } + header('Location: log.php'); + exit; } ?> diff --git a/src/user/lookup.php b/src/user/lookup.php index 0b0fd01..9392e9c 100644 --- a/src/user/lookup.php +++ b/src/user/lookup.php @@ -14,8 +14,8 @@ $uid = Session::get("uid"); $username = Session::get("username"); -$admin = Util::adminCheck(False); -$supp = Util::suppCheck(False); +$admin = Util::adminCheck(false); +$supp = Util::suppCheck(false); Util::banCheck(); Util::checktoken(); diff --git a/src/user/profile.php b/src/user/profile.php index 94bc0c1..8ad6d69 100644 --- a/src/user/profile.php +++ b/src/user/profile.php @@ -8,7 +8,7 @@ $System = new SystemController(); Session::init(); if (!Session::isLogged()) { - Util::redirect("/auth/login.php"); + Util::redirect("/auth/login.php"); } $uid = Session::get("uid"); @@ -25,33 +25,33 @@ if (!$user->getdcid($uid) == false) { - $user->downloadAvatarWithAccessToken($user->getdcid($uid), $uid); + $user->downloadAvatarWithAccessToken($user->getdcid($uid), $uid); } if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") { - if (isset($_POST["updatePassword"])) { - $error = $user->updateUserPass(Util::securevar($_POST)); - } - if (isset($_POST["activateSub"])) { - $error = $user->activateSub(Util::securevar($_POST['subCode'])); - $error = Util::securevar($_POST['subCode']); - } - if (isset($_POST["change_display_name"])) { - $error = $user->set_display_name(Util::securevar($_POST['display_name'])); - $error = Util::securevar($_POST['display_name']); - } - header("location: profile.php"); + if (isset($_POST["updatePassword"])) { + $error = $user->updateUserPass(Util::securevar($_POST)); + } + if (isset($_POST["activateSub"])) { + $error = $user->activateSub(Util::securevar($_POST['subCode'])); + $error = Util::securevar($_POST['subCode']); + } + if (isset($_POST["change_display_name"])) { + $error = $user->set_display_name(Util::securevar($_POST['display_name'])); + $error = Util::securevar($_POST['display_name']); + } + header("location: profile.php"); } // if post request if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST" && !isset($_POST["activateSub"]) && !isset($_POST["updatePassword"]) && !isset($_POST["change_display_name"]) && $System->getSystemData()->relinkdiscord == 1) { - header("Location: https://discord.com/api/oauth2/authorize?client_id=" . client_id . "&redirect_uri=" . SITE_URL . SUB_DIR . "/user/profile.php&response_type=code&scope=identify"); - exit(); + header("Location: https://discord.com/api/oauth2/authorize?client_id=" . client_id . "&redirect_uri=" . SITE_URL . SUB_DIR . "/user/profile.php&response_type=code&scope=identify"); + exit(); } if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "GET" && $System->getSystemData()->discordlinking == 1 || $System->getSystemData()->relinkdiscord == 1 || ($System->getSystemData()->relinkdiscord == 0 && !$user->isDiscordLinked())) { - if (isset($_GET['code'])) { - $code = Util::securevar($_GET['code']); - $user->discord_link($code); - } + if (isset($_GET['code'])) { + $code = Util::securevar($_GET['code']); + $user->discord_link($code); + } } ?> @@ -115,27 +115,27 @@

gettime(); - if ($System->getSystemData()->frozen == 1 && $userfrozen == 1) { - $sub = $sub + $time; - if ($sub < 1000) { - Util::display("$sub days ()"); - } elseif ($sub < 1) { - Util::display('You dont have a active subscription!'); - } else { - Util::display("Lifetime"); - } - } else { - if ($sub > 8000) { - Util::display("Lifetime"); - } else { - if ($sub >= 0) { - Util::display("$sub days"); - } else { - Util::display('You dont have a active subscription!'); - } - } - } - ?> +if ($System->getSystemData()->frozen == 1 && $userfrozen == 1) { + $sub = $sub + $time; + if ($sub < 1000) { + Util::display("$sub days ()"); + } elseif ($sub < 1) { + Util::display('You dont have a active subscription!'); + } else { + Util::display("Lifetime"); + } +} else { + if ($sub > 8000) { + Util::display("Lifetime"); + } else { + if ($sub >= 0) { + Util::display("$sub days"); + } else { + Util::display('You dont have a active subscription!'); + } + } +} +?>

@@ -196,8 +196,8 @@ get_name_cooldown(); - $days_left = Util::calculate_days($cooldown_date); - ?> +$days_left = Util::calculate_days($cooldown_date); +?> 0) : ?>
diff --git a/src/user/tokens.php b/src/user/tokens.php index ba9e2a7..2e4f8d1 100644 --- a/src/user/tokens.php +++ b/src/user/tokens.php @@ -7,7 +7,7 @@ Session::init(); if (!Session::isLogged()) { - Util::redirect("/auth/login.php"); + Util::redirect("/auth/login.php"); } $username = Session::get('username'); @@ -22,24 +22,24 @@ if (Util::securevar($_SERVER['REQUEST_METHOD']) === 'POST') { - if (isset($_POST["password2"])) { - $token = Util::securevar($_POST["deltoken"]); - $password = Util::securevar($_POST["password2"]); - if (isset($token, $password)) { - $user->deletetoken($token, $password); - } - } - header("location: tokens.php"); + if (isset($_POST["password2"])) { + $token = Util::securevar($_POST["deltoken"]); + $password = Util::securevar($_POST["password2"]); + if (isset($token, $password)) { + $user->deletetoken($token, $password); + } + } + header("location: tokens.php"); } if ($_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST["password"])) { - $password = Util::securevar($_POST["password"]); + $password = Util::securevar($_POST["password"]); - $token = Util::securevar($_COOKIE['login_cookie']); - $error = $user->deleteother($token, $password); - if (!$error) { - header('location: tokens.php'); - } + $token = Util::securevar($_COOKIE['login_cookie']); + $error = $user->deleteother($token, $password); + if (!$error) { + header('location: tokens.php'); + } } diff --git a/src/user/userinvites.php b/src/user/userinvites.php index 950ca73..bd9fc63 100644 --- a/src/user/userinvites.php +++ b/src/user/userinvites.php @@ -2,14 +2,14 @@ require_once '../app/require.php'; require_once '../app/controllers/UserController.php'; -require_once ("../includes/head.nav.inc.php"); +require_once("../includes/head.nav.inc.php"); $user = new UserController(); Session::init(); if (!Session::isLogged()) { - Util::redirect("/auth/login.php"); + Util::redirect("/auth/login.php"); } $username = Session::get("username"); @@ -23,17 +23,17 @@ // if post request if (Util::securevar($_SERVER['REQUEST_METHOD']) === 'POST') { - if (isset($_POST['genInv'])) { - $geninv = Util::securevar($_POST['genInv']); - } + if (isset($_POST['genInv'])) { + $geninv = Util::securevar($_POST['genInv']); + } - if (isset($geninv)) { - $user->geninv($username); - } + if (isset($geninv)) { + $user->geninv($username); + } - header("location: userinvites.php"); - exit(); + header("location: userinvites.php"); + exit(); } ?> diff --git a/src/user/userlist.php b/src/user/userlist.php index 29051c2..7194f7b 100644 --- a/src/user/userlist.php +++ b/src/user/userlist.php @@ -3,7 +3,7 @@ require_once("../includes/head.nav.inc.php"); display_top_nav("User list"); -$user = new UserController; +$user = new UserController(); $ip = $user->getip(); @@ -77,13 +77,13 @@ $name = $row->uid . "." . $ext; ?> + Util::getavatar($row->uid) + ); ?>" download=""> + Util::getavatar($row->uid) + ); ?>"> uid); ?> diff --git a/src/user/viewprofile.php b/src/user/viewprofile.php index 72744e6..6ffac23 100644 --- a/src/user/viewprofile.php +++ b/src/user/viewprofile.php @@ -2,7 +2,7 @@ require_once "../app/require.php"; require_once "../app/controllers/SystemController.php"; -require_once ("../includes/head.nav.inc.php"); +require_once("../includes/head.nav.inc.php"); $user = new UserController(); @@ -11,12 +11,12 @@ Session::init(); if (!Session::isLogged()) { - Util::redirect("/auth/login.php"); + Util::redirect("/auth/login.php"); } $uid = Session::get("uid"); $username = Session::get("username"); -$admin = Util::adminCheck(False); -$supp = Util::suppCheck(False); +$admin = Util::adminCheck(false); +$supp = Util::suppCheck(false); $getuid = Util::securevar($_GET["uid"]); $sub = $user->getSubStatus($username); $userfrozen = $user->getfrozen(); @@ -30,23 +30,23 @@ if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "GET") { - if (isset($_GET["uid"])) { - $uid = Util::securevar($_GET["uid"]); - - if (!empty($uid)) { - $getuid = Util::securevar($_GET["uid"]); - $userbyid = $user->getuserbyuid($getuid); - if (!empty($userbyid->username)) { - $username = $userbyid->username; - } else { - echo ""; + if (isset($_GET["uid"])) { + $uid = Util::securevar($_GET["uid"]); + + if (!empty($uid)) { + $getuid = Util::securevar($_GET["uid"]); + $userbyid = $user->getuserbyuid($getuid); + if (!empty($userbyid->username)) { + $username = $userbyid->username; + } else { + echo ""; + echo ""; + } + } else { + echo ""; echo ""; - } - } else { - echo ""; - echo ""; - } - } + } + } } ?> @@ -79,12 +79,12 @@
displayname; - if ($displayName !== null) { - echo Util::display($view->username . " ($displayName)"); - } else { - echo Util::display($view->username); - } - ?> +if ($displayName !== null) { + echo Util::display($view->username . " ($displayName)"); +} else { + echo Util::display($view->username); +} +?>

UID: uid); ?>

Badges: