where('torrent_id', $id)->get()->pluck('tag_id')->toArray(); $searchBoxRep = new \App\Repositories\SearchBoxRepository(); if ($enablespecial == 'yes' && user_can('movetorrent')) $allowmove = true; //enable moving torrent to other section else $allowmove = false; $sectionmode = $row['cat_mode']; if ($sectionmode == $browsecatmode) { $othermode = $specialcatmode; $movenote = $lang_edit['text_move_to_special']; } else { $othermode = $browsecatmode; $movenote = $lang_edit['text_move_to_browse']; } /* $showsource = (get_searchbox_value($sectionmode, 'showsource') || ($allowmove && get_searchbox_value($othermode, 'showsource'))); //whether show sources or not $showmedium = (get_searchbox_value($sectionmode, 'showmedium') || ($allowmove && get_searchbox_value($othermode, 'showmedium'))); //whether show media or not $showcodec = (get_searchbox_value($sectionmode, 'showcodec') || ($allowmove && get_searchbox_value($othermode, 'showcodec'))); //whether show codecs or not $showstandard = (get_searchbox_value($sectionmode, 'showstandard') || ($allowmove && get_searchbox_value($othermode, 'showstandard'))); //whether show standards or not $showprocessing = (get_searchbox_value($sectionmode, 'showprocessing') || ($allowmove && get_searchbox_value($othermode, 'showprocessing'))); //whether show processings or not $showteam = (get_searchbox_value($sectionmode, 'showteam') || ($allowmove && get_searchbox_value($othermode, 'showteam'))); //whether show teams or not $showaudiocodec = (get_searchbox_value($sectionmode, 'showaudiocodec') || ($allowmove && get_searchbox_value($othermode, 'showaudiocodec'))); //whether show audio codecs or not */ $settingMain = get_setting('main'); stdhead($lang_edit['head_edit_torrent'] . "\"". $row["name"] . "\""); if (!isset($CURUSER) || ($CURUSER["id"] != $row["owner"] && !user_can('torrentmanage'))) { print("

".$lang_edit['text_cannot_edit_torrent']."

"); echo sprintf("

".$lang_edit['text_cannot_edit_torrent_note']."

", $_SERVER["REQUEST_URI"] ?? ''); } else { print("
"); print(""); if (isset($_GET["returnto"])) print(""); print("\n"); print(""); tr($lang_edit['row_torrent_name']."*", "", 1); if ($smalldescription_main == 'yes') tr($lang_edit['row_small_description'], "", 1); get_external_tr($row["url"]); if ($settingMain['enable_pt_gen_system'] == 'yes') { $ptGen = new \Nexus\PTGen\PTGen(); echo $ptGen->renderUploadPageFormInput($row['pt_gen']); } if ($enablenfo_main=='yes') tr($lang_edit['row_nfo_file'], "".$lang_edit['radio_keep_current']. "".$lang_edit['radio_remove']. "".$lang_edit['radio_update']."
", 1); //price if (user_can('torrent-set-price') && get_setting("torrent.paid_torrent_enabled") == "yes") { $maxPrice = get_setting("torrent.max_price"); $pricePlaceholder = ""; if ($maxPrice > 0) { $pricePlaceholder = nexus_trans("label.torrent.max_price_help", ["max_price" => $maxPrice]); } tr(nexus_trans('label.torrent.price'), '  ' . nexus_trans('label.torrent.price_help', ['tax_factor' => (floatval(get_setting('torrent.tax_factor', 0)) * 100) . '%']), 1); } print(""); if ($settingMain['enable_technical_info'] == 'yes') { tr($lang_functions['text_technical_info'], '
' . $lang_functions['text_technical_info_help_text'], 1); } $s = "\n"; if ($allowmove){ $s2 = "\n"; $movecheckbox = ""; } tr($lang_edit['row_type']."*", $s.($allowmove ? "  ".$movecheckbox.$movenote.$s2 : ""), 1); /* if ($showsource || $showmedium || $showcodec || $showaudiocodec || $showstandard || $showprocessing){ if ($showsource){ $source_select = torrent_selection($lang_edit['text_source'],"source_sel","sources",$row["source"]); } else $source_select = ""; if ($showmedium){ $medium_select = torrent_selection($lang_edit['text_medium'],"medium_sel","media",$row["medium"]); } else $medium_select = ""; if ($showcodec){ $codec_select = torrent_selection($lang_edit['text_codec'],"codec_sel","codecs",$row["codec"]); } else $codec_select = ""; if ($showaudiocodec){ $audiocodec_select = torrent_selection($lang_edit['text_audio_codec'],"audiocodec_sel","audiocodecs",$row["audiocodec"]); } else $audiocodec_select = ""; if ($showstandard){ $standard_select = torrent_selection($lang_edit['text_standard'],"standard_sel","standards",$row["standard"]); } else $standard_select = ""; if ($showprocessing){ $processing_select = torrent_selection($lang_edit['text_processing'],"processing_sel","processings",$row["processing"]); } else $processing_select = ""; tr($lang_edit['row_quality'], $source_select . $medium_select . $codec_select . $audiocodec_select. $standard_select . $processing_select, 1); } if ($showteam){ if ($showteam){ $team_select = torrent_selection($lang_edit['text_team'],"team_sel","teams",$row["team"]); } else $showteam = ""; tr($lang_edit['row_content'],$team_select,1); } */ $sectionCurrent = $searchBoxRep->renderTaxonomySelect($sectionmode, $row); tr($lang_edit['row_quality'], $sectionCurrent, 1, "mode_$sectionmode"); echo $customField->renderOnUploadPage($id, $sectionmode); echo $hitAndRunRep->renderOnUploadPage($row['hr'], $sectionmode); tr($lang_functions['text_tags'], $tagRep->renderCheckbox($sectionmode, $tagIdArr), 1, "mode_$sectionmode"); if ($allowmove && $othermode) { $selectOther = $searchBoxRep->renderTaxonomySelect($othermode, $row); tr($lang_edit['row_quality'], $selectOther, 1, "mode_$othermode"); echo $customField->renderOnUploadPage($id, $othermode); echo $hitAndRunRep->renderOnUploadPage($row['hr'], $othermode); tr($lang_functions['text_tags'], $tagRep->renderCheckbox($othermode, $tagIdArr), 1, "mode_$othermode"); } $rowChecks = []; if (user_can('beanonymous') || user_can('torrentmanage')) { $rowChecks[] = ""; } if (user_can('torrentmanage')) { array_unshift($rowChecks, ""); } if (!empty($rowChecks)) { tr($lang_edit['row_check'], implode('  ', $rowChecks), 1); } if (user_can('torrentsticky') || (user_can('torrentmanage') && $CURUSER["picker"] == 'yes')){ $pickcontent = $pickcontentPrefix = ""; if(user_can('torrentonpromotion')) { $pickcontent .= "".$lang_edit['row_special_torrent'].": "."   ".'  '; } if(user_can('torrentsticky')) { if ($pickcontent) { $pickcontent .= "
"; } $options = []; foreach (\App\Models\Torrent::listPosStates() as $key => $value) { $options[] = "".$value['text'].""; } $pickcontent .= "".$lang_edit['row_torrent_position'].": "."   "; $pickcontent .= datetimepicker_input('pos_state_until', $row['pos_state_until'], nexus_trans('label.deadline') . ": ", ['require_files' => true]); } if(user_can('torrentmanage') && ($CURUSER["picker"] == 'yes' || get_user_class() >= \App\Models\User::CLASS_SYSOP)) { if ($pickcontent) $pickcontent .= '
'; $pickcontent .= "".$lang_edit['row_recommended_movie'].": ".""; } tr($lang_edit['row_pick'], $pickcontent, 1); } print("
\n"); print("
".htmlspecialchars($row["name"])."
".$lang_edit['row_description']."*"); textbbcode("edittorrent","descr",($row["descr"]), false, 130, true); print("
\n"); print("
\n"); if (user_can('torrent-delete') && user_can('torrentmanage')) { print("

