Ejemplo n.º 1
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);
}
            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
//Torrent info
$torrents = tr_torrentAccessor($stdGetFields, array($globalinfo["torrentId"]));
if (!$torrents) {
    _error("Torrent not found or deleted");
}
if (!is_array($torrents)) {
    $torrents = array();
}
//Speed info
parseSpeeds($globalinfo, $torrents);
require_once 'templates/torrent_options.tmpl.php';
exit(0);
Ejemplo n.º 3
0
                        }
                    }
                    Header("Location: " . $globalinfo["scriptName"] . "?t=" . $globalinfo["torrentId"] . "&pg=" . $globalinfo["page"]);
                    exit;
                }
            }
        }
    }
}
//###########################################################
// Interface
//###########################################################
// Free Space info
parseFreespace($globalinfo);
//Torrent info
$torrents = tr_torrentAccessor($stdGetFields);
if (!is_array($torrents)) {
    $torrents = array();
}
//##############################################
//sort by status and name
//##############################################
switch ($session["sort-order"]) {
    case 4:
        $arr_order = array(0 => 0, 2 => 1, 4 => 2, 3 => 3, 1 => 4);
        break;
    case 3:
        $arr_order = array(0 => 0, 2 => 1, 1 => 2, 3 => 3, 4 => 4);
        break;
    case 2:
        $arr_order = array(4 => 0, 1 => 1, 3 => 2, 0 => 3, 2 => 4);