torrents list show seedbox icon

This commit is contained in:
xiaomlove
2022-09-02 19:49:41 +08:00
parent 17b225424e
commit 875e8ea797
19 changed files with 180 additions and 39 deletions
+16
View File
@@ -217,6 +217,9 @@ function print_category_editor($type, $row='')
$showaudiocodec = $row['showaudiocodec'];
$catsperrow = $row['catsperrow'];
$catpadding = $row['catpadding'];
if (!empty($row['extra'])) {
$row['extra'] = json_decode($row['extra'], true);
}
}
else
{
@@ -233,6 +236,17 @@ function print_category_editor($type, $row='')
}
tr($lang_catmanage['row_searchbox_name']."<font color=\"red\">*</font>", "<input type=\"text\" name=\"name\" value=\"".htmlspecialchars($name)."\" style=\"width: 300px\" /> " . $lang_catmanage['text_searchbox_name_note'], 1);
tr($lang_catmanage['row_show_sub_category'], "<input type=\"checkbox\" name=\"showsource\" value=\"1\"".($showsource ? " checked=\"checked\"" : "")." /> " . $lang_catmanage['text_sources'] . "<input type=\"checkbox\" name=\"showmedium\" value=\"1\"".($showmedium ? " checked=\"checked\"" : "")." /> " . $lang_catmanage['text_media'] . "<input type=\"checkbox\" name=\"showcodec\" value=\"1\"".($showcodec ? " checked=\"checked\"" : "")." /> " . $lang_catmanage['text_codecs'] . "<input type=\"checkbox\" name=\"showstandard\" value=\"1\"".($showstandard ? " checked=\"checked\"" : "")." /> " . $lang_catmanage['text_standards'] . "<input type=\"checkbox\" name=\"showprocessing\" value=\"1\"".($showprocessing ? " checked=\"checked\"" : "")." /> " . $lang_catmanage['text_processings'] . "<input type=\"checkbox\" name=\"showteam\" value=\"1\"".($showteam ? " checked=\"checked\"" : "")." /> " . $lang_catmanage['text_teams'] . "<input type=\"checkbox\" name=\"showaudiocodec\" value=\"1\"".($showaudiocodec ? " checked=\"checked\"" : "")." /> " . $lang_catmanage['text_audio_codecs']."<br />".$lang_catmanage['text_show_sub_category_note'], 1);
//extra
$extraCheckbox = "";
foreach (\App\Models\SearchBox::listExtraText() as $name => $text) {
$extraCheckbox .= sprintf(
'<label><input type="checkbox" name="extra[%s]" value="1"%s />%s</label>',
$name, !empty($row['extra'][$name]) ? ' checked' : '', $text
);
}
tr($lang_catmanage['row_searchbox_extras'], $extraCheckbox, 1);
tr($lang_catmanage['row_items_per_row']."<font color=\"red\">*</font>", "<input type=\"text\" name=\"catsperrow\" value=\"".$catsperrow."\" style=\"width: 100px\" /> " . $lang_catmanage['text_items_per_row_note'], 1);
tr($lang_catmanage['row_padding_between_items']."<font color=\"red\">*</font>", "<input type=\"text\" name=\"catpadding\" value=\"".$catpadding."\" style=\"width: 100px\" /> " . $lang_catmanage['text_padding_between_items_note'], 1);
$field = new \Nexus\Field\Field();
@@ -715,6 +729,8 @@ elseif($action == 'submit')
$updateset[] = "custom_fields=" . sqlesc(implode(',', $_POST['custom_fields'] ?? []));
$updateset[] = "custom_fields_display_name=" . sqlesc($_POST['custom_fields_display_name'] ?? '');
$updateset[] = "custom_fields_display=" . sqlesc($_POST['custom_fields_display'] ?? '');
$updateset[] = "extra=" . sqlesc(json_encode($_POST['extra'] ?? []));
if ($showsource || $showmedium || $showcodec || $showstandard || $showprocessing || $showteam || $showaudiocodec)
$updateset[] = "showsubcat=1";
else