@@ -290,8 +290,9 @@ discard block |
||
| 290 | 290 | public function show429($retry='') |
| 291 | 291 | { |
| 292 | 292 | header('HTTP/1.1 429 Too Many Requests'); |
| 293 | - if ($retry != '') |
|
| 294 | - header('Retry-After: '.$retry); |
|
| 293 | + if ($retry != '') { |
|
| 294 | + header('Retry-After: '.$retry); |
|
| 295 | + } |
|
| 295 | 296 | |
| 296 | 297 | echo " |
| 297 | 298 | <html> |
@@ -363,8 +364,7 @@ discard block |
||
| 363 | 364 | $this->smarty->assign('ismod', 'true'); |
| 364 | 365 | } |
| 365 | 366 | |
| 366 | - if ($this->userdata["hideads"] == "1") |
|
| 367 | - { |
|
| 367 | + if ($this->userdata["hideads"] == "1") { |
|
| 368 | 368 | $this->settings->setSetting(['adheader', '']); |
| 369 | 369 | $this->settings->setSetting(['adbrowse', '']); |
| 370 | 370 | $this->settings->setSetting(['addetail', '']); |
@@ -2,22 +2,27 @@ |
||
| 2 | 2 | |
| 3 | 3 | use nntmux\NZBGet; |
| 4 | 4 | |
| 5 | -if (!$page->users->isLoggedIn()) |
|
| 5 | +if (!$page->users->isLoggedIn()) { |
|
| 6 | 6 | $page->show403(); |
| 7 | +} |
|
| 7 | 8 | |
| 8 | -if (empty($_GET["id"])) |
|
| 9 | +if (empty($_GET["id"])) { |
|
| 9 | 10 | $page->show404(); |
| 11 | +} |
|
| 10 | 12 | |
| 11 | 13 | $nzbget = new NZBGet($page); |
| 12 | 14 | |
| 13 | -if (empty($nzbget->url)) |
|
| 15 | +if (empty($nzbget->url)) { |
|
| 14 | 16 | $page->show404(); |
| 17 | +} |
|
| 15 | 18 | |
| 16 | -if (empty($nzbget->username)) |
|
| 19 | +if (empty($nzbget->username)) { |
|
| 17 | 20 | $page->show404(); |
| 21 | +} |
|
| 18 | 22 | |
| 19 | -if (empty($nzbget->password)) |
|
| 23 | +if (empty($nzbget->password)) { |
|
| 20 | 24 | $page->show404(); |
| 25 | +} |
|
| 21 | 26 | |
| 22 | 27 | $guid = $_GET["id"]; |
| 23 | 28 | |
@@ -1,22 +1,24 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use nntmux\ReleaseFiles; |
| 3 | 3 | |
| 4 | -if (!$page->users->isLoggedIn()) |
|
| 4 | +if (!$page->users->isLoggedIn()) { |
|
| 5 | 5 | $page->show403(); |
| 6 | +} |
|
| 6 | 7 | |
| 7 | -if (!isset($_REQUEST["id"])) |
|
| 8 | +if (!isset($_REQUEST["id"])) { |
|
| 8 | 9 | $page->show404(); |
| 10 | +} |
|
| 9 | 11 | |
| 10 | 12 | $rf = new ReleaseFiles(); |
| 11 | 13 | $files = $rf->getByGuid($_REQUEST["id"]); |
| 12 | 14 | |
| 13 | -if (count($files) == 0) |
|
| 15 | +if (count($files) == 0) { |
|
| 14 | 16 | print "No files"; |
| 15 | -else |
|
| 16 | -{ |
|
| 17 | +} else { |
|
| 17 | 18 | //print "<h3 class=\"tooltiphead\">rar archive contains...</h3>\n"; |
| 18 | 19 | print "<ul>\n"; |
| 19 | - foreach ($files as $f) |
|
| 20 | - print "<li>".htmlentities($f["name"], ENT_QUOTES)." ".($f["passworded"] == 1?"<img width=\"12\" src=\"".WWW_TOP."/themes/shared/images/icons/lock.gif\" />":"")."</li>\n"; |
|
| 20 | + foreach ($files as $f) { |
|
| 21 | + print "<li>".htmlentities($f["name"], ENT_QUOTES)." ".($f["passworded"] == 1?"<img width=\"12\" src=\"".WWW_TOP."/themes/shared/images/icons/lock.gif\" />":"")."</li>\n"; |
|
| 22 | + } |
|
| 21 | 23 | print "</ul>"; |
| 22 | 24 | } |
@@ -3,33 +3,33 @@ |
||
| 3 | 3 | use nntmux\Releases; |
| 4 | 4 | use nntmux\Videos; |
| 5 | 5 | |
| 6 | -if (!$page->users->isLoggedIn()) |
|
| 6 | +if (!$page->users->isLoggedIn()) { |
|
| 7 | 7 | $page->show403(); |
| 8 | +} |
|
| 8 | 9 | |
| 9 | -if (!isset($_REQUEST["id"])) |
|
| 10 | +if (!isset($_REQUEST["id"])) { |
|
| 10 | 11 | $page->show404(); |
| 12 | +} |
|
| 11 | 13 | |
| 12 | 14 | $r = new Releases(); |
| 13 | 15 | $rel = $r->getByGuid($_REQUEST["id"]); |
| 14 | 16 | |
| 15 | -if (!$rel) |
|
| 17 | +if (!$rel) { |
|
| 16 | 18 | print "No tv info"; |
| 17 | -else |
|
| 18 | -{ |
|
| 19 | +} else { |
|
| 19 | 20 | |
| 20 | 21 | print "<ul class=\"ui-tooltip-nntmux\">\n"; |
| 21 | 22 | print "<li>".htmlentities($rel["title"], ENT_QUOTES)."</li>\n"; |
| 22 | 23 | print "<li>Aired on ".date("F j, Y", strtotime($rel["firstaired"]))."</li>\n"; |
| 23 | 24 | print "</ul>"; |
| 24 | 25 | |
| 25 | - if (isset($rel["videos_id"]) && $rel["videos_id"] > 0) |
|
| 26 | - { |
|
| 26 | + if (isset($rel["videos_id"]) && $rel["videos_id"] > 0) { |
|
| 27 | 27 | $t = new Videos(); |
| 28 | 28 | $show = $t->getByVideoID($rel["videos_id"]); |
| 29 | - if (count($show) > 0) |
|
| 30 | - { |
|
| 31 | - if ($show["image"] != "0") |
|
| 32 | - print "<img class=\"shadow\" src=\"/covers/tvshows/" . $show["id"] . ".jpg\" width=\"180\"/>"; |
|
| 29 | + if (count($show) > 0) { |
|
| 30 | + if ($show["image"] != "0") { |
|
| 31 | + print "<img class=\"shadow\" src=\"/covers/tvshows/" . $show["id"] . ".jpg\" width=\"180\"/>"; |
|
| 32 | + } |
|
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | } |
@@ -26,14 +26,11 @@ |
||
| 26 | 26 | $page->meta_description = ""; |
| 27 | 27 | $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes'); |
| 28 | 28 | |
| 29 | - if (isset($_GET['modal'])) |
|
| 30 | - { |
|
| 29 | + if (isset($_GET['modal'])) { |
|
| 31 | 30 | $page->content = $page->smarty->fetch('viewxxx.tpl'); |
| 32 | 31 | $page->smarty->assign('modal', true); |
| 33 | 32 | echo $page->content; |
| 34 | - } |
|
| 35 | - else |
|
| 36 | - { |
|
| 33 | + } else { |
|
| 37 | 34 | $page->content = $page->smarty->fetch('viewxxxfull.tpl'); |
| 38 | 35 | $page->render(); |
| 39 | 36 | } |
@@ -16,11 +16,11 @@ discard block |
||
| 16 | 16 | use nntmux\Books; |
| 17 | 17 | use nntmux\PreDb; |
| 18 | 18 | |
| 19 | -if (!$page->users->isLoggedIn()) |
|
| 19 | +if (!$page->users->isLoggedIn()) { |
|
| 20 | 20 | $page->show403(); |
| 21 | +} |
|
| 21 | 22 | |
| 22 | -if (isset($_GET["id"])) |
|
| 23 | -{ |
|
| 23 | +if (isset($_GET["id"])) { |
|
| 24 | 24 | $releases = new Releases(['Settings' => $page->settings]); |
| 25 | 25 | $rc = new ReleaseComments; |
| 26 | 26 | $re = new ReleaseExtra; |
@@ -30,11 +30,13 @@ discard block |
||
| 30 | 30 | $cpapi = $user['cp_api']; |
| 31 | 31 | $cpurl = $user['cp_url']; |
| 32 | 32 | |
| 33 | - if (!$data) |
|
| 34 | - $page->show404(); |
|
| 33 | + if (!$data) { |
|
| 34 | + $page->show404(); |
|
| 35 | + } |
|
| 35 | 36 | |
| 36 | - if ($page->isPostBack()) |
|
| 37 | - $rc->addComment($data["id"], $data["gid"], $_POST["txtAddComment"], $page->users->currentUserId(), $_SERVER['REMOTE_ADDR']); |
|
| 37 | + if ($page->isPostBack()) { |
|
| 38 | + $rc->addComment($data["id"], $data["gid"], $_POST["txtAddComment"], $page->users->currentUserId(), $_SERVER['REMOTE_ADDR']); |
|
| 39 | + } |
|
| 38 | 40 | |
| 39 | 41 | $nfo = $releases->getReleaseNfo($data["id"], true); |
| 40 | 42 | $reVideo = $re->getVideo($data["id"]); |
@@ -53,8 +55,7 @@ discard block |
||
| 53 | 55 | } |
| 54 | 56 | |
| 55 | 57 | $episodeArray = ''; |
| 56 | - if ($data['episodeinfoid'] > 0) |
|
| 57 | - { |
|
| 58 | + if ($data['episodeinfoid'] > 0) { |
|
| 58 | 59 | $episode = new Episode(); |
| 59 | 60 | $episodeArray = $episode->getEpisodeInfoByID($data['episodeinfoid']); |
| 60 | 61 | } |
@@ -125,8 +126,7 @@ discard block |
||
| 125 | 126 | } |
| 126 | 127 | |
| 127 | 128 | $AniDBAPIArray = ''; |
| 128 | - if ($data["anidbid"] > 0) |
|
| 129 | - { |
|
| 129 | + if ($data["anidbid"] > 0) { |
|
| 130 | 130 | $AniDB = new AniDB(['Settings' => $releases->pdo]); |
| 131 | 131 | $AniDBAPIArray = $AniDB->getAnimeInfo($data["anidbid"]); |
| 132 | 132 | } |
@@ -2,19 +2,23 @@ |
||
| 2 | 2 | |
| 3 | 3 | use nntmux\SABnzbd; |
| 4 | 4 | |
| 5 | -if (!$page->users->isLoggedIn()) |
|
| 5 | +if (!$page->users->isLoggedIn()) { |
|
| 6 | 6 | $page->show403(); |
| 7 | +} |
|
| 7 | 8 | |
| 8 | -if (empty($_GET["id"])) |
|
| 9 | +if (empty($_GET["id"])) { |
|
| 9 | 10 | $page->show404(); |
| 11 | +} |
|
| 10 | 12 | |
| 11 | 13 | $sab = new SABnzbd($page); |
| 12 | 14 | |
| 13 | -if (empty($sab->url)) |
|
| 15 | +if (empty($sab->url)) { |
|
| 14 | 16 | $page->show404(); |
| 17 | +} |
|
| 15 | 18 | |
| 16 | -if (empty($sab->apikey)) |
|
| 19 | +if (empty($sab->apikey)) { |
|
| 17 | 20 | $page->show404(); |
| 21 | +} |
|
| 18 | 22 | |
| 19 | 23 | $guid = $_GET["id"]; |
| 20 | 24 | |
@@ -110,8 +110,7 @@ |
||
| 110 | 110 | { |
| 111 | 111 | $status = opcache_get_status(); |
| 112 | 112 | $config = opcache_get_configuration(); |
| 113 | - $memsize = function($size, $precision = 3, $space = false) |
|
| 114 | - { |
|
| 113 | + $memsize = function($size, $precision = 3, $space = false) { |
|
| 115 | 114 | $i = 0; |
| 116 | 115 | $val = array(' bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); |
| 117 | 116 | while (($size / 1024) > 1) { |
@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | // set the current action |
| 13 | 13 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
| 14 | 14 | |
| 15 | -if (isset($_REQUEST["id"])) |
|
| 16 | -{ |
|
| 15 | +if (isset($_REQUEST["id"])) { |
|
| 17 | 16 | $id = $_REQUEST["id"]; |
| 18 | 17 | $mov = $movie->getMovieInfo($id); |
| 19 | 18 | |
@@ -21,28 +20,23 @@ discard block |
||
| 21 | 20 | $page->show404(); |
| 22 | 21 | } |
| 23 | 22 | |
| 24 | - switch($action) |
|
| 25 | - { |
|
| 23 | + switch($action) { |
|
| 26 | 24 | case 'submit': |
| 27 | 25 | $coverLoc = WWW_DIR."covers/movies/".$id.'-cover.jpg'; |
| 28 | 26 | $backdropLoc = WWW_DIR."covers/movies/".$id.'-backdrop.jpg'; |
| 29 | 27 | |
| 30 | - if($_FILES['cover']['size'] > 0) |
|
| 31 | - { |
|
| 28 | + if($_FILES['cover']['size'] > 0) { |
|
| 32 | 29 | $tmpName = $_FILES['cover']['tmp_name']; |
| 33 | 30 | $file_info = getimagesize($tmpName); |
| 34 | - if(!empty($file_info)) |
|
| 35 | - { |
|
| 31 | + if(!empty($file_info)) { |
|
| 36 | 32 | move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc); |
| 37 | 33 | } |
| 38 | 34 | } |
| 39 | 35 | |
| 40 | - if($_FILES['backdrop']['size'] > 0) |
|
| 41 | - { |
|
| 36 | + if($_FILES['backdrop']['size'] > 0) { |
|
| 42 | 37 | $tmpName = $_FILES['backdrop']['tmp_name']; |
| 43 | 38 | $file_info = getimagesize($tmpName); |
| 44 | - if(!empty($file_info)) |
|
| 45 | - { |
|
| 39 | + if(!empty($file_info)) { |
|
| 46 | 40 | move_uploaded_file($_FILES['backdrop']['tmp_name'], $backdropLoc); |
| 47 | 41 | } |
| 48 | 42 | } |