-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclean.php
More file actions
18 lines (17 loc) · 665 Bytes
/
clean.php
File metadata and controls
18 lines (17 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require "include/bittorrent.php";
require_once("include/secrets.php");
global $mysql_host, $mysql_user, $mysql_pass, $mysql_db;
$con_link = mysqli_connect($mysql_host, $mysql_user, $mysql_pass, $mysql_db);
if (get_user_class() < UC_SYSOP)
dbconn();
$res = mysqli_query($con_link, "SELECT id,torrent FROM peers") or sqlerr();
$n = 0;
while ($arr = mysqli_fetch_assoc($res))
{
$res2 = mysqli_query($con_link, "SELECT id FROM torrents WHERE id=" . $arr["torrent"]) or sqlerr();
if (mysqli_num_rows($res2) == 0)
++$n;
}
print "" . $n . " torrents zijn er verwijderd (zonder seeds)! Druk de terug knop links bovenin jouw browser :) ";
?>