mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 10:18:55 +00:00
29 lines
779 B
PHP
29 lines
779 B
PHP
<?php
|
|
|
|
require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php';
|
|
|
|
use Blacklight\Movie;
|
|
use Blacklight\http\BasePage;
|
|
|
|
$page = new BasePage();
|
|
$page->setAdminPrefs();
|
|
$movie = new Movie(['Settings' => $page->pdo]);
|
|
$id = 0;
|
|
|
|
$page->title = 'Movie Add';
|
|
|
|
if (request()->has('id') && ctype_digit(request()->input('id')) && strlen(request()->input('id')) === 7) {
|
|
$id = request()->input('id');
|
|
|
|
$movCheck = $movie->getMovieInfo($id);
|
|
if (! $movCheck || (request()->has('update') && request()->input('update') === 1)) {
|
|
if ($movie->updateMovieInfo($id)) {
|
|
header('Location:'.WWW_TOP.'/movie-list.php');
|
|
die();
|
|
}
|
|
}
|
|
}
|
|
|
|
$page->content = $page->smarty->fetch('movie-add.tpl');
|
|
$page->adminrender();
|