Example #1
0
    }
    $magnet = "magnet:?xt=urn:btih:{$hash}&dn=" . urlencode($title) . '&tr=' . implode('&tr=', $trackers);
}
echo "<a href=\"{$magnet}\" class=\"ptag\">Magnet</a>";
?>
</p>

<?php 
echo "<table class=\"rtable\">";
echo "<tr><td class=\"top_row\" width=\"800px\">{$title} ~ {$count} sources</td></tr>";
foreach ($cdata as $data) {
    echo "<tr class=\"row\"><td><img src=\"https://plus.google.com/_/favicon?domain={$sources[$data['source_id']]}\" class=\"icon\"> " . $sources[$data['source_id']];
    if ($data['url']) {
        echo " &middot; <a href=\"{$data['url']}\" target=\"blank\">{$data['title']}</a>";
    }
    echo " &middot; " . Rivr::getTypeInt($data['category']) . "</td></tr>";
}
echo "</table><br/>";
if ($torrent) {
    echo "<table class=\"table\"><tr><td width=\"405px\" align=\"left\" valign=\"top\">";
    //trackers info
    echo "<td width=\"405px\" align=\"right\" valign=\"top\"><table class=\"rtable_sm\">";
    echo "<tr><td class=\"top_row\" width=\"390px\">Trackers</td></tr>";
    foreach ($trackers as $tracker) {
        echo "<tr class=\"row small\"><td>{$tracker}</td></tr>";
    }
    echo "</table></td></tr></table><br/>";
    //torrent contents
    function &getArrayPath($path, &$array)
    {
        $path = explode('/', $path);
Example #2
0
<?php

require_once 'includes/config.php';
require_once 'includes/rivr.php';
require_once 'includes/functions.php';
$q = clean_text(mb_strtolower(htmlspecialchars(urldecode($_GET['q']))));
$date = time();
$query = $db->query("SELECT query, type FROM queries WHERE query LIKE '{$q}%' ORDER BY count+count/POW(2,({$date}-first_date)/21600) DESC;");
while ($data = $query->fetch_assoc()) {
    $suggestions[] = array('query' => $data['query'], 'type' => mb_strtoupper(Rivr::getTypeInt($data['type'])));
}
echo json_encode($suggestions);
Example #3
0
        $rtype = '';
    }
    echo "<tr class=\"row\"><td style=\"width:700px;\">{$rtype}<a href=\"{$data['hash']}\">{$data['title']}</a></td><td width=\"70px\" class=\"seeds\">{$data['seeds']}</td><td width=\"70px\" class=\"leech\">{$data['peers']}</td><td width=\"90px\">" . bytesToStr($data['size'] * 1024) . "</td></tr>";
}
echo "</table><br/>";
$categories = array(0 => 'Movies', 1 => 'TV', 3 => 'Games', 2 => 'Software', 4 => 'Music', 6 => 'Anime', 7 => 'Books', 5 => 'P**n');
foreach ($categories as $key => $val) {
    echo "<table class=\"rtable\">";
    echo "<tr class=\"top_row\"><td colspan=\"4\">{$val}</td></tr>";
    $query = $sdb->query("SELECT *, (seeds+0.2*peers) AS score FROM rtindex0,rtindex1,rtindex2,rtindex3 WHERE category = {$key} ORDER BY score DESC LIMIT 7");
    while ($data = $query->fetch_assoc()) {
        $iquery = $db->query("SELECT title FROM rtindex WHERE id = '{$data['id']}';");
        $idata = $iquery->fetch_assoc();
        $data['title'] = $idata['title'];
        if ($data['category'] != 8) {
            $rtype = "<img src=\"images/" . Rivr::getTypeInt($data['category']) . ".png\" class=\"icon\"/>";
        } else {
            $rtype = '';
        }
        echo "<tr class=\"row\"><td style=\"width:700px;\">{$rtype}<a href=\"{$data['hash']}\">{$data['title']}</a></td><td width=\"70px\" class=\"seeds\">{$data['seeds']}</td><td width=\"70px\" class=\"leech\">{$data['peers']}</td><td width=\"90px\">" . bytesToStr($data['size'] * 1024) . "</td></tr>";
    }
    echo "</table><br/>";
}
?>

</div>

<?php 
include "includes/footer.php";
?>