当前位置: 首页>>代码示例>>PHP>>正文


PHP Releases::getByGuid方法代码示例

本文整理汇总了PHP中Releases::getByGuid方法的典型用法代码示例。如果您正苦于以下问题:PHP Releases::getByGuid方法的具体用法?PHP Releases::getByGuid怎么用?PHP Releases::getByGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Releases的用法示例。


在下文中一共展示了Releases::getByGuid方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendURLToNZBGet

    /**
     * Send a NZB URL to NZBGet.
     *
     * @param string $guid Release identifier.
     *
     * @return bool|mixed
     *
     * @access public
     */
    public function sendURLToNZBGet($guid)
    {
        $reldata = $this->Releases->getByGuid($guid);
        $url = "{$this->serverurl}getnzb/{$guid}&i={$this->uid}&r={$this->rsstoken}";
        $header = '<?xml version="1.0"?>
			<methodCall>
				<methodName>appendurl</methodName>
				<params>
					<param>
						<value><string>' . $reldata['searchname'] . '.nzb' . '</string></value>
					</param>
					<param>
						<value><string>' . $reldata['category_name'] . '</string></value>
					</param>
					<param>
						<value><i4>0</i4></value>
					</param>
					<param>
						<value><boolean>>False</boolean></value>
					</param>
					<param>
						<value>
							<string>' . $url . '</string>
						</value>
					</param>
				</params>
			</methodCall>';
        Utility::getUrl(['url' => $this->fullURL . 'appendurl', 'method' => 'post', 'postdata' => $header, 'verifycert' => false]);
    }
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:38,代码来源:NZBGet.php

示例2: sendURLToNZBGet

    /**
     * Send a NZB URL to NZBGet.
     *
     * @param string $guid Release identifier.
     *
     * @return bool|mixed
     *
     * @access public
     */
    public function sendURLToNZBGet($guid)
    {
        $reldata = $this->Releases->getByGuid($guid);
        $header = '<?xml version="1.0"?>
			<methodCall>
				<methodName>appendurl</methodName>
				<params>
					<param>
						<value><string>' . $reldata['searchname'] . '.nzb' . '</string></value>
					</param>
					<param>
						<value><string>' . $reldata['category_name'] . '</string></value>
					</param>
					<param>
						<value><i4>0</i4></value>
					</param>
					<param>
						<value><boolean>>False</boolean></value>
					</param>
					<param>
						<value>
							<string>' . $this->serverurl . 'getnzb/' . $guid . '%26i%3D' . $this->uid . '%26r%3D' . $this->rsstoken . '</string>
						</value>
					</param>
				</params>
			</methodCall>';
        nzedb\utility\getUrl($this->fullURL . 'appendurl', 'post', $header);
    }
开发者ID:Jay204,项目名称:nZEDb,代码行数:37,代码来源:NZBGet.php

示例3: sendToNZBGet

    public function sendToNZBGet($guid)
    {
        $releases = new Releases();
        $reldata = $releases->getByGuid($guid);
        $url = "{$this->serverurl}getnzb/{$guid}&amp;i={$this->uid}&amp;r={$this->rsstoken}";
        $header = <<<NZBGet_URL
<?xml version="1.0"?>
<methodCall>
\t<methodName>appendurl</methodName>
\t<params>
\t\t<param>
\t\t\t<value><string>{$reldata['searchname']}.nzb</string></value>
\t\t</param>
\t\t<param>
\t\t\t<value><string>{$reldata['category_name']}</string></value>
\t\t</param>
\t\t<param>
\t\t\t<value><i4>0</i4></value>
\t\t</param>
\t\t<param>
\t\t\t<value><boolean>>False</boolean></value>
\t\t</param>
\t\t<param>
\t\t\t<value>
\t\t\t\t<string>{$url}</string>
\t\t\t</value>
\t\t</param>
\t</params>
</methodCall>
NZBGet_URL;
        getUrl($this->fullurl() . "appendurl", "POST", $header);
    }
开发者ID:scriptzteam,项目名称:newzNZB-premium-indexer,代码行数:32,代码来源:nzbget.php

示例4: Releases

