mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
$page = new AdminPage();
|
|
$releases = new Releases();
|
|
$category = new Category();
|
|
|
|
// set the current action
|
|
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
|
$id = (isset($_REQUEST['id']) && is_array($_REQUEST['id'])) ? $_REQUEST['id'] : '';
|
|
|
|
$page->smarty->assign('action', $action);
|
|
$page->smarty->assign('idArr', $id);
|
|
|
|
switch($action)
|
|
{
|
|
case 'doedit':
|
|
case 'edit':
|
|
$success = false;
|
|
if ($action == 'doedit')
|
|
{
|
|
$upd = $releases->updatemulti($_REQUEST["id"], $_REQUEST["category"], $_REQUEST["grabs"], $_REQUEST["rageID"], $_REQUEST["season"], $_REQUEST['imdbID']);
|
|
if ($upd !== false) {
|
|
$success = true;
|
|
} else {
|
|
|
|
}
|
|
}
|
|
$page->smarty->assign('success', $success);
|
|
$page->smarty->assign('from',(isset($_REQUEST['from'])?$_REQUEST['from']:''));
|
|
$page->smarty->assign('catlist',$category->getForSelect());
|
|
$page->content = $page->smarty->fetch('ajax_release-edit.tpl');
|
|
echo $page->content;
|
|
|
|
break;
|
|
case 'dodelete':
|
|
$releases->delete($_REQUEST["id"], true);
|
|
break;
|
|
case 'dorebuild':
|
|
$releases->rebuildmulti($_REQUEST["id"]);
|
|
break;
|
|
default:
|
|
$page->show404();
|
|
break;
|
|
}
|