"); print("
\n"); print("\n"); if (isset($_GET["returnto"])) print("\n"); print("\n"); print(""); tr(" ".$lang_edit['radio_dead'], $lang_edit['text_dead_note'], 1); tr(" ".$lang_edit['radio_dupe'], "", 1); tr(" ".$lang_edit['radio_nuked'], "", 1); tr(" ".$lang_edit['radio_rules'], "".$lang_edit['text_req'], 1); tr(" ".$lang_edit['radio_other'], "".$lang_edit['text_req'], 1); print("\n"); print("
".$lang_edit['text_delete_torrent']."
"); print("
\n"); } $json_sticky_series = json_encode(array(4, 6, 12, 24, 36, 48, 72, 168, 360)); echo << jQuery(function($){ var date_format = function (date) { var seperator1 = "-"; var seperator2 = ":"; var month = date.getMonth() + 1; var strDate = date.getDate(); var strHour = date.getHours(); var strMinute = date.getMinutes(); var strSecond = date.getSeconds(); if (month >= 1 && month <= 9) { month = "0" + month; } if (strDate >= 0 && strDate <= 9) { strDate = "0" + strDate; } if (strHour >= 0 && strHour <= 9) strHour = "0" + strHour; if (strMinute >= 0 && strMinute <= 9) strMinute = "0" + strMinute; if (strSecond >= 0 && strSecond <= 9) strSecond = "0" + strSecond; return date.getFullYear() + seperator1 + month + seperator1 + strDate + " " + strHour + seperator2 + strMinute + seperator2 + strSecond; } var pos_until_select = $("#pos_until_select"); var pos_until = $("#pos_until"); $("#pos_group").change(function(){ if($(this).val() == 0){ pos_until.hide(); pos_until_select.hide(); }else{ pos_until.show(); pos_until_select.show(); } }).change(); var series = $json_sticky_series; series.forEach(function(elem){ var label = elem >= 72 ? parseInt(parseInt(elem) / 24) + "{$lang_functions['text_day']}" : elem + "{$lang_functions['text_hour']}"; pos_until_select.append(''); }); pos_until_select.change(function(){ var value = $(this).val(); if(value == -1){ pos_until.val("0000-00-00 00:00:00").attr("readonly", true); }else if(value == 0){ pos_until.attr("readonly", false); }else if(value > 0){ var curr = pos_until.val(); var d = new Date(Date.now() + 3600000 * value); pos_until.attr("readonly", true).val(date_format(d)); } }).change(); }); EOT; } \Nexus\Nexus::js('vendor/jquery-loading/jquery.loading.min.js', 'footer', true); \Nexus\Nexus::js('js/ptgen.js', 'footer', true); $customFieldJs = <<'.mkprettytime($addSeconds).''; }