add torrent pos_state_until

This commit is contained in:
xiaomlove
2022-09-17 18:55:26 +08:00
parent fedc67ad5e
commit 1a0ad86b32
10 changed files with 160 additions and 4 deletions
+25
View File
@@ -2,6 +2,7 @@
require_once("../include/bittorrent.php");
dbconn();
require_once(get_langfile_path());
require_once(get_langfile_path('edit.php'));
loggedinorreturn();
parked();
$userInfo = \App\Models\User::query()->findOrFail($CURUSER['id']);
@@ -180,6 +181,30 @@ JS;
}
//===end
//pick
$pickcontent = '';
if(user_can('torrentsticky'))
{
$options = [];
foreach (\App\Models\Torrent::listPosStates() as $key => $value) {
$options[] = "<option" . (($row["pos_state"] == $key) ? " selected=\"selected\"" : "" ) . " value=\"" . $key . "\">".$value['text']."</option>";
}
$pickcontent .= "<b>".$lang_edit['row_torrent_position'].":&nbsp;</b>"."<select name=\"pos_state\" style=\"width: 100px;\">" . implode('', $options) . "</select>&nbsp;&nbsp;&nbsp;";
$pickcontent .= datetimepicker_input('pos_state_until', '', nexus_trans('label.deadline') . ":&nbsp;");
}
if(user_can('torrentmanage') && ($CURUSER["picker"] == 'yes' || get_user_class() >= \App\Models\User::CLASS_SYSOP))
{
if ($pickcontent) $pickcontent .= '<br />';
$pickcontent .= "<b>".$lang_edit['row_recommended_movie'].":&nbsp;</b>"."<select name=\"picktype\" style=\"width: 100px;\">";
foreach (\App\Models\Torrent::listPickInfo(true) as $_pick_type => $_pick_type_text) {
$pickcontent .= sprintf('<option value="%s">%s</option>', $_pick_type, $_pick_type_text);
}
$pickcontent .= '</select>';
}
if ($pickcontent) {
tr($lang_edit['row_pick'], $pickcontent, 1);
}
if(user_can('beanonymous'))
{
tr($lang_upload['row_show_uploader'], "<input type=\"checkbox\" name=\"uplver\" value=\"yes\" />".$lang_upload['checkbox_hide_uploader_note'], 1);