mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 22:01:30 +00:00
22 lines
788 B
PHP
22 lines
788 B
PHP
<?php
|
|
|
|
require_once dirname(__DIR__).DIRECTORY_SEPARATOR.'smarty.php';
|
|
|
|
use nntmux\Regexes;
|
|
|
|
$page = new AdminPage();
|
|
|
|
$page->title = 'Collections Regex Test';
|
|
|
|
$group = trim(isset($_POST['group']) && ! empty($_POST['group']) ? $_POST['group'] : '');
|
|
$regex = trim(isset($_POST['regex']) && ! empty($_POST['regex']) ? $_POST['regex'] : '');
|
|
$limit = (isset($_POST['limit']) && is_numeric($_POST['limit']) ? $_POST['limit'] : 50);
|
|
$page->smarty->assign(['group' => $group, 'regex' => $regex, 'limit' => $limit]);
|
|
|
|
if ($group && $regex) {
|
|
$page->smarty->assign('data', (new Regexes(['Settings' => $page->pdo, 'Table_Name' => 'collection_regexes']))->testCollectionRegex($group, $regex, $limit));
|
|
}
|
|
|
|
$page->content = $page->smarty->fetch('collection_regexes-test.tpl');
|
|
$page->render();
|