From 018e612284fc2ad85fa5709a32f3d63d5ae362da Mon Sep 17 00:00:00 2001 From: nova Date: Sat, 18 May 2019 21:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=AE=E9=A1=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- details.php | 10 +++++++++- lang/chs/lang_pickup.php | 2 ++ pickup.php | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/details.php b/details.php index 87efbc5..db42acd 100644 --- a/details.php +++ b/details.php @@ -743,7 +743,15 @@ } $pickcontent .= '   '; $pickcontent .= '
'; - $pickcontent .= "" . $lang_pickup ['row_torrent_position'] . ": " . "   "; + // 置顶处理 beg + $pickcontent .= "" . $lang_pickup ['row_torrent_position'] . ": "; + $pickcontent .= "   "; + // 置顶处理 end $pickcontent .= '   '; $pickcontent .= "" . $lang_pickup ['row_recommended_movie'] . ": " . "      " . "" . $lang_pickup ['submit_edit_it'] . "" . "\n"; diff --git a/lang/chs/lang_pickup.php b/lang/chs/lang_pickup.php index e37a983..1f343a7 100755 --- a/lang/chs/lang_pickup.php +++ b/lang/chs/lang_pickup.php @@ -16,6 +16,8 @@ 'select_classic' => "经典", 'select_recommended' => "推荐", 'select_sticky' => "置顶", + 'select_double_sticky' => '二级置顶', + 'select_triple_sticky' => '三级置顶', 'submit_edit_it' => "确认设置", 'submit_revert_changes' => "重置", 'row_pick' => "设置促销", diff --git a/pickup.php b/pickup.php index 0907e95..1f29dcd 100644 --- a/pickup.php +++ b/pickup.php @@ -135,6 +135,26 @@ function bark($msg) $updateset [] = "pos_state = 'normal'"; $updateset [] = "pos_state_until = '0000-00-00 00:00:00'"; } + }elseif ((0 + $_POST ["sel_posstate"]) == 2) { + if ($_POST ["posstateuntil"] && strtotime($torrentAddedTimeString) <= strtotime($_POST ["posstateuntil"])) { + $updateset [] = "pos_state = 'double_sticky'"; + $updateset [] = "pos_state_until = " . sqlesc($_POST ["posstateuntil"]); + if ($row ["pos_state"] != 'sticky') + $posstate = "二级置顶 "; + } else { + $updateset [] = "pos_state = 'normal'"; + $updateset [] = "pos_state_until = '0000-00-00 00:00:00'"; + } + }elseif ((0 + $_POST ["sel_posstate"]) == 3) { + if ($_POST ["posstateuntil"] && strtotime($torrentAddedTimeString) <= strtotime($_POST ["posstateuntil"])) { + $updateset [] = "pos_state = 'triple_sticky'"; + $updateset [] = "pos_state_until = " . sqlesc($_POST ["posstateuntil"]); + if ($row ["pos_state"] != 'sticky') + $posstate = "三级置顶 "; + } else { + $updateset [] = "pos_state = 'normal'"; + $updateset [] = "pos_state_until = '0000-00-00 00:00:00'"; + } } }