paid torent max_price&enabled configurable

This commit is contained in:
xiaomlove
2023-04-29 12:57:46 +08:00
parent 241485be0f
commit 73871a51ba
14 changed files with 59 additions and 13 deletions
+7 -2
View File
@@ -74,8 +74,13 @@ stdhead($lang_upload['head_upload']);
tr($lang_upload['row_nfo_file'], "<input type=\"file\" class=\"file\" name=\"nfo\" /><br /><font class=\"medium\">".$lang_upload['text_only_viewed_by'].get_user_class_name($viewnfo_class,false,true,true).$lang_upload['text_or_above']."</font>", 1);
}
//price
if (user_can('torrent-set-price')) {
tr(nexus_trans('label.torrent.price'), '<input type="number" min="0" name="price" />&nbsp;&nbsp;' . nexus_trans('label.torrent.price_help', ['tax_factor' => (floatval(get_setting('torrent.tax_factor', 0)) * 100) . '%']), 1);
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'), '<input type="number" min="0" name="price" placeholder="'.$pricePlaceholder.'" />&nbsp;&nbsp;' . nexus_trans('label.torrent.price_help', ['tax_factor' => (floatval(get_setting('torrent.tax_factor', 0)) * 100) . '%']), 1);
}
print("<tr><td class=\"rowhead\" style='padding: 3px' valign=\"top\">".$lang_upload['row_description']."<font color=\"red\">*</font></td><td class=\"rowfollow\">");