findOrFail($CURUSER['id']); if ($CURUSER["uploadpos"] == 'no') stderr($lang_upload['std_sorry'], $lang_upload['std_unauthorized_to_upload'],false); if ($enableoffer == 'yes') $has_allowed_offer = get_row_count("offers","WHERE allowed='allowed' AND userid = ". sqlesc($CURUSER["id"])); else $has_allowed_offer = 0; $uploadfreely = user_can_upload("torrents"); $offerSkipApprovedCount = get_setting('main.offer_skip_approved_count'); $uploadDenyApprovalDenyCount = get_setting('main.upload_deny_approval_deny_count'); $approvalDenyCount = \App\Models\Torrent::query()->where('owner', $CURUSER['id'])->where('approval_status', \App\Models\Torrent::APPROVAL_STATUS_DENY)->count(); do_log("uploadfreely: $uploadfreely, has_allowed_offer: $has_allowed_offer, offerSkipApprovedCount: $offerSkipApprovedCount, uploadDenyApprovalDenyCount: $uploadDenyApprovalDenyCount, approvalDenyCount: $approvalDenyCount"); $allowtorrents = ($has_allowed_offer || $uploadfreely || ($userInfo->offer_allowed_count >= $offerSkipApprovedCount)); $allowspecial = user_can_upload("music"); if ($uploadDenyApprovalDenyCount > 0 && $approvalDenyCount >= $uploadDenyApprovalDenyCount) { stderr($lang_upload['std_sorry'],sprintf($lang_upload['approval_deny_reach_upper_limit'], $uploadDenyApprovalDenyCount),false); } if (!$allowtorrents && !$allowspecial) stderr($lang_upload['std_sorry'],$lang_upload['std_please_offer'],false); $allowtwosec = ($allowtorrents && $allowspecial); $brsectiontype = $browsecatmode; $spsectiontype = $specialcatmode; /* $showsource = (($allowtorrents && get_searchbox_value($brsectiontype, 'showsource')) || ($allowspecial && get_searchbox_value($spsectiontype, 'showsource'))); //whether show sources or not $showmedium = (($allowtorrents && get_searchbox_value($brsectiontype, 'showmedium')) || ($allowspecial && get_searchbox_value($spsectiontype, 'showmedium'))); //whether show media or not $showcodec = (($allowtorrents && get_searchbox_value($brsectiontype, 'showcodec')) || ($allowspecial && get_searchbox_value($spsectiontype, 'showcodec'))); //whether show codecs or not $showstandard = (($allowtorrents && get_searchbox_value($brsectiontype, 'showstandard')) || ($allowspecial && get_searchbox_value($spsectiontype, 'showstandard'))); //whether show standards or not $showprocessing = (($allowtorrents && get_searchbox_value($brsectiontype, 'showprocessing')) || ($allowspecial && get_searchbox_value($spsectiontype, 'showprocessing'))); //whether show processings or not $showteam = (($allowtorrents && get_searchbox_value($brsectiontype, 'showteam')) || ($allowspecial && get_searchbox_value($spsectiontype, 'showteam'))); //whether show teams or not $showaudiocodec = (($allowtorrents && get_searchbox_value($brsectiontype, 'showaudiocodec')) || ($allowspecial && get_searchbox_value($spsectiontype, 'showaudiocodec'))); //whether show languages or not */ $settingMain = get_setting('main'); $torrentRep = new \App\Repositories\TorrentRepository(); $searchBoxRep = new \App\Repositories\SearchBoxRepository(); $tagRep = new \App\Repositories\TagRepository(); stdhead($lang_upload['head_upload']); ?>
".$lang_upload['text_red_star_required']."

