diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 02:37:40 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 02:37:40 +0000 |
commit | 9ad5c7b5e23b4940e7a3ea3ca3a6fb77e6a8fab0 (patch) | |
tree | d088b5210e77d9fa91d954d8550e00e372b47378 /plugins/webinterface/www/mobile/torrent.php | |
download | ktorrent-9ad5c7b5e23b4940e7a3ea3ca3a6fb77e6a8fab0.tar.gz ktorrent-9ad5c7b5e23b4940e7a3ea3ca3a6fb77e6a8fab0.zip |
Updated to final KDE3 ktorrent release (2.2.6)
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1077377 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugins/webinterface/www/mobile/torrent.php')
-rw-r--r-- | plugins/webinterface/www/mobile/torrent.php | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/plugins/webinterface/www/mobile/torrent.php b/plugins/webinterface/www/mobile/torrent.php new file mode 100644 index 0000000..a1e451d --- /dev/null +++ b/plugins/webinterface/www/mobile/torrent.php @@ -0,0 +1,91 @@ +<html> +<head> +<title>KTorrent WebInterface</title> +</head> +<body> +<table width="100%"> + <tbody> + <tr> + <td align="center"><IMG src="ktorrentwebinterfacelogo.png" width="340" height="150" align="top" border="0"></td> + <?php + $stats=downloadStatus(); + $t=$stats[$_REQUEST['id']]; + echo "<td><strong>ktorrent-><a href=\"interface.php\">transfers</a></strong>->{$t['torrent_name']}</td>"; + echo "<td><a href=\"torrent.php?id={$_REQUEST['id']}\" >refresh</a></td>"; + ?> + </tr> + </tbody> +</table> +<table width="100%"> + <tbody> + <tr> + <?php + echo "<td><a href=\"torrent.php?stop={$_REQUEST['id']}&id={$_REQUEST['id']}\" title=\"STOP\"><img src=\"/stop.png\" name=\"stop\" width=\"16\" height=\"16\" border=\"0\"></a></td>"; + echo "<td><a href=\"torrent.php?start={$_REQUEST['id']}&id={$_REQUEST['id']}\" title=\"START\"><img src=\"/start.png\" name=\"start\" width=\"16\" height=\"16\" border=\"0\"></a></td>"; + echo "<td><a href=\"interface.php?remove={$_REQUEST['id']}\" title=\"REMOVE\"><img src=\"/remove.png\" name=\"remove\" width=\"16\" height=\"16\" border=\"0\"></a></td>"; + ?> + </tr> + </tbody> +</table> +<table width="100%"> + <tbody> + <?php + echo "<tr>"; + echo "<td><strong>Status: </strong></td>"; + switch ($t['status']) { + case 0: + echo "<td>NOT_STARTED</td>"; + break; + case 1: + echo "<td>SEEDING_COMPLETE</td>"; + break; + case 2: + echo "<td>DOWNLOAD_COMPLETE</td>"; + break; + case 3: + echo "<td>SEEDING</td>"; + break; + case 4: + echo "<td>DOWNLOADING</td>"; + break; + case 5: + echo "<td>STALLED</td>"; + break; + case 6: + echo "<td>STOPPED</td>"; + break; + case 7: + echo "<td>ALLOCATING_DISKSPACE</td>"; + break; + case 8: + echo "<td>ERROR</td>"; + break; + case 9: + echo "<td>QUEUED</td>"; + break; + case 10: + echo "<td>CHECKING_DATA</td>"; + break; + default: + echo "<td>Not supported Status</td>"; + } + echo "</tr>"; + echo "<tr>"; + echo "<td><strong>Down speed: </strong></td>"; + echo "<td>{$t['download_rate']}</td>"; + echo "</tr>"; + echo "<tr>"; + echo "<td><strong>Up speed: </strong></td>"; + echo "<td>{$t['upload_rate']}</td>"; + echo "</tr>"; + echo "<tr>"; + echo "<td><strong>Complete: </strong></td>"; + $perc = round(100.0 - ($t['bytes_left_to_download'] / $t['total_bytes_to_download']) * 100.0, 2); + echo "<td>$perc %</td>"; + echo "</tr>"; + ?> + </tbody> +</table> +</body> +</html> + |