Files
newznab-tmux/public/oldadmin/movie-add.php
T
2018-04-18 09:41:29 +02:00

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();