From a241d3983d1cb79d455053a1f41cae0366fcaa71 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Thu, 15 May 2025 17:34:19 +0500 Subject: feat: change emotesets --- public/account/change_emoteset.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 public/account/change_emoteset.php (limited to 'public/account') diff --git a/public/account/change_emoteset.php b/public/account/change_emoteset.php new file mode 100644 index 0000000..c2fc209 --- /dev/null +++ b/public/account/change_emoteset.php @@ -0,0 +1,36 @@ +prepare("SELECT id FROM acquired_emote_sets WHERE emote_set_id = ? AND user_id = ?"); +$stmt->execute([$emote_set_id, $user_id]); + +if ($stmt->rowCount() == 0) { + generate_alert("/404.php", "You don't own emote set ID $emote_set_id", 403); + exit; +} + +$_SESSION["user_active_emote_set_id"] = $emote_set_id; + +header("Location: " . $_POST["redirect"] ?? "/"); \ No newline at end of file -- cgit v1.2.3