Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
<?php
if (!defined('BLOCK_FILE'))
{
header("Location: ../index.php");
exit;
}
if (!cache_check('releases', 500)) {
$res1 = sql_query("SELECT COUNT(*) FROM torrents $sqlseeders WHERE category <> 0 and banned = 'no'");
$row1 = mysql_fetch_array($res1);
$count = $row1[0];
$content .= "<table cellspacing=\"0\" cellpadding=\"5\" width=\"100%\"><tr><td id=\"centerCcolumn\">";
include "include/codecs.php";
$perpage = 5;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, $_SERVER["PHP_SELF"] . "?" );
$res = sql_query("SELECT torrents.*, categories.id AS catid, free, SUM(trackers.leechers) AS leechers, SUM(trackers.seeders) AS seeders, ratingsum, numratings, categories.name AS catname, categories.image AS catimage, users.username FROM torrents LEFT JOIN users ON torrents.owner = users.id LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN trackers ON torrents.id=trackers.torrent WHERE category <> 0 and banned = 'no' GROUP BY torrents.id ORDER BY added DESC $limit") or sqlerr(__FILE__, __LINE__);
$content .= $pagertop;
$content .= "</td></tr>";
while ($release = mysql_fetch_array($res)) {
$catid = $release["catid"];
$catname = $release["catname"];
$catimage = $release["catimage"];
$ratingsum = $release["ratingsum"];
$numratings = $release["numratings"];
$seeders = $release["seeders"];
$leechers = $release["leechers"];
$torname = $release["name"];
$descr=$release["descr"];
$uprow = (isset($release["username"]) ? ("<a href=userdetails.php?id=" . $release["owner"] . ">" . htmlspecialchars($release["username"]) . "</a>") : "<i>Скоро сделаем и будет видно :)</i>");
if (strlen($descr) > 700)
$descr = substr($descr, 0, 700) . "...";
$sss = '';
$img1 = "<img width=\"160\" border='0' src=pic/2222.jpg />";
$content .= "<tr><td>";
$content .= "<table width=\"100%\" class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">";
$content .= "<tr>";
$content .= "<td class=\"colhead\" colspan=\"2\" align=center><p align=left>";
$content .= "</td>";
$content .= "</tr>";
if ($release["image1"] != "")
$img1 = "<div style=\"border: 0px dashed #CCC; background: #f7f7f7; margin: 0 0 1px 0; padding: 3px; class=more-cont\"><a href=\"details.php?id=$release[id]\" alt=\"$release[name]\" title=\"$release[name]\"><div id=\"dvd_container_big\"><img src='torrents/images/$release[image1]' alt=\"$release[name]\" width=\"212\" height=\"301\" border=\"0\" title=\"$release[name]\" /><div id=\"dvd_box\"></div></div></a>";
$content .= "<tr valign=\"top\"><td align=\"center\" width=\"160\">";
$content .= "$img1";
$content .= "</div>";
$content .= "</td>";
switch ($release['free']) {
case 'no':
$th = "";
break;
case 'silver':
$th = "<img src=\"pic/silverdownload.gif\" title=\"".$tracker_lang['silver']."\" alt=\"".$tracker_lang['silver']."\">";
break;
case 'gold':
$th = "<img src=\"pic/freedownload.gif\" title=\"".$tracker_lang['golden']."\" alt=\"".$tracker_lang['golden']."\">";
break;
}
$rating = $ratingsum/$numratings ;
//print ("<center>$s</center>");
$content .= "<td><div align=\"left\">".(!empty($catname) ? "<a href=\"browse.php?cat=$catid\">
<img src=\"pic/cats/$catimage\" alt=\"$catname\" title=\"$catname\" align=\"right\" border=\"0\" /></a>" : "")."
<a href=\"details.php?id=$release[id]\" alt=\"$release[name]\"><FONT SIZE=3>".$release["name"]."</FONT></a></a>$th</br></br> ".format_comment($descr)." <br>
<br>
<div style=\"border: 3px dashed #ddd; background: #f7f7f7; margin: 0 0 5px 0; padding: 2; class=more-cont\">
<b>Раздаёт:
</b>$uprow<b>
Добавлен:
</b> ".nicetime($release["added"],true)."<br>
<b>Размер: </b>".mksize($release["size"])."<b> Комментариев: </b>$release[comments]</b><br>
<b><font color=green>Раздают: </font></b>$seeders<b> <font color=red>Качают: </font></b>$leechers <br> <br>
<img width=130 src=pic/ratings/$rating.png>
</div>
<br>
</div><div align=\"right\"></div></td>";
$content .= "</tr>";
$content .= "</table>";
$content .= "</td></tr>";
}
$content .= "<tr><td>";
$content .= $pagerbottom;
$content .= "</td></tr>";
$content .= "</table>";
cache_write('releases', $content);
} else
$content = cache_read('releases');
?>