<?php

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET["id"])) {
    $releases = new Releases(['Settings' => $page->settings]);
    $rc = new ReleaseComments();
    $re = new ReleaseExtra();
    $data = $releases->getByGuid($_GET["id"]);
    if (!$data) {
        $page->show404();
    }
    if ($page->isPostBack()) {
        $rc->addComment($data["id"], $data["gid"], $_POST["txtAddComment"], $page->users->currentUserId(), $_SERVER['REMOTE_ADDR']);
    }
    $nfo = $releases->getReleaseNfo($data["id"], false);
    $reVideo = $re->getVideo($data["id"]);
    $reAudio = $re->getAudio($data["id"]);
    $reSubs = $re->getSubs($data["id"]);
    $comments = $rc->getCommentsByGid($data["gid"]);
    $rage = '';
    if ($data["rageid"] != '') {
        $tvrage = new TvAnger();
        $rageinfo = $tvrage->getByRageID($data["rageid"]);
        if (count($rageinfo) > 0) {
            $seriesnames = $seriesdescription = $seriescountry = $seriesgenre = $seriesimg = $seriesid = array();
            foreach ($rageinfo as $r) {
                $seriesnames[] = $r['releasetitle'];
                if (!empty($r['description'])) {
                    $seriesdescription[] = $r['description'];
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:31,代码来源:details.php

示例5: date

            $page->users->addDownloadRequest($uid, $guid);
            if (isset($_GET["del"]) && $_GET["del"] == 1) {
                $page->users->delCartByUserAndRelease($guid, $uid);
            }
        }
        $filename = date("Ymdhis") . ".nzb.zip";
        header("Content-type: application/octet-stream");
        header("Content-disposition: attachment; filename=" . $filename);
        echo $zip;
        die;
    } else {
        $page->show404();
    }
}
if (isset($_GET["id"])) {
    $reldata = $rel->getByGuid($_GET["id"]);
    $nzbpath = $nzb->getNZBPath($_GET["id"]);
    if (!file_exists($nzbpath)) {
        header("X-DNZB-RCode: 404");
        header("X-DNZB-RText: NZB file not found!");
        $page->show404();
    }
    if ($reldata) {
        $rel->updateGrab($_GET["id"]);
        $page->users->addDownloadRequest($uid, $reldata['id']);
        $page->users->incrementGrabs($uid);
        if (isset($_GET["del"]) && $_GET["del"] == 1) {
            $page->users->delCartByUserAndRelease($_GET["id"], $uid);
        }
    } else {
        header("X-DNZB-RCode: 404");
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:31,代码来源:getnzb.php

示例6: Releases

<?php

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
if (!isset($_REQUEST["id"])) {
    $page->show404();
}
$r = new Releases(['Settings' => $page->settings]);
$rel = $r->getByGuid($_REQUEST["id"]);
if (!$rel) {
    print "No tv info";
} else {
    //print "<h3 class=\"tooltiphead\">episode info...</h3>\n";
    print "<ul>\n";
    if (isset($rel['tvtitle'])) {
        print "<li>" . htmlentities($rel["tvtitle"], ENT_QUOTES) . "</li>\n";
    }
    print "<li>Aired on " . date("F j, Y", strtotime($rel["tvairdate"])) . "</li>\n";
    print "</ul>";
    if ($rel["rageid"] > 0) {
        $t = new TvRage(['Settings' => $page->settings]);
        $rage = $t->getByRageID($rel["rageid"]);
        if (count($rage) > 0) {
            if ($rage[0]["imgdata"] != "") {
                print "<img class=\"shadow\" src=\"" . WWW_TOP . "/getimage?type=tvrage&amp;id=" . $rage[0]["id"] . "\" width=\"180\"/>";
            }
        }
    }
}
开发者ID:Jay204,项目名称:nZEDb,代码行数:30,代码来源:ajax_tvinfo.php

示例7: Releases

<?php

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET['id'])) {
    $releases = new Releases(['Settings' => $page->settings]);
    $data = $releases->getByGuid($_GET['id']);
    if (!$data) {
        $page->show404();
    }
    $rc = new ReleaseComments($page->settings);
    if ($page->isPostBack()) {
        $rc->addComment($data['id'], $_POST['txtAddComment'], $page->users->currentUserId(), $_SERVER['REMOTE_ADDR']);
    }
    $nfo = $releases->getReleaseNfo($data['id'], false);
    $re = new ReleaseExtra($page->settings);
    $reVideo = $re->getVideo($data['id']);
    $reAudio = $re->getAudio($data['id']);
    $reSubs = $re->getSubs($data['id']);
    $comments = $rc->getComments($data['id']);
    $similars = $releases->searchSimilar($data['id'], $data['searchname'], 6, $page->userdata['categoryexclusions']);
    $rage = $ani = $mov = $mus = $con = $game = $xxx = $boo = '';
    if ($data['rageid'] != '') {
        $tvrage = new TvRage(['Settings' => $page->settings]);
        $rageinfo = $tvrage->getByRageID($data['rageid']);
        if (count($rageinfo) > 0) {
            $seriesnames = $seriesdescription = $seriescountry = $seriesgenre = $seriesimg = $seriesid = array();
            foreach ($rageinfo as $r) {
                $seriesnames[] = $r['releasetitle'];
                if (!empty($r['description'])) {
开发者ID:Jay204,项目名称:nZEDb,代码行数:31,代码来源:details.php

示例8: array

<?php

require_once WWW_DIR . "/lib/releases.php";
if (!$users->isLoggedIn()) {
    $page->show403();
}
if (isset($_REQUEST["add"])) {
    if (isset($_GET['add']) && !empty($_GET['add'])) {
        $ids = array($_GET['add']);
    } elseif (isset($_POST['add']) && is_array($_POST['add'])) {
        $ids = $_POST['add'];
    }
    $releases = new Releases();
    $data = $releases->getByGuid($ids);
    if (!$data) {
        $page->show404();
    }
    foreach ($data as $d) {
        $users->addCart($users->currentUserId(), $d["ID"]);
    }
} elseif (isset($_REQUEST["delete"])) {
    if (isset($_GET['delete']) && !empty($_GET['delete'])) {
        $ids = array($_GET['delete']);
    } elseif (isset($_POST['delete']) && is_array($_POST['delete'])) {
        $ids = $_POST['delete'];
    }
    if (isset($ids)) {
        $users->delCartByGuid($ids, $users->currentUserId());
    }
    if (!isset($_POST['delete'])) {
        header("Location: " . WWW_TOP . "/cart");
开发者ID:scriptzteam,项目名称:newzNZB-premium-indexer,代码行数:31,代码来源:cart.php

示例9: isset

     $relData = $releases->searchbyRageId(isset($_GET['rid']) ? $_GET['rid'] : '-1', isset($_GET['season']) ? $_GET['season'] : '', isset($_GET['ep']) ? $_GET['ep'] : '', $offset, limit(), isset($_GET['q']) ? $_GET['q'] : '', categoryid(), $maxAge);
     addLanguage($relData, $page->settings);
     printOutput($relData, $outputXML, $page, $offset);
     break;
     //
     // get nfo
     //
 //
 // get nfo
 //
 case "gn":
     if (!isset($_GET["id"])) {
         showApiError(200);
     }
     $page->users->addApiRequest($uid, $_SERVER['REQUEST_URI'], $hosthash);
     $reldata = $releases->getByGuid($_GET["id"]);
     if (!$reldata) {
         showApiError(300);
     }
     $nfo = $releases->getReleaseNfo($reldata["id"], true);
     if (!$nfo) {
         showApiError(300);
     }
     $nforaw = Utility::cp437toUTF($nfo["nfo"]);
     $page->smarty->assign('release', $reldata);
     $page->smarty->assign('nfo', $nfo);
     $page->smarty->assign('nfoutf', $nforaw);
     if (isset($_GET["raw"])) {
         header("Content-type: text/x-nfo");
         header("Content-Disposition: attachment; filename=" . str_replace(" ", "_", $reldata["searchname"]) . ".nfo");
         echo $nforaw;
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:31,代码来源:api.php

示例10: Releases

<?php

$releases = new Releases(['Settings' => $page->settings]);
$page->users = new Users();
$page = new Page();
if (isset($_GET['userid']) && is_numeric($_GET['userid']) && isset($_GET['rsstoken']) && isset($_GET['guid'])) {
    $rel = $releases->getByGuid($_GET["guid"]);
    $userid = $_GET['userid'];
    $rsstoken = $_GET['rsstoken'];
    if (!$rel) {
        $page->show404();
    }
    $alt = $releases->getAlternate($rel['guid'], $rel['searchname'], $userid);
    if (!$alt) {
        $page->show404();
    }
    $url = $page->serverurl . 'getnzb/' . $alt['guid'] . '.nzb' . '&i=' . $userid . '&r=' . $rsstoken;
    header('Location: ' . $url . '');
}
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:19,代码来源:failed.php

示例11: Page

<?php

if (isset($_GET['guid']) && isset($_GET['searchname']) && isset($_GET['userid']) && is_numeric($_GET['userid']) && isset($_GET['rsstoken'])) {
    $page = new Page();
    $releases = new Releases(['Settings' => $page->settings]);
    $users = new Users();
    $userid = $_GET['userid'];
    $rsstoken = $_GET['rsstoken'];
    $rel = $releases->getByGuid($_GET['guid']);
    if (!$rel) {
        $page->show404();
    }
    $alt = $releases->getAlternate($_GET['guid'], $_GET['searchname'], $userid);
    if (!$alt) {
        $page->show404();
    }
    $url = $page->serverurl . 'getnzb/' . $alt['guid'] . '.nzb' . '&i=' . $userid . '&r=' . $rsstoken;
    header('Location: ' . $url . '');
}
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:19,代码来源:failed.php


注:本文中的Releases::getByGuid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。