custom fields in upload.php

This commit is contained in:
xiaomlove
2021-03-03 19:29:29 +08:00
parent 25a69891f4
commit 723a6fadc9
7 changed files with 153 additions and 15 deletions

View File

@@ -12,6 +12,16 @@ $res = sql_query("SELECT torrents.*, categories.mode as cat_mode FROM torrents L
$row = mysql_fetch_array($res);
if (!$row) die();
/**
* custom fields
* @since v1.6
*/
$customFieldValueRes = sql_query("select * from torrents_custom_field_values where torrent_id = $id");
$customFieldValues = [];
while ($row = mysql_fetch_assoc($res)) {
$customFieldValues[$row['custom_field_id']] = unserialize($row['custom_field_value']);
}
if ($enablespecial == 'yes' && get_user_class() >= $movetorrent_class)
$allowmove = true; //enable moving torrent to other section
else $allowmove = false;