@@ -116,9 +116,10 @@ discard block |
||
116 | 116 | </div><!-- .windowbg --> |
117 | 117 | </div><!-- #manage_attachments -->'; |
118 | 118 | |
119 | - if (!empty($context['results'])) |
|
120 | - echo ' |
|
119 | + if (!empty($context['results'])) { |
|
120 | + echo ' |
|
121 | 121 | <div class="noticebox">', $context['results'], '</div>'; |
122 | + } |
|
122 | 123 | |
123 | 124 | echo ' |
124 | 125 | <div id="transfer" class="cat_bar"> |
@@ -133,9 +134,10 @@ discard block |
||
133 | 134 | <select name="from"> |
134 | 135 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
135 | 136 | |
136 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
137 | - echo ' |
|
137 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
138 | + echo ' |
|
138 | 139 | <option value="', $id, '">', $dir, '</option>'; |
140 | + } |
|
139 | 141 | |
140 | 142 | echo ' |
141 | 143 | </select> |
@@ -146,13 +148,14 @@ discard block |
||
146 | 148 | <option value="0">', $txt['attachment_transfer_auto_select'], '</option> |
147 | 149 | <option value="-1">', $txt['attachment_transfer_forum_root'], '</option>'; |
148 | 150 | |
149 | - if (!empty($context['base_dirs'])) |
|
150 | - foreach ($context['base_dirs'] as $id => $dir) |
|
151 | + if (!empty($context['base_dirs'])) { |
|
152 | + foreach ($context['base_dirs'] as $id => $dir) |
|
151 | 153 | echo ' |
152 | 154 | <option value="', $id, '">', $dir, '</option>'; |
153 | - else |
|
154 | - echo ' |
|
155 | + } else { |
|
156 | + echo ' |
|
155 | 157 | <option value="0" disabled>', $txt['attachment_transfer_no_base'], '</option>'; |
158 | + } |
|
156 | 159 | |
157 | 160 | echo ' |
158 | 161 | </select> |
@@ -162,18 +165,20 @@ discard block |
||
162 | 165 | <select name="to"> |
163 | 166 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
164 | 167 | |
165 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
166 | - echo ' |
|
168 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
169 | + echo ' |
|
167 | 170 | <option value="', $id, '">', $dir, '</option>'; |
171 | + } |
|
168 | 172 | |
169 | 173 | echo ' |
170 | 174 | </select> |
171 | 175 | </dd>'; |
172 | 176 | |
173 | - if (!empty($modSettings['attachmentDirFileLimit'])) |
|
174 | - echo ' |
|
177 | + if (!empty($modSettings['attachmentDirFileLimit'])) { |
|
178 | + echo ' |
|
175 | 179 | <dt>', $txt['attachment_transfer_empty'], '</dt> |
176 | 180 | <dd><input type="checkbox" name="empty_it"', $context['checked'] ? ' checked' : '', '></dd>'; |
181 | + } |
|
177 | 182 | |
178 | 183 | echo ' |
179 | 184 | </dl> |
@@ -209,8 +214,8 @@ discard block |
||
209 | 214 | global $context, $txt, $scripturl; |
210 | 215 | |
211 | 216 | // If we've completed just let them know! |
212 | - if ($context['completed']) |
|
213 | - echo ' |
|
217 | + if ($context['completed']) { |
|
218 | + echo ' |
|
214 | 219 | <div id="manage_attachments"> |
215 | 220 | <div class="cat_bar"> |
216 | 221 | <h3 class="catbg">', $txt['repair_attachments_complete'], '</h3> |
@@ -219,10 +224,11 @@ discard block |
||
219 | 224 | ', $txt['repair_attachments_complete_desc'], ' |
220 | 225 | </div> |
221 | 226 | </div>'; |
227 | + } |
|
222 | 228 | |
223 | 229 | // What about if no errors were even found? |
224 | - elseif (!$context['errors_found']) |
|
225 | - echo ' |
|
230 | + elseif (!$context['errors_found']) { |
|
231 | + echo ' |
|
226 | 232 | <div id="manage_attachments"> |
227 | 233 | <div class="cat_bar"> |
228 | 234 | <h3 class="catbg">', $txt['repair_attachments_complete'], '</h3> |
@@ -231,6 +237,7 @@ discard block |
||
231 | 237 | ', $txt['repair_attachments_no_errors'], ' |
232 | 238 | </div> |
233 | 239 | </div>'; |
240 | + } |
|
234 | 241 | |
235 | 242 | // Otherwise, I'm sad to say, we have a problem! |
236 | 243 | else |
@@ -245,11 +252,12 @@ discard block |
||
245 | 252 | <p>', $txt['repair_attachments_error_desc'], '</p>'; |
246 | 253 | |
247 | 254 | // Loop through each error reporting the status |
248 | - foreach ($context['repair_errors'] as $error => $number) |
|
249 | - if (!empty($number)) |
|
255 | + foreach ($context['repair_errors'] as $error => $number) { |
|
256 | + if (!empty($number)) |
|
250 | 257 | echo ' |
251 | 258 | <input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '"> |
252 | 259 | <label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label><br>'; |
260 | + } |
|
253 | 261 | |
254 | 262 | echo ' |
255 | 263 | <br> |
@@ -268,8 +276,9 @@ discard block |
||
268 | 276 | { |
269 | 277 | global $modSettings; |
270 | 278 | |
271 | - if (!empty($modSettings['attachment_basedirectories'])) |
|
272 | - template_show_list('base_paths'); |
|
279 | + if (!empty($modSettings['attachment_basedirectories'])) { |
|
280 | + template_show_list('base_paths'); |
|
281 | + } |
|
273 | 282 | |
274 | 283 | template_show_list('attach_paths'); |
275 | 284 | } |
@@ -31,9 +31,10 @@ discard block |
||
31 | 31 | ', $txt['who_show1'], ' |
32 | 32 | <select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
33 | 33 | |
34 | - foreach ($context['show_methods'] as $value => $label) |
|
35 | - echo ' |
|
34 | + foreach ($context['show_methods'] as $value => $label) { |
|
35 | + echo ' |
|
36 | 36 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
37 | + } |
|
37 | 38 | echo ' |
38 | 39 | </select> |
39 | 40 | <noscript> |
@@ -58,20 +59,22 @@ discard block |
||
58 | 59 | <td>'; |
59 | 60 | |
60 | 61 | // Guests can't be messaged. |
61 | - if (!$member['is_guest']) |
|
62 | - echo ' |
|
62 | + if (!$member['is_guest']) { |
|
63 | + echo ' |
|
63 | 64 | <span class="contact_info floatright"> |
64 | 65 | ', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['text'] . '">' : '', $settings['use_image_buttons'] ? '<span class="' . ($member['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $member['online']['text'] . '"></span>' : $member['online']['label'], $context['can_send_pm'] ? '</a>' : '', ' |
65 | 66 | </span>'; |
67 | + } |
|
66 | 68 | |
67 | 69 | echo ' |
68 | 70 | <span class="member', $member['is_hidden'] ? ' hidden' : '', '"> |
69 | 71 | ', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', ' |
70 | 72 | </span>'; |
71 | 73 | |
72 | - if (!empty($member['ip'])) |
|
73 | - echo ' |
|
74 | + if (!empty($member['ip'])) { |
|
75 | + echo ' |
|
74 | 76 | (<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)'; |
77 | + } |
|
75 | 78 | |
76 | 79 | echo ' |
77 | 80 | </td> |
@@ -81,13 +84,14 @@ discard block |
||
81 | 84 | } |
82 | 85 | |
83 | 86 | // No members? |
84 | - if (empty($context['members'])) |
|
85 | - echo ' |
|
87 | + if (empty($context['members'])) { |
|
88 | + echo ' |
|
86 | 89 | <tr class="windowbg"> |
87 | 90 | <td colspan="3"> |
88 | 91 | ', $txt['who_no_online_' . ($context['show_by'] == 'guests' || $context['show_by'] == 'spiders' ? $context['show_by'] : 'members')], ' |
89 | 92 | </td> |
90 | 93 | </tr>'; |
94 | + } |
|
91 | 95 | |
92 | 96 | echo ' |
93 | 97 | </tbody> |
@@ -98,9 +102,10 @@ discard block |
||
98 | 102 | ', $txt['who_show1'], ' |
99 | 103 | <select name="show" onchange="document.forms.whoFilter.submit();">'; |
100 | 104 | |
101 | - foreach ($context['show_methods'] as $value => $label) |
|
102 | - echo ' |
|
105 | + foreach ($context['show_methods'] as $value => $label) { |
|
106 | + echo ' |
|
103 | 107 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
108 | + } |
|
104 | 109 | echo ' |
105 | 110 | </select> |
106 | 111 | <noscript> |
@@ -129,17 +134,19 @@ discard block |
||
129 | 134 | |
130 | 135 | foreach ($context['credits'] as $section) |
131 | 136 | { |
132 | - if (isset($section['pretext'])) |
|
133 | - echo ' |
|
137 | + if (isset($section['pretext'])) { |
|
138 | + echo ' |
|
134 | 139 | <div class="windowbg"> |
135 | 140 | <p>', $section['pretext'], '</p> |
136 | 141 | </div>'; |
142 | + } |
|
137 | 143 | |
138 | - if (isset($section['title'])) |
|
139 | - echo ' |
|
144 | + if (isset($section['title'])) { |
|
145 | + echo ' |
|
140 | 146 | <div class="cat_bar"> |
141 | 147 | <h3 class="catbg">', $section['title'], '</h3> |
142 | 148 | </div>'; |
149 | + } |
|
143 | 150 | |
144 | 151 | echo ' |
145 | 152 | <div class="windowbg"> |
@@ -147,17 +154,18 @@ discard block |
||
147 | 154 | |
148 | 155 | foreach ($section['groups'] as $group) |
149 | 156 | { |
150 | - if (isset($group['title'])) |
|
151 | - echo ' |
|
157 | + if (isset($group['title'])) { |
|
158 | + echo ' |
|
152 | 159 | <dt> |
153 | 160 | <strong>', $group['title'], '</strong> |
154 | 161 | </dt> |
155 | 162 | <dd>'; |
163 | + } |
|
156 | 164 | |
157 | 165 | // Try to make this read nicely. |
158 | - if (count($group['members']) <= 2) |
|
159 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
160 | - else |
|
166 | + if (count($group['members']) <= 2) { |
|
167 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
168 | + } else |
|
161 | 169 | { |
162 | 170 | $last_peep = array_pop($group['members']); |
163 | 171 | echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep; |
@@ -170,9 +178,10 @@ discard block |
||
170 | 178 | echo ' |
171 | 179 | </dl>'; |
172 | 180 | |
173 | - if (isset($section['posttext'])) |
|
174 | - echo ' |
|
181 | + if (isset($section['posttext'])) { |
|
182 | + echo ' |
|
175 | 183 | <p class="posttext">', $section['posttext'], '</p>'; |
184 | + } |
|
176 | 185 | |
177 | 186 | echo ' |
178 | 187 | </div>'; |
@@ -187,26 +196,29 @@ discard block |
||
187 | 196 | </div> |
188 | 197 | <div class="windowbg">'; |
189 | 198 | |
190 | - if (!empty($context['credits_software_graphics']['graphics'])) |
|
191 | - echo ' |
|
199 | + if (!empty($context['credits_software_graphics']['graphics'])) { |
|
200 | + echo ' |
|
192 | 201 | <dl> |
193 | 202 | <dt><strong>', $txt['credits_graphics'], '</strong></dt> |
194 | 203 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd> |
195 | 204 | </dl>'; |
205 | + } |
|
196 | 206 | |
197 | - if (!empty($context['credits_software_graphics']['software'])) |
|
198 | - echo ' |
|
207 | + if (!empty($context['credits_software_graphics']['software'])) { |
|
208 | + echo ' |
|
199 | 209 | <dl> |
200 | 210 | <dt><strong>', $txt['credits_software'], '</strong></dt> |
201 | 211 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd> |
202 | 212 | </dl>'; |
213 | + } |
|
203 | 214 | |
204 | - if (!empty($context['credits_software_graphics']['fonts'])) |
|
205 | - echo ' |
|
215 | + if (!empty($context['credits_software_graphics']['fonts'])) { |
|
216 | + echo ' |
|
206 | 217 | <dl> |
207 | 218 | <dt><strong>', $txt['credits_fonts'], '</strong></dt> |
208 | 219 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd> |
209 | 220 | </dl>'; |
221 | + } |
|
210 | 222 | echo ' |
211 | 223 | </div>'; |
212 | 224 | } |
@@ -222,14 +234,16 @@ discard block |
||
222 | 234 | <ul>'; |
223 | 235 | |
224 | 236 | // Display the credits. |
225 | - if (!empty($context['credits_modifications'])) |
|
226 | - echo ' |
|
237 | + if (!empty($context['credits_modifications'])) { |
|
238 | + echo ' |
|
227 | 239 | <li>', implode('</li><li>', $context['credits_modifications']), '</li>'; |
240 | + } |
|
228 | 241 | |
229 | 242 | // Legacy. |
230 | - if (!empty($context['copyrights']['mods'])) |
|
231 | - echo ' |
|
243 | + if (!empty($context['copyrights']['mods'])) { |
|
244 | + echo ' |
|
232 | 245 | <li>', implode('</li><li>', $context['copyrights']['mods']), '</li>'; |
246 | + } |
|
233 | 247 | |
234 | 248 | echo ' |
235 | 249 | </ul> |
@@ -54,18 +54,20 @@ discard block |
||
54 | 54 | <div class="windowbg" id="group_requests_panel"> |
55 | 55 | <ul>'; |
56 | 56 | |
57 | - foreach ($context['group_requests'] as $request) |
|
58 | - echo ' |
|
57 | + foreach ($context['group_requests'] as $request) { |
|
58 | + echo ' |
|
59 | 59 | <li class="smalltext"> |
60 | 60 | <a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], ' |
61 | 61 | </li>'; |
62 | + } |
|
62 | 63 | |
63 | 64 | // Don't have any watched users right now? |
64 | - if (empty($context['group_requests'])) |
|
65 | - echo ' |
|
65 | + if (empty($context['group_requests'])) { |
|
66 | + echo ' |
|
66 | 67 | <li> |
67 | 68 | <strong class="smalltext">', $txt['mc_group_requests_none'], '</strong> |
68 | 69 | </li>'; |
70 | + } |
|
69 | 71 | |
70 | 72 | echo ' |
71 | 73 | </ul> |
@@ -121,18 +123,20 @@ discard block |
||
121 | 123 | <div class="windowbg" id="watched_users_panel"> |
122 | 124 | <ul>'; |
123 | 125 | |
124 | - foreach ($context['watched_users'] as $user) |
|
125 | - echo ' |
|
126 | + foreach ($context['watched_users'] as $user) { |
|
127 | + echo ' |
|
126 | 128 | <li> |
127 | 129 | <span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span> |
128 | 130 | </li>'; |
131 | + } |
|
129 | 132 | |
130 | 133 | // Don't have any watched users right now? |
131 | - if (empty($context['watched_users'])) |
|
132 | - echo ' |
|
134 | + if (empty($context['watched_users'])) { |
|
135 | + echo ' |
|
133 | 136 | <li> |
134 | 137 | <strong class="smalltext">', $txt['mc_watched_users_none'], '</strong> |
135 | 138 | </li>'; |
139 | + } |
|
136 | 140 | |
137 | 141 | echo ' |
138 | 142 | </ul> |
@@ -188,18 +192,20 @@ discard block |
||
188 | 192 | <div class="windowbg" id="reported_posts_panel"> |
189 | 193 | <ul>'; |
190 | 194 | |
191 | - foreach ($context['reported_posts'] as $post) |
|
192 | - echo ' |
|
195 | + foreach ($context['reported_posts'] as $post) { |
|
196 | + echo ' |
|
193 | 197 | <li> |
194 | 198 | <span class="smalltext">', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), '</span> |
195 | 199 | </li>'; |
200 | + } |
|
196 | 201 | |
197 | 202 | // Don't have any watched users right now? |
198 | - if (empty($context['reported_posts'])) |
|
199 | - echo ' |
|
203 | + if (empty($context['reported_posts'])) { |
|
204 | + echo ' |
|
200 | 205 | <li> |
201 | 206 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
202 | 207 | </li>'; |
208 | + } |
|
203 | 209 | |
204 | 210 | echo ' |
205 | 211 | </ul> |
@@ -255,18 +261,20 @@ discard block |
||
255 | 261 | <div class="windowbg" id="reported_users_panel"> |
256 | 262 | <ul>'; |
257 | 263 | |
258 | - foreach ($context['reported_users'] as $user) |
|
259 | - echo ' |
|
264 | + foreach ($context['reported_users'] as $user) { |
|
265 | + echo ' |
|
260 | 266 | <li> |
261 | 267 | <span class="smalltext">', $user['user']['link'], '</span> |
262 | 268 | </li>'; |
269 | + } |
|
263 | 270 | |
264 | 271 | // Don't have any watched users right now? |
265 | - if (empty($context['reported_users'])) |
|
266 | - echo ' |
|
272 | + if (empty($context['reported_users'])) { |
|
273 | + echo ' |
|
267 | 274 | <li> |
268 | 275 | <strong class="smalltext">', $txt['mc_reported_users_none'], '</strong> |
269 | 276 | </li>'; |
277 | + } |
|
270 | 278 | |
271 | 279 | echo ' |
272 | 280 | </ul> |
@@ -313,11 +321,12 @@ discard block |
||
313 | 321 | global $context, $txt, $scripturl; |
314 | 322 | |
315 | 323 | // Let them know the action was a success. |
316 | - if (!empty($context['report_post_action'])) |
|
317 | - echo ' |
|
324 | + if (!empty($context['report_post_action'])) { |
|
325 | + echo ' |
|
318 | 326 | <div class="infobox"> |
319 | 327 | ', $txt['report_action_' . $context['report_post_action']], ' |
320 | 328 | </div>'; |
329 | + } |
|
321 | 330 | |
322 | 331 | echo ' |
323 | 332 | <div id="modnotes"> |
@@ -333,11 +342,12 @@ discard block |
||
333 | 342 | <ul class="moderation_notes">'; |
334 | 343 | |
335 | 344 | // Cycle through the notes. |
336 | - foreach ($context['notes'] as $note) |
|
337 | - echo ' |
|
345 | + foreach ($context['notes'] as $note) { |
|
346 | + echo ' |
|
338 | 347 | <li class="smalltext"> |
339 | 348 | ', ($note['can_delete'] ? '<a href="' . $note['delete_href'] . ';' . $context['mod-modnote-del_token_var'] . '=' . $context['mod-modnote-del_token'] . '" data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'], ' <strong>', $note['author']['link'], ':</strong> ', $note['text'], ' |
340 | 349 | </li>'; |
350 | + } |
|
341 | 351 | |
342 | 352 | echo ' |
343 | 353 | </ul> |
@@ -378,18 +388,19 @@ discard block |
||
378 | 388 | $remove_button = create_button('delete', 'remove_message', 'remove'); |
379 | 389 | |
380 | 390 | // No posts? |
381 | - if (empty($context['unapproved_items'])) |
|
382 | - echo ' |
|
391 | + if (empty($context['unapproved_items'])) { |
|
392 | + echo ' |
|
383 | 393 | <div class="windowbg"> |
384 | 394 | <p class="centertext"> |
385 | 395 | ', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], ' |
386 | 396 | </p> |
387 | 397 | </div>'; |
388 | - else |
|
389 | - echo ' |
|
398 | + } else { |
|
399 | + echo ' |
|
390 | 400 | <div class="pagesection floatleft"> |
391 | 401 | ', $context['page_index'], ' |
392 | 402 | </div>'; |
403 | + } |
|
393 | 404 | |
394 | 405 | foreach ($context['unapproved_items'] as $item) |
395 | 406 | { |
@@ -408,14 +419,16 @@ discard block |
||
408 | 419 | <span class="floatright"> |
409 | 420 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';approve=', $item['id'], '">', $approve_button, '</a>'; |
410 | 421 | |
411 | - if ($item['can_delete']) |
|
412 | - echo ' |
|
422 | + if ($item['can_delete']) { |
|
423 | + echo ' |
|
413 | 424 | ', $context['menu_separator'], ' |
414 | 425 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';delete=', $item['id'], '">', $remove_button, '</a>'; |
426 | + } |
|
415 | 427 | |
416 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
417 | - echo ' |
|
428 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
429 | + echo ' |
|
418 | 430 | <input type="checkbox" name="item[]" value="', $item['id'], '" checked> '; |
431 | + } |
|
419 | 432 | |
420 | 433 | echo ' |
421 | 434 | </span> |
@@ -425,8 +438,8 @@ discard block |
||
425 | 438 | echo ' |
426 | 439 | <div class="pagesection">'; |
427 | 440 | |
428 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
429 | - echo ' |
|
441 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
442 | + echo ' |
|
430 | 443 | <div class="floatright"> |
431 | 444 | <select name="do" onchange="if (this.value != 0 && confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();"> |
432 | 445 | <option value="0">', $txt['with_selected'], ':</option> |
@@ -438,12 +451,14 @@ discard block |
||
438 | 451 | <input type="submit" name="mc_go" value="', $txt['go'], '" class="button"> |
439 | 452 | </noscript> |
440 | 453 | </div>'; |
454 | + } |
|
441 | 455 | |
442 | - if (!empty($context['unapproved_items'])) |
|
443 | - echo ' |
|
456 | + if (!empty($context['unapproved_items'])) { |
|
457 | + echo ' |
|
444 | 458 | <div class="floatleft"> |
445 | 459 | <div class="pagelinks">', $context['page_index'], '</div> |
446 | 460 | </div>'; |
461 | + } |
|
447 | 462 | |
448 | 463 | echo ' |
449 | 464 | </div><!-- .pagesection --> |
@@ -464,8 +479,9 @@ discard block |
||
464 | 479 | |
465 | 480 | // We'll have a delete please bob. |
466 | 481 | // @todo Discuss this with the team and rewrite if required. |
467 | - if (empty($delete_button)) |
|
468 | - $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
482 | + if (empty($delete_button)) { |
|
483 | + $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
484 | + } |
|
469 | 485 | |
470 | 486 | $output_html = ' |
471 | 487 | <div> |
@@ -474,10 +490,11 @@ discard block |
||
474 | 490 | </div> |
475 | 491 | <div class="floatright">'; |
476 | 492 | |
477 | - if ($post['can_delete']) |
|
478 | - $output_html .= ' |
|
493 | + if ($post['can_delete']) { |
|
494 | + $output_html .= ' |
|
479 | 495 | <a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a> |
480 | 496 | <input type="checkbox" name="delete[]" value="' . $post['id'] . '">'; |
497 | + } |
|
481 | 498 | |
482 | 499 | $output_html .= ' |
483 | 500 | </div> |
@@ -521,12 +538,12 @@ discard block |
||
521 | 538 | <input type="submit" name="save" value="', $txt['save'], '" class="button"> |
522 | 539 | </div> |
523 | 540 | </form>'; |
524 | - } |
|
525 | - else |
|
526 | - echo ' |
|
541 | + } else { |
|
542 | + echo ' |
|
527 | 543 | <div class="windowbg"> |
528 | 544 | <div class="centertext">', $txt['mc_no_settings'], '</div> |
529 | 545 | </div>'; |
546 | + } |
|
530 | 547 | |
531 | 548 | echo ' |
532 | 549 | </div><!-- #modcenter -->'; |
@@ -622,13 +639,14 @@ discard block |
||
622 | 639 | </dd> |
623 | 640 | </dl>'; |
624 | 641 | |
625 | - if ($context['template_data']['can_edit_personal']) |
|
626 | - echo ' |
|
642 | + if ($context['template_data']['can_edit_personal']) { |
|
643 | + echo ' |
|
627 | 644 | <input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', '> |
628 | 645 | <label for="make_personal"> |
629 | 646 | <strong>', $txt['mc_warning_template_personal'], '</strong> |
630 | 647 | </label> |
631 | 648 | <p class="smalltext">', $txt['mc_warning_template_personal_desc'], '</p>'; |
649 | + } |
|
632 | 650 | |
633 | 651 | echo ' |
634 | 652 | <input type="submit" name="preview" id="preview_button" value="', $txt['preview'], '" class="button"> |
@@ -21,9 +21,10 @@ discard block |
||
21 | 21 | <div id="admincenter"> |
22 | 22 | <form action="', $scripturl, '?action=admin;area=paidsubscribe;sa=modify;sid=', $context['sub_id'], '" method="post">'; |
23 | 23 | |
24 | - if (!empty($context['disable_groups'])) |
|
25 | - echo ' |
|
24 | + if (!empty($context['disable_groups'])) { |
|
25 | + echo ' |
|
26 | 26 | <div class="noticebox">', $txt['paid_mod_edit_note'], '</div>'; |
27 | + } |
|
27 | 28 | |
28 | 29 | echo ' |
29 | 30 | <div class="cat_bar"> |
@@ -67,9 +68,10 @@ discard block |
||
67 | 68 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
68 | 69 | |
69 | 70 | // Put each group into the box. |
70 | - foreach ($context['groups'] as $id => $name) |
|
71 | - echo ' |
|
71 | + foreach ($context['groups'] as $id => $name) { |
|
72 | + echo ' |
|
72 | 73 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
74 | + } |
|
73 | 75 | |
74 | 76 | echo ' |
75 | 77 | </select> |
@@ -81,12 +83,13 @@ discard block |
||
81 | 83 | <dd>'; |
82 | 84 | |
83 | 85 | // Put a checkbox in for each group |
84 | - foreach ($context['groups'] as $id => $name) |
|
85 | - echo ' |
|
86 | + foreach ($context['groups'] as $id => $name) { |
|
87 | + echo ' |
|
86 | 88 | <label for="addgroup_', $id, '"> |
87 | 89 | <input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', '> |
88 | 90 | <span class="smalltext">', $name, '</span> |
89 | 91 | </label><br>'; |
92 | + } |
|
90 | 93 | |
91 | 94 | echo ' |
92 | 95 | </dd> |
@@ -236,8 +239,8 @@ discard block |
||
236 | 239 | <dl class="settings">'; |
237 | 240 | |
238 | 241 | // Do we need a username? |
239 | - if ($context['action_type'] == 'add') |
|
240 | - echo ' |
|
242 | + if ($context['action_type'] == 'add') { |
|
243 | + echo ' |
|
241 | 244 | <dt> |
242 | 245 | <strong>', $txt['paid_username'], ':</strong><br> |
243 | 246 | <span class="smalltext">', $txt['one_username'], '</span> |
@@ -245,6 +248,7 @@ discard block |
||
245 | 248 | <dd> |
246 | 249 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30"> |
247 | 250 | </dd>'; |
251 | + } |
|
248 | 252 | |
249 | 253 | echo ' |
250 | 254 | <dt> |
@@ -262,9 +266,10 @@ discard block |
||
262 | 266 | <select name="year" id="year" onchange="generateDays();">'; |
263 | 267 | |
264 | 268 | // Show a list of all the years we allow... |
265 | - for ($year = 2005; $year <= 2030; $year++) |
|
266 | - echo ' |
|
269 | + for ($year = 2005; $year <= 2030; $year++) { |
|
270 | + echo ' |
|
267 | 271 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
272 | + } |
|
268 | 273 | |
269 | 274 | echo ' |
270 | 275 | </select> |
@@ -272,9 +277,10 @@ discard block |
||
272 | 277 | <select name="month" id="month" onchange="generateDays();">'; |
273 | 278 | |
274 | 279 | // There are 12 months per year - ensure that they all get listed. |
275 | - for ($month = 1; $month <= 12; $month++) |
|
276 | - echo ' |
|
280 | + for ($month = 1; $month <= 12; $month++) { |
|
281 | + echo ' |
|
277 | 282 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
283 | + } |
|
278 | 284 | |
279 | 285 | echo ' |
280 | 286 | </select> |
@@ -282,9 +288,10 @@ discard block |
||
282 | 288 | <select name="day" id="day">'; |
283 | 289 | |
284 | 290 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
285 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
286 | - echo ' |
|
291 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
292 | + echo ' |
|
287 | 293 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
294 | + } |
|
288 | 295 | |
289 | 296 | echo ' |
290 | 297 | </select> |
@@ -296,9 +303,10 @@ discard block |
||
296 | 303 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
297 | 304 | |
298 | 305 | // Show a list of all the years we allow... |
299 | - for ($year = 2005; $year <= 2030; $year++) |
|
300 | - echo ' |
|
306 | + for ($year = 2005; $year <= 2030; $year++) { |
|
307 | + echo ' |
|
301 | 308 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
309 | + } |
|
302 | 310 | |
303 | 311 | echo ' |
304 | 312 | </select> |
@@ -306,9 +314,10 @@ discard block |
||
306 | 314 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
307 | 315 | |
308 | 316 | // There are 12 months per year - ensure that they all get listed. |
309 | - for ($month = 1; $month <= 12; $month++) |
|
310 | - echo ' |
|
317 | + for ($month = 1; $month <= 12; $month++) { |
|
318 | + echo ' |
|
311 | 319 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
320 | + } |
|
312 | 321 | |
313 | 322 | echo ' |
314 | 323 | </select> |
@@ -316,9 +325,10 @@ discard block |
||
316 | 325 | <select name="dayend" id="dayend">'; |
317 | 326 | |
318 | 327 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
319 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
320 | - echo ' |
|
328 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
329 | + echo ' |
|
321 | 330 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
331 | + } |
|
322 | 332 | |
323 | 333 | echo ' |
324 | 334 | </select> |
@@ -357,8 +367,8 @@ discard block |
||
357 | 367 | <div class="windowbg"> |
358 | 368 | <ul>'; |
359 | 369 | |
360 | - foreach ($context['pending_payments'] as $id => $payment) |
|
361 | - echo ' |
|
370 | + foreach ($context['pending_payments'] as $id => $payment) { |
|
371 | + echo ' |
|
362 | 372 | <li> |
363 | 373 | ', $payment['desc'], ' |
364 | 374 | <span class="floatleft"> |
@@ -368,6 +378,7 @@ discard block |
||
368 | 378 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;lid=', $context['log_id'], ';pending=', $id, ';remove">', $txt['pending_payments_remove'], '</a> |
369 | 379 | </span> |
370 | 380 | </li>'; |
381 | + } |
|
371 | 382 | |
372 | 383 | echo ' |
373 | 384 | </ul> |
@@ -392,12 +403,12 @@ discard block |
||
392 | 403 | <h3 class="catbg">', $txt['subscriptions'], '</h3> |
393 | 404 | </div>'; |
394 | 405 | |
395 | - if (empty($context['subscriptions'])) |
|
396 | - echo ' |
|
406 | + if (empty($context['subscriptions'])) { |
|
407 | + echo ' |
|
397 | 408 | <div class="information"> |
398 | 409 | ', $txt['paid_subs_none'], ' |
399 | 410 | </div>'; |
400 | - else |
|
411 | + } else |
|
401 | 412 | { |
402 | 413 | echo ' |
403 | 414 | <div class="information"> |
@@ -408,8 +419,9 @@ discard block |
||
408 | 419 | foreach ($context['subscriptions'] as $id => $subscription) |
409 | 420 | { |
410 | 421 | // Ignore the inactive ones... |
411 | - if (empty($subscription['active'])) |
|
412 | - continue; |
|
422 | + if (empty($subscription['active'])) { |
|
423 | + continue; |
|
424 | + } |
|
413 | 425 | |
414 | 426 | echo ' |
415 | 427 | <div class="cat_bar"> |
@@ -419,9 +431,10 @@ discard block |
||
419 | 431 | <p><strong>', $subscription['name'], '</strong></p> |
420 | 432 | <p class="smalltext">', $subscription['desc'], '</p>'; |
421 | 433 | |
422 | - if (!$subscription['flexible']) |
|
423 | - echo ' |
|
434 | + if (!$subscription['flexible']) { |
|
435 | + echo ' |
|
424 | 436 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
437 | + } |
|
425 | 438 | |
426 | 439 | if ($context['user']['is_owner']) |
427 | 440 | { |
@@ -434,24 +447,25 @@ discard block |
||
434 | 447 | <select name="cur[', $subscription['id'], ']">'; |
435 | 448 | |
436 | 449 | // Print out the costs for this one. |
437 | - foreach ($subscription['costs'] as $duration => $value) |
|
438 | - echo ' |
|
450 | + foreach ($subscription['costs'] as $duration => $value) { |
|
451 | + echo ' |
|
439 | 452 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
453 | + } |
|
440 | 454 | |
441 | 455 | echo ' |
442 | 456 | </select>'; |
443 | - } |
|
444 | - else |
|
445 | - echo ' |
|
457 | + } else { |
|
458 | + echo ' |
|
446 | 459 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
460 | + } |
|
447 | 461 | |
448 | 462 | echo ' |
449 | 463 | <hr> |
450 | 464 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button">'; |
451 | - } |
|
452 | - else |
|
453 | - echo ' |
|
465 | + } else { |
|
466 | + echo ' |
|
454 | 467 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>'; |
468 | + } |
|
455 | 469 | |
456 | 470 | echo ' |
457 | 471 | </div><!-- .windowbg -->'; |
@@ -478,18 +492,19 @@ discard block |
||
478 | 492 | </thead> |
479 | 493 | <tbody>'; |
480 | 494 | |
481 | - if (empty($context['current'])) |
|
482 | - echo ' |
|
495 | + if (empty($context['current'])) { |
|
496 | + echo ' |
|
483 | 497 | <tr class="windowbg"> |
484 | 498 | <td colspan="4"> |
485 | 499 | ', $txt['paid_none_yet'], ' |
486 | 500 | </td> |
487 | 501 | </tr>'; |
502 | + } |
|
488 | 503 | |
489 | 504 | foreach ($context['current'] as $sub) |
490 | 505 | { |
491 | - if (!$sub['hide']) |
|
492 | - echo ' |
|
506 | + if (!$sub['hide']) { |
|
507 | + echo ' |
|
493 | 508 | <tr class="windowbg"> |
494 | 509 | <td> |
495 | 510 | ', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -500,6 +515,7 @@ discard block |
||
500 | 515 | <td>', $sub['start'], '</td> |
501 | 516 | <td>', $sub['end'], '</td> |
502 | 517 | </tr>'; |
518 | + } |
|
503 | 519 | } |
504 | 520 | |
505 | 521 | echo ' |
@@ -551,15 +567,17 @@ discard block |
||
551 | 567 | ', $gateway['desc'], '<br> |
552 | 568 | <form action="', $gateway['form'], '" method="post">'; |
553 | 569 | |
554 | - if (!empty($gateway['javascript'])) |
|
555 | - echo ' |
|
570 | + if (!empty($gateway['javascript'])) { |
|
571 | + echo ' |
|
556 | 572 | <script> |
557 | 573 | ', $gateway['javascript'], ' |
558 | 574 | </script>'; |
575 | + } |
|
559 | 576 | |
560 | - foreach ($gateway['hidden'] as $name => $value) |
|
561 | - echo ' |
|
577 | + foreach ($gateway['hidden'] as $name => $value) { |
|
578 | + echo ' |
|
562 | 579 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
580 | + } |
|
563 | 581 | |
564 | 582 | echo ' |
565 | 583 | <br> |
@@ -283,11 +283,11 @@ discard block |
||
283 | 283 | if (removeItems == 0) |
284 | 284 | { |
285 | 285 | e.preventDefault(); |
286 | - return alert("'. $txt['select_item_check'] .'"); |
|
286 | + return alert("'. $txt['select_item_check'] . '"); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | |
290 | - return confirm("'. $txt['ban_remove_selected_confirm'] .'"); |
|
290 | + return confirm("'. $txt['ban_remove_selected_confirm'] . '"); |
|
291 | 291 | });', |
292 | 292 | ); |
293 | 293 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | array( |
487 | 487 | 'position' => 'below_table_data', |
488 | 488 | 'value' => ' |
489 | - <input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button"> <a class="button" href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>', |
|
489 | + <input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button"> <a class="button" href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>', |
|
490 | 490 | 'style' => 'text-align: right;', |
491 | 491 | ), |
492 | 492 | array( |
@@ -506,11 +506,11 @@ discard block |
||
506 | 506 | if (removeItems == 0) |
507 | 507 | { |
508 | 508 | e.preventDefault(); |
509 | - return alert("'. $txt['select_item_check'] .'"); |
|
509 | + return alert("'. $txt['select_item_check'] . '"); |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | |
513 | - return confirm("'. $txt['ban_remove_selected_confirm'] .'"); |
|
513 | + return confirm("'. $txt['ban_remove_selected_confirm'] . '"); |
|
514 | 514 | });', |
515 | 515 | ); |
516 | 516 | createList($listOptions); |