medal add priority

This commit is contained in:
xiaomlove
2025-04-21 11:52:05 +07:00
parent d990723ebc
commit e3673ef3da
4 changed files with 48 additions and 6 deletions

View File

@@ -2,7 +2,8 @@
require "../include/bittorrent.php";
dbconn();
loggedinorreturn();
$query = \App\Models\Medal::query()->where('display_on_medal_page', 1);
$query = \App\Models\Medal::query()->where('display_on_medal_page', 1)
->orderBy('priority', 'desc')->orderBy("id", 'desc');
$q = htmlspecialchars($_REQUEST['q'] ?? '');
if (!empty($q)) {
$query->where('username', 'name', "%{$q}%");