@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | $page->smarty->assign('console', $con); |
16 | 16 | |
17 | - $page->title = "Info for ".$con['title']; |
|
17 | + $page->title = "Info for " . $con['title']; |
|
18 | 18 | $page->meta_title = ""; |
19 | 19 | $page->meta_keywords = ""; |
20 | 20 | $page->meta_description = ""; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | $page->smarty->assign('movie', $mov); |
18 | 18 | |
19 | - $page->title = "Info for ".$mov['title']; |
|
19 | + $page->title = "Info for " . $mov['title']; |
|
20 | 20 | $page->meta_title = ""; |
21 | 21 | $page->meta_keywords = ""; |
22 | 22 | $page->meta_description = ""; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $captcha = new Captcha($page); |
13 | 13 | $email = $sent = $confirmed = ''; |
14 | 14 | |
15 | -switch($action) { |
|
15 | +switch ($action) { |
|
16 | 16 | case "reset": |
17 | 17 | if (!isset($_REQUEST['guid'])) { |
18 | 18 | $page->smarty->assign('error', "No reset code provided."); |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | $to = $ret["email"]; |
35 | 35 | $subject = $page->settings->getSetting('title') . " Password Reset"; |
36 | 36 | $contents = "Your password has been reset to " . $newpass; |
37 | - $onscreen = "Your password has been reset to <strong>" . $newpass ."</strong> and sent to your e-mail address."; |
|
37 | + $onscreen = "Your password has been reset to <strong>" . $newpass . "</strong> and sent to your e-mail address."; |
|
38 | 38 | Utility::sendEmail($to, $subject, $contents, $page->settings->getSetting('email')); |
39 | - $page->smarty->assign('notice', $onscreen); |
|
39 | + $page->smarty->assign('notice', $onscreen); |
|
40 | 40 | $confirmed = "true"; |
41 | 41 | break; |
42 | 42 | } |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | |
32 | 32 | $browsecount = $results[0]['_totalcount']; |
33 | 33 | |
34 | -$page->smarty->assign('pagertotalitems',$browsecount); |
|
35 | -$page->smarty->assign('pageroffset',$offset); |
|
36 | -$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
|
34 | +$page->smarty->assign('pagertotalitems', $browsecount); |
|
35 | +$page->smarty->assign('pageroffset', $offset); |
|
36 | +$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE); |
|
37 | 37 | $page->smarty->assign('pagerquerybase', WWW_TOP . "/browse?t=" . $category . "&g=" . $grp . "&ob=" . $orderby . "&offset="); |
38 | 38 | $page->smarty->assign('pagerquerysuffix', "#results"); |
39 | 39 | |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | foreach ($ordering as $ordertype) { |
76 | 76 | $page->smarty->assign('orderby' . $ordertype, WWW_TOP . "/browse?t=" . $category . "&g=" . $grp . "&ob=" . $ordertype . "&offset=0"); |
77 | 77 | } |
78 | -$page->smarty->assign('lastvisit',$page->userdata['lastlogin']); |
|
78 | +$page->smarty->assign('lastvisit', $page->userdata['lastlogin']); |
|
79 | 79 | |
80 | -$page->smarty->assign('results',$results); |
|
80 | +$page->smarty->assign('results', $results); |
|
81 | 81 | |
82 | 82 | $page->meta_title = "Browse Nzbs"; |
83 | 83 | $page->meta_keywords = "browse,nzb,description,details"; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | $moviecats = $cat->getChildren(Category::MOVIE_ROOT); |
17 | 17 | $mtmp = []; |
18 | -foreach($moviecats as $mcat) { |
|
18 | +foreach ($moviecats as $mcat) { |
|
19 | 19 | $mtmp[$mcat['id']] = $mcat; |
20 | 20 | } |
21 | 21 | |
@@ -72,18 +72,18 @@ discard block |
||
72 | 72 | $page->smarty->assign('genres', $genres); |
73 | 73 | $page->smarty->assign('genre', $genre); |
74 | 74 | |
75 | -$years = range(1903, (date("Y")+1)); |
|
75 | +$years = range(1903, (date("Y") + 1)); |
|
76 | 76 | rsort($years); |
77 | 77 | $year = (isset($_REQUEST['year']) && in_array($_REQUEST['year'], $years)) ? $_REQUEST['year'] : ''; |
78 | 78 | $page->smarty->assign('years', $years); |
79 | 79 | $page->smarty->assign('year', $year); |
80 | 80 | |
81 | -$browseby_link = '&title='.$title.'&actors='.$actors.'&director='.$director.'&rating='.$rating.'&genre='.$genre.'&year='.$year; |
|
81 | +$browseby_link = '&title=' . $title . '&actors=' . $actors . '&director=' . $director . '&rating=' . $rating . '&genre=' . $genre . '&year=' . $year; |
|
82 | 82 | |
83 | 83 | $page->smarty->assign('pagertotalitems', isset($results[0]['_totalcount']) ? $results[0]['_totalcount'] : 0); |
84 | -$page->smarty->assign('pageroffset',$offset); |
|
85 | -$page->smarty->assign('pageritemsperpage',ITEMS_PER_COVER_PAGE); |
|
86 | -$page->smarty->assign('pagerquerybase', WWW_TOP."/movies?t=".$category.$browseby_link."&ob=".$orderby."&offset="); |
|
84 | +$page->smarty->assign('pageroffset', $offset); |
|
85 | +$page->smarty->assign('pageritemsperpage', ITEMS_PER_COVER_PAGE); |
|
86 | +$page->smarty->assign('pagerquerybase', WWW_TOP . "/movies?t=" . $category . $browseby_link . "&ob=" . $orderby . "&offset="); |
|
87 | 87 | $page->smarty->assign('pagerquerysuffix', "#results"); |
88 | 88 | |
89 | 89 | $pager = $page->smarty->fetch("pager.tpl"); |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
104 | -foreach($ordering as $ordertype) { |
|
104 | +foreach ($ordering as $ordertype) { |
|
105 | 105 | $page->smarty->assign('orderby' . $ordertype, WWW_TOP . "/movies?t=" . $category . $browseby_link . "&ob=" . $ordertype . "&offset=0"); |
106 | 106 | } |
107 | 107 | |
108 | -$page->smarty->assign('results',$movies); |
|
108 | +$page->smarty->assign('results', $movies); |
|
109 | 109 | |
110 | 110 | $page->meta_title = "Browse Nzbs"; |
111 | 111 | $page->meta_keywords = "browse,nzb,description,details"; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $arPages[] = buildURL("Home", "Home Page", "/", 'daily', '1.0'); |
11 | 11 | |
12 | 12 | |
13 | -$role=0; |
|
13 | +$role = 0; |
|
14 | 14 | if ($page->userdata != null) |
15 | 15 | $role = $page->userdata["role"]; |
16 | 16 | |
@@ -18,19 +18,19 @@ discard block |
||
18 | 18 | // useful links |
19 | 19 | // |
20 | 20 | $contents = new Contents(); |
21 | -$contentlist = $contents->getForMenuByTypeAndRole(Contents::TYPEUSEFUL, $role); |
|
21 | +$contentlist = $contents->getForMenuByTypeAndRole(Contents::TYPEUSEFUL, $role); |
|
22 | 22 | foreach ($contentlist as $content) |
23 | 23 | { |
24 | - $arPages[] = buildURL("Useful Links", $content["title"], '/content/'.$content["id"].$content["url"], 'monthly', '0.50'); |
|
24 | + $arPages[] = buildURL("Useful Links", $content["title"], '/content/' . $content["id"] . $content["url"], 'monthly', '0.50'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | // |
28 | 28 | // articles |
29 | 29 | // |
30 | -$contentlist = $contents->getForMenuByTypeAndRole(Contents::TYPEARTICLE, $role); |
|
30 | +$contentlist = $contents->getForMenuByTypeAndRole(Contents::TYPEARTICLE, $role); |
|
31 | 31 | foreach ($contentlist as $content) |
32 | 32 | { |
33 | - $arPages[] = buildURL("Articles", $content["title"], '/content/'.$content["id"].$content["url"], 'monthly', '0.50'); |
|
33 | + $arPages[] = buildURL("Articles", $content["title"], '/content/' . $content["id"] . $content["url"], 'monthly', '0.50'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | // |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | } |
77 | 77 | else |
78 | 78 | { |
79 | - $page->title = $page->settings->getSetting('title'). " site map"; |
|
80 | - $page->meta_title = $page->settings->getSetting('title'). " site map"; |
|
79 | + $page->title = $page->settings->getSetting('title') . " site map"; |
|
80 | + $page->meta_title = $page->settings->getSetting('title') . " site map"; |
|
81 | 81 | $page->meta_keywords = "sitemap,site,map"; |
82 | - $page->meta_description = $page->settings->getSetting('title')." site map shows all our pages."; |
|
82 | + $page->meta_description = $page->settings->getSetting('title') . " site map shows all our pages."; |
|
83 | 83 | $page->content = $page->smarty->fetch('sitemap.tpl'); |
84 | 84 | $page->render(); |
85 | 85 | } |
86 | 86 | |
87 | -function buildURL($type, $name, $url, $freq='daily', $p='1.0') |
|
87 | +function buildURL($type, $name, $url, $freq = 'daily', $p = '1.0') |
|
88 | 88 | { |
89 | 89 | $s = new Sitemap($type, $name, $url, $freq, $p); |
90 | 90 | return $s; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | // |
205 | 205 | public function addToHead($headcontent) |
206 | 206 | { |
207 | - $this->head = $this->head."\n".$headcontent; |
|
207 | + $this->head = $this->head . "\n" . $headcontent; |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | // |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | // |
213 | 213 | public function addToBody($attr) |
214 | 214 | { |
215 | - $this->body = $this->body." ".$attr; |
|
215 | + $this->body = $this->body . " " . $attr; |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
@@ -287,11 +287,11 @@ discard block |
||
287 | 287 | ); |
288 | 288 | } |
289 | 289 | |
290 | - public function show429($retry='') |
|
290 | + public function show429($retry = '') |
|
291 | 291 | { |
292 | 292 | header('HTTP/1.1 429 Too Many Requests'); |
293 | 293 | if ($retry != '') |
294 | - header('Retry-After: '.$retry); |
|
294 | + header('Retry-After: ' . $retry); |
|
295 | 295 | |
296 | 296 | echo " |
297 | 297 | <html> |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | <body> |
303 | 303 | <h1>Too Many Requests</h1> |
304 | 304 | |
305 | - <p>Wait ".(($retry != '') ? ceil($retry/60).' minutes ' : '')."or risk being temporarily banned.</p> |
|
305 | + <p>Wait ".(($retry != '') ? ceil($retry / 60) . ' minutes ' : '') . "or risk being temporarily banned.</p> |
|
306 | 306 | |
307 | 307 | </body> |
308 | 308 | </html>"; |
@@ -341,8 +341,8 @@ discard block |
||
341 | 341 | $this->users->updateSiteAccessed($this->userdata['id']); |
342 | 342 | } |
343 | 343 | |
344 | - $this->smarty->assign('userdata',$this->userdata); |
|
345 | - $this->smarty->assign('loggedin',"true"); |
|
344 | + $this->smarty->assign('userdata', $this->userdata); |
|
345 | + $this->smarty->assign('loggedin', "true"); |
|
346 | 346 | |
347 | 347 | if ($this->userdata['nzbvortex_api_key'] != '' && $this->userdata['nzbvortex_server_url'] != '') { |
348 | 348 | $this->smarty->assign('weHasVortex', true); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; |
9 | 9 | $id = (isset($_REQUEST['id'])) ? $_REQUEST['id'] : ''; |
10 | 10 | |
11 | -switch($action) |
|
11 | +switch ($action) |
|
12 | 12 | { |
13 | 13 | case 'grabs': |
14 | 14 | $u->delDownloadRequests($id); |
@@ -17,6 +17,6 @@ |
||
17 | 17 | //print "<h3 class=\"tooltiphead\">rar archive contains...</h3>\n"; |
18 | 18 | print "<ul>\n"; |
19 | 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 | + print "<li>" . htmlentities($f["name"], ENT_QUOTES) . " " . ($f["passworded"] == 1 ? "<img width=\"12\" src=\"" . WWW_TOP . "/themes/shared/images/icons/lock.gif\" />" : "") . "</li>\n"; |
|
21 | 21 | print "</ul>"; |
22 | 22 | } |