mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
sticky background color
This commit is contained in:
@@ -5,6 +5,7 @@ Complete PT website building solution. Based on NexusPHP + Laravel Framework + E
|
|||||||
## Functional Features
|
## Functional Features
|
||||||
|
|
||||||
- Upload torrent
|
- Upload torrent
|
||||||
|
- Special section
|
||||||
- Request torrent
|
- Request torrent
|
||||||
- Subtitle
|
- Subtitle
|
||||||
- Exam
|
- Exam
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
## 功能特性
|
## 功能特性
|
||||||
- 发种
|
- 发种
|
||||||
|
- 特别区
|
||||||
- 求种
|
- 求种
|
||||||
- 字幕
|
- 字幕
|
||||||
- 考核
|
- 考核
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
|
|
||||||
## 更多信息
|
## 更多信息
|
||||||
博客:[https://nexusphp.org](http://nexusphp.org/)
|
博客:[https://nexusphp.org](http://nexusphp.org/)
|
||||||
|
论坛:[https://discuss.nexusphp.org](https://discuss.nexusphp.org/)
|
||||||
文档:[https://doc.nexusphp.org](http://doc.nexusphp.org/)
|
文档:[https://doc.nexusphp.org](http://doc.nexusphp.org/)
|
||||||
QQ群: [764452568](https://jq.qq.com/?_wv=1027&k=IbltZcIx)
|
QQ群: [764452568](https://jq.qq.com/?_wv=1027&k=IbltZcIx)
|
||||||

|

|
||||||
|
|||||||
+2
-4
@@ -68,11 +68,9 @@ foreach ($settings as $name => $value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$SITENAME = $BASIC['SITENAME'];
|
$SITENAME = $BASIC['SITENAME'];
|
||||||
//$BASEURL = $BASIC['BASEURL'];
|
$BASEURL = $BASIC['BASEURL'] ?: ($_SERVER['HTTP_HOST'] ?? '');
|
||||||
$BASEURL = $_SERVER['HTTP_HOST'] ?? '';
|
|
||||||
$announce_urls = array();
|
$announce_urls = array();
|
||||||
//$announce_urls[] = $BASIC['announce_url'];
|
$announce_urls[] = $BASIC['announce_url'] ?: ($BASEURL . '/announce.php');
|
||||||
$announce_urls[] = $BASEURL . '/announce.php';
|
|
||||||
|
|
||||||
$SITE_ONLINE = $MAIN['site_online'];
|
$SITE_ONLINE = $MAIN['site_online'];
|
||||||
$max_torrent_size = $MAIN['max_torrent_size'];
|
$max_torrent_size = $MAIN['max_torrent_size'];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0-beta8');
|
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0-beta8');
|
||||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2020-05-15');
|
defined('RELEASE_DATE') || define('RELEASE_DATE', '2020-06-05');
|
||||||
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
||||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||||
|
|||||||
+12
-8
@@ -3159,7 +3159,7 @@ else $displaysmalldescr = true;
|
|||||||
foreach ($rows as $row)
|
foreach ($rows as $row)
|
||||||
{
|
{
|
||||||
$id = $row["id"];
|
$id = $row["id"];
|
||||||
$sphighlight = get_torrent_bg_color($row['sp_state']);
|
$sphighlight = get_torrent_bg_color($row['sp_state'], $row['pos_state']);
|
||||||
print("<tr" . $sphighlight . ">\n");
|
print("<tr" . $sphighlight . ">\n");
|
||||||
|
|
||||||
print("<td class=\"rowfollow nowrap\" valign=\"middle\" style='padding: 0px'>");
|
print("<td class=\"rowfollow nowrap\" valign=\"middle\" style='padding: 0px'>");
|
||||||
@@ -3889,10 +3889,10 @@ function get_second_icon($row, $catimgurl) //for CHDBits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_torrent_bg_color($promotion = 1)
|
function get_torrent_bg_color($promotion = 1, $posState = "")
|
||||||
{
|
{
|
||||||
global $CURUSER;
|
global $CURUSER;
|
||||||
|
$sphighlight = null;
|
||||||
if ($CURUSER['appendpromotion'] == 'highlight'){
|
if ($CURUSER['appendpromotion'] == 'highlight'){
|
||||||
$global_promotion_state = get_global_sp_state();
|
$global_promotion_state = get_global_sp_state();
|
||||||
if ($global_promotion_state == 1){
|
if ($global_promotion_state == 1){
|
||||||
@@ -3910,7 +3910,6 @@ function get_torrent_bg_color($promotion = 1)
|
|||||||
$sphighlight = " class='twouphalfdown_bg'";
|
$sphighlight = " class='twouphalfdown_bg'";
|
||||||
elseif($promotion==7)
|
elseif($promotion==7)
|
||||||
$sphighlight = " class='thirtypercentdown_bg'";
|
$sphighlight = " class='thirtypercentdown_bg'";
|
||||||
else $sphighlight = "";
|
|
||||||
}
|
}
|
||||||
elseif($global_promotion_state == 2)
|
elseif($global_promotion_state == 2)
|
||||||
$sphighlight = " class='free_bg'";
|
$sphighlight = " class='free_bg'";
|
||||||
@@ -3924,11 +3923,16 @@ function get_torrent_bg_color($promotion = 1)
|
|||||||
$sphighlight = " class='twouphalfdown_bg'";
|
$sphighlight = " class='twouphalfdown_bg'";
|
||||||
elseif($global_promotion_state == 7)
|
elseif($global_promotion_state == 7)
|
||||||
$sphighlight = " class='thirtypercentdown_bg'";
|
$sphighlight = " class='thirtypercentdown_bg'";
|
||||||
else
|
|
||||||
$sphighlight = "";
|
|
||||||
}
|
}
|
||||||
else $sphighlight = "";
|
if (is_null($sphighlight)) {
|
||||||
return $sphighlight;
|
$torrentSettings = get_setting('torrent');
|
||||||
|
if ($posState == \App\Models\Torrent::POS_STATE_STICKY_ONE && !empty($torrentSettings['sticky_first_level_background_color'])) {
|
||||||
|
$sphighlight = sprintf(' style="background-color: %s"', $torrentSettings['sticky_first_level_background_color']);
|
||||||
|
} elseif ($posState == \App\Models\Torrent::POS_STATE_STICKY_SECOND && !empty($torrentSettings['sticky_second_level_background_color'])) {
|
||||||
|
$sphighlight = sprintf(' style="background-color: %s"', $torrentSettings['sticky_second_level_background_color']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (string)$sphighlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_torrent_promotion_append($promotion = 1,$forcemode = "",$showtimeleft = false, $added = "", $promotionTimeType = 0, $promotionUntil = ''){
|
function get_torrent_promotion_append($promotion = 1,$forcemode = "",$showtimeleft = false, $added = "", $promotionTimeType = 0, $promotionUntil = ''){
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ function check_cheater($userid, $torrentid, $uploaded, $downloaded, $anctime, $s
|
|||||||
$time = date("Y-m-d H:i:s");
|
$time = date("Y-m-d H:i:s");
|
||||||
$upspeed = ($uploaded > 0 ? $uploaded / $anctime : 0);
|
$upspeed = ($uploaded > 0 ? $uploaded / $anctime : 0);
|
||||||
$mustBeCheaterSpeed = 1024 * 1024 * 100; //100 MB/s
|
$mustBeCheaterSpeed = 1024 * 1024 * 100; //100 MB/s
|
||||||
$mayBeCheaterSpeed = 1024 * 1024 * 25; //25 MB/s
|
$mayBeCheaterSpeed = 1024 * 1024 * 50; //50 MB/s
|
||||||
|
|
||||||
if ($uploaded > 1073741824 && $upspeed > ($mustBeCheaterSpeed/$cheaterdet_security)) //Uploaded more than 1 GB with uploading rate higher than 100 MByte/S (For Consertive level). This is no doubt cheating.
|
if ($uploaded > 1073741824 && $upspeed > ($mustBeCheaterSpeed/$cheaterdet_security)) //Uploaded more than 1 GB with uploading rate higher than 100 MByte/S (For Consertive level). This is no doubt cheating.
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -706,6 +706,10 @@ $lang_settings = array
|
|||||||
'text_login_secret_lifetime_deadline' => '当前密钥有效期至',
|
'text_login_secret_lifetime_deadline' => '当前密钥有效期至',
|
||||||
'row_enable_technical_info' => '启用技术信息',
|
'row_enable_technical_info' => '启用技术信息',
|
||||||
'text_enable_technical_info' => "默认'否'。技术信息来自软件 <b><a href=\"https://mediaarea.net/en/MediaInfo\" target='_blank'>MediaInfo</a></b> Text 视图的结果",
|
'text_enable_technical_info' => "默认'否'。技术信息来自软件 <b><a href=\"https://mediaarea.net/en/MediaInfo\" target='_blank'>MediaInfo</a></b> Text 视图的结果",
|
||||||
|
'row_sticky_first_level_background_color' => '一级置顶背景颜色',
|
||||||
|
'text_sticky_first_level_background_color_note' => '一级置顶背景颜色,不设置则无背景色。',
|
||||||
|
'row_sticky_second_level_background_color' => '二级置顶背景颜色',
|
||||||
|
'text_sticky_second_level_background_color_note' => '二级置顶背景颜色,不设置则无背景色。',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -706,6 +706,10 @@ $lang_settings = array
|
|||||||
'text_login_secret_lifetime_deadline' => '當前密鑰有效期至',
|
'text_login_secret_lifetime_deadline' => '當前密鑰有效期至',
|
||||||
'row_enable_technical_info' => '啟用技術信息',
|
'row_enable_technical_info' => '啟用技術信息',
|
||||||
'text_enable_technical_info' => "默認'否'。技術信息來自軟件 <b><a href=\"https://mediaarea.net/en/MediaInfo\" target='_blank'>MediaInfo</a></b> Text 視圖的結果",
|
'text_enable_technical_info' => "默認'否'。技術信息來自軟件 <b><a href=\"https://mediaarea.net/en/MediaInfo\" target='_blank'>MediaInfo</a></b> Text 視圖的結果",
|
||||||
|
'row_sticky_first_level_background_color' => '一級置頂背景顏色',
|
||||||
|
'text_sticky_first_level_background_color_note' => '一級置頂背景顏色,不設置則無背景色。',
|
||||||
|
'row_sticky_second_level_background_color' => '二級置頂背景顏色',
|
||||||
|
'text_sticky_second_level_background_color_note' => '二級置頂背景顏色,不設置則無背景色。',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -706,6 +706,10 @@ $lang_settings = array
|
|||||||
'text_login_secret_lifetime_deadline' => 'Current login secret deadline',
|
'text_login_secret_lifetime_deadline' => 'Current login secret deadline',
|
||||||
'row_enable_technical_info' => 'Enable Technical Information',
|
'row_enable_technical_info' => 'Enable Technical Information',
|
||||||
'text_enable_technical_info' => "Default 'No'. Technical Information comes from software <b><a href=\"https://mediaarea.net/en/MediaInfo\" target='_blank'>MediaInfo</a></b> Text view",
|
'text_enable_technical_info' => "Default 'No'. Technical Information comes from software <b><a href=\"https://mediaarea.net/en/MediaInfo\" target='_blank'>MediaInfo</a></b> Text view",
|
||||||
|
'row_sticky_first_level_background_color' => 'Sticky first level bg color',
|
||||||
|
'text_sticky_first_level_background_color_note' => 'Sticky first level bg color, it will be none if not set.',
|
||||||
|
'row_sticky_second_level_background_color' => 'Sticky second level bg color',
|
||||||
|
'text_sticky_second_level_background_color_note' => 'Sticky second level bg color, it will be none if not set.',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
'basic' =>
|
'basic' =>
|
||||||
array (
|
array (
|
||||||
'SITENAME' => 'NexusPHP',
|
'SITENAME' => 'NexusPHP',
|
||||||
|
'BASEURL' => '',
|
||||||
|
'announce_url' => '',
|
||||||
),
|
),
|
||||||
'main' =>
|
'main' =>
|
||||||
array (
|
array (
|
||||||
@@ -307,6 +309,8 @@
|
|||||||
'thirtypercentleechbecome' => '1',
|
'thirtypercentleechbecome' => '1',
|
||||||
'expirethirtypercentleech' => '0',
|
'expirethirtypercentleech' => '0',
|
||||||
'minvotes' => '10',
|
'minvotes' => '10',
|
||||||
|
'sticky_first_level_background_color' => '#89c9e6',
|
||||||
|
'sticky_second_level_background_color' => '#aadbf3',
|
||||||
),
|
),
|
||||||
'attachment' =>
|
'attachment' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
+2
-1
@@ -108,7 +108,8 @@ $trackerReportAuthKey = $torrentRep->getTrackerReportAuthKey($id, $CURUSER['id']
|
|||||||
|
|
||||||
$dict = bdec_file($fn, $max_torrent_size);
|
$dict = bdec_file($fn, $max_torrent_size);
|
||||||
//$dict['value']['announce']['value'] = $ssl_torrent . $base_announce_url . "?passkey=$CURUSER[passkey]";
|
//$dict['value']['announce']['value'] = $ssl_torrent . $base_announce_url . "?passkey=$CURUSER[passkey]";
|
||||||
$dict['value']['announce']['value'] = getSchemeAndHttpHost() . "/announce.php?authkey=$trackerReportAuthKey";
|
$dict['value']['announce']['value'] = $ssl_torrent . $base_announce_url . "?authkey=$trackerReportAuthKey";
|
||||||
|
//$dict['value']['announce']['value'] = getSchemeAndHttpHost() . "/announce.php?authkey=$trackerReportAuthKey";
|
||||||
$dict['value']['announce']['string'] = strlen($dict['value']['announce']['value']).":".$dict['value']['announce']['value'];
|
$dict['value']['announce']['string'] = strlen($dict['value']['announce']['value']).":".$dict['value']['announce']['value'];
|
||||||
$dict['value']['announce']['strlen'] = strlen($dict['value']['announce']['string']);
|
$dict['value']['announce']['strlen'] = strlen($dict['value']['announce']['string']);
|
||||||
/*if ($announce_urls[1] != "") // add multi-tracker
|
/*if ($announce_urls[1] != "") // add multi-tracker
|
||||||
|
|||||||
+12
-5
@@ -62,7 +62,7 @@ elseif ($action == 'savesettings_basic') // save basic
|
|||||||
{
|
{
|
||||||
stdhead($lang_settings['head_save_basic_settings']);
|
stdhead($lang_settings['head_save_basic_settings']);
|
||||||
$validConfig = array(
|
$validConfig = array(
|
||||||
'SITENAME',
|
'SITENAME', 'BASEURL', 'announce_url'
|
||||||
);
|
);
|
||||||
GetVar($validConfig);
|
GetVar($validConfig);
|
||||||
$BASIC = [];
|
$BASIC = [];
|
||||||
@@ -128,7 +128,12 @@ elseif ($action == 'savesettings_account') // save account
|
|||||||
elseif($action == 'savesettings_torrent') // save account
|
elseif($action == 'savesettings_torrent') // save account
|
||||||
{
|
{
|
||||||
stdhead($lang_settings['head_save_torrent_settings']);
|
stdhead($lang_settings['head_save_torrent_settings']);
|
||||||
$validConfig = array('prorules', 'randomhalfleech','randomfree','randomtwoup','randomtwoupfree','randomtwouphalfdown','largesize', 'largepro','expirehalfleech','expirefree','expiretwoup','expiretwoupfree','expiretwouphalfleech', 'expirenormal','hotdays','hotseeder','halfleechbecome','freebecome','twoupbecome','twoupfreebecome', 'twouphalfleechbecome','normalbecome','uploaderdouble','deldeadtorrent', 'randomthirtypercentdown', 'thirtypercentleechbecome', 'expirethirtypercentleech');
|
$validConfig = array(
|
||||||
|
'prorules', 'randomhalfleech','randomfree','randomtwoup','randomtwoupfree','randomtwouphalfdown','largesize', 'largepro','expirehalfleech',
|
||||||
|
'expirefree','expiretwoup','expiretwoupfree','expiretwouphalfleech', 'expirenormal','hotdays','hotseeder','halfleechbecome','freebecome',
|
||||||
|
'twoupbecome','twoupfreebecome', 'twouphalfleechbecome','normalbecome','uploaderdouble','deldeadtorrent', 'randomthirtypercentdown',
|
||||||
|
'thirtypercentleechbecome', 'expirethirtypercentleech', 'sticky_first_level_background_color', 'sticky_second_level_background_color'
|
||||||
|
);
|
||||||
GetVar($validConfig);
|
GetVar($validConfig);
|
||||||
$TORRENT = [];
|
$TORRENT = [];
|
||||||
foreach($validConfig as $config) {
|
foreach($validConfig as $config) {
|
||||||
@@ -423,8 +428,8 @@ elseif ($action == 'basicsettings') // basic settings
|
|||||||
$config = get_setting('basic');
|
$config = get_setting('basic');
|
||||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_basic'>");
|
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_basic'>");
|
||||||
tr($lang_settings['row_site_name'],"<input type='text' style=\"width: 300px\" name=SITENAME value='".($config["SITENAME"] ? $config["SITENAME"]: "Nexus")."'> ".$lang_settings['text_site_name_note'], 1);
|
tr($lang_settings['row_site_name'],"<input type='text' style=\"width: 300px\" name=SITENAME value='".($config["SITENAME"] ? $config["SITENAME"]: "Nexus")."'> ".$lang_settings['text_site_name_note'], 1);
|
||||||
// tr($lang_settings['row_base_url'],"<input type='text' style=\"width: 300px\" name=BASEURL value='".($config["BASEURL"] ? $config["BASEURL"] : $_SERVER["HTTP_HOST"])."'> ".$lang_settings['text_it_should_be'] . $_SERVER["HTTP_HOST"] . $lang_settings['text_base_url_note'], 1);
|
tr($lang_settings['row_base_url'],"<input type='text' style=\"width: 300px\" name=BASEURL value='".($config["BASEURL"] ? $config["BASEURL"] : $_SERVER["HTTP_HOST"])."'> ".$lang_settings['text_it_should_be'] . $_SERVER["HTTP_HOST"] . $lang_settings['text_base_url_note'], 1);
|
||||||
// tr($lang_settings['row_announce_url'],"<input type='text' style=\"width: 300px\" name=announce_url value='".($config["announce_url"] ? $config["announce_url"] : $_SERVER["HTTP_HOST"]."/announce.php")."'> ".$lang_settings['text_it_should_be'] . $_SERVER["HTTP_HOST"]."/announce.php", 1);
|
tr($lang_settings['row_announce_url'],"<input type='text' style=\"width: 300px\" name=announce_url value='".($config["announce_url"] ? $config["announce_url"] : $_SERVER["HTTP_HOST"]."/announce.php")."'> ".$lang_settings['text_it_should_be'] . $_SERVER["HTTP_HOST"]."/announce.php", 1);
|
||||||
// tr($lang_settings['row_mysql_host'],"<input type='text' style=\"width: 300px\" name=mysql_host value='".($config["mysql_host"] ? $config["mysql_host"] : "localhost")."'> ".$lang_settings['text_mysql_host_note'], 1);
|
// tr($lang_settings['row_mysql_host'],"<input type='text' style=\"width: 300px\" name=mysql_host value='".($config["mysql_host"] ? $config["mysql_host"] : "localhost")."'> ".$lang_settings['text_mysql_host_note'], 1);
|
||||||
// tr($lang_settings['row_mysql_user'],"<input type='text' style=\"width: 300px\" name=mysql_user value='".($config["mysql_user"] ? $config["mysql_user"] : "root")."'> ".$lang_settings['text_mysql_user_note'], 1);
|
// tr($lang_settings['row_mysql_user'],"<input type='text' style=\"width: 300px\" name=mysql_user value='".($config["mysql_user"] ? $config["mysql_user"] : "root")."'> ".$lang_settings['text_mysql_user_note'], 1);
|
||||||
// tr($lang_settings['row_mysql_password'],"<input type='password' style=\"width: 300px\" name=mysql_pass value=''> ".$lang_settings['text_mysql_password_note'], 1);
|
// tr($lang_settings['row_mysql_password'],"<input type='password' style=\"width: 300px\" name=mysql_pass value=''> ".$lang_settings['text_mysql_password_note'], 1);
|
||||||
@@ -588,6 +593,8 @@ elseif ($action == 'torrentsettings')
|
|||||||
print ($notice);
|
print ($notice);
|
||||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_torrent'>");
|
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_torrent'>");
|
||||||
|
|
||||||
|
tr($lang_settings['row_sticky_first_level_background_color'],"<input type='text' name=sticky_first_level_background_color style=\"width: 100px\" value={$TORRENT['sticky_first_level_background_color']}> ".$lang_settings['text_sticky_first_level_background_color_note'], 1);
|
||||||
|
tr($lang_settings['row_sticky_second_level_background_color'],"<input type='text' name=sticky_second_level_background_color style=\"width: 100px\" value={$TORRENT['sticky_second_level_background_color']}> ".$lang_settings['text_sticky_second_level_background_color_note'], 1);
|
||||||
yesorno($lang_settings['row_promotion_rules'], 'prorules', $TORRENT["prorules"], $lang_settings['text_promotion_rules_note']);
|
yesorno($lang_settings['row_promotion_rules'], 'prorules', $TORRENT["prorules"], $lang_settings['text_promotion_rules_note']);
|
||||||
tr($lang_settings['row_random_promotion'], $lang_settings['text_random_promotion_note_one']."<ul><li><input type='text' style=\"width: 50px\" name=randomhalfleech value='".(isset($TORRENT["randomhalfleech"]) ? $TORRENT["randomhalfleech"] : 5 )."'>".$lang_settings['text_halfleech_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomfree value='".(isset($TORRENT["randomfree"]) ? $TORRENT["randomfree"] : 2 )."'>".$lang_settings['text_free_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomtwoup value='".(isset($TORRENT["randomtwoup"]) ? $TORRENT["randomtwoup"] : 2 )."'>".$lang_settings['text_twoup_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomtwoupfree value='".(isset($TORRENT["randomtwoupfree"]) ? $TORRENT["randomtwoupfree"] : 1 )."'>".$lang_settings['text_freetwoup_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomtwouphalfdown value='".(isset($TORRENT["randomtwouphalfdown"]) ? $TORRENT["randomtwouphalfdown"] : 0 )."'>".$lang_settings['text_twouphalfleech_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomthirtypercentdown value='".(isset($TORRENT["randomthirtypercentdown"]) ? $TORRENT["randomthirtypercentdown"] : 0 )."'>".$lang_settings['text_thirtypercentleech_chance_becoming']."</li></ul>".$lang_settings['text_random_promotion_note_two'], 1);
|
tr($lang_settings['row_random_promotion'], $lang_settings['text_random_promotion_note_one']."<ul><li><input type='text' style=\"width: 50px\" name=randomhalfleech value='".(isset($TORRENT["randomhalfleech"]) ? $TORRENT["randomhalfleech"] : 5 )."'>".$lang_settings['text_halfleech_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomfree value='".(isset($TORRENT["randomfree"]) ? $TORRENT["randomfree"] : 2 )."'>".$lang_settings['text_free_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomtwoup value='".(isset($TORRENT["randomtwoup"]) ? $TORRENT["randomtwoup"] : 2 )."'>".$lang_settings['text_twoup_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomtwoupfree value='".(isset($TORRENT["randomtwoupfree"]) ? $TORRENT["randomtwoupfree"] : 1 )."'>".$lang_settings['text_freetwoup_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomtwouphalfdown value='".(isset($TORRENT["randomtwouphalfdown"]) ? $TORRENT["randomtwouphalfdown"] : 0 )."'>".$lang_settings['text_twouphalfleech_chance_becoming']."</li><li><input type='text' style=\"width: 50px\" name=randomthirtypercentdown value='".(isset($TORRENT["randomthirtypercentdown"]) ? $TORRENT["randomthirtypercentdown"] : 0 )."'>".$lang_settings['text_thirtypercentleech_chance_becoming']."</li></ul>".$lang_settings['text_random_promotion_note_two'], 1);
|
||||||
tr($lang_settings['row_large_torrent_promotion'], $lang_settings['text_torrent_larger_than']."<input type='text' style=\"width: 50px\" name=largesize value='".(isset($TORRENT["largesize"]) ? $TORRENT["largesize"] : 20 )."'>".$lang_settings['text_gb_promoted_to']."<select name=largepro>".promotion_selection((isset($TORRENT['largepro']) ? $TORRENT['largepro'] : 2), 1)."</select>".$lang_settings['text_by_system_upon_uploading']."<br />".$lang_settings['text_large_torrent_promotion_note'], 1);
|
tr($lang_settings['row_large_torrent_promotion'], $lang_settings['text_torrent_larger_than']."<input type='text' style=\"width: 50px\" name=largesize value='".(isset($TORRENT["largesize"]) ? $TORRENT["largesize"] : 20 )."'>".$lang_settings['text_gb_promoted_to']."<select name=largepro>".promotion_selection((isset($TORRENT['largepro']) ? $TORRENT['largepro'] : 2), 1)."</select>".$lang_settings['text_by_system_upon_uploading']."<br />".$lang_settings['text_large_torrent_promotion_note'], 1);
|
||||||
@@ -724,7 +731,7 @@ elseif ($action == 'showmenu') // settings main page
|
|||||||
tr($lang_settings['row_torrents_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='torrentsettings'><input type='submit' value=\"".$lang_settings['submit_torrents_settings']."\"> ".$lang_settings['text_torrents_settings_note']."</form>", 1);
|
tr($lang_settings['row_torrents_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='torrentsettings'><input type='submit' value=\"".$lang_settings['submit_torrents_settings']."\"> ".$lang_settings['text_torrents_settings_note']."</form>", 1);
|
||||||
tr($lang_settings['row_attachment_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='attachmentsettings'><input type='submit' value=\"".$lang_settings['submit_attachment_settings']."\"> ".$lang_settings['text_attachment_settings_note']."</form>", 1);
|
tr($lang_settings['row_attachment_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='attachmentsettings'><input type='submit' value=\"".$lang_settings['submit_attachment_settings']."\"> ".$lang_settings['text_attachment_settings_note']."</form>", 1);
|
||||||
tr($lang_settings['row_advertisement_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='advertisementsettings'><input type='submit' value=\"".$lang_settings['submit_advertisement_settings']."\"> ".$lang_settings['text_advertisement_settings_note']."</form>", 1);
|
tr($lang_settings['row_advertisement_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='advertisementsettings'><input type='submit' value=\"".$lang_settings['submit_advertisement_settings']."\"> ".$lang_settings['text_advertisement_settings_note']."</form>", 1);
|
||||||
tr($lang_settings['row_code_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='codesettings'><input type='submit' value=\"".$lang_settings['submit_code_settings']."\"> ".$lang_settings['text_code_settings_note']."</form>", 1);
|
// tr($lang_settings['row_code_settings'], "<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='codesettings'><input type='submit' value=\"".$lang_settings['submit_code_settings']."\"> ".$lang_settings['text_code_settings_note']."</form>", 1);
|
||||||
}
|
}
|
||||||
print("</table>");
|
print("</table>");
|
||||||
stdfoot();
|
stdfoot();
|
||||||
|
|||||||
@@ -137,7 +137,9 @@ function dict_get($d, $k, $t) {
|
|||||||
return $v["value"];
|
return $v["value"];
|
||||||
}
|
}
|
||||||
|
|
||||||
list($ann, $info) = dict_check($dict, "announce(string):info");
|
//list($ann, $info) = dict_check($dict, "announce(string):info");
|
||||||
|
//@see https://blog.rhilip.info/archives/1036/
|
||||||
|
list($info) = dict_check($dict, "info");
|
||||||
list($dname, $plen, $pieces) = dict_check($info, "name(string):piece length(integer):pieces(string)");
|
list($dname, $plen, $pieces) = dict_check($info, "name(string):piece length(integer):pieces(string)");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user