Skip to content
This repository was archived by the owner on May 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions src/admin/bans.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
?>
<!DOCTYPE html>
Expand Down Expand Up @@ -111,14 +111,14 @@
<?php foreach ($userList2 as $row) : ?>
<?php
if (isset($_GET["min"]) && isset($_GET["max"])) {
$min = Util::securevar($_GET["min"]);
$max = Util::securevar($_GET["max"]);
$min = Util::securevar($_GET["min"]);
$max = Util::securevar($_GET["max"]);
}

?>
?>
<?php if (!isset($min) || !isset($max)) {
$min = 1;
$max = 10;
$min = 1;
$max = 10;
} ?>
<?php if ($row->uid <= $max && $row->uid >= $min) : ?>
<tr>
Expand All @@ -128,19 +128,19 @@
<?php else : ?>
<?php
$ext = pathinfo(
Util::getavatar($row->uid),
PATHINFO_EXTENSION
Util::getavatar($row->uid),
PATHINFO_EXTENSION
);
$name = $row->uid . "." . $ext;
?>
$name = $row->uid . "." . $ext;
?>
<a href="<?php Util::display(
Util::getavatar($row->uid)
); ?>" download="<?php Util::display(
$name
); ?>">
Util::getavatar($row->uid)
); ?>" download="<?php Util::display(
$name
); ?>">
<img title="Click to download" data-toggle="tooltip" data-placement="top" class="rounded-circle img-profile" width="45" height="45" src="<?php Util::display(
Util::getavatar($row->uid)
); ?>"></a>
Util::getavatar($row->uid)
); ?>"></a>
<?php endif; ?>
</td>
<th scope="row" class="text-center"><?php Util::display($row->uid); ?></th>
Expand Down
108 changes: 54 additions & 54 deletions src/admin/codes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
?>

Expand Down
24 changes: 12 additions & 12 deletions src/admin/gift.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
?>
<!DOCTYPE html>
Expand Down
Loading