"); ?> *", "\n", 1); if ($altname_main == 'yes'){ tr($lang_upload['row_torrent_name'], "".$lang_upload['text_english_title']."     ".$lang_upload['text_chinese_title']." 
".$lang_upload['text_titles_note']."", 1); } else { $autoFillText = $lang_upload['fill_quality']; $nameInput = $torrentRep->buildUploadFieldInput("name", "", $lang_upload['text_torrent_name_note'], $autoFillText); tr($lang_upload['row_torrent_name'], $nameInput, 1); } if ($smalldescription_main == 'yes') tr($lang_upload['row_small_description'], "
".$lang_upload['text_small_description_note']."", 1); get_external_tr(); if ($settingMain['enable_pt_gen_system'] == 'yes') { $ptGen = new \Nexus\PTGen\PTGen(); echo $ptGen->renderUploadPageFormInput(""); } if ($enablenfo_main=='yes') { tr($lang_upload['row_nfo_file'], "
".$lang_upload['text_only_viewed_by'].get_user_class_name($viewnfo_class,false,true,true).$lang_upload['text_or_above']."", 1); } print("\n"); if ($settingMain['enable_technical_info'] == 'yes') { tr($lang_functions['text_technical_info'], '
' . $lang_functions['text_technical_info_help_text'], 1); } if ($allowtorrents){ $disablespecial = " onchange=\"disableother('browsecat','specialcat')\""; $s = "\n"; } else $s = ""; if ($allowspecial){ $disablebrowse = " onchange=\"disableother('specialcat','browsecat')\""; $s2 = "\n"; } else $s2 = ""; tr($lang_upload['row_type']."*", ($allowtwosec ? $lang_upload['text_to_browse_section'] : "").$s.($allowtwosec ? $lang_upload['text_to_special_section'] : "").$s2.($allowtwosec ? $lang_upload['text_type_note'] : ""),1); /* if ($showsource || $showmedium || $showcodec || $showaudiocodec || $showstandard || $showprocessing){ if ($showsource){ $source_select = torrent_selection($lang_upload['text_source'],"source_sel","sources"); } else $source_select = ""; if ($showmedium){ $medium_select = torrent_selection($lang_upload['text_medium'],"medium_sel","media"); } else $medium_select = ""; if ($showcodec){ $codec_select = torrent_selection($lang_upload['text_codec'],"codec_sel","codecs"); } else $codec_select = ""; if ($showaudiocodec){ $audiocodec_select = torrent_selection($lang_upload['text_audio_codec'],"audiocodec_sel","audiocodecs"); } else $audiocodec_select = ""; if ($showstandard){ $standard_select = torrent_selection($lang_upload['text_standard'],"standard_sel","standards"); } else $standard_select = ""; if ($showprocessing){ $processing_select = torrent_selection($lang_upload['text_processing'],"processing_sel","processings"); } else $processing_select = ""; tr($lang_upload['row_quality'], $source_select . $medium_select. $codec_select . $audiocodec_select. $standard_select . $processing_select, 1 ); } if ($showteam){ if ($showteam){ $team_select = torrent_selection($lang_upload['text_team'],"team_sel","teams"); } else $showteam = ""; tr($lang_upload['row_content'],$team_select,1); } */ $customField = new \Nexus\Field\Field(); $hitAndRunRep = new \App\Repositories\HitAndRunRepository(); if ($allowtorrents) { $selectNormal = $searchBoxRep->renderTaxonomySelect($browsecatmode); tr($lang_upload['row_quality'], $selectNormal, 1, "mode_$browsecatmode"); echo $customField->renderOnUploadPage(0, $browsecatmode); echo $hitAndRunRep->renderOnUploadPage('', $browsecatmode); tr($lang_functions['text_tags'], $tagRep->renderCheckbox($browsecatmode), 1, "mode_$browsecatmode"); } if ($allowspecial) { $selectNormal = $searchBoxRep->renderTaxonomySelect($specialcatmode); tr($lang_upload['row_quality'], $selectNormal, 1, "mode_$specialcatmode"); echo $customField->renderOnUploadPage(0, $specialcatmode); echo $hitAndRunRep->renderOnUploadPage('', $specialcatmode); tr($lang_functions['text_tags'], $tagRep->renderCheckbox($specialcatmode), 1, "mode_$specialcatmode"); } //==== offer dropdown for offer mod from code by S4NE $offerres = sql_query("SELECT id, name FROM offers WHERE userid = ".sqlesc($CURUSER['id'])." AND allowed = 'allowed' ORDER BY name ASC") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($offerres) > 0) { $offer = ""; tr($lang_upload['row_your_offer']. (!$uploadfreely && !$allowspecial ? "*" : ""), $offer.$lang_upload['text_please_select_offer'] , 1); $getOfferJs = << $value) { $options[] = "".$value['text'].""; } $pickcontent .= "".$lang_edit['row_torrent_position'].": "."   "; $pickcontent .= datetimepicker_input('pos_state_until', '', nexus_trans('label.deadline') . ": "); } if(user_can('torrentmanage') && ($CURUSER["picker"] == 'yes' || get_user_class() >= \App\Models\User::CLASS_SYSOP)) { if ($pickcontent) $pickcontent .= '
'; $pickcontent .= "".$lang_edit['row_recommended_movie'].": "."'; } if ($pickcontent) { tr($lang_edit['row_pick'], $pickcontent, 1); } if(user_can('beanonymous')) { tr($lang_upload['row_show_uploader'], "".$lang_upload['checkbox_hide_uploader_note'], 1); } ?>
:     
ATTENTION: Torrent directory isn't writable. Please contact the administrator about this problem!"); if(!$max_torrent_size) print("

ATTENTION: Max. Torrent Size not set. Please contact the administrator about this problem!"); ?>
".$lang_upload['row_description']."*"); textbbcode("upload","descr", "", false, 130, true); print("
0) { jQuery("tr[relation=mode_" + mode +"]").show(); } }) jQuery("tr[relation]").hide(); JS; \Nexus\Nexus::js($customFieldJs, 'footer', false); stdfoot();