@@ -4,15 +4,16 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | $music = new Music; |
| 6 | 6 | |
| 7 | -if (!$page->users->isLoggedIn()) |
|
| 7 | +if (!$page->users->isLoggedIn()) { |
|
| 8 | 8 | $page->show403(); |
| 9 | +} |
|
| 9 | 10 | |
| 10 | -if (isset($_GET["id"]) && ctype_digit($_GET["id"])) |
|
| 11 | -{ |
|
| 11 | +if (isset($_GET["id"]) && ctype_digit($_GET["id"])) { |
|
| 12 | 12 | $mus = $music->getMusicInfo($_GET['id']); |
| 13 | 13 | |
| 14 | - if (!$mus) |
|
| 15 | - $page->show404(); |
|
| 14 | + if (!$mus) { |
|
| 15 | + $page->show404(); |
|
| 16 | + } |
|
| 16 | 17 | |
| 17 | 18 | $page->smarty->assign('music', $mus); |
| 18 | 19 | |
@@ -23,17 +24,17 @@ discard block |
||
| 23 | 24 | $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes'); |
| 24 | 25 | |
| 25 | 26 | $modal = false; |
| 26 | - if (isset($_GET['modal'])) |
|
| 27 | - { |
|
| 27 | + if (isset($_GET['modal'])) { |
|
| 28 | 28 | $modal = true; |
| 29 | 29 | $page->smarty->assign('modal', true); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $page->content = $page->smarty->fetch('viewmusic.tpl'); |
| 33 | 33 | |
| 34 | - if ($modal) |
|
| 35 | - echo $page->content; |
|
| 36 | - else |
|
| 37 | - $page->render(); |
|
| 38 | -} |
|
| 34 | + if ($modal) { |
|
| 35 | + echo $page->content; |
|
| 36 | + } else { |
|
| 37 | + $page->render(); |
|
| 38 | + } |
|
| 39 | + } |
|
| 39 | 40 | |
@@ -5,14 +5,16 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | $releases = new Releases; |
| 7 | 7 | |
| 8 | -if (!$page->users->isLoggedIn()) |
|
| 8 | +if (!$page->users->isLoggedIn()) { |
|
| 9 | 9 | $page->show403(); |
| 10 | +} |
|
| 10 | 11 | |
| 11 | 12 | if (isset($_GET["id"])) { |
| 12 | 13 | $rel = $releases->getByGuid($_GET["id"]); |
| 13 | 14 | |
| 14 | - if (!$rel) |
|
| 15 | - $page->show404(); |
|
| 15 | + if (!$rel) { |
|
| 16 | + $page->show404(); |
|
| 17 | + } |
|
| 16 | 18 | |
| 17 | 19 | $nfo = $releases->getReleaseNfo($rel['id']); |
| 18 | 20 | $nfo['nfoUTF'] = Utility::cp437toUTF($nfo['nfo']); |
@@ -33,8 +35,9 @@ discard block |
||
| 33 | 35 | |
| 34 | 36 | $page->content = $page->smarty->fetch('viewnfo.tpl'); |
| 35 | 37 | |
| 36 | - if ($modal) |
|
| 37 | - echo $page->content; |
|
| 38 | - else |
|
| 39 | - $page->render(); |
|
| 40 | -} |
|
| 38 | + if ($modal) { |
|
| 39 | + echo $page->content; |
|
| 40 | + } else { |
|
| 41 | + $page->render(); |
|
| 42 | + } |
|
| 43 | + } |
|
@@ -4,8 +4,9 @@ discard block |
||
| 4 | 4 | use nntmux\SABnzbd; |
| 5 | 5 | use nntmux\NZBGet; |
| 6 | 6 | |
| 7 | -if (!$page->users->isLoggedIn()) |
|
| 7 | +if (!$page->users->isLoggedIn()) { |
|
| 8 | 8 | $page->show403(); |
| 9 | +} |
|
| 9 | 10 | |
| 10 | 11 | $rc = new ReleaseComments; |
| 11 | 12 | $sab = new SABnzbd($page); |
@@ -38,8 +39,9 @@ discard block |
||
| 38 | 39 | $page->smarty->assign('downloadlist',$downloadlist); |
| 39 | 40 | |
| 40 | 41 | $data = $page->users->getById($userID); |
| 41 | -if (!$data) |
|
| 42 | +if (!$data) { |
|
| 42 | 43 | $page->show404(); |
| 44 | +} |
|
| 43 | 45 | |
| 44 | 46 | // Check if the user selected a theme. |
| 45 | 47 | if (!isset($data['style']) || $data['style'] == 'None') { |
@@ -3,15 +3,17 @@ |
||
| 3 | 3 | |
| 4 | 4 | $forum = new Forum; |
| 5 | 5 | |
| 6 | -if (!$page->users->isLoggedIn()) |
|
| 6 | +if (!$page->users->isLoggedIn()) { |
|
| 7 | 7 | $page->show403(); |
| 8 | +} |
|
| 8 | 9 | |
| 9 | -if ($page->isPostBack()) |
|
| 10 | -{ |
|
| 11 | - if (!isset($_POST["addSubject"]) || empty($_POST["addSubject"])) |
|
| 12 | - $page->show403(); |
|
| 13 | - if (!isset($_POST["addMessage"]) || empty($_POST["addMessage"])) |
|
| 14 | - $page->show403(); |
|
| 10 | +if ($page->isPostBack()) { |
|
| 11 | + if (!isset($_POST["addSubject"]) || empty($_POST["addSubject"])) { |
|
| 12 | + $page->show403(); |
|
| 13 | + } |
|
| 14 | + if (!isset($_POST["addMessage"]) || empty($_POST["addMessage"])) { |
|
| 15 | + $page->show403(); |
|
| 16 | + } |
|
| 15 | 17 | |
| 16 | 18 | $forum->add(0, $page->users->currentUserId(), $_POST["addSubject"], $_POST["addMessage"]); |
| 17 | 19 | header("Location:".WWW_TOP."/forum"); |
@@ -6,19 +6,21 @@ discard block |
||
| 6 | 6 | $releases = new Releases; |
| 7 | 7 | $nzb = new NZB; |
| 8 | 8 | |
| 9 | -if (!$page->users->isLoggedIn()) |
|
| 9 | +if (!$page->users->isLoggedIn()) { |
|
| 10 | 10 | $page->show403(); |
| 11 | +} |
|
| 11 | 12 | |
| 12 | -if (isset($_GET["id"])) |
|
| 13 | -{ |
|
| 13 | +if (isset($_GET["id"])) { |
|
| 14 | 14 | $rel = $releases->getByGuid($_GET["id"]); |
| 15 | - if (!$rel) |
|
| 16 | - $page->show404(); |
|
| 15 | + if (!$rel) { |
|
| 16 | + $page->show404(); |
|
| 17 | + } |
|
| 17 | 18 | |
| 18 | 19 | $nzbpath = $nzb->NZBPath($_GET["id"]); |
| 19 | 20 | |
| 20 | - if (!file_exists($nzbpath)) |
|
| 21 | - $page->show404(); |
|
| 21 | + if (!file_exists($nzbpath)) { |
|
| 22 | + $page->show404(); |
|
| 23 | + } |
|
| 22 | 24 | |
| 23 | 25 | ob_start(); |
| 24 | 26 | @readgzfile($nzbpath); |
@@ -36,17 +38,17 @@ discard block |
||
| 36 | 38 | $page->meta_description = "View Nzb File List"; |
| 37 | 39 | |
| 38 | 40 | $modal = false; |
| 39 | - if (isset($_GET['modal'])) |
|
| 40 | - { |
|
| 41 | + if (isset($_GET['modal'])) { |
|
| 41 | 42 | $modal = true; |
| 42 | 43 | $page->smarty->assign('modal', true); |
| 43 | 44 | } |
| 44 | 45 | |
| 45 | 46 | $page->content = $page->smarty->fetch('viewfilelist.tpl'); |
| 46 | 47 | |
| 47 | - if ($modal) |
|
| 48 | - echo $page->content; |
|
| 49 | - else |
|
| 50 | - $page->render(); |
|
| 51 | -} |
|
| 48 | + if ($modal) { |
|
| 49 | + echo $page->content; |
|
| 50 | + } else { |
|
| 51 | + $page->render(); |
|
| 52 | + } |
|
| 53 | + } |
|
| 52 | 54 | |
@@ -1,18 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (!$page->users->isLoggedIn()) |
|
| 3 | +if (!$page->users->isLoggedIn()) { |
|
| 4 | 4 | $page->show403(); |
| 5 | +} |
|
| 5 | 6 | use nntmux\NZBVortex; |
| 6 | 7 | |
| 7 | -try |
|
| 8 | -{ |
|
| 9 | - if (isset($_GET['isAjax'])) |
|
| 10 | - { |
|
| 8 | +try { |
|
| 9 | + if (isset($_GET['isAjax'])) { |
|
| 11 | 10 | $vortex = new NZBVortex; |
| 12 | 11 | |
| 13 | 12 | // I guess we Ajax this way. |
| 14 | - if (isset($_GET['getOverview'])) |
|
| 15 | - { |
|
| 13 | + if (isset($_GET['getOverview'])) { |
|
| 16 | 14 | $overview = $vortex->getOverview(); |
| 17 | 15 | $page->smarty->assign('overview', $overview); |
| 18 | 16 | $content = $page->smarty->fetch('nzbvortex-ajax.tpl'); |
@@ -20,65 +18,54 @@ discard block |
||
| 20 | 18 | exit; |
| 21 | 19 | } |
| 22 | 20 | |
| 23 | - if (isset($_GET['addQueue'])) |
|
| 24 | - { |
|
| 21 | + if (isset($_GET['addQueue'])) { |
|
| 25 | 22 | $nzb = $_GET['addQueue']; |
| 26 | 23 | $vortex->addQueue($nzb); |
| 27 | 24 | exit; |
| 28 | 25 | } |
| 29 | 26 | |
| 30 | - if (isset($_GET['resume'])) |
|
| 31 | - { |
|
| 27 | + if (isset($_GET['resume'])) { |
|
| 32 | 28 | $vortex->resume((int)$_GET['resume']); |
| 33 | 29 | exit; |
| 34 | 30 | } |
| 35 | 31 | |
| 36 | - if (isset($_GET['pause'])) |
|
| 37 | - { |
|
| 32 | + if (isset($_GET['pause'])) { |
|
| 38 | 33 | $vortex->pause((int)$_GET['pause']); |
| 39 | 34 | exit; |
| 40 | 35 | } |
| 41 | 36 | |
| 42 | - if (isset($_GET['moveup'])) |
|
| 43 | - { |
|
| 37 | + if (isset($_GET['moveup'])) { |
|
| 44 | 38 | $vortex->moveUp((int)$_GET['moveup']); |
| 45 | 39 | exit; |
| 46 | 40 | } |
| 47 | 41 | |
| 48 | - if (isset($_GET['movedown'])) |
|
| 49 | - { |
|
| 42 | + if (isset($_GET['movedown'])) { |
|
| 50 | 43 | $vortex->moveDown((int)$_GET['movedown']); |
| 51 | 44 | exit; |
| 52 | 45 | } |
| 53 | 46 | |
| 54 | - if (isset($_GET['movetop'])) |
|
| 55 | - { |
|
| 47 | + if (isset($_GET['movetop'])) { |
|
| 56 | 48 | $vortex->moveTop((int)$_GET['movetop']); |
| 57 | 49 | exit; |
| 58 | 50 | } |
| 59 | 51 | |
| 60 | - if (isset($_GET['movebottom'])) |
|
| 61 | - { |
|
| 52 | + if (isset($_GET['movebottom'])) { |
|
| 62 | 53 | $vortex->moveBottom((int)$_GET['movebottom']); |
| 63 | 54 | exit; |
| 64 | 55 | } |
| 65 | 56 | |
| 66 | - if (isset($_GET['delete'])) |
|
| 67 | - { |
|
| 57 | + if (isset($_GET['delete'])) { |
|
| 68 | 58 | $vortex->delete((int)$_GET['delete']); |
| 69 | 59 | exit; |
| 70 | 60 | } |
| 71 | 61 | |
| 72 | - if (isset($_GET['filelist'])) |
|
| 73 | - { |
|
| 62 | + if (isset($_GET['filelist'])) { |
|
| 74 | 63 | $response = $vortex->getFilelist((int)$_GET['filelist']); |
| 75 | 64 | echo json_encode($response); |
| 76 | 65 | exit; |
| 77 | 66 | } |
| 78 | 67 | } |
| 79 | -} |
|
| 80 | -catch (Exception $e) |
|
| 81 | -{ |
|
| 68 | +} catch (Exception $e) { |
|
| 82 | 69 | header('HTTP/1.1 500 Internal Server Error'); |
| 83 | 70 | printf($e->getMessage()); |
| 84 | 71 | exit; |
@@ -1,16 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (!$page->users->isLoggedIn()) |
|
| 3 | +if (!$page->users->isLoggedIn()) { |
|
| 4 | 4 | $page->show403(); |
| 5 | +} |
|
| 5 | 6 | |
| 6 | 7 | use nntmux\Console; |
| 7 | 8 | |
| 8 | -if (isset($_GET["id"]) && ctype_digit($_GET["id"])) |
|
| 9 | -{ |
|
| 9 | +if (isset($_GET["id"]) && ctype_digit($_GET["id"])) { |
|
| 10 | 10 | $console = new Console(['Settings' => $page->settings]); |
| 11 | 11 | $con = $console->getConsoleInfo($_GET['id']); |
| 12 | - if (!$con) |
|
| 13 | - $page->show404(); |
|
| 12 | + if (!$con) { |
|
| 13 | + $page->show404(); |
|
| 14 | + } |
|
| 14 | 15 | |
| 15 | 16 | $page->smarty->assign('console', $con); |
| 16 | 17 | |
@@ -21,16 +22,16 @@ discard block |
||
| 21 | 22 | $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes'); |
| 22 | 23 | |
| 23 | 24 | $modal = false; |
| 24 | - if (isset($_GET['modal'])) |
|
| 25 | - { |
|
| 25 | + if (isset($_GET['modal'])) { |
|
| 26 | 26 | $modal = true; |
| 27 | 27 | $page->smarty->assign('modal', true); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $page->content = $page->smarty->fetch('viewconsole.tpl'); |
| 31 | 31 | |
| 32 | - if ($modal) |
|
| 33 | - echo $page->content; |
|
| 34 | - else |
|
| 35 | - $page->render(); |
|
| 36 | -} |
|
| 32 | + if ($modal) { |
|
| 33 | + echo $page->content; |
|
| 34 | + } else { |
|
| 35 | + $page->render(); |
|
| 36 | + } |
|
| 37 | + } |
|
@@ -4,15 +4,16 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | $movie = new Movie; |
| 6 | 6 | |
| 7 | -if (!$page->users->isLoggedIn()) |
|
| 7 | +if (!$page->users->isLoggedIn()) { |
|
| 8 | 8 | $page->show403(); |
| 9 | +} |
|
| 9 | 10 | |
| 10 | -if (isset($_GET["id"]) && ctype_digit($_GET["id"])) |
|
| 11 | -{ |
|
| 11 | +if (isset($_GET["id"]) && ctype_digit($_GET["id"])) { |
|
| 12 | 12 | $mov = $movie->getMovieInfo($_GET['id']); |
| 13 | 13 | |
| 14 | - if (!$mov) |
|
| 15 | - $page->show404(); |
|
| 14 | + if (!$mov) { |
|
| 15 | + $page->show404(); |
|
| 16 | + } |
|
| 16 | 17 | |
| 17 | 18 | $page->smarty->assign('movie', $mov); |
| 18 | 19 | |
@@ -23,17 +24,17 @@ discard block |
||
| 23 | 24 | $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes'); |
| 24 | 25 | |
| 25 | 26 | $modal = false; |
| 26 | - if (isset($_GET['modal'])) |
|
| 27 | - { |
|
| 27 | + if (isset($_GET['modal'])) { |
|
| 28 | 28 | $modal = true; |
| 29 | 29 | $page->smarty->assign('modal', true); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $page->content = $page->smarty->fetch('viewmovietrailer.tpl'); |
| 33 | 33 | |
| 34 | - if ($modal) |
|
| 35 | - echo $page->content; |
|
| 36 | - else |
|
| 37 | - $page->render(); |
|
| 38 | -} |
|
| 34 | + if ($modal) { |
|
| 35 | + echo $page->content; |
|
| 36 | + } else { |
|
| 37 | + $page->render(); |
|
| 38 | + } |
|
| 39 | + } |
|
| 39 | 40 | |
@@ -5,12 +5,14 @@ |
||
| 5 | 5 | |
| 6 | 6 | $releases = new Releases(['Settings' => $page->settings]); |
| 7 | 7 | |
| 8 | -if (!$page->users->isLoggedIn()) |
|
| 8 | +if (!$page->users->isLoggedIn()) { |
|
| 9 | 9 | $page->show403(); |
| 10 | +} |
|
| 10 | 11 | |
| 11 | 12 | $category = -1; |
| 12 | -if (isset($_REQUEST["t"]) && ctype_digit($_REQUEST["t"])) |
|
| 13 | +if (isset($_REQUEST["t"]) && ctype_digit($_REQUEST["t"])) { |
|
| 13 | 14 | $category = $_REQUEST["t"]; |
| 15 | +} |
|
| 14 | 16 | |
| 15 | 17 | $grp = -1; |
| 16 | 18 | if (isset($_REQUEST["g"])) { |