本文整理汇总了PHP中Releases::getEarliestUsenetPostDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Releases::getEarliestUsenetPostDate方法的具体用法?PHP Releases::getEarliestUsenetPostDate怎么用?PHP Releases::getEarliestUsenetPostDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Releases
的用法示例。
在下文中一共展示了Releases::getEarliestUsenetPostDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
示例2: 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();