exam support priority + peer suppoert ipv4&ipv6

This commit is contained in:
xiaomlove
2022-04-18 19:07:35 +08:00
parent 107da8e335
commit 55138da862
46 changed files with 302 additions and 115 deletions
+8 -4
View File
@@ -1,6 +1,12 @@
<?php
require_once("../include/bittorrent.php");
dbconn();
function denyDownload()
{
require_once ROOT_PATH . get_langfile_path("functions.php");
require_once(get_langfile_path());
permissiondenied();
}
$torrentRep = new \App\Repositories\TorrentRepository();
if (!empty($_REQUEST['downhash'])) {
$params = explode('|', $_REQUEST['downhash']);
@@ -75,8 +81,7 @@ if (@ini_get('output_handler') == 'ob_gzhandler' AND @ob_get_length() !== false)
*/
if ($CURUSER['downloadpos']=="no") {
require_once(get_langfile_path());
permissiondenied();
denyDownload();
}
$trackerSchemaAndHost = get_tracker_schema_and_host();
@@ -103,8 +108,7 @@ if (filesize($fn) == 0) {
httperr();
}
if (($row['banned'] == 'yes' && get_user_class() < $seebanned_class) || !can_access_torrent($row)) {
require_once(get_langfile_path());
permissiondenied();
denyDownload();
}
sql_query("UPDATE torrents SET hits = hits + 1 WHERE id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__);