rendered paste body<? if ($CURUSER) { // Get the torrents with leechers but no seed. $sn_lines = array(); $tnsr = mysql_query("SELECT t1.id, t1.name, t1.size, t1.leechers, t2.to_go FROM torrents AS t1, peers AS t2 WHERE t2.torrent = t1.id AND seeders = 0 AND leechers > 0 AND t1.access = ".AL_COMMON." ORDER BY t1.leechers DESC, t2.to_go DESC") or sqlerr(); while ($tnsa = mysql_fetch_assoc($tnsr)) { if($tnsa['to_go'] >= $tnsa['size']) continue; $perc = round((($tnsa['size'] - $tnsa['to_go']) / $tnsa['size']) * 100, 2) . "%"; $work[$tnsa['id']] = $tnsa['to_go']; $sn_lines[$tnsa['id']] = '<b><a href="details.php?id=' . $tnsa['id'] . '&hit=1">' . $tnsa['name'] . '</a><font color=#0099FF><b> (' . $tnsa['leechers'] . ($tnsa['leechers'] == 1 ? " Качают, $perc" : " Качают, $perc ") . " завершено)</b></font>"; } print("<h2>Релизы, которым нужны раздающие</h2>"); if (count($st_lines)) { foreach ($st_lines as $line) { echo("$line\n"); } } if (count($sn_lines)) { echo('<b><center><font color=#ff0000>Скачал сам, дай скачать другому!!!</font></center>' . "\n"); echo("<table width=100% border=1 cellspacing=0 cellpadding=10><tr><td class=text>"); foreach ($sn_lines as $line) { echo("$line<br>\n"); } echo("</p>\n"); echo("</td></tr></table>"); } if (count($vip_lines) && get_user_class() >= UC_VIP) { foreach ($vip_lines as $line) { echo("$line\n"); } }} ?>