Example #1
0
File: view.php Project: nylen/rtgui
        print_r($this_torrent);
        ?>

      <h2>Files</h2>
<?php 
        print_r(get_file_list($r_hash));
        ?>

      <h2>Peers</h2>
<?php 
        print_r(get_peer_list($r_hash));
        ?>

      <h2>Tracker</h2>
<?php 
        print_r(get_tracker_list($r_hash));
        ?>

    </pre>
<?php 
    }
    echo <<<HTML
  </div><!-- id="tab-{$r_select}" -->




HTML;
}
// end tab loop
?>
Example #2
0
        echo "<p><input type='submit' name='setdir'  value='Set directory' disabled=1>&nbsp;<i>Torrent must be stopped before changing directory.</i></p>\n";
    } else {
        echo "<input type='hidden' name='hash' value='" . $thistorrent['hash'] . "'>\n";
        echo "<input type='hidden' name='newdir' value=''>\n";
        echo "<input type='submit' name='setdir'  value='Set directory'>\n";
    }
    echo "</fieldset>\n";
    echo "</form>\n";
    echo "<iframe frameborder=0 src='dirbrowser.php?dir=" . urlencode($seldir) . "&amp;hilitedir=" . urlencode($torrentdir) . "' width=100% height=300px>iFrame</iframe>";
    echo "<br>&nbsp;</div>";
    // end container div
    echo "<div class='bottomthin' style='width:552px;'> </div>\n";
}
// Debug info
if ($r_select == "debug") {
    echo "<pre class='medtext'>";
    echo "<h2>Torrent</h2>";
    echo nl2br(print_r($thistorrent));
    echo "<h2>Files</h2>";
    echo nl2br(print_r(get_file_list($r_hash)));
    echo "<h2>Peers</h2>";
    echo nl2br(print_r(get_peer_list($r_hash)));
    echo "<h2>Tracker</h2>";
    echo nl2br(print_r(get_tracker_list($r_hash)));
    echo "</pre>";
}
?>
</div>
</body>
</html>
Example #3
0
    echo "<tr class='row2'><td class='datacol' align=right><b>Complete</b></td><td>" . $thistorrent['percent_complete'] . " %&nbsp;&nbsp;";
    echo percentbar(@round($thistorrent['percent_complete'] / 2));
    echo "<tr class='row1'><td class='datacol' align=right><b>Down Rate</b></td><td>" . format_bytes($thistorrent['down_rate']) . "</td></tr>\n";
    echo "<tr class='row2'><td class='datacol' align=right><b>Down Total</b></td><td>" . format_bytes($thistorrent['down_total']) . "</td></tr>\n";
    echo "<tr class='row1'><td class='datacol' align=right><b>Up Rate</b></td><td>" . format_bytes($thistorrent['up_rate']) . "</td></tr>\n";
    echo "<tr class='row2'><td class='datacol' align=right><b>Up Total</b></td><td>" . format_bytes($thistorrent['up_total']) . "</td></tr>\n";
    echo "<tr class='row1'><td class='datacol' align=right><b>Peers connected</b></td><td>" . $thistorrent['peers_connected'] . "</td></tr>\n";
    echo "<tr class='row2'><td class='datacol' align=right><b>Peers not connected</b></td><td>" . $thistorrent['peers_not_connected'] . "</td></tr>\n";
    echo "<tr class='row1'><td class='datacol' align=right><b>Peers complete</b></td><td>" . $thistorrent['peers_complete'] . "</td></tr>\n";
    echo "<tr class='row2'><td class='datacol' align=right><b>Ratio</b></td><td>" . @round($thistorrent['ratio'] / 1000, 2) . " %</td></tr>\n";
    echo "<tr class='row2'><td class='datacol' align=right><b>Priority</b></td><td>" . $thistorrent['priority_str'] . "</td></tr>\n";
    echo "</table>\n<br>\n";
}
// tracker info...
if ($r_select == "tracker") {
    $data = get_tracker_list($r_hash);
    echo "<table border=0 cellspacing=0 cellpadding=5 class='maintable' width='100%'>";
    echo "<tr class='tablehead'>";
    echo "<td>URL</td>";
    echo "<td align=center>Last</td>";
    echo "<td align=center>Interval</td>";
    echo "<td align=center>Scrapes</td>";
    echo "<td align=center>Enabled</td>";
    echo "</tr>\n";
    $thisrow = "row1";
    foreach ($data as $item) {
        echo "<tr class='{$thisrow}'>";
        echo "<td colspan=5>" . wordwrap($item['get_url'], 90, "<br>\n", TRUE) . "</td>";
        echo "</tr><tr class='{$thisrow}'>\n";
        echo "<td class='datacol' width='80%'>&nbsp;</td>";
        echo "<td class='datacol' align=center nowrap>" . ($item['get_scrape_time_last'] > 0 ? date("Y-m-d H:i", @round($item['get_scrape_time_last'] / 1000000)) : "never") . "</td>";