mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
approval allow automatic
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.28');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-10-01');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-10-04');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -181,6 +181,7 @@ return array (
|
||||
'user-delete' => User::CLASS_ADMINISTRATOR,
|
||||
'user-change-class' => User::CLASS_ADMINISTRATOR,
|
||||
'torrent-set-special-tag' => User::CLASS_ADMINISTRATOR,
|
||||
'torrent-approval-allow-automatic' => User::CLASS_UPLOADER,
|
||||
),
|
||||
'tweak' =>
|
||||
array (
|
||||
|
||||
+18
-5
@@ -5,8 +5,21 @@ loggedinorreturn();
|
||||
|
||||
if (get_user_class() < UC_MODERATOR)
|
||||
stderr("Sorry", "Access denied.");
|
||||
stdhead("Duplicate IP users");
|
||||
begin_frame("Duplicate IP users:", true);
|
||||
|
||||
$tabs = ['users', 'peers'];
|
||||
$tab = 'users';
|
||||
if (!empty($_REQUEST['tab']) && in_array($_REQUEST['tab'], $tabs)) {
|
||||
$tab = $_REQUEST['tab'];
|
||||
}
|
||||
$page = $_REQUEST['page'] ?? 0;
|
||||
$title = 'Duplicate IP users';
|
||||
stdhead($title);
|
||||
print '<h1>'.$title.'</h1>';
|
||||
//print '<ul class="menu" style="padding-inline-start: 0">';
|
||||
//foreach ($tabs as $item) {
|
||||
// echo sprintf('<li class="%s"><a href="?tab=%s&page=%s">%s</a></li>', $tab == $item ? 'selected' : '', $item, $page, $item);
|
||||
//}
|
||||
//print '</ul>';
|
||||
begin_table();
|
||||
|
||||
if (get_user_class() >= UC_MODERATOR || $CURUSER["guard"] == "yes")
|
||||
@@ -44,7 +57,7 @@ if (get_user_class() >= UC_MODERATOR || $CURUSER["guard"] == "yes")
|
||||
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
|
||||
else
|
||||
$ratio="---";
|
||||
|
||||
|
||||
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
|
||||
$uploaded = mksize($arr["uploaded"]);
|
||||
$downloaded = mksize($arr["downloaded"]);
|
||||
@@ -54,7 +67,7 @@ if (get_user_class() >= UC_MODERATOR || $CURUSER["guard"] == "yes")
|
||||
$utc = "";
|
||||
else
|
||||
$utc = " bgcolor=\"ECE9D8\"";
|
||||
|
||||
|
||||
$peer_res = sql_query("SELECT count(*) FROM peers WHERE ip = " . sqlesc($ras['ip']) . " AND userid = " . $arr['id']);
|
||||
$peer_row = mysql_fetch_row($peer_res);
|
||||
print("<tr$utc><td align=left>" . get_username($arr["id"])."</td>
|
||||
@@ -64,7 +77,7 @@ if (get_user_class() >= UC_MODERATOR || $CURUSER["guard"] == "yes")
|
||||
<td align=center>$downloaded</td>
|
||||
<td align=center>$uploaded</td>
|
||||
<td align=center>$ratio</td>
|
||||
<td align=center><a href=\"http://www.whois.sc/$arr[ip]\" target=\"_blank\">$arr[ip]</a></td>\n<td align=center>" .
|
||||
<td align=center><a href=\"http://www.whois.sc/$arr[ip]\" target=\"_blank\">$arr[ip]</a></td>\n<td align=center>" .
|
||||
($peer_row[0] ? "ja" : "nein") . "</td></tr>\n");
|
||||
$ip = $arr["ip"];
|
||||
}
|
||||
|
||||
+3
-1
@@ -224,7 +224,7 @@ elseif ($action == 'savesettings_authority') // save user authority
|
||||
'torrentstructure','sendinvite','viewhistory','topten','log','confilog','userprofile', 'torrenthistory','prfmanage', 'cruprfmanage',
|
||||
'uploadsub','delownsub','submanage','updateextinfo', 'viewanonymous','beanonymous','addoffer','offermanage', 'upload','uploadspecial',
|
||||
'view_special_torrent','movetorrent','chrmanage','viewinvite', 'buyinvite','seebanned','againstoffer','userbar', 'torrent-approval',
|
||||
'torrent-delete', 'user-delete', 'user-change-class', 'torrent-set-special-tag'
|
||||
'torrent-delete', 'user-delete', 'user-change-class', 'torrent-set-special-tag', 'torrent-approval-allow-automatic'
|
||||
);
|
||||
GetVar($validConfig);
|
||||
$AUTHORITY = [];
|
||||
@@ -454,6 +454,8 @@ elseif ($action == 'authoritysettings') //Authority settings
|
||||
tr($lang_settings['row_torrent_hr'], $lang_settings['text_minimum_class'].classlist('torrent_hr',$maxclass,$AUTHORITY['torrent_hr'] ?? '',0,true).$lang_settings['text_default'].get_user_class_name(UC_ADMINISTRATOR,false,true,true).$lang_settings['text_torrent_hr_note'],1);
|
||||
tr(nexus_trans('permission.torrent-set-special-tag.text'), $lang_settings['text_minimum_class'].classlist('torrent-set-special-tag',$maxclass,$AUTHORITY['torrent-set-special-tag'] ?? '',0,true).$lang_settings['text_default'].get_user_class_name(UC_ADMINISTRATOR,false,true,true).nexus_trans('permission.torrent-set-special-tag.desc'),1);
|
||||
tr(nexus_trans('permission.torrent-approval.text'), $lang_settings['text_minimum_class'].classlist('torrent-approval',$maxclass,$AUTHORITY['torrent-approval'] ?? '',0,true).$lang_settings['text_default'].get_user_class_name(UC_ADMINISTRATOR,false,true,true).nexus_trans('permission.torrent-approval.desc'),1);
|
||||
tr(nexus_trans('permission.torrent-approval-allow-automatic.text'), $lang_settings['text_minimum_class'].classlist('torrent-approval-allow-automatic',$maxclass,$AUTHORITY['torrent-approval-allow-automatic'] ?? '',0,true).$lang_settings['text_default'].get_user_class_name(UC_UPLOADER,false,true,true).nexus_trans('permission.torrent-approval-allow-automatic.desc'),1);
|
||||
|
||||
tr($lang_settings['row_ask_for_reseed'], $lang_settings['text_minimum_class'].classlist('askreseed',$maxclass,$AUTHORITY['askreseed'],0,true).$lang_settings['text_default'].get_user_class_name(UC_POWER_USER,false,true,true).$lang_settings['text_ask_for_reseed_note'],1);
|
||||
tr($lang_settings['row_view_nfo'], $lang_settings['text_minimum_class'].classlist('viewnfo',$maxclass,$AUTHORITY['viewnfo'],0,true).$lang_settings['text_default'].get_user_class_name(UC_POWER_USER,false,true,true).$lang_settings['text_view_nfo_note'],1);
|
||||
tr($lang_settings['row_view_torrent_structure'], $lang_settings['text_minimum_class'].classlist('torrentstructure',$maxclass,$AUTHORITY['torrentstructure'],0,true).$lang_settings['text_default'].get_user_class_name(UC_ULTIMATE_USER,false,true,true).$lang_settings['text_view_torrent_structure_note'],1);
|
||||
|
||||
@@ -239,6 +239,9 @@ header("Refresh: 0; url=staffbox.php?action=viewpm&pmid=$id");
|
||||
//////////////////////////
|
||||
|
||||
if ($action == "takecontactanswered") {
|
||||
if (empty($_POST['setanswered'])) {
|
||||
stderr($lang_staffbox['std_sorry'], nexus_trans('nexus.select_one_please'));
|
||||
}
|
||||
|
||||
if ($_POST['setdealt']){
|
||||
$res = sql_query ("SELECT * FROM staffmessages WHERE answered=0 AND id IN (" . implode(", ", $_POST['setanswered']) . ")");
|
||||
|
||||
@@ -367,6 +367,9 @@ if(user_can('torrentmanage') && ($CURUSER['picker'] == 'yes' || get_user_class()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (user_can('torrent-approval-allow-automatic')) {
|
||||
$insert['approval_status'] = \App\Models\Torrent::APPROVAL_STATUS_ALLOW;
|
||||
}
|
||||
do_log("[INSERT_TORRENT]: " . nexus_json_encode($insert));
|
||||
$id = \Nexus\Database\NexusDB::insert('torrents', $insert);
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@ return [
|
||||
'text' => 'Set torrent special tags',
|
||||
'desc' => 'Set the Official/Zero bonus tag to torrents',
|
||||
],
|
||||
'torrent-approval-allow-automatic' => [
|
||||
'text' => 'Torrent approval allow automatically',
|
||||
'desc' => 'Torrent is the approval allow status after upload automatically',
|
||||
],
|
||||
'defaultclass' => [
|
||||
'text' => 'Default Class',
|
||||
'desc' => ' Class upon registration',
|
||||
|
||||
@@ -9,6 +9,10 @@ return [
|
||||
'text' => '设定种子特殊标签',
|
||||
'desc' => '设定种子的官方、零魔标签',
|
||||
],
|
||||
'torrent-approval-allow-automatic' => [
|
||||
'text' => '种子自动通过审核',
|
||||
'desc' => '种子发布即为审核通过状态',
|
||||
],
|
||||
'defaultclass' => [
|
||||
'text' => '默认等级',
|
||||
'desc' => '注册时获得的等级',
|
||||
|
||||
@@ -9,6 +9,10 @@ return [
|
||||
'text' => '設定種子特殊標簽',
|
||||
'desc' => '設定種子的官方、零魔標簽',
|
||||
],
|
||||
'torrent-approval-allow-automatic' => [
|
||||
'text' => '種子自動通過審核',
|
||||
'desc' => '種子發布即為審核通過狀態',
|
||||
],
|
||||
'defaultclass' => [
|
||||
'text' => '預設等級',
|
||||
'desc' => '註冊時獲得的等級',
|
||||
|
||||
Reference in New Issue
Block a user