TimeToLive <-- i add this word so next time the search will find this topic
cleanup.php
delete
PHP Code:
// delete old torrents
$days = 28;
$dt = sqlesc(get_date_time(gmtime() - ($days * 86400)));
$res = mysql_query("SELECT id, name FROM torrents WHERE added < $dt");
while ($arr = mysql_fetch_assoc($res))
{
@unlink("$torrent_dir/$arr[id].torrent");
mysql_query("DELETE FROM torrents WHERE id=$arr[id]");
mysql_query("DELETE FROM peers WHERE torrent=$arr[id]");
mysql_query("DELETE FROM comments WHERE torrent=$arr[id]");
mysql_query("DELETE FROM files WHERE torrent=$arr[id]");
write_log("Torrent $arr[id] ($arr[name]) was deleted by system (older than $days days)");
}
bittorrent.php
delete
PHP Code:
<td class="colhead" align="center">TTL</td>
and
delete
PHP Code:
$ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
if ($ttl == 1) $ttl .= "<br>hour"; else $ttl .= "<br>hours";
print("<td align=center>$ttl</td>\n");
userdetails.php
delete
PHP Code:
<td class=colhead align=center>TTL</td>
and
delete
PHP Code:
$ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($arr["added"])) / 3600);
if ($ttl == 1) $ttl .= "<br>hour"; else $ttl .= "<br>hours";
and
delete
PHP Code:
<td align=center>$ttl</td>