@@ -34,10 +34,10 @@ |
||
34 | 34 | */ |
35 | 35 | public function render() |
36 | 36 | { |
37 | - $this->smarty->assign('page',$this); |
|
37 | + $this->smarty->assign('page', $this); |
|
38 | 38 | |
39 | 39 | $admin_menu = $this->smarty->fetch('adminmenu.tpl'); |
40 | - $this->smarty->assign('admin_menu',$admin_menu); |
|
40 | + $this->smarty->assign('admin_menu', $admin_menu); |
|
41 | 41 | |
42 | 42 | $this->page_template = "baseadminpage.tpl"; |
43 | 43 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | $queueType = $error = ''; |
17 | 17 | $queue = null; |
18 | -switch($page->settings->getSetting('sabintegrationtype')) { |
|
18 | +switch ($page->settings->getSetting('sabintegrationtype')) { |
|
19 | 19 | case SABnzbd::INTEGRATION_TYPE_NONE: |
20 | 20 | if ($userData['queuetype'] == 2) { |
21 | 21 | $queueType = 'NZBGet'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $queue = new SABnzbd($page); |
28 | 28 | break; |
29 | 29 | case SABnzbd::INTEGRATION_TYPE_USER: |
30 | - switch((int)$userData['queuetype']) { |
|
30 | + switch ((int)$userData['queuetype']) { |
|
31 | 31 | case 1: |
32 | 32 | $queueType = 'Sabnzbd'; |
33 | 33 | $queue = new SABnzbd($page); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $page->smarty->assign(array('queueType' => $queueType, 'error' => $error, 'user', $page->users)); |
85 | 85 | $page->title = "Your $queueType Download Queue"; |
86 | 86 | $page->meta_title = "View $queueType Queue"; |
87 | -$page->meta_keywords = "view," . strtolower($queueType) .",queue"; |
|
87 | +$page->meta_keywords = "view," . strtolower($queueType) . ",queue"; |
|
88 | 88 | $page->meta_description = "View $queueType Queue"; |
89 | 89 | |
90 | 90 | $page->content = $page->smarty->fetch('viewqueue.tpl'); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | $page->smarty->assign('book', $book); |
17 | 17 | |
18 | - $page->title = "Info for ".$book['title']; |
|
18 | + $page->title = "Info for " . $book['title']; |
|
19 | 19 | $page->meta_title = ""; |
20 | 20 | $page->meta_keywords = ""; |
21 | 21 | $page->meta_description = ""; |
@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | $count = 1; |
28 | 28 | |
29 | 29 | $speed = $obj->{'speed'}; |
30 | - $queued = round($obj->{'mbleft'}, 2)."MB / ".round($obj->{'mb'}, 2)."MB"; |
|
30 | + $queued = round($obj->{'mbleft'}, 2) . "MB / " . round($obj->{'mb'}, 2) . "MB"; |
|
31 | 31 | $status = ucwords(strtolower($obj->{'state'})); |
32 | 32 | |
33 | - $output .= "<p><b>Download speed:</b> ".$speed."B/s - <b>Queued:</b> ".$queued." - <b>Status:</b> ".$status."</p>"; |
|
33 | + $output .= "<p><b>Download speed:</b> " . $speed . "B/s - <b>Queued:</b> " . $queued . " - <b>Status:</b> " . $status . "</p>"; |
|
34 | 34 | |
35 | 35 | if (count($queue) > 0) |
36 | 36 | { |
37 | - $output.="<table class=\"data highlight\">"; |
|
38 | - $output.="<tr> |
|
37 | + $output .= "<table class=\"data highlight\">"; |
|
38 | + $output .= "<tr> |
|
39 | 39 | <th></th> |
40 | 40 | <th>Name</th> |
41 | 41 | <th style='width:80px;'>size</th> |
@@ -51,28 +51,28 @@ discard block |
||
51 | 51 | } |
52 | 52 | else |
53 | 53 | { |
54 | - $output.="<tr>"; |
|
55 | - $output.="<td style='text-align:right;'>".$count."</td>"; |
|
56 | - $output.="<td>".htmlspecialchars($item->{'filename'}, ENT_QUOTES)."</td>"; |
|
57 | - $output.="<td style='text-align:right;'>".round($item->{'mb'}, 2)." MB</td>"; |
|
58 | - $output.="<td class='right'>".round($item->{'mbleft'}, 2)." MB</td>"; |
|
59 | - $output.="<td class='right'>".($item->{'mb'}==0?0:round($item->{'mbleft'}/$item->{'mb'}*100))."%</td>"; |
|
60 | - $output.="<td style='text-align:right;'>".$item->{'timeleft'}."</td>"; |
|
61 | - $output.="<td style='text-align:right;'><a onclick=\"return confirm('Are you sure?');\" href='?del=".$item->{'id'}."'>delete</a></td>"; |
|
62 | - $output.="</tr>"; |
|
54 | + $output .= "<tr>"; |
|
55 | + $output .= "<td style='text-align:right;'>" . $count . "</td>"; |
|
56 | + $output .= "<td>" . htmlspecialchars($item->{'filename'}, ENT_QUOTES) . "</td>"; |
|
57 | + $output .= "<td style='text-align:right;'>" . round($item->{'mb'}, 2) . " MB</td>"; |
|
58 | + $output .= "<td class='right'>" . round($item->{'mbleft'}, 2) . " MB</td>"; |
|
59 | + $output .= "<td class='right'>" . ($item->{'mb'} == 0 ? 0 : round($item->{'mbleft'} / $item->{'mb'} * 100)) . "%</td>"; |
|
60 | + $output .= "<td style='text-align:right;'>" . $item->{'timeleft'} . "</td>"; |
|
61 | + $output .= "<td style='text-align:right;'><a onclick=\"return confirm('Are you sure?');\" href='?del=" . $item->{'id'} . "'>delete</a></td>"; |
|
62 | + $output .= "</tr>"; |
|
63 | 63 | $count++; |
64 | 64 | } |
65 | 65 | } |
66 | - $output.="</table>"; |
|
66 | + $output .= "</table>"; |
|
67 | 67 | } |
68 | 68 | else |
69 | 69 | { |
70 | - $output.="<p>The queue is currently empty.</p>"; |
|
70 | + $output .= "<p>The queue is currently empty.</p>"; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | else |
74 | 74 | { |
75 | - $output.="<p>Error retreiving queue.</p>"; |
|
75 | + $output .= "<p>Error retreiving queue.</p>"; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | break; |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | |
89 | 89 | if (count($history) > 0) |
90 | 90 | { |
91 | - $output.="<h2>Download History</h2>"; |
|
92 | - $output.="<table class=\"data highlight\">"; |
|
93 | - $output.="<tr> |
|
91 | + $output .= "<h2>Download History</h2>"; |
|
92 | + $output .= "<table class=\"data highlight\">"; |
|
93 | + $output .= "<tr> |
|
94 | 94 | <th style='width:20px;'></th> |
95 | 95 | <th>Name</th> |
96 | 96 | <th>Category</th> |
@@ -101,18 +101,18 @@ discard block |
||
101 | 101 | </tr>"; |
102 | 102 | foreach ($history as $item) |
103 | 103 | { |
104 | - $output.="<tr>"; |
|
105 | - $output.="<td class='".($item->{'fail_message'} != "" ? "sabhistoryfail" : "sabhistorysuccess")."'></td>"; |
|
106 | - $output.="<td>".htmlspecialchars($item->{'name'}, ENT_QUOTES)."</td>"; |
|
107 | - $output.="<td style='text-align:center;'>".htmlspecialchars($item->{'category'}, ENT_QUOTES)."</td>"; |
|
108 | - $output.="<td title='".htmlspecialchars($item->{'fail_message'}, ENT_QUOTES)."' style='text-align:center;'>".$item->{'status'}."</td>"; |
|
109 | - $output.="<td style='text-align:right;'>".$item->{'size'}."</td>"; |
|
110 | - $output.="<td style='text-align:right;'>".gmdate("H:i:s", $item->{'download_time'})."</td>"; |
|
111 | - $output.="<td style='text-align:right;'>".gmdate("Y-m-d H:i", $item->{'completed'})."</td>"; |
|
112 | - $output.="</tr>\n"; |
|
104 | + $output .= "<tr>"; |
|
105 | + $output .= "<td class='" . ($item->{'fail_message'} != "" ? "sabhistoryfail" : "sabhistorysuccess") . "'></td>"; |
|
106 | + $output .= "<td>" . htmlspecialchars($item->{'name'}, ENT_QUOTES) . "</td>"; |
|
107 | + $output .= "<td style='text-align:center;'>" . htmlspecialchars($item->{'category'}, ENT_QUOTES) . "</td>"; |
|
108 | + $output .= "<td title='" . htmlspecialchars($item->{'fail_message'}, ENT_QUOTES) . "' style='text-align:center;'>" . $item->{'status'} . "</td>"; |
|
109 | + $output .= "<td style='text-align:right;'>" . $item->{'size'} . "</td>"; |
|
110 | + $output .= "<td style='text-align:right;'>" . gmdate("H:i:s", $item->{'download_time'}) . "</td>"; |
|
111 | + $output .= "<td style='text-align:right;'>" . gmdate("Y-m-d H:i", $item->{'completed'}) . "</td>"; |
|
112 | + $output .= "</tr>\n"; |
|
113 | 113 | $count++; |
114 | 114 | } |
115 | - $output.="</table>"; |
|
115 | + $output .= "</table>"; |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | if (is_array($queue) && count($queue) > 0) |
125 | 125 | { |
126 | 126 | $count = 1; |
127 | - $output.="<table class=\"data highlight\">"; |
|
128 | - $output.="<tr> |
|
127 | + $output .= "<table class=\"data highlight\">"; |
|
128 | + $output .= "<tr> |
|
129 | 129 | <th></th> |
130 | 130 | <th>Name</th> |
131 | 131 | <th style='width:80px;'>size</th> |
@@ -136,22 +136,22 @@ discard block |
||
136 | 136 | </tr>"; |
137 | 137 | foreach ($queue as $item) |
138 | 138 | { |
139 | - $output.="<tr>"; |
|
140 | - $output.="<td style='text-align:right;'>".$count."</td>"; |
|
141 | - $output.="<td>".htmlspecialchars($item['NZBNicename'], ENT_QUOTES)."</td>"; |
|
142 | - $output.="<td style='text-align:right;'>".round($item['FileSizeMB'], 2)." MB</td>"; |
|
143 | - $output.="<td class='right'>".round($item['RemainingSizeMB'], 2)." MB</td>"; |
|
144 | - $output.="<td class='right'>".($item['FileSizeMB']==0?0:round($item['RemainingSizeMB']/$item['FileSizeMB']*100))."%</td>"; |
|
145 | - $output.="<td style='text-align:right;'>".$item['RemainingFileCount']."</td>"; |
|
146 | - $output.="<td style='text-align:right;'><a onclick=\"return confirm('Are you sure?');\" href='?nzbgetdel=".$item['NZBID']."'>delete</a></td>"; |
|
147 | - $output.="</tr>"; |
|
139 | + $output .= "<tr>"; |
|
140 | + $output .= "<td style='text-align:right;'>" . $count . "</td>"; |
|
141 | + $output .= "<td>" . htmlspecialchars($item['NZBNicename'], ENT_QUOTES) . "</td>"; |
|
142 | + $output .= "<td style='text-align:right;'>" . round($item['FileSizeMB'], 2) . " MB</td>"; |
|
143 | + $output .= "<td class='right'>" . round($item['RemainingSizeMB'], 2) . " MB</td>"; |
|
144 | + $output .= "<td class='right'>" . ($item['FileSizeMB'] == 0 ? 0 : round($item['RemainingSizeMB'] / $item['FileSizeMB'] * 100)) . "%</td>"; |
|
145 | + $output .= "<td style='text-align:right;'>" . $item['RemainingFileCount'] . "</td>"; |
|
146 | + $output .= "<td style='text-align:right;'><a onclick=\"return confirm('Are you sure?');\" href='?nzbgetdel=" . $item['NZBID'] . "'>delete</a></td>"; |
|
147 | + $output .= "</tr>"; |
|
148 | 148 | $count++; |
149 | 149 | } |
150 | - $output.="</table>"; |
|
150 | + $output .= "</table>"; |
|
151 | 151 | } |
152 | 152 | else |
153 | 153 | { |
154 | - $output.="<p>The queue is currently empty.</p>"; |
|
154 | + $output .= "<p>The queue is currently empty.</p>"; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | break; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | $id = $_REQUEST['id']; |
16 | 16 | //Get info for first guid to populate form |
17 | 17 | $rel = $releases->getByGuid($_REQUEST['id'][0]); |
18 | -} else { |
|
18 | +} else { |
|
19 | 19 | $id = $rel = ''; |
20 | 20 | } |
21 | 21 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | $page->smarty->assign('music', $mus); |
18 | 18 | |
19 | - $page->title = "Info for ".$mus['title']; |
|
19 | + $page->title = "Info for " . $mus['title']; |
|
20 | 20 | $page->meta_title = ""; |
21 | 21 | $page->meta_keywords = ""; |
22 | 22 | $page->meta_description = ""; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | "<td style='text-align:center;'>" . $item['RemainingSizeMB'] . " MB</td>" . |
57 | 57 | "<td style='text-align:center;'>" . ($item['FileSizeMB'] == 0 ? 0 : round(100 - ($item['RemainingSizeMB'] / $item['FileSizeMB']) * 100)) . "%</td>" . |
58 | 58 | "<td style='text-align:center;'>" . ($item['ActiveDownloads'] > 0 ? 'Downloading' : 'Paused') . "</td>" . |
59 | - "<td style='text-align:center;'><a onclick=\"return confirm('Are you sure?');\" href='?del=" . $item['LastID'] . "'>Delete</a></td>" . |
|
59 | + "<td style='text-align:center;'><a onclick=\"return confirm('Are you sure?');\" href='?del=" . $item['LastID'] . "'>Delete</a></td>" . |
|
60 | 60 | "<td style='text-align:center;'><a href='?pause=" . $item['LastID'] . "'>Pause</a></td>" . |
61 | 61 | "<td style='text-align:center;'><a href='?resume=" . $item['LastID'] . "'>Resume</a></td>" . |
62 | 62 | "</tr>"; |
@@ -31,10 +31,10 @@ |
||
31 | 31 | } |
32 | 32 | } |
33 | 33 | $page->smarty->assign('msg', $msg); |
34 | -$page->title = "Contact ".$page->settings->getSetting('title'); |
|
35 | -$page->meta_title = "Contact ".$page->settings->getSetting('title'); |
|
34 | +$page->title = "Contact " . $page->settings->getSetting('title'); |
|
35 | +$page->meta_title = "Contact " . $page->settings->getSetting('title'); |
|
36 | 36 | $page->meta_keywords = "contact us,contact,get in touch,email"; |
37 | -$page->meta_description = "Contact us at ".$page->settings->getSetting('title')." and submit your feedback"; |
|
37 | +$page->meta_description = "Contact us at " . $page->settings->getSetting('title') . " and submit your feedback"; |
|
38 | 38 | |
39 | 39 | $page->content = $page->smarty->fetch('contact.tpl'); |
40 | 40 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!$privateProfiles || $privileged) { |
20 | 20 | |
21 | - $altID = (isset($_GET['id']) && $_GET['id'] >= 0) ? (int) $_GET['id'] : false; |
|
21 | + $altID = (isset($_GET['id']) && $_GET['id'] >= 0) ? (int)$_GET['id'] : false; |
|
22 | 22 | $altUsername = (isset($_GET['name']) && strlen($_GET['name']) > 0) ? $_GET['name'] : false; |
23 | 23 | |
24 | 24 | // If both 'id' and 'name' are specified, 'id' should take precedence. |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | $downloadlist = $page->users->getDownloadRequestsForUser($userID); |
38 | -$page->smarty->assign('downloadlist',$downloadlist); |
|
38 | +$page->smarty->assign('downloadlist', $downloadlist); |
|
39 | 39 | |
40 | 40 | $data = $page->users->getById($userID); |
41 | 41 | if (!$data) |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $data['style'] = 'Using the admin selected theme.'; |
47 | 47 | } |
48 | 48 | |
49 | -$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
|
49 | +$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
|
50 | 50 | $page->smarty->assign([ |
51 | 51 | 'apirequests' => $page->users->getApiRequests($userID), |
52 | 52 | 'grabstoday' => $page->users->getDownloadRequests($userID), |