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 TorrentFlux; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
include_once "config.php";
include_once "functions.php";
include_once "AliasFile.php";
$torrent = getRequestVar('torrent');
$error = "";
$torrentowner = getOwner($torrent);
$graph_width = "";
$background = "#000000";
$alias = SecurityClean(getRequestVar('alias'));
if (!empty($alias)) {
    // read the alias file
    // create AliasFile object
    $af = new AliasFile($cfg["torrent_file_path"] . $alias, $torrentowner);
    for ($inx = 0; $inx < sizeof($af->errors); $inx++) {
        $error .= "<li style=\"font-size:10px;color:#ff0000;\">" . $af->errors[$inx] . "</li>";
    }
    if ($af->seedlimit <= 0) {
        $af->seedlimit = "none";
    } else {
        $af->seedlimit .= "%";
    }
} else {
    die("fatal error torrent file not specified");
}
Ejemplo n.º 2
0
    (at your option) any later version.

    TorrentFlux 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 TorrentFlux; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
include_once "config.php";
include_once "functions.php";
require_once "metaInfo.php";
global $cfg;
$torrent = SecurityClean(getRequestVar('torrent'));
DisplayHead(_TORRENTDETAILS);
echo "<table width=\"740\" border=0 cellpadding=0 cellspacing=0><tr><td>";
echo displayDriveSpaceBar(getDriveSpace($cfg["path"]));
echo "</td></tr></table>";
echo "<br>";
echo "<div align=\"left\" id=\"BodyLayer\" name=\"BodyLayer\" style=\"border: thin solid ";
echo $cfg["main_bgcolor"];
echo "; position:relative; width:740; height:500; padding-left: 5px; padding-right: 5px; z-index:1; overflow: scroll; visibility: visible\">";
$als = getRequestVar('als');
if ($als == "false") {
    showMetaInfo($torrent, false);
} else {
    showMetaInfo($torrent, true);
}
echo "</div>";
Ejemplo n.º 3
0
    $return = getRequestVar('return');
    if (!empty($return)) {
        sleep(3);
        passthru("kill " . $kill);
        // try to remove the pid file
        @unlink($cfg["torrent_file_path"] . $alias_file . ".pid");
        header("location: " . $return . ".php?op=queueSettings");
        exit;
    } else {
        header("location: index.php");
        exit;
    }
}
// Did the user select the option to remove a torrent from the Queue?
if (isset($_REQUEST["dQueue"])) {
    $alias_file = SecurityClean(getRequestVar('alias_file'));
    $QEntry = getRequestVar('QEntry');
    // Is the Qinfo file still there?
    if (file_exists($cfg["torrent_file_path"] . "queue/" . $alias_file . ".Qinfo")) {
        // Yes, then delete it and update the stat file.
        include_once "AliasFile.php";
        // We are going to write a '2' on the front of the stat file so that
        // it will be set back to New Status
        $the_user = getOwner($QEntry);
        // read the alias file
        // create AliasFile object
        $af = new AliasFile($cfg["torrent_file_path"] . $alias_file, $the_user);
        if ($af->percent_done > 0 && $af->percent_done < 100) {
            // has downloaded something at some point, mark it is incomplete
            $af->running = "0";
            $af->time_left = "Torrent Stopped";