From bb25eb03c77f6f2e88663e12defcbc4814fae066 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Wed, 17 Sep 2025 17:11:17 +0700 Subject: [PATCH] improve userdetails page hide_text --- lang/chs/lang_tags.php | 16 ++++++++-------- lang/cht/lang_tags.php | 16 ++++++++-------- lang/en/lang_tags.php | 16 ++++++++-------- public/takeupload.php | 4 ++-- public/userdetails.php | 5 +++-- 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/lang/chs/lang_tags.php b/lang/chs/lang_tags.php index e069550b..8cd69ea8 100644 --- a/lang/chs/lang_tags.php +++ b/lang/chs/lang_tags.php @@ -53,22 +53,22 @@ $lang_tags = array 'text_hyperlink_one' => "超级链接(方式1)", 'text_hyperlink_one_description' => "插入超级链接", 'text_hyperlink_one_syntax' => "[url]URL[/url]", - 'text_hyperlink_one_example' => "[url]". "http://%s[/url]", + 'text_hyperlink_one_example' => "[url]". "%s[/url]", 'text_hyperlink_one_remarks' => "该标签是多余的,所有URL都会自动加超级链接", 'text_hyperlink_two' => "超级链接(方式2)", 'text_hyperlink_two_description' => "插入超级链接", 'text_hyperlink_two_syntax' => "[url=URL]链接文字[/url]", - 'text_hyperlink_two_example' => "[url="."http://%s]%s[/url]", + 'text_hyperlink_two_example' => "[url="."%s]%s[/url]", 'text_hyperlink_two_remarks' => "当你需要将文字加超链接时使用。", 'text_image_one' => "图片(方式1)", 'text_image_one_description' => "插入图片", 'text_image_one_syntax' => "[img=URL]", - 'text_image_one_example' => "[img=http://%s/pic/nexus.png]", + 'text_image_one_example' => "[img=%s/pic/nexus.png]", 'text_image_one_remarks' => "URL必须是.gif, .jpg, jpeg.png", 'text_image_two' => "图片(方式2)", 'text_image_two_description' => "插入图片", 'text_image_two_syntax' => "[img]URL[/img]", - 'text_image_two_example' => "[img]http://%s/pic/nexus.png[/img]", + 'text_image_two_example' => "[img]%s/pic/nexus.png[/img]", 'text_image_two_remarks' => "URL必须是.gif, .jpg, jpeg.png", 'text_quote_one' => "引用(方式1)", 'text_quote_one_description' => "插入引用", @@ -106,19 +106,19 @@ $lang_tags = array 'text_flash' => "Flash(方式1)", 'text_flash_description' => "在页面内插入指定宽度与高度的Flash", 'text_flash_syntax' => "[flash,width,height]Flash URL[/flash]", - 'text_flash_example' => "[flash,500,300]http://%s/flash.demo.swf[/flash]", + 'text_flash_example' => "[flash,500,300]%s/flash.demo.swf[/flash]", 'text_flash_two' => "Flash(方式2)", 'text_flash_two_description' => "在页面内插入默认宽度与高度(500 * 300)的Flash", 'text_flash_two_syntax' => "[flash]Flash URL[/flash]", - 'text_flash_two_example' => "[flash]http://%s/flash.demo.swf[/flash]", + 'text_flash_two_example' => "[flash]%s/flash.demo.swf[/flash]", 'text_flv_one' => "Flash视频(方式1)", 'text_flv_one_description' => "在页面内插入指定宽度与高度的Flash视频", 'text_flv_one_syntax' => "[flv,width,height]Flash视频的URL[/flv]", - 'text_flv_one_example' => "[flv,320,240]http://%s/flash.video.demo.flv[/flv]", + 'text_flv_one_example' => "[flv,320,240]%s/flash.video.demo.flv[/flv]", 'text_flv_two' => "Flash视频(方式2)", 'text_flv_two_description' => "在页面内插入默认宽度与高度(320 * 240)的Flash视频", 'text_flv_two_syntax' => "[flv]Flash视频的URL[/flv]", - 'text_flv_two_example' => "[flv]http://%s/flash.video.demo.flv[/flv]", + 'text_flv_two_example' => "[flv]%s/flash.video.demo.flv[/flv]", 'text_youtube' => "YouTube", 'text_youtube_description' => "在页面内插入YouTube网站的在线视频", 'text_youtube_syntax' => "[youtube,width,height]YouTube视频的URL[/youtube]", diff --git a/lang/cht/lang_tags.php b/lang/cht/lang_tags.php index f1798de8..bac11b23 100644 --- a/lang/cht/lang_tags.php +++ b/lang/cht/lang_tags.php @@ -45,22 +45,22 @@ $lang_tags = array 'text_hyperlink_one' => "超連結(方式1)", 'text_hyperlink_one_description' => "插入超連結", 'text_hyperlink_one_syntax' => "[url]URL[/url]", - 'text_hyperlink_one_example' => "[url]http://%s[/url]", + 'text_hyperlink_one_example' => "[url]%s[/url]", 'text_hyperlink_one_remarks' => "該標籤是多餘的,所有URL都會自動加超連結", 'text_hyperlink_two' => "超連結(方式2)", 'text_hyperlink_two_description' => "插入超連結", 'text_hyperlink_two_syntax' => "[url=URL]鏈結文字[/url]", - 'text_hyperlink_two_example' => "[url=http://%s]%s[/url]", + 'text_hyperlink_two_example' => "[url=%s]%s[/url]", 'text_hyperlink_two_remarks' => "當你需要將文字加超鏈結時使用。", 'text_image_one' => "圖片(方式1)", 'text_image_one_description' => "插入圖片", 'text_image_one_syntax' => "[img=URL]", - 'text_image_one_example' => "[img=http://%s/pic/nexus.png]", + 'text_image_one_example' => "[img=%s/pic/nexus.png]", 'text_image_one_remarks' => "URL必須是.gif, .jpg, jpeg.png", 'text_image_two' => "圖片(方式2)", 'text_image_two_description' => "插入圖片", 'text_image_two_syntax' => "[img]URL[/img]", - 'text_image_two_example' => "[img]http://%s/pic/nexus.png[/img]", + 'text_image_two_example' => "[img]%s/pic/nexus.png[/img]", 'text_image_two_remarks' => "URL必須是.gif, .jpg, jpeg.png", 'text_quote_one' => "引用(方式1)", 'text_quote_one_description' => "插入引用", @@ -98,19 +98,19 @@ $lang_tags = array 'text_flash' => "Flash(方式1)", 'text_flash_description' => "在頁面內插入指定寬度與高度的Flash", 'text_flash_syntax' => "[flash,width,height]Flash URL[/flash]", - 'text_flash_example' => "[flash,500,300]http://%s/flash.demo.swf[/flash]", + 'text_flash_example' => "[flash,500,300]%s/flash.demo.swf[/flash]", 'text_flash_two' => "Flash(方式2)", 'text_flash_two_description' => "在頁面內插入默認寬度與高度的Flash", 'text_flash_two_syntax' => "[flash]Flash URL[/flash]", - 'text_flash_two_example' => "[flash]http://%s/flash.demo.swf[/flash]", + 'text_flash_two_example' => "[flash]%s/flash.demo.swf[/flash]", 'text_flv_one' => "Flash視頻(方式1)", 'text_flv_one_description' => "在頁面內插入指定寬度與高度的Flash視頻", 'text_flv_one_syntax' => "[flv,width,height]Flash視頻的URL[/flv]", - 'text_flv_one_example' => "[flv,320,240]http://%s/flash.video.demo.flv[/flv]", + 'text_flv_one_example' => "[flv,320,240]%s/flash.video.demo.flv[/flv]", 'text_flv_two' => "Flash視頻(方式2)", 'text_flv_two_description' => "在在頁面內插入默認寬度與高度(320 * 240)的Flash視頻", 'text_flv_two_syntax' => "[flv]Flash視頻的URL[/flv]", - 'text_flv_two_example' => "[flv]http://%s/flash.video.demo.flv[/flv]", + 'text_flv_two_example' => "[flv]%s/flash.video.demo.flv[/flv]", 'text_youtube' => "YouTube", 'text_youtube_description' => "在頁面內插入YouTube網站的在線視頻", 'text_youtube_syntax' => "[youtube,width,height]YouTube視頻的URL[/youtube]", diff --git a/lang/en/lang_tags.php b/lang/en/lang_tags.php index 7c0aa00e..3ad09cc6 100644 --- a/lang/en/lang_tags.php +++ b/lang/en/lang_tags.php @@ -53,22 +53,22 @@ $lang_tags = array 'text_hyperlink_one' => "Hyperlink (alt. 1)", 'text_hyperlink_one_description' => "Inserts a hyperlink.", 'text_hyperlink_one_syntax' => "[url]URL[/url]", - 'text_hyperlink_one_example' => "[url]http://%s[/url]", + 'text_hyperlink_one_example' => "[url]%s[/url]", 'text_hyperlink_one_remarks' => "This tag is superfluous; all URLs are automatically hyperlinked.", 'text_hyperlink_two' => "Hyperlink (alt. 2)", 'text_hyperlink_two_description' => "Inserts a hyperlink.", 'text_hyperlink_two_syntax' => "[url=URL]Link text[/url]", - 'text_hyperlink_two_example' => "[url=http://%s]%s[/url]", + 'text_hyperlink_two_example' => "[url=%s]%s[/url]", 'text_hyperlink_two_remarks' => "You do not have to use this tag unless you want to set the link text; all URLs are automatically hyperlinked.", 'text_image_one' => "Image (alt. 1)", 'text_image_one_description' => "Inserts a picture.", 'text_image_one_syntax' => "[img=URL]", - 'text_image_one_example' => "[img=http://%s/pic/nexus.png]", + 'text_image_one_example' => "[img=%s/pic/nexus.png]", 'text_image_one_remarks' => "The URL must end with .gif, .jpg, .jpeg or .png.", 'text_image_two' => "Image (alt. 2)", 'text_image_two_description' => "Inserts a picture.", 'text_image_two_syntax' => "[img]URL[/img]", - 'text_image_two_example' => "[img]http://%s/pic/nexus.png[/img]", + 'text_image_two_example' => "[img]%s/pic/nexus.png[/img]", 'text_image_two_remarks' => "The URL must end with .gif, .jpg, .jpeg or .png.", 'text_quote_one' => "Quote (alt. 1)", 'text_quote_one_description' => "Inserts a quote.", @@ -106,19 +106,19 @@ $lang_tags = array 'text_flash' => "Flash (alt. 1)", 'text_flash_description' => "Insert flash in webpages at defined width and height", 'text_flash_syntax' => "[flash,width,height]Flash URL[/flash]", - 'text_flash_example' => "[flash,500,300]http://%s/flash.demo.swf[/flash]", + 'text_flash_example' => "[flash,500,300]%s/flash.demo.swf[/flash]", 'text_flash_two' => "Flash (alt. 2)", 'text_flash_two_description' => "Insert flash in webpages at default width and height (500 * 300)", 'text_flash_two_syntax' => "[flash]Flash URL[/flash]", - 'text_flash_two_example' => "[flash]http://%s/flash.demo.swf[/flash]", + 'text_flash_two_example' => "[flash]%s/flash.demo.swf[/flash]", 'text_flv_one' => "Flash video (alt.1)", 'text_flv_one_description' => "Insert flash video in webpages at defined width and height", 'text_flv_one_syntax' => "[flv,width,height]Flash video URL[/flv]", - 'text_flv_one_example' => "[flv,320,240]http://%s/flash.video.demo.flv[/flv]", + 'text_flv_one_example' => "[flv,320,240]%s/flash.video.demo.flv[/flv]", 'text_flv_two' => "Flash video (alt.2)", 'text_flv_two_description' => "Insert flash video in webpages at default width and height (320 * 240)", 'text_flv_two_syntax' => "[flv]Flash video URL[/flv]", - 'text_flv_two_example' => "[flv]http://%s/flash.video.demo.flv[/flv]", + 'text_flv_two_example' => "[flv]%s/flash.video.demo.flv[/flv]", 'text_youtube' => "YouTube", 'text_youtube_description' => "Insert YouTube online video in webpages", 'text_youtube_syntax' => "[youtube,width,height]Video URL on YouTube[/youtube]", diff --git a/public/takeupload.php b/public/takeupload.php index 87591db5..4ce1af74 100644 --- a/public/takeupload.php +++ b/public/takeupload.php @@ -103,7 +103,7 @@ bark($lang_takeupload['std_empty_file']); //check max price $maxPrice = get_setting("torrent.max_price"); $paidTorrentEnabled = get_setting("torrent.paid_torrent_enabled") == "yes"; -if ($maxPrice > 0 && $_POST['price'] > $maxPrice && $paidTorrentEnabled) { +if ($maxPrice > 0 && isset($_POST['price']) && $_POST['price'] > $maxPrice && $paidTorrentEnabled) { bark('price too much'); } @@ -141,7 +141,7 @@ if (strlen($pieces) % 20 != 0) bark($lang_takeupload['std_invalid_pieces']); $filelist = array(); -$totallen = $info['length']; +$totallen = $info['length'] ?? null; if (isset($totallen)) { $filelist[] = array($dname, $totallen); $type = "single"; diff --git a/public/userdetails.php b/public/userdetails.php index 51273ca2..e0ae5494 100644 --- a/public/userdetails.php +++ b/public/userdetails.php @@ -235,8 +235,9 @@ if (user_can('userprofile') || $user["id"] == $CURUSER["id"]) $locationinfo = "[" . $loc_pub . "]"; } else $locationinfo = ""; - $ip = $user["id"] == $CURUSER["id"] ? hide_text($user['ip']) : $user['ip']; - tr_small($lang_userdetails['row_ip_address'], $ip.$locationinfo.$seedBoxIcon, 1); +// $ip = $user["id"] == $CURUSER["id"] ? hide_text($user['ip']) : $user['ip']; + $ip = $user["ip"]; + tr_small($lang_userdetails['row_ip_address'], hide_text($ip.$locationinfo.$seedBoxIcon), 1); } $clientselect = ''; $res = sql_query("SELECT peer_id, agent, ipv4, ipv6, port FROM peers WHERE userid = {$user['id']} GROUP BY agent, ipv4, ipv6, port") or sqlerr();