From 9f4bb3baeba7632e1f57e009da67ffb5663fe0ed Mon Sep 17 00:00:00 2001 From: net909 Date: Thu, 18 Jul 2024 20:04:24 +0800 Subject: [PATCH] update --- admin/ajax_file.php | 7 ++++++- admin/file-view.php | 10 +++++----- admin/file.php | 6 +++--- admin/head.php | 12 ++++++------ admin/login.php | 4 ++-- admin/set.php | 2 +- admin/set_stor.php | 2 +- admin/user.php | 6 +++--- ajax.php | 2 +- file.php | 10 +++++----- includes/footer.php | 6 +++--- includes/header.php | 16 ++++++++-------- index.php | 6 +++--- login.php | 2 +- player.php | 10 +++++----- upload.php | 6 +++--- 16 files changed, 56 insertions(+), 51 deletions(-) diff --git a/admin/ajax_file.php b/admin/ajax_file.php index 602de52..57d5154 100644 --- a/admin/ajax_file.php +++ b/admin/ajax_file.php @@ -31,10 +31,15 @@ $sql.=" AND `ip`='{$kw}'"; } } + if($_POST['orderby'] == 1){ + $orderby = 'count desc'; + }else{ + $orderby = 'id desc'; + } $offset = intval($_POST['offset']); $limit = intval($_POST['limit']); $total = $DB->getColumn("SELECT count(*) from pre_file WHERE{$sql}"); - $list = $DB->getAll("SELECT * FROM pre_file WHERE{$sql} order by id desc limit $offset,$limit"); + $list = $DB->getAll("SELECT * FROM pre_file WHERE{$sql} order by {$orderby} limit $offset,$limit"); $list2 = []; foreach($list as $row){ $row['icon'] = type_to_icon($row['type']); diff --git a/admin/file-view.php b/admin/file-view.php index 3a2cc89..9b96302 100644 --- a/admin/file-view.php +++ b/admin/file-view.php @@ -23,9 +23,9 @@ <?php echo $title ?> - + - + @@ -45,7 +45,7 @@ ?> - + - - + + - - + + + - + + diff --git a/admin/login.php b/admin/login.php index b0dd1f7..cddde08 100644 --- a/admin/login.php +++ b/admin/login.php @@ -48,8 +48,8 @@ 管理员登录 - - + + @@ -48,7 +48,7 @@ ?> - + - - + + - - + + +