<?php $music = new Music(); if (!$page->users->isLoggedIn()) { $page->show403(); } if (isset($_GET["id"]) && ctype_digit($_GET["id"])) { $mus = $music->getMusicInfo($_GET['id']); if (!$mus) { $page->show404(); } $page->smarty->assign('music', $mus); $page->title = "Info for " . $mus['title']; $page->meta_title = ""; $page->meta_keywords = ""; $page->meta_description = ""; $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes'); $modal = false; if (isset($_GET['modal'])) { $modal = true; $page->smarty->assign('modal', true); } $page->content = $page->smarty->fetch('viewmusic.tpl'); if ($modal) { echo $page->content; } else { $page->render(); } }
$xxx = $x->getXXXInfo($data['xxxinfo_id']); if (isset($xxx['trailers'])) { $xxx['trailers'] = $x->insertSwf($xxx['classused'], $xxx['trailers']); } if ($xxx && isset($xxx['title'])) { $xxx['title'] = str_replace(array('/', '\\'), '', $xxx['title']); $xxx['actors'] = $x->makeFieldLinks($xxx, 'actors'); $xxx['genre'] = $x->makeFieldLinks($xxx, 'genre'); $xxx['director'] = $x->makeFieldLinks($xxx, 'director'); } else { $xxx = false; } } if ($data['musicinfoid'] != '') { $music = new Music(['Settings' => $page->settings]); $mus = $music->getMusicInfo($data['musicinfoid']); } if ($data['consoleinfoid'] != '') { $c = new Console(['Settings' => $page->settings]); $con = $c->getConsoleInfo($data['consoleinfoid']); } if ($data['gamesinfo_id'] != '') { $g = new Games(['Settings' => $page->settings]); $game = $g->getgamesInfo($data['gamesinfo_id']); } if ($data['bookinfoid'] != '') { $b = new Books(['Settings' => $page->settings]); $boo = $b->getBookInfo($data['bookinfoid']); } $rf = new ReleaseFiles($page->settings); $releasefiles = $rf->get($data['id']);
<?php require_once "config.php"; require_once WWW_DIR . "/lib/adminpage.php"; require_once WWW_DIR . "/lib/music.php"; require_once WWW_DIR . "/lib/genres.php"; $page = new AdminPage(); $music = new Music(); $gen = new Genres(); $id = 0; // set the current action $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; if (isset($_REQUEST["id"])) { $id = $_REQUEST["id"]; $mus = $music->getMusicInfo($id); if (!$mus) { $page->show404(); } switch ($action) { case 'submit': $coverLoc = WWW_DIR . "covers/music/" . $id . '.jpg'; if ($_FILES['cover']['size'] > 0) { $tmpName = $_FILES['cover']['tmp_name']; $file_info = getimagesize($tmpName); if (!empty($file_info)) { move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc); } } $_POST['cover'] = file_exists($coverLoc) ? 1 : 0; $_POST['salesrank'] = empty($_POST['salesrank']) || !ctype_digit($_POST['salesrank']) ? "null" : $_POST['salesrank']; $_POST['releasedate'] = empty($_POST['releasedate']) || !strtotime($_POST['releasedate']) ? $mus['releasedate'] : date("Y-m-d H:i:s", strtotime($_POST['releasedate']));
if (isset($_POST['from']) && !empty($_POST['from'])) { header("Location:" . $_POST['from']); exit; } header("Location:" . WWW_TOP . "/release-list.php"); break; case 'view': default: if (isset($_GET["id"])) { $page->title = "Release Edit"; $id = $_GET["id"]; $release = $releases->getByID($id); if ($release && $release["imdbid"] != "") { $movie = new Movie(); $mov = $movie->getMovieInfo($release['imdbid']); $page->smarty->assign('updatename', $mov["title"]); } if ($release && $release["musicinfoid"] != "") { $music = new Music(); $mus = $music->getMusicInfo($release['musicinfoid']); $page->smarty->assign('updatename', $mus["artist"] . " - " . $mus["title"] . ($mus["year"] != "" ? " - " . $mus["year"] : "")); } $page->smarty->assign('release', $release); } break; } $page->smarty->assign('yesno_ids', array(1, 0)); $page->smarty->assign('yesno_names', array('Yes', 'No')); $page->smarty->assign('catlist', $category->getForSelect(false)); $page->content = $page->smarty->fetch('release-edit.tpl'); $page->render();