finish field management

This commit is contained in:
xiaomlove
2021-03-03 01:56:07 +08:00
parent 528d559f24
commit 7b8a6a7ce2
5 changed files with 60 additions and 1 deletions

View File

@@ -41,6 +41,14 @@ if ($action == 'view') {
stdhead($lang_fields['field_management']." - ".$lang_fields['text_edit']);
begin_main_frame();
echo $field->buildFieldForm($row);
} elseif ($action == 'del') {
$id = intval($_GET['id'] ?? 0);
if ($id == 0) {
stderr($lang_fields['field_management'], "invalid id");
}
$sql = "delete from torrents_custom_fields where id = $id";
$res = sql_query($sql);
redirect('fields.php?action=view&type=');
}