mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
technicial info
This commit is contained in:
+10
-2
@@ -18,6 +18,8 @@ if (get_user_class() >= $torrentmanage_class || $CURUSER["id"] == $row["owner"])
|
||||
$owned = 1;
|
||||
else $owned = 0;
|
||||
|
||||
$settingMain = get_setting('main');
|
||||
|
||||
if (!$row)
|
||||
stderr($lang_details['std_error'], $lang_details['std_no_torrent_id']);
|
||||
elseif ($row['banned'] == 'yes' && get_user_class() < $seebanned_class)
|
||||
@@ -160,10 +162,16 @@ else {
|
||||
/**************end custom fields****************/
|
||||
|
||||
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);
|
||||
$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");
|
||||
|
||||
+2
-1
@@ -41,7 +41,7 @@ if ($action == 'savesettings_main') // save main
|
||||
'showpolls','showstats','showlastxtorrents', 'showtrackerload','showshoutbox','showfunbox','showoffer','sptime','showhelpbox','enablebitbucket',
|
||||
'smalldescription','altname','extforum','extforumurl','defaultlang','defstylesheet', 'donation','spsct','browsecat','specialcat','waitsystem',
|
||||
'maxdlsystem','bitbucket','torrentnameprefix', 'showforumstats','verification','invite_count','invite_timeout', 'seeding_leeching_time_calc_start',
|
||||
'startsubid', 'logo', 'showlastxforumposts'
|
||||
'startsubid', 'logo', 'showlastxforumposts', 'enable_technical_info'
|
||||
);
|
||||
GetVar($validConfig);
|
||||
$MAIN = [];
|
||||
@@ -643,6 +643,7 @@ elseif ($action == 'mainsettings') // main settings
|
||||
yesorno($lang_settings['row_enable_pt_gen_system'],'enable_pt_gen_system', $MAIN['enable_pt_gen_system'], $lang_settings['text_enable_pt_gen_system_note']);
|
||||
tr($lang_settings['row_pt_gen_api_point'],"<input type='text' name=\"pt_gen_api_point\" style=\"width: 300px\" value={$MAIN['pt_gen_api_point']}> ".$lang_settings['text_pt_gen_api_point_note'], 1);
|
||||
yesorno($lang_settings['row_enable_nfo'],'enablenfo', $MAIN['enablenfo'], $lang_settings['text_enable_nfo_note']);
|
||||
yesorno($lang_settings['row_enable_technical_info'],'enable_technical_info', $MAIN['enable_technical_info'], $lang_settings['text_enable_technical_info']);
|
||||
yesorno($lang_settings['row_enable_school_system'],'enableschool', $MAIN['enableschool'], $lang_settings['text_school_system_note']);
|
||||
yesorno($lang_settings['row_restrict_email_domain'],'restrictemail', $MAIN['restrictemail'], $lang_settings['text_restrict_email_domain_note']);
|
||||
yesorno($lang_settings['row_show_shoutbox'],'showshoutbox', $MAIN['showshoutbox'], $lang_settings['text_show_shoutbox_note']);
|
||||
|
||||
+14
-14
@@ -342,8 +342,8 @@ if (empty($url) && !empty($ptGenImdbLink)) {
|
||||
$url = str_replace('tt', '', $ptGenImdbInfo['id']);
|
||||
}
|
||||
|
||||
$ret = sql_query("INSERT INTO torrents (filename, owner, visible, anonymous, name, size, numfiles, type, url, small_descr, descr, ori_descr, category, source, medium, codec, audiocodec, standard, processing, team, save_as, sp_state, added, last_action, nfo, info_hash, pt_gen, tags) VALUES (".sqlesc($fname).", ".sqlesc($CURUSER["id"]).", 'yes', ".sqlesc($anonymous).", ".sqlesc($torrent).", ".sqlesc($totallen).", ".count($filelist).", ".sqlesc($type).", ".sqlesc($url).", ".sqlesc($small_descr).", ".sqlesc($descr).", ".sqlesc($descr).", ".sqlesc($catid).", ".sqlesc($sourceid).", ".sqlesc($mediumid).", ".sqlesc($codecid).", ".sqlesc($audiocodecid).", ".sqlesc($standardid).", ".sqlesc($processingid).", ".sqlesc($teamid).", ".sqlesc($dname).", ".sqlesc($sp_state) .
|
||||
", " . sqlesc(date("Y-m-d H:i:s")) . ", " . sqlesc(date("Y-m-d H:i:s")) . ", ".sqlesc($nfo).", " . sqlesc($infohash). ", " . sqlesc(json_encode($postPtGen)) . ", " . array_sum($_POST['tags'] ?? []) . ")");
|
||||
$ret = sql_query("INSERT INTO torrents (filename, owner, visible, anonymous, name, size, numfiles, type, url, small_descr, descr, ori_descr, category, source, medium, codec, audiocodec, standard, processing, team, save_as, sp_state, added, last_action, nfo, info_hash, pt_gen, tags, technical_info) VALUES (".sqlesc($fname).", ".sqlesc($CURUSER["id"]).", 'yes', ".sqlesc($anonymous).", ".sqlesc($torrent).", ".sqlesc($totallen).", ".count($filelist).", ".sqlesc($type).", ".sqlesc($url).", ".sqlesc($small_descr).", ".sqlesc($descr).", ".sqlesc($descr).", ".sqlesc($catid).", ".sqlesc($sourceid).", ".sqlesc($mediumid).", ".sqlesc($codecid).", ".sqlesc($audiocodecid).", ".sqlesc($standardid).", ".sqlesc($processingid).", ".sqlesc($teamid).", ".sqlesc($dname).", ".sqlesc($sp_state) .
|
||||
", " . sqlesc(date("Y-m-d H:i:s")) . ", " . sqlesc(date("Y-m-d H:i:s")) . ", ".sqlesc($nfo).", " . sqlesc($infohash). ", " . sqlesc(json_encode($postPtGen)) . ", " . array_sum($_POST['tags'] ?? []) . ", " . sqlesc($_POST['technical_info'] ?? '') . ")");
|
||||
if (!$ret) {
|
||||
if (mysql_errno() == 1062)
|
||||
bark($lang_takeupload['std_torrent_existed']);
|
||||
@@ -372,18 +372,18 @@ if (!empty($_POST['custom_fields'])) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($_FILES['custom_fields'])) {
|
||||
foreach ($_FILES['custom_fields'] as $customField => $customValue) {
|
||||
$customData = [
|
||||
'torrent_id' => $id,
|
||||
'custom_field_id' => $customField,
|
||||
'custom_field_value' => $value,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
];
|
||||
\Nexus\Database\DB::insert('torrents_custom_field_values', $customData);
|
||||
}
|
||||
}
|
||||
//if (!empty($_FILES['custom_fields'])) {
|
||||
// foreach ($_FILES['custom_fields'] as $customField => $customValue) {
|
||||
// $customData = [
|
||||
// 'torrent_id' => $id,
|
||||
// 'custom_field_id' => $customField,
|
||||
// 'custom_field_value' => $value,
|
||||
// 'created_at' => $now,
|
||||
// 'updated_at' => $now,
|
||||
// ];
|
||||
// \Nexus\Database\DB::insert('torrents_custom_field_values', $customData);
|
||||
// }
|
||||
//}
|
||||
|
||||
@sql_query("DELETE FROM files WHERE torrent = $id");
|
||||
foreach ($filelist as $file) {
|
||||
|
||||
@@ -73,6 +73,10 @@ stdhead($lang_upload['head_upload']);
|
||||
textbbcode("upload","descr","",false);
|
||||
print("</td></tr>\n");
|
||||
|
||||
if ($settingMain['enable_technical_info'] == 'yes') {
|
||||
tr($lang_upload['row_technical_info'], '<textarea name="technical_info" rows="8" style="width: 650px;"></textarea><br/>' . $lang_upload['row_technical_info_help_text'], 1);
|
||||
}
|
||||
|
||||
if ($allowtorrents){
|
||||
$disablespecial = " onchange=\"disableother('browsecat','specialcat')\"";
|
||||
$s = "<select name=\"type\" id=\"browsecat\" ".($allowtwosec ? $disablespecial : "").">\n<option value=\"0\">".$lang_upload['select_choose_one']."</option>\n";
|
||||
|
||||
Reference in New Issue
Block a user