if ($x == $globalstats['download_cap']) { echo "selected"; } echo ">" . format_bytes($x) . "</option>"; } echo "</select>"; echo " <input type='submit' name='submit' value='Set'>"; echo "</form><br>\n"; echo "<form method='post' action='control.php'>"; echo "Add torrent URL: <input type=text cols=20 name='addurl' size=38 maxlength=500>"; echo " <input type='submit' name='submit' value='Add'>"; echo "</form>"; echo "</tr></td>\n</table>\n<br>\n"; // ..end of title block // Get the list of torrents downloading $data = get_full_list($_SESSION['view']); // Sort the list if (is_array($data)) { if (strtolower($_SESSION['sortord'] == "asc")) { $sortkey = $_SESSION['sortkey']; usort($data, 'sort_matches_asc'); } else { $sortkey = $_SESSION['sortkey']; usort($data, 'sort_matches_desc'); } } else { $data = array(); } // View selection... echo "<table cellspacing=0 cellpadding=3>\n"; echo "<tr><td> </td>\n";
// // rtGui is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with rtGui. If not, see <http://www.gnu.org/licenses/>. session_start(); include "config.php"; include "functions.php"; extract($_REQUEST, EXTR_PREFIX_ALL | EXTR_REFS, 'r'); if (!isset($r_view)) { $r_view = "main"; } $data = get_full_list("{$r_view}"); // If tracker_filter is set, get tracker URL for each torrent if ($_SESSION['tracker_filter'] != "") { if ($displaytrackerurl == TRUE && is_array($data)) { foreach ($data as $key => $item) { $data[$key]['tracker_url'] = tracker_url($item['hash']); } } } $totcount = 0; if ($data) { foreach ($data as $subitem) { $displaythis = FALSE; if ($_SESSION['tracker_filter'] == "") { $displaythis = TRUE; }
$r_select = "files"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" href="favicon.ico" /> <title>rtGui</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div class='modal'> <?php // Get torrent info... (get all downloads, then filter out just this one by the hash) $alltorrents = get_full_list("main"); $thistorrent = array(); foreach ($alltorrents as $torrent) { if ($r_hash == $torrent['hash']) { $thistorrent = $torrent; } } if ($thistorrent['complete'] == 1) { $statusstyle = "complete"; } else { $statusstyle = "incomplete"; } if ($thistorrent['is_active'] == 1) { $statusstyle .= "active"; } else { $statusstyle .= "inactive";
include "functions.php"; import_request_variables("gp", "r_"); if (!isset($r_view)) { $r_view = "complete"; } // header: header('Content-Type: text/xml'); echo "<?xml version=\"1.0\"?>"; echo "<rss version=\"2.0\">"; echo "<channel>"; echo "<title>rtGui rss feed</title>"; echo "<description>Latest info from your rTorrent/rtGui system</description>"; echo "<generator>rtGui - http://rtgui.googlecode.com/ </generator>"; echo "<link>" . $rtguiurl . "</link>"; echo "<lastBuildDate>" . date("r") . "</lastBuildDate>"; $data = get_full_list($r_view); if (is_array($data)) { $sortkey = "state_changed"; usort($data, 'sort_matches_desc'); $last = 0; foreach ($data as $item) { if ($item['state_changed'] > $last) { $last = $item['state_changed']; } } echo "<lastBuildDate>" . date("r", $last) . "</lastBuildDate>"; foreach ($data as $item) { echo "<item>"; echo "<title>" . ($item['complete'] == 1 ? "[Complete] " : "[Incomplete] ") . htmlspecialchars($item['name']) . "</title>"; echo "<description>"; echo htmlspecialchars($item['tied_to_file']) . " (" . format_bytes($item['size_bytes']) . ")";