You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
811 B
35 lines
811 B
<?php
|
|
require_once './config.php';
|
|
|
|
use nzedb\Groups;
|
|
|
|
$page = new AdminPage();
|
|
$msgs = $error = false;
|
|
|
|
// Set the current action.
|
|
$action = (isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view');
|
|
|
|
switch ($action) {
|
|
case 'submit':
|
|
if (isset($_POST['groupfilter'])) {
|
|
$groups = new Groups();
|
|
$msgs = $groups->addBulk($_POST['groupfilter'], $_POST['active'], $_POST['backfill']);
|
|
if (is_string($msgs)) {
|
|
$error = true;
|
|
}
|
|
}
|
|
break;
|
|
case 'view':
|
|
default:
|
|
$msgs = false;
|
|
break;
|
|
}
|
|
|
|
$page->smarty->assign('error', $error);
|
|
$page->smarty->assign('groupmsglist', $msgs);
|
|
$page->smarty->assign('yesno_ids', [1, 0]);
|
|
$page->smarty->assign('yesno_names', ['Yes', 'No']);
|
|
|
|
$page->title = 'Bulk Add Newsgroups';
|
|
$page->content = $page->smarty->fetch('group-bulk.tpl');
|
|
$page->render();
|
|
|