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


PHP Releases::getReleasedGroupsForSelect方法代码示例

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


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

示例1: exit

<?php

require_once "config.php";
if (\newznab\utility\Utility::isCLI()) {
    exit('This script is only for exporting from the web, use the script in misc/testing' . PHP_EOL);
}
$page = new AdminPage();
$rel = new Releases(['Settings' => $page->settings]);
if ($page->isPostBack()) {
    $retVal = $path = '';
    $path = $_POST["folder"];
    $postFrom = isset($_POST["postfrom"]) ? $_POST["postfrom"] : '';
    $postTo = isset($_POST["postto"]) ? $_POST["postto"] : '';
    $group = $_POST["group"] === '-1' ? 0 : (int) $_POST["group"];
    $gzip = $_POST["gzip"] === '1' ? true : false;
    if ($path !== "") {
        $NE = new NZBExport(['Browser' => true, 'Settings' => $page->settings, 'Releases' => $rel]);
        $retVal = $NE->beginExport([$path, $postFrom, $postTo, $group, $gzip]);
    } else {
        $retVal = 'Error, a path is required!';
    }
    $page->smarty->assign(['folder' => $path, 'output' => $retVal, 'fromdate' => $postFrom, 'todate' => $postTo, 'group' => $_POST["group"], 'gzip' => $_POST["gzip"]]);
} else {
    $page->smarty->assign(['fromdate' => $rel->getEarliestUsenetPostDate(), 'todate' => $rel->getLatestUsenetPostDate()]);
}
$page->title = "Export Nzbs";
$page->smarty->assign(['gziplist' => [1 => 'True', 0 => 'False'], 'grouplist' => $rel->getReleasedGroupsForSelect(true)]);
$page->content = $page->smarty->fetch('nzb-export.tpl');
$page->render();
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:29,代码来源:nzb-export.php

示例2: fopen

            $fh = fopen($path . $catname . "/" . safeFilename($release["searchname"]) . ".nzb", 'w');
            fwrite($fh, $nzbfile);
            fclose($fh);
            $nzbCount++;
            if ($nzbCount % 10 == 0) {
                echo "Exported " . $nzbCount . " of " . $total . " nzbs\n";
            }
        }
        $retval .= 'Processed ' . $nzbCount . ' nzbs';
        if (!empty($argc)) {
            echo 'Processed ' . $nzbCount . ' nzbs';
            die;
        }
    } else {
        echo 'No export path specified.';
        die;
    }
    $page->smarty->assign('folder', $path);
    $page->smarty->assign('output', $retval);
    $page->smarty->assign('fromdate', $postfrom);
    $page->smarty->assign('todate', $postto);
    $page->smarty->assign('group', $group);
} else {
    $page->smarty->assign('fromdate', $rel->getEarliestUsenetPostDate());
    $page->smarty->assign('todate', $rel->getLatestUsenetPostDate());
}
$page->title = "Export Nzbs";
$grouplist = $rel->getReleasedGroupsForSelect(true);
$page->smarty->assign('grouplist', $grouplist);
$page->content = $page->smarty->fetch('nzb-export.tpl');
$page->render();
开发者ID:nubzzz,项目名称:newznab,代码行数:31,代码来源:nzb-export.php

示例3: exit

<?php

require_once './config.php';
require_once nZEDb_LIB . 'utility' . DS . 'Utility.php';
if (\nzedb\utility\Utility::isCLI()) {
    exit('This script is only for exporting from the web, use the script in misc/testing' . PHP_EOL);
}
$page = new AdminPage();
$rel = new Releases(['Settings' => $page->settings]);
if ($page->isPostBack()) {
    $retVal = $path = '';
    $path = $_POST["folder"];
    $postFrom = isset($_POST["postfrom"]) ? $_POST["postfrom"] : '';
    $postTo = isset($_POST["postto"]) ? $_POST["postto"] : '';
    $group = $_POST["group"] === '-1' ? 0 : (int) $_POST["group"];
    $gzip = $_POST["gzip"] === '1' ? true : false;
    if ($path !== "") {
        $NE = new NZBExport(['Browser' => true, 'Settings' => $page->settings, 'Releases' => $rel]);
        $retVal = $NE->beginExport(array($path, $postFrom, $postTo, $group, $gzip));
    } else {
        $retVal = 'Error, a path is required!';
    }
    $page->smarty->assign(array('folder' => $path, 'output' => $retVal, 'fromdate' => $postFrom, 'todate' => $postTo, 'group' => $_POST["group"], 'gzip' => $_POST["gzip"]));
} else {
    $page->smarty->assign(array('fromdate' => $rel->getEarliestUsenetPostDate(), 'todate' => $rel->getLatestUsenetPostDate()));
}
$page->title = "Export Nzbs";
$page->smarty->assign(array('gziplist' => array(1 => 'True', 0 => 'False'), 'grouplist' => $rel->getReleasedGroupsForSelect(true)));
$page->content = $page->smarty->fetch('nzb-export.tpl');
$page->render();
开发者ID:Jay204,项目名称:nZEDb,代码行数:30,代码来源:nzb-export.php


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