*/
//###########################################################
// Actions
//###########################################################
if (isset($_REQUEST['list'])) {
    $tor_IdList = parse_torrent_list($_REQUEST['list']);
    if (isset($_REQUEST['action-delete'])) {
        tr_torrentRemove($tor_IdList);
        Header("Location: " . $globalinfo["scriptIndex"] . "?t=" . $globalinfo["torrentId"] . "&pg=" . $globalinfo["page"]);
        exit;
    } else {
        if (isset($_REQUEST['action-start'])) {
            tr_torrentStart($tor_IdList);
        } else {
            if (isset($_REQUEST['action-stop'])) {
                tr_torrentStop($tor_IdList);
            } else {
                if (isset($_REQUEST['action-save'])) {
                }
            }
        }
    }
    Header("Location: " . $globalinfo["scriptName"] . "?t=" . $globalinfo["torrentId"] . "&pg=" . $globalinfo["page"]);
    exit;
}
//###########################################################
// Interface
//###########################################################
// Free Space info
parseFreespace($globalinfo);
//if we requested torrent info
예제 #2
0
function tr_torrentStopAll()
{
    global $globalinfo;
    $torrents = tr_torrentAccessor();
    if (!is_array($torrents)) {
        return;
    }
    $tor_IdList = array();
    foreach ($torrents as $_torrent) {
        $tor_IdList[] = tor_getId($_torrent);
    }
    tr_torrentStop($tor_IdList);
}