add PT-Gen api point setting

This commit is contained in:
xiaomlove
2021-01-19 17:35:05 +08:00
parent 84cf49ec40
commit a5eaad9036
39 changed files with 66 additions and 6977 deletions

View File

@@ -83,7 +83,7 @@ print("<tr><th class=\"left\">User name</th><th>Registered</th><th>Uploaded</th>
$res = sql_query("SELECT * FROM users $query ORDER BY cheat DESC $limit") or sqlerr();
while ($arr = mysql_fetch_assoc($res))
{
if ($arr['added'] == "0000-00-00 00:00:00") $joindate = 'N/A';
if ($arr['added'] == "0000-00-00 00:00:00" || $arr['added'] == null) $joindate = 'N/A';
else $joindate = get_elapsed_time(strtotime($arr['added'])).' ago';
$age = date('U') - date('U',strtotime($arr['added']));
if ($arr["downloaded"] > 0)
@@ -94,7 +94,7 @@ while ($arr = mysql_fetch_assoc($res))
if ($arr["uploaded"] > 0) $ratio = "Inf.";
else $ratio = "---";
}
if ($arr['added'] == '0000-00-00 00:00:00') $arr['added'] = '-';
if ($arr['added'] == '0000-00-00 00:00:00' || $arr['added'] == null) $arr['added'] = '-';
echo '<tr><th class="left"><a href="userdetails.php?id='.$arr['id'].'"><b>'.$arr['username'].'</b></a></th>';
echo '<td>'.$joindate.'</td>';
echo '<td class="right">'.mksize($arr['uploaded']).' @ '.mksize($arr['uploaded'] / $age).'ps</td>';

View File

@@ -27,7 +27,7 @@ if ($user["gender"] == "Male") $gender = "<img src=pic/male.png alt='Male' style
elseif ($user["gender"] == "Female") $gender = "<img src=pic/female.png alt='Female' style='margin-left: 4pt'>";
elseif ($user["gender"] == "N/A") $gender = "<img src=pic/na.gif alt='N/A' style='margin-left: 4pt'>";
if ($user[added] == "0000-00-00 00:00:00")
if ($user[added] == "0000-00-00 00:00:00" || $user['added'] == null)
$joindate = 'N/A';
else
$joindate = "$user[added] (" . get_elapsed_time(strtotime($user["added"])) . " ago)";

View File

@@ -36,9 +36,9 @@ if (get_user_class() >= UC_MODERATOR || $CURUSER["guard"] == "yes")
$uc++;
while($arr = mysql_fetch_assoc($ros))
{
if ($arr['added'] == '0000-00-00 00:00:00')
if ($arr['added'] == '0000-00-00 00:00:00' || $arr['added'] == null)
$arr['added'] = '-';
if ($arr['last_access'] == '0000-00-00 00:00:00')
if ($arr['last_access'] == '0000-00-00 00:00:00' || $arr['last_access'] == null)
$arr['last_access'] = '-';
if($arr["downloaded"] != 0)
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);

View File

@@ -128,10 +128,10 @@ $limit";
while ($user = mysql_fetch_array($res))
{
if ($user['added'] == '0000-00-00 00:00:00')
if ($user['added'] == '0000-00-00 00:00:00' || $user['added'] == null)
$added = $lang_ipsearch['text_not_available'];
else $added = gettime($user['added']);
if ($user['last_access'] == '0000-00-00 00:00:00')
if ($user['last_access'] == '0000-00-00 00:00:00' || $user['added'] == null)
$lastaccess = $lang_ipsearch['text_not_available'];
else $lastaccess = gettime($user['last_access']);

View File

@@ -28,7 +28,7 @@ if ($action == "edituser")
$userid = $_POST["userid"];
$class = intval($_POST["class"] ?? 0);
$vip_added = ($_POST["vip_added"] == 'yes' ? 'yes' : 'no');
$vip_until = ($_POST["vip_until"] ? $_POST["vip_until"] : '0000-00-00 00:00:00');
$vip_until = ($_POST["vip_until"] ? $_POST["vip_until"] : null);
$warned = $_POST["warned"];
$warnlength = intval($_POST["warnlength"] ?? 0);
@@ -209,7 +209,7 @@ if ($action == "edituser")
if ($warned && $curwarned != $warned)
{
$updateset[] = "warned = " . sqlesc($warned);
$updateset[] = "warneduntil = '0000-00-00 00:00:00'";
$updateset[] = "warneduntil = null";
if ($warned == 'no')
{
@@ -227,7 +227,7 @@ if ($action == "edituser")
{
$modcomment = date("Y-m-d") . " - Warned by " . $CURUSER['username'] . ".\nReason: $warnpm.\n". $modcomment;
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_you_are_warned_by'].$CURUSER[username]."." . ($warnpm ? $lang_modtask_target[get_user_lang($userid)]['msg_reason'].$warnpm : ""));
$updateset[] = "warneduntil = '0000-00-00 00:00:00'";
$updateset[] = "warneduntil = null";
}else{
$warneduntil = date("Y-m-d H:i:s",(strtotime(date("Y-m-d H:i:s")) + $warnlength * 604800));
$dur = $warnlength . $lang_modtask_target[get_user_lang($userid)]['msg_week'] . ($warnlength > 1 ? $lang_modtask_target[get_user_lang($userid)]['msg_s'] : "");

View File

@@ -30,7 +30,7 @@ $exmodcomment = $user["modcomment"];
$modcomment = date("Y-m-d") . " - Warning Removed By " . $CURUSER['username'] . ".\n". $modcomment . $exmodcomment;
sql_query("UPDATE users SET modcomment=" . sqlesc($modcomment) . " WHERE id IN (" . implode(", ", $_POST[usernw]) . ")") or sqlerr(__FILE__, __LINE__);
$do="UPDATE users SET warned='no', warneduntil='0000-00-00 00:00:00' WHERE id IN (" . implode(", ", $_POST[usernw]) . ")";
$do="UPDATE users SET warned='no', warneduntil=null WHERE id IN (" . implode(", ", $_POST[usernw]) . ")";
$res=sql_query($do);}
if (!empty($_POST["desact"])){

BIN
public/pic/bangumi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

View File

@@ -54,7 +54,7 @@ if ($action == 'savesettings_main') // save main
'minoffervotes','offervotetimeout','offeruptimeout','maxsubsize','postsperpage', 'topicsperpage', 'torrentsperpage', 'maxnewsnum',
'max_dead_torrent_time','maxusers','torrent_dir', 'iniupload','SITEEMAIL', 'ACCOUNTANTID', 'ALIPAYACCOUNT', 'PAYPALACCOUNT', 'SLOGAN',
'icplicense', 'autoclean_interval_one', 'autoclean_interval_two', 'autoclean_interval_three','autoclean_interval_four', 'autoclean_interval_five',
'reportemail','invitesystem','registration','showhotmovies','showclassicmovies','showimdbinfo', 'enable_pt_gen_system', 'enablenfo', 'enableschool','restrictemail',
'reportemail','invitesystem','registration','showhotmovies','showclassicmovies','showimdbinfo', 'enable_pt_gen_system', 'pt_gen_api_point', 'enablenfo', 'enableschool','restrictemail',
'showpolls','showstats','showlastxtorrents', 'showtrackerload','showshoutbox','showfunbox','showoffer','sptime','showhelpbox','enablebitbucket',
'smalldescription','altname','extforum','extforumurl','defaultlang','defstylesheet', 'donation','spsct','browsecat','specialcat','waitsystem',
'maxdlsystem','bitbucket','torrentnameprefix', 'showforumstats','verification','invite_count','invite_timeout', 'seeding_leeching_time_calc_start',
@@ -591,6 +591,7 @@ elseif ($action == 'mainsettings') // main settings
yesorno($lang_settings['row_show_classic'],'showclassicmovies', $MAIN['showclassicmovies'], $lang_settings['text_show_classic_note']);
yesorno($lang_settings['row_enable_imdb_system'],'showimdbinfo', $MAIN['showimdbinfo'], $lang_settings['text_imdb_system_note']);
yesorno($lang_settings['row_enable_pt_gen_system'],'enable_pt_gen_system', $MAIN['enable_pt_gen_system'], $lang_settings['text_enable_pt_gen_system_note']);
tr($lang_settings['row_pt_gen_api_point'],"<input type='text' name=\"pt_gen_api_point\" style=\"width: 300px\" value={$MAIN['pt_gen_api_point']}> ".$lang_settings['text_pt_gen_api_point_note'], 1);
yesorno($lang_settings['row_enable_nfo'],'enablenfo', $MAIN['enablenfo'], $lang_settings['text_enable_nfo_note']);
yesorno($lang_settings['row_enable_school_system'],'enableschool', $MAIN['enableschool'], $lang_settings['text_school_system_note']);
yesorno($lang_settings['row_restrict_email_domain'],'restrictemail', $MAIN['restrictemail'], $lang_settings['text_restrict_email_domain_note']);

View File

@@ -834,7 +834,7 @@ usercpmenu ();
$commentcount = get_row_count("comments", "WHERE user=" . sqlesc($CURUSER["id"]));
//Join Date
if ($CURUSER['added'] == "0000-00-00 00:00:00")
if ($CURUSER['added'] == "0000-00-00 00:00:00" || $CURUSER['added'] == null)
$joindate = 'N/A';
else
$joindate = $CURUSER['added']." (" . gettime($CURUSER['added'],true,false,true).")";

View File

@@ -28,12 +28,12 @@ else
if ($user["status"] == "pending")
stderr($lang_userdetails['std_sorry'], $lang_userdetails['std_user_not_confirmed']);
if ($user['added'] == "0000-00-00 00:00:00")
if ($user['added'] == "0000-00-00 00:00:00" || $user['added'] == null)
$joindate = $lang_userdetails['text_not_available'];
else
$joindate = $user['added']." (" . gettime($user["added"], true, false, true).")";
$lastseen = $user["last_access"];
if ($lastseen == "0000-00-00 00:00:00")
if ($lastseen == "0000-00-00 00:00:00" || $lastseen == null)
$lastseen = $lang_userdetails['text_not_available'];
else
{
@@ -369,7 +369,7 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
if ($warned)
{
$warneduntil = $user['warneduntil'];
if ($warneduntil == '0000-00-00 00:00:00')
if ($warneduntil == '0000-00-00 00:00:00' || $warneduntil == null)
print("<td align=\"center\" class=\"rowfollow\">".$lang_userdetails['text_arbitrary_duration']."</td>\n");
else
{
@@ -418,7 +418,7 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
{
print("<td align=\"left\" class=\"rowfollow\"><font color=\"red\">".$lang_userdetails['text_leech_warned']."</font> ");
$leechwarnuntil = $user['leechwarnuntil'];
if ($leechwarnuntil != '0000-00-00 00:00:00')
if ($leechwarnuntil != '0000-00-00 00:00:00' || $leechwarnuntil != null)
{
print($lang_userdetails['text_until'].$leechwarnuntil);
print("<br />(" . mkprettytime(strtotime($leechwarnuntil) - strtotime(date("Y-m-d H:i:s"))) .$lang_userdetails['text_to_go'].")");

View File

@@ -109,10 +109,10 @@ $sql = sprintf('SELECT
users.country >0, %s, \'---\'
) as country,
IF (
users.added = "0000-00-00 00:00:00", "-", users.added
users.added = null, "-", users.added
) as added,
IF (
users.last_access = "0000-00-00 00:00:00", "-", users.last_access
users.last_access = null, "-", users.last_access
) as last_access

View File

@@ -777,9 +777,9 @@ if (count($_GET) > 0 && !$_GET['h'])
"<td class=colhead>History</td></tr>";
while ($user = mysql_fetch_array($res))
{
if ($user['added'] == '0000-00-00 00:00:00')
if ($user['added'] == '0000-00-00 00:00:00' || $user['added'] == null)
$user['added'] = '---';
if ($user['last_access'] == '0000-00-00 00:00:00')
if ($user['last_access'] == '0000-00-00 00:00:00' || $user['last_access'] == null)
$user['last_access'] = '---';
if ($user['ip'])

View File

@@ -27,9 +27,9 @@ print("<tr align=center><td class=colhead width=90>User Name</td>
for ($i = 1; $i <= $num; $i++)
{
$arr = mysql_fetch_assoc($res);
if ($arr['added'] == '0000-00-00 00:00:00')
if ($arr['added'] == '0000-00-00 00:00:00' || $arr['added'] == null)
$arr['added'] = '-';
if ($arr['last_access'] == '0000-00-00 00:00:00')
if ($arr['last_access'] == '0000-00-00 00:00:00' || $arr['added'] == null)
$arr['last_access'] = '-';
if($arr["downloaded"] != 0){
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);