예제 #1
0
 To read the license please visit http://www.gnu.org/copyleft/gpl.html

*******************************************************************************/
include_once "config.php";
include_once "functions.php";
require_once "metaInfo.php";
global $cfg;
$torrent = 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);
}
switch ($cfg["metainfoclient"]) {
    case "transmissioncli":
        echo '<br><br><strong>Scrape Info : </strong><br><br>';
        echo getTorrentScrapeInfo($torrent);
        break;
}
echo "</div>";
DisplayFoot();
예제 #2
0
/**
 * pieTransferScrape
 */
function image_pieTransferScrape()
{
    global $cfg;
    // transfer-id
    $transfer = tfb_getRequestVar('transfer');
    if (empty($transfer)) {
        Image::paintNoOp();
    }
    // validate transfer
    if (tfb_isValidTransfer($transfer) !== true) {
        AuditAction($cfg["constants"]["error"], "INVALID TRANSFER: " . $transfer);
        Image::paintNoOp();
    }
    // get scrape-data
    require_once 'inc/functions/functions.common.php';
    $scrape = @trim(getTorrentScrapeInfo($transfer));
    if (!empty($scrape) && preg_match("/(\\d+) seeder\\(s\\), (\\d+) leecher\\(s\\).*/i", $scrape, $reg)) {
        $seeder = $reg[1];
        $leecher = $reg[2];
        // draw image
        Image::paintPie3D(202, 160, 100, 50, 200, 100, 20, Image::stringToRGBColor($cfg["body_data_bg"]), array($seeder + 1.0E-5, $leecher + 1.0E-5), image_getColors(), array('Seeder : ' . $seeder, 'Leecher : ' . $leecher), 58, 130, 2, 14);
    } else {
        // output image
        Image::paintNoOp();
    }
}
예제 #3
0
    exit;
}
/******************************************************************************/
// common functions
require_once 'inc/functions/functions.common.php';
// transfer functions
require_once 'inc/functions/functions.transfer.php';
// init template-instance
tmplInitializeInstance($cfg["theme"], "page.transferScrape.tmpl");
// init transfer
transfer_init();
// client-switch
if (substr($transfer, -8) == ".torrent") {
    // this is a t-client
    $tmpl->setvar('hasScrape', 1);
    $tmpl->setvar('scrapeInfo', getTorrentScrapeInfo($transfer));
} else {
    if (substr($transfer, -5) == ".wget") {
        // this is wget.
        $tmpl->setvar('hasScrape', 0);
        $tmpl->setvar('scrapeInfo', "Scrape not supported by wget");
    } else {
        if (substr($transfer, -4) == ".nzb") {
            // this is nzbperl.
            $tmpl->setvar('hasScrape', 0);
            $tmpl->setvar('scrapeInfo', "Scrape not supported by nzbperl");
        } else {
            AuditAction($cfg["constants"]["error"], "INVALID TRANSFER: " . $transfer);
            @error("Invalid Transfer", "", "", array($transfer));
        }
    }