diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-09 01:51:38 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-09 01:51:38 +0500 |
| commit | 64a9bfae4a659f38f33320e59004a1d1dd259a40 (patch) | |
| tree | 037ada7511f50fa78dff1c6645b984b327f77ce2 /lib/partials.php | |
| parent | 29477e67ede12347b153e2255325327374e1b073 (diff) | |
upd: replaced <?php echo with <?=
Diffstat (limited to 'lib/partials.php')
| -rw-r--r-- | lib/partials.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/partials.php b/lib/partials.php index 979621d..60d1325 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -34,7 +34,7 @@ function html_navigation_bar() $unread_count = intval($stmt->fetch()[0]); echo '' ?> <a href="/inbox.php" class="button"> - Inbox <?php echo $unread_count > 0 ? "($unread_count)" : "" ?> + Inbox <?= $unread_count > 0 ? "($unread_count)" : "" ?> </a> <?php ; $stmt = null; @@ -48,7 +48,7 @@ function html_navigation_bar() echo '' ?> <a href="/report/list.php" class="button"> - Reports <?php echo $unread_count > 0 ? "($unread_count)" : "" ?> + Reports <?= $unread_count > 0 ? "($unread_count)" : "" ?> </a> <?php ; } @@ -81,7 +81,7 @@ function html_navigation_bar() <div class="flex items-bottom small-gap" style="margin-left: auto;"> <?php if (isset($_SESSION["user_emote_sets"])): ?> <form action="/account/change_emoteset.php" method="POST" id="form-change-emoteset"> - <input type="text" name="redirect" value="<?php echo $_SERVER["REQUEST_URI"] ?>" style="display: none;"> + <input type="text" name="redirect" value="<?= $_SERVER["REQUEST_URI"] ?>" style="display: none;"> <div class="row small-gap"> <label for="id">Current emote set: </label> <select name="id" onchange="send_change_emoteset(event)"> @@ -100,8 +100,8 @@ function html_navigation_bar() </script> <?php endif; ?> - <a href="/users.php?id=<?php echo $_SESSION["user_id"] ?>" class="flex items-bottom small-gap"> - Signed in as <?php echo $_SESSION["user_name"] ?> + <a href="/users.php?id=<?= $_SESSION["user_id"] ?>" class="flex items-bottom small-gap"> + Signed in as <?= $_SESSION["user_name"] ?> <?php echo '<img src="/static/'; if (is_dir($_SERVER['DOCUMENT_ROOT'] . "/static/userdata/avatars/" . $_SESSION["user_id"])) { @@ -129,20 +129,20 @@ function html_navigation_search() Search... </div> <div class="box content"> - <form action="<?php echo $_SERVER["REQUEST_URI"] ?>" method="GET"> - <input type="text" name="q" style="padding:4px;" value="<?php echo $_GET["q"] ?? "" ?>"><br> + <form action="<?= $_SERVER["REQUEST_URI"] ?>" method="GET"> + <input type="text" name="q" style="padding:4px;" value="<?= $_GET["q"] ?? "" ?>"><br> <?php if (str_starts_with($_SERVER["REQUEST_URI"], "/emotes")) { ?> <label for="sort_by">Sort by</label> <select name="sort_by"> - <option value="high_ratings" <?php echo ($_GET["sort_by"] ?? "") == "high_ratings" ? "selected" : "" ?>> + <option value="high_ratings" <?= ($_GET["sort_by"] ?? "") == "high_ratings" ? "selected" : "" ?>> High ratings</option> - <option value="low_ratings" <?php echo ($_GET["sort_by"] ?? "") == "low_ratings" ? "selected" : "" ?>>Low + <option value="low_ratings" <?= ($_GET["sort_by"] ?? "") == "low_ratings" ? "selected" : "" ?>>Low ratings</option> - <option value="recent" <?php echo ($_GET["sort_by"] ?? "") == "recent" ? "selected" : "" ?>>Recent + <option value="recent" <?= ($_GET["sort_by"] ?? "") == "recent" ? "selected" : "" ?>>Recent </option> - <option value="oldest" <?php echo ($_GET["sort_by"] ?? "") == "oldest" ? "selected" : "" ?>>Oldest + <option value="oldest" <?= ($_GET["sort_by"] ?? "") == "oldest" ? "selected" : "" ?>>Oldest </option> </select> <?php @@ -167,10 +167,10 @@ function html_pagination(int $total_pages, int $current_page, string $redirect) echo '' ?> <div class="pagination"> <?php if ($current_page > 1): ?> - <a href="<?php echo $redirect . ($current_page - 1) ?>">[ prev ]</a> + <a href="<?= $redirect . ($current_page - 1) ?>">[ prev ]</a> <?php endif; ?> <?php if ($current_page < $total_pages): ?> - <a href="<?php echo $redirect . ($current_page + 1) ?>">[ next ]</a> + <a href="<?= $redirect . ($current_page + 1) ?>">[ next ]</a> <?php endif; ?> </div> |
