mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
add custom field to staffpanel
This commit is contained in:
+10
-7
@@ -11,7 +11,7 @@ int_check($id);
|
||||
if (!isset($id) || !$id)
|
||||
die();
|
||||
|
||||
$res = sql_query("SELECT torrents.cache_stamp, torrents.sp_state, torrents.url, torrents.small_descr, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, nfo, LENGTH(torrents.nfo) AS nfosz, torrents.last_action, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, torrents.anonymous, torrents.pt_gen, categories.name AS cat_name, sources.name AS source_name, media.name AS medium_name, codecs.name AS codec_name, standards.name AS standard_name, processings.name AS processing_name, teams.name AS team_name, audiocodecs.name AS audiocodec_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN sources ON torrents.source = sources.id LEFT JOIN media ON torrents.medium = media.id LEFT JOIN codecs ON torrents.codec = codecs.id LEFT JOIN standards ON torrents.standard = standards.id LEFT JOIN processings ON torrents.processing = processings.id LEFT JOIN teams ON torrents.team = teams.id LEFT JOIN audiocodecs ON torrents.audiocodec = audiocodecs.id WHERE torrents.id = $id LIMIT 1")
|
||||
$res = sql_query("SELECT torrents.cache_stamp, torrents.sp_state, torrents.url, torrents.small_descr, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, nfo, LENGTH(torrents.nfo) AS nfosz, torrents.last_action, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, torrents.anonymous, torrents.pt_gen, torrents.technical_info, categories.name AS cat_name, sources.name AS source_name, media.name AS medium_name, codecs.name AS codec_name, standards.name AS standard_name, processings.name AS processing_name, teams.name AS team_name, audiocodecs.name AS audiocodec_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN sources ON torrents.source = sources.id LEFT JOIN media ON torrents.medium = media.id LEFT JOIN codecs ON torrents.codec = codecs.id LEFT JOIN standards ON torrents.standard = standards.id LEFT JOIN processings ON torrents.processing = processings.id LEFT JOIN teams ON torrents.team = teams.id LEFT JOIN audiocodecs ON torrents.audiocodec = audiocodecs.id WHERE torrents.id = $id LIMIT 1")
|
||||
or sqlerr();
|
||||
$row = mysql_fetch_array($res);
|
||||
if (get_user_class() >= $torrentmanage_class || $CURUSER["id"] == $row["owner"])
|
||||
@@ -161,17 +161,20 @@ else {
|
||||
|
||||
/**************end custom fields****************/
|
||||
|
||||
//technical info
|
||||
if ($settingMain['enable_technical_info'] == 'yes') {
|
||||
$technicalInfo = new \Nexus\Torrent\TechnicalInformation($row['technical_info'] ?? '');
|
||||
$technicalInfoResult = $technicalInfo->renderOnDetailsPage();
|
||||
if (!empty($technicalInfoResult)) {
|
||||
tr($lang_functions['text_technical_info'], $technicalInfoResult, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($CURUSER['showdescription'] != 'no' && !empty($row["descr"])){
|
||||
$torrentdetailad=$Advertisement->get_ad('torrentdetail');
|
||||
tr("<a href=\"javascript: klappe_news('descr')\"><span class=\"nowrap\"><img class=\"minus\" src=\"pic/trans.gif\" alt=\"Show/Hide\" id=\"picdescr\" title=\"".($lang_details['title_show_or_hide'] ?? '')."\" /> ".$lang_details['row_description']."</span></a>", "<div id='kdescr'>".($Advertisement->enable_ad() && $torrentdetailad ? "<div align=\"left\" style=\"margin-bottom: 10px\" id=\"ad_torrentdetail\">".$torrentdetailad[0]."</div>" : "").format_comment($row["descr"])."</div>", 1);
|
||||
}
|
||||
|
||||
//technical info
|
||||
if ($settingMain['enable_technical_info'] == 'yes') {
|
||||
$technicalInfo = new \Nexus\Torrent\TechnicalInformation($row['technical_info']);
|
||||
|
||||
}
|
||||
|
||||
if (get_user_class() >= $viewnfo_class && $CURUSER['shownfo'] != 'no' && $row["nfosz"] > 0){
|
||||
if (!$nfo = $Cache->get_value('nfo_block_torrent_id_'.$id)){
|
||||
$nfo = code($row["nfo"], $view == "magic");
|
||||
|
||||
Reference in New Issue
Block a user