From 460d12ab7bb93daa6b03300fefdfccefb6d32d01 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 22 Apr 2025 13:15:31 +0500 Subject: upd: combined single_page and multiple_page into one + updated emote url --- src/alert.php | 2 +- src/emotes/multiple_page.php | 48 ------------ src/emotes/single_page.php | 169 ------------------------------------------- 3 files changed, 1 insertion(+), 218 deletions(-) delete mode 100644 src/emotes/multiple_page.php delete mode 100644 src/emotes/single_page.php (limited to 'src') diff --git a/src/alert.php b/src/alert.php index 62f1887..62045d5 100644 --- a/src/alert.php +++ b/src/alert.php @@ -10,7 +10,7 @@ function generate_alert(string $path, string $error, int $status = 400) "data" => null ]); } else { - header("Location: $path?error_status=$status&error_reason=$error"); + header("Location: $path" . (str_contains($path, "?") ? "&" : "?") . "error_status=$status&error_reason=$error"); } } diff --git a/src/emotes/multiple_page.php b/src/emotes/multiple_page.php deleted file mode 100644 index 25c4c9c..0000000 --- a/src/emotes/multiple_page.php +++ /dev/null @@ -1,48 +0,0 @@ - - - - AlrightTV - - - - -
-
- -
- -
-
- -
- get_id() . "\">"; - - if ($e->is_added_by_user()) { - echo ''; - } - - echo "get_id() . "/2x." . $e->get_ext() . "\" alt=\"" . $e->get_code() . "\"/>"; - echo "

" . $e->get_code() . "

"; - echo ""; - } - } else { - // info - echo ""; - } - ?> -
-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/emotes/single_page.php b/src/emotes/single_page.php deleted file mode 100644 index d1fc4e8..0000000 --- a/src/emotes/single_page.php +++ /dev/null @@ -1,169 +0,0 @@ - - - - - AlrightTV - - - - -
-
- -
- -
- -
- -
-
- <?php echo $emote->get_code() ?> - <?php echo $emote->get_code() ?> - <?php echo $emote->get_code() ?> -
-
-
- -
- -
- prepare("SELECT id FROM emote_set_contents WHERE emote_set_id = ? AND emote_id = ?"); - $stmt->execute([$_SESSION["user_emote_set_id"], $emote->get_id()]); - $added = $stmt->rowCount() > 0; - } - - $db = null; - ?> -
- - - - - - - - -
-
-
-
- - - -
-
- - - -
- Report - emote -
- -

Log in to get additional features...

- -
- -
- - - - - - - - - -
Uploaderget_uploaded_by()) { - $db = new PDO(DB_URL, DB_USER, DB_PASS); - $stmt = $db->prepare("SELECT username FROM users WHERE id = ?"); - $stmt->execute([$emote->get_uploaded_by()]); - - if ($row = $stmt->fetch()) { - $username = $row["username"]; - $link = "/users.php?id=" . $emote->get_uploaded_by(); - } - - $db = null; - } - - echo ""; - echo $username; - echo ""; - - echo ', get_created_at()); - echo ' UTC">about ' . format_timestamp(time() - $emote->get_created_at()) . " ago"; - ?>
RatingNot rated
-
- -
-
- prepare("SELECT users.id, users.username - FROM users - INNER JOIN emote_sets AS es ON es.owner_id = users.id - INNER JOIN emote_set_contents AS ec ON ec.emote_set_id = es.id - WHERE ec.emote_id = ?"); - - $stmt->execute([$emote->get_id()]); - $count = $stmt->rowCount(); - - $db = null; - - if ($count > 0) { - echo "

Added in $count channels

"; - } else { - echo "No one has added this emote yet... :'("; - } - ?> -
- fetch()) { - echo '' . $row["username"] . ''; - } - ?> -
-
-
-
-
-
-
- - - \ No newline at end of file -- cgit v1.2.3