@@ -36,11 +36,12 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | // An error? |
39 | - if (!empty($context['error_message'])) |
|
40 | - echo ' |
|
39 | + if (!empty($context['error_message'])) { |
|
40 | + echo ' |
|
41 | 41 | <div class="errorbox"> |
42 | 42 | ', $context['error_message'], ' |
43 | 43 | </div>'; |
44 | + } |
|
44 | 45 | |
45 | 46 | // Provide something of an introduction... |
46 | 47 | echo ' |
@@ -67,11 +68,12 @@ discard block |
||
67 | 68 | // If the files are not writable, we might! |
68 | 69 | if (!empty($context['still_not_writable'])) |
69 | 70 | { |
70 | - if (!empty($context['package_ftp']['error'])) |
|
71 | - echo ' |
|
71 | + if (!empty($context['package_ftp']['error'])) { |
|
72 | + echo ' |
|
72 | 73 | <div class="errorbox"> |
73 | 74 | ', $context['package_ftp']['error'], ' |
74 | 75 | </div>'; |
76 | + } |
|
75 | 77 | |
76 | 78 | echo ' |
77 | 79 | <div class="cat_bar"> |
@@ -150,11 +152,12 @@ discard block |
||
150 | 152 | </div>'; |
151 | 153 | |
152 | 154 | // Not writable? Oops, show an error for ya. |
153 | - if (!empty($context['lang_file_not_writable_message'])) |
|
154 | - echo ' |
|
155 | + if (!empty($context['lang_file_not_writable_message'])) { |
|
156 | + echo ' |
|
155 | 157 | <div class="errorbox"> |
156 | 158 | ', $context['lang_file_not_writable_message'], ' |
157 | 159 | </div>'; |
160 | + } |
|
158 | 161 | |
159 | 162 | // Show the language entries |
160 | 163 | echo ' |
@@ -199,9 +202,10 @@ discard block |
||
199 | 202 | <input type="submit" name="save_main" value="', $txt['save'], '"', $context['lang_file_not_writable_message'] || !empty($context['file_entries']) ? ' disabled' : '', ' class="button">'; |
200 | 203 | |
201 | 204 | // Allow deleting entries. English can't be deleted though. |
202 | - if ($context['lang_id'] != 'english') |
|
203 | - echo ' |
|
205 | + if ($context['lang_id'] != 'english') { |
|
206 | + echo ' |
|
204 | 207 | <input type="submit" name="delete_main" value="', $txt['delete'], '"', $context['lang_file_not_writable_message'] || !empty($context['file_entries']) ? ' disabled' : '', ' onclick="confirm(\'', $txt['languages_delete_confirm'], '\');" class="button">'; |
208 | + } |
|
205 | 209 | |
206 | 210 | echo ' |
207 | 211 | </div><!-- .windowbg --> |
@@ -223,9 +227,10 @@ discard block |
||
223 | 227 | echo ' |
224 | 228 | <optgroup label="', $theme['name'], '">'; |
225 | 229 | |
226 | - foreach ($theme['files'] as $file) |
|
227 | - echo ' |
|
230 | + foreach ($theme['files'] as $file) { |
|
231 | + echo ' |
|
228 | 232 | <option value="', $id_theme, '+', $file['id'], '"', $file['selected'] ? ' selected' : '', '> => ', $file['name'], '</option>'; |
233 | + } |
|
229 | 234 | |
230 | 235 | echo ' |
231 | 236 | </optgroup>'; |
@@ -240,11 +245,12 @@ discard block |
||
240 | 245 | <br class="clear">'; |
241 | 246 | |
242 | 247 | // Is it not writable? Show an error. |
243 | - if (!empty($context['entries_not_writable_message'])) |
|
244 | - echo ' |
|
248 | + if (!empty($context['entries_not_writable_message'])) { |
|
249 | + echo ' |
|
245 | 250 | <div class="errorbox"> |
246 | 251 | ', $context['entries_not_writable_message'], ' |
247 | 252 | </div>'; |
253 | + } |
|
248 | 254 | |
249 | 255 | // Already have some file entries? |
250 | 256 | if (!empty($context['file_entries'])) |
@@ -283,8 +289,8 @@ discard block |
||
283 | 289 | } |
284 | 290 | |
285 | 291 | // Odd number? |
286 | - if (!empty($cached)) |
|
287 | - echo ' |
|
292 | + if (!empty($cached)) { |
|
293 | + echo ' |
|
288 | 294 | |
289 | 295 | <dt> |
290 | 296 | <span class="smalltext">', $cached['key'], '</span> |
@@ -297,6 +303,7 @@ discard block |
||
297 | 303 | </dt> |
298 | 304 | <dd> |
299 | 305 | </dd>'; |
306 | + } |
|
300 | 307 | |
301 | 308 | echo ' |
302 | 309 | </dl> |
@@ -331,12 +338,13 @@ discard block |
||
331 | 338 | <input type="text" name="smf_add" size="40" value="', !empty($context['smf_search_term']) ? $context['smf_search_term'] : '', '">'; |
332 | 339 | |
333 | 340 | // Do we have some errors? Too bad. Display a little error box. |
334 | - if (!empty($context['smf_error'])) |
|
335 | - echo ' |
|
341 | + if (!empty($context['smf_error'])) { |
|
342 | + echo ' |
|
336 | 343 | <div> |
337 | 344 | <br> |
338 | 345 | <p class="errorbox">', $txt['add_language_error_' . $context['smf_error']], '</p> |
339 | 346 | </div>'; |
347 | + } |
|
340 | 348 | |
341 | 349 | echo ' |
342 | 350 | </fieldset> |
@@ -41,11 +41,12 @@ discard block |
||
41 | 41 | </div>'; |
42 | 42 | |
43 | 43 | // If this is an existing set, and there are still un-added smileys - offer an import opportunity. |
44 | - if (!empty($context['current_set']['can_import'])) |
|
45 | - echo ' |
|
44 | + if (!empty($context['current_set']['can_import'])) { |
|
45 | + echo ' |
|
46 | 46 | <div class="information"> |
47 | 47 | ', $context['current_set']['can_import'] == 1 ? sprintf($txt['smiley_set_import_single'], $context['current_set']['import_url']) : sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import'], $context['current_set']['import_url']), ' |
48 | 48 | </div>'; |
49 | + } |
|
49 | 50 | |
50 | 51 | echo ' |
51 | 52 | <div class="windowbg2 noup"> |
@@ -62,20 +63,20 @@ discard block |
||
62 | 63 | <dd> |
63 | 64 | ', $modSettings['smileys_url'], '/'; |
64 | 65 | |
65 | - if ($context['current_set']['id'] == 'default') |
|
66 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
67 | - |
|
68 | - elseif (empty($context['smiley_set_dirs'])) |
|
69 | - echo ' |
|
66 | + if ($context['current_set']['id'] == 'default') { |
|
67 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
68 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
69 | + echo ' |
|
70 | 70 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '"> '; |
71 | - else |
|
71 | + } else |
|
72 | 72 | { |
73 | 73 | echo ' |
74 | 74 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
75 | 75 | |
76 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
77 | - echo ' |
|
76 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
77 | + echo ' |
|
78 | 78 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
79 | + } |
|
79 | 80 | echo ' |
80 | 81 | </select> '; |
81 | 82 | } |
@@ -90,14 +91,15 @@ discard block |
||
90 | 91 | </dd>'; |
91 | 92 | |
92 | 93 | // If this is a new smiley set they have the option to import smileys already in the directory. |
93 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
94 | - echo ' |
|
94 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
95 | + echo ' |
|
95 | 96 | <dt> |
96 | 97 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
97 | 98 | </dt> |
98 | 99 | <dd> |
99 | 100 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1"> |
100 | 101 | </dd>'; |
102 | + } |
|
101 | 103 | |
102 | 104 | echo ' |
103 | 105 | </dl> |
@@ -131,9 +133,10 @@ discard block |
||
131 | 133 | <dd> |
132 | 134 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">'; |
133 | 135 | |
134 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
135 | - echo ' |
|
136 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
137 | + echo ' |
|
136 | 138 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
139 | + } |
|
137 | 140 | |
138 | 141 | echo ' |
139 | 142 | </select>) |
@@ -149,17 +152,18 @@ discard block |
||
149 | 152 | </dt> |
150 | 153 | <dd>'; |
151 | 154 | |
152 | - if (empty($context['filenames'])) |
|
153 | - echo ' |
|
155 | + if (empty($context['filenames'])) { |
|
156 | + echo ' |
|
154 | 157 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '">'; |
155 | - else |
|
158 | + } else |
|
156 | 159 | { |
157 | 160 | echo ' |
158 | 161 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
159 | 162 | |
160 | - foreach ($context['filenames'] as $filename) |
|
161 | - echo ' |
|
163 | + foreach ($context['filenames'] as $filename) { |
|
164 | + echo ' |
|
162 | 165 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
166 | + } |
|
163 | 167 | echo ' |
164 | 168 | </select>'; |
165 | 169 | } |
@@ -228,9 +232,10 @@ discard block |
||
228 | 232 | <dd> |
229 | 233 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
230 | 234 | |
231 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
232 | - echo ' |
|
235 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
236 | + echo ' |
|
233 | 237 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
238 | + } |
|
234 | 239 | |
235 | 240 | echo ' |
236 | 241 | </select> |
@@ -240,17 +245,18 @@ discard block |
||
240 | 245 | </dt> |
241 | 246 | <dd>'; |
242 | 247 | |
243 | - if (empty($context['filenames'])) |
|
244 | - echo ' |
|
248 | + if (empty($context['filenames'])) { |
|
249 | + echo ' |
|
245 | 250 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');">'; |
246 | - else |
|
251 | + } else |
|
247 | 252 | { |
248 | 253 | echo ' |
249 | 254 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
250 | 255 | |
251 | - foreach ($context['filenames'] as $filename) |
|
252 | - echo ' |
|
256 | + foreach ($context['filenames'] as $filename) { |
|
257 | + echo ' |
|
253 | 258 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
259 | + } |
|
254 | 260 | echo ' |
255 | 261 | </select>'; |
256 | 262 | } |
@@ -279,14 +285,15 @@ discard block |
||
279 | 285 | |
280 | 286 | <dl id="uploadMore" style="display: none;" class="settings">'; |
281 | 287 | |
282 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
283 | - echo ' |
|
288 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
289 | + echo ' |
|
284 | 290 | <dt> |
285 | 291 | ', sprintf($txt['smileys_add_upload_for'], '<strong>' . $smiley_set['name'] . '</strong>'), ': |
286 | 292 | </dt> |
287 | 293 | <dd> |
288 | 294 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');"> |
289 | 295 | </dd>'; |
296 | + } |
|
290 | 297 | |
291 | 298 | echo ' |
292 | 299 | </dl> |
@@ -357,27 +364,30 @@ discard block |
||
357 | 364 | |
358 | 365 | foreach ($location['rows'] as $row) |
359 | 366 | { |
360 | - if (!empty($context['move_smiley'])) |
|
361 | - echo ' |
|
367 | + if (!empty($context['move_smiley'])) { |
|
368 | + echo ' |
|
362 | 369 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
370 | + } |
|
363 | 371 | |
364 | 372 | foreach ($row as $smiley) |
365 | 373 | { |
366 | - if (empty($context['move_smiley'])) |
|
367 | - echo ' |
|
374 | + if (empty($context['move_smiley'])) { |
|
375 | + echo ' |
|
368 | 376 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '"></a>'; |
369 | - else |
|
370 | - echo ' |
|
377 | + } else { |
|
378 | + echo ' |
|
371 | 379 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '" ', $smiley['selected'] ? 'class="selected_item"' : '', '> |
372 | 380 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
381 | + } |
|
373 | 382 | } |
374 | 383 | |
375 | 384 | echo ' |
376 | 385 | <br>'; |
377 | 386 | } |
378 | - if (!empty($context['move_smiley'])) |
|
379 | - echo ' |
|
387 | + if (!empty($context['move_smiley'])) { |
|
388 | + echo ' |
|
380 | 389 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
390 | + } |
|
381 | 391 | echo ' |
382 | 392 | </div><!-- .windowbg2 --> |
383 | 393 | <input type="hidden" name="reorder" value="1"> |
@@ -414,14 +424,15 @@ discard block |
||
414 | 424 | <div class="windowbg2"> |
415 | 425 | <dl class="settings">'; |
416 | 426 | |
417 | - if (!$context['new_icon']) |
|
418 | - echo ' |
|
427 | + if (!$context['new_icon']) { |
|
428 | + echo ' |
|
419 | 429 | <dt> |
420 | 430 | <strong>', $txt['smiley_preview'], ': </strong> |
421 | 431 | </dt> |
422 | 432 | <dd> |
423 | 433 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
424 | 434 | </dd>'; |
435 | + } |
|
425 | 436 | |
426 | 437 | echo ' |
427 | 438 | <dt> |
@@ -448,9 +459,10 @@ discard block |
||
448 | 459 | echo ' |
449 | 460 | <optgroup label="', $category['name'], '">'; |
450 | 461 | |
451 | - foreach ($category['boards'] as $board) |
|
452 | - echo ' |
|
462 | + foreach ($category['boards'] as $board) { |
|
463 | + echo ' |
|
453 | 464 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
465 | + } |
|
454 | 466 | |
455 | 467 | echo ' |
456 | 468 | </optgroup>'; |
@@ -467,19 +479,21 @@ discard block |
||
467 | 479 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
468 | 480 | |
469 | 481 | // Print the list of all the icons it can be put after... |
470 | - foreach ($context['icons'] as $id => $data) |
|
471 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
482 | + foreach ($context['icons'] as $id => $data) { |
|
483 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
472 | 484 | echo ' |
473 | 485 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
486 | + } |
|
474 | 487 | |
475 | 488 | echo ' |
476 | 489 | </select> |
477 | 490 | </dd> |
478 | 491 | </dl>'; |
479 | 492 | |
480 | - if (!$context['new_icon']) |
|
481 | - echo ' |
|
493 | + if (!$context['new_icon']) { |
|
494 | + echo ' |
|
482 | 495 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
496 | + } |
|
483 | 497 | |
484 | 498 | echo ' |
485 | 499 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button"> |
@@ -62,16 +62,17 @@ |
||
62 | 62 | <div id="error_box" class="errorbox"> |
63 | 63 | <ul id="error_list">'; |
64 | 64 | |
65 | - foreach ($context['post_errors'] as $key => $error) |
|
66 | - echo ' |
|
65 | + foreach ($context['post_errors'] as $key => $error) { |
|
66 | + echo ' |
|
67 | 67 | <li id="error_', $key, '" class="error">', $error, '</li>'; |
68 | + } |
|
68 | 69 | |
69 | 70 | echo ' |
70 | 71 | </ul>'; |
71 | - } |
|
72 | - else |
|
73 | - echo ' |
|
72 | + } else { |
|
73 | + echo ' |
|
74 | 74 | <div style="display:none" id="error_box" class="errorbox">'; |
75 | + } |
|
75 | 76 | |
76 | 77 | echo ' |
77 | 78 | </div>'; |
@@ -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 noup"> |
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="windowbg2 noup"> |
@@ -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 noup">'; |
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> |
@@ -72,9 +72,10 @@ discard block |
||
72 | 72 | |
73 | 73 | // Allow css/js files to be disabled for this specific theme. |
74 | 74 | // Add the identifier as an array key. IE array('smf_script'); Some external files might not add identifiers, on those cases SMF uses its filename as reference. |
75 | - if (!isset($settings['disable_files'])) |
|
76 | - $settings['disable_files'] = array(); |
|
77 | -} |
|
75 | + if (!isset($settings['disable_files'])) { |
|
76 | + $settings['disable_files'] = array(); |
|
77 | + } |
|
78 | + } |
|
78 | 79 | |
79 | 80 | /** |
80 | 81 | * The main sub template above the content. |
@@ -112,8 +113,9 @@ discard block |
||
112 | 113 | echo ' |
113 | 114 | <meta'; |
114 | 115 | |
115 | - foreach ($meta_tag as $meta_key => $meta_value) |
|
116 | - echo ' ', $meta_key, '="', $meta_value, '"'; |
|
116 | + foreach ($meta_tag as $meta_key => $meta_value) { |
|
117 | + echo ' ', $meta_key, '="', $meta_value, '"'; |
|
118 | + } |
|
117 | 119 | |
118 | 120 | echo '>'; |
119 | 121 | } |
@@ -124,14 +126,16 @@ discard block |
||
124 | 126 | <meta name="theme-color" content="#557EA0">'; |
125 | 127 | |
126 | 128 | // Please don't index these Mr Robot. |
127 | - if (!empty($context['robot_no_index'])) |
|
128 | - echo ' |
|
129 | + if (!empty($context['robot_no_index'])) { |
|
130 | + echo ' |
|
129 | 131 | <meta name="robots" content="noindex">'; |
132 | + } |
|
130 | 133 | |
131 | 134 | // Present a canonical url for search engines to prevent duplicate content in their indices. |
132 | - if (!empty($context['canonical_url'])) |
|
133 | - echo ' |
|
135 | + if (!empty($context['canonical_url'])) { |
|
136 | + echo ' |
|
134 | 137 | <link rel="canonical" href="', $context['canonical_url'], '">'; |
138 | + } |
|
135 | 139 | |
136 | 140 | // Show all the relative links, such as help, search, contents, and the like. |
137 | 141 | echo ' |
@@ -140,24 +144,28 @@ discard block |
||
140 | 144 | <link rel="search" href="' . $scripturl . '?action=search">' : ''); |
141 | 145 | |
142 | 146 | // If RSS feeds are enabled, advertise the presence of one. |
143 | - if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) |
|
144 | - echo ' |
|
147 | + if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) { |
|
148 | + echo ' |
|
145 | 149 | <link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['rss'], '" href="', $scripturl, '?action=.xml;type=rss2', !empty($context['current_board']) ? ';board=' . $context['current_board'] : '', '"> |
146 | 150 | <link rel="alternate" type="application/atom+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['atom'], '" href="', $scripturl, '?action=.xml;type=atom', !empty($context['current_board']) ? ';board=' . $context['current_board'] : '', '">'; |
151 | + } |
|
147 | 152 | |
148 | 153 | // If we're viewing a topic, these should be the previous and next topics, respectively. |
149 | - if (!empty($context['links']['next'])) |
|
150 | - echo ' |
|
154 | + if (!empty($context['links']['next'])) { |
|
155 | + echo ' |
|
151 | 156 | <link rel="next" href="', $context['links']['next'], '">'; |
157 | + } |
|
152 | 158 | |
153 | - if (!empty($context['links']['prev'])) |
|
154 | - echo ' |
|
159 | + if (!empty($context['links']['prev'])) { |
|
160 | + echo ' |
|
155 | 161 | <link rel="prev" href="', $context['links']['prev'], '">'; |
162 | + } |
|
156 | 163 | |
157 | 164 | // If we're in a board, or a topic for that matter, the index will be the board's index. |
158 | - if (!empty($context['current_board'])) |
|
159 | - echo ' |
|
165 | + if (!empty($context['current_board'])) { |
|
166 | + echo ' |
|
160 | 167 | <link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0">'; |
168 | + } |
|
161 | 169 | |
162 | 170 | // Output any remaining HTML headers. (from mods, maybe?) |
163 | 171 | echo $context['html_headers']; |
@@ -190,20 +198,22 @@ discard block |
||
190 | 198 | <li> |
191 | 199 | <a href="', $scripturl, '?action=profile"', !empty($context['self_profile']) ? ' class="active"' : '', ' id="profile_menu_top" onclick="return false;">'; |
192 | 200 | |
193 | - if (!empty($context['user']['avatar'])) |
|
194 | - echo $context['user']['avatar']['image']; |
|
201 | + if (!empty($context['user']['avatar'])) { |
|
202 | + echo $context['user']['avatar']['image']; |
|
203 | + } |
|
195 | 204 | |
196 | 205 | echo $context['user']['name'], '</a> |
197 | 206 | <div id="profile_menu" class="top_menu"></div> |
198 | 207 | </li>'; |
199 | 208 | |
200 | 209 | // Secondly, PMs if we're doing them |
201 | - if ($context['allow_pm']) |
|
202 | - echo ' |
|
210 | + if ($context['allow_pm']) { |
|
211 | + echo ' |
|
203 | 212 | <li> |
204 | 213 | <a href="', $scripturl, '?action=pm"', !empty($context['self_pm']) ? ' class="active"' : '', ' id="pm_menu_top">', $txt['pm_short'], !empty($context['user']['unread_messages']) ? ' <span class="amt">' . $context['user']['unread_messages'] . '</span>' : '', '</a> |
205 | 214 | <div id="pm_menu" class="top_menu scrollable"></div> |
206 | 215 | </li>'; |
216 | + } |
|
207 | 217 | |
208 | 218 | // Thirdly, alerts |
209 | 219 | echo ' |
@@ -218,17 +228,18 @@ discard block |
||
218 | 228 | } |
219 | 229 | // Otherwise they're a guest. Ask them to either register or login. |
220 | 230 | else |
221 | - if (empty($maintenance)) |
|
222 | - echo ' |
|
231 | + if (empty($maintenance)) { |
|
232 | + echo ' |
|
223 | 233 | <ul class="floatleft welcome"> |
224 | 234 | <li>', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $context['forum_name_html_safe'], $scripturl . '?action=login', 'return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ');', $scripturl . '?action=signup'), '</li> |
225 | 235 | </ul>'; |
226 | - else |
|
227 | - // In maintenance mode, only login is allowed and don't show OverlayDiv |
|
236 | + } else { |
|
237 | + // In maintenance mode, only login is allowed and don't show OverlayDiv |
|
228 | 238 | echo ' |
229 | 239 | <ul class="floatleft welcome"> |
230 | 240 | <li>', sprintf($txt['welcome_guest'], $txt['guest_title'], '', $scripturl. '?action=login', 'return true;'), '</li> |
231 | 241 | </ul>'; |
242 | + } |
|
232 | 243 | |
233 | 244 | if (!empty($modSettings['userLanguage']) && !empty($context['languages']) && count($context['languages']) > 1) |
234 | 245 | { |
@@ -236,9 +247,10 @@ discard block |
||
236 | 247 | <form id="languages_form" method="get" class="floatright"> |
237 | 248 | <select id="language_select" name="language" onchange="this.form.submit()">'; |
238 | 249 | |
239 | - foreach ($context['languages'] as $language) |
|
240 | - echo ' |
|
250 | + foreach ($context['languages'] as $language) { |
|
251 | + echo ' |
|
241 | 252 | <option value="', $language['filename'], '"', isset($context['user']['language']) && $context['user']['language'] == $language['filename'] ? ' selected="selected"' : '', '>', str_replace('-utf8', '', $language['name']), '</option>'; |
253 | + } |
|
242 | 254 | |
243 | 255 | echo ' |
244 | 256 | </select> |
@@ -262,32 +274,37 @@ discard block |
||
262 | 274 | <option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>'; |
263 | 275 | |
264 | 276 | // Can't limit it to a specific topic if we are not in one |
265 | - if (!empty($context['current_topic'])) |
|
266 | - echo ' |
|
277 | + if (!empty($context['current_topic'])) { |
|
278 | + echo ' |
|
267 | 279 | <option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>'; |
280 | + } |
|
268 | 281 | |
269 | 282 | // Can't limit it to a specific board if we are not in one |
270 | - if (!empty($context['current_board'])) |
|
271 | - echo ' |
|
283 | + if (!empty($context['current_board'])) { |
|
284 | + echo ' |
|
272 | 285 | <option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisbrd'], '</option>'; |
286 | + } |
|
273 | 287 | |
274 | 288 | // Can't search for members if we can't see the memberlist |
275 | - if (!empty($context['allow_memberlist'])) |
|
276 | - echo ' |
|
289 | + if (!empty($context['allow_memberlist'])) { |
|
290 | + echo ' |
|
277 | 291 | <option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>'; |
292 | + } |
|
278 | 293 | |
279 | 294 | echo ' |
280 | 295 | </select>'; |
281 | 296 | |
282 | 297 | // Search within current topic? |
283 | - if (!empty($context['current_topic'])) |
|
284 | - echo ' |
|
298 | + if (!empty($context['current_topic'])) { |
|
299 | + echo ' |
|
285 | 300 | <input type="hidden" name="sd_topic" value="', $context['current_topic'], '">'; |
301 | + } |
|
286 | 302 | |
287 | 303 | // If we're on a certain board, limit it to this board ;). |
288 | - elseif (!empty($context['current_board'])) |
|
289 | - echo ' |
|
304 | + elseif (!empty($context['current_board'])) { |
|
305 | + echo ' |
|
290 | 306 | <input type="hidden" name="sd_brd" value="', $context['current_board'], '">'; |
307 | + } |
|
291 | 308 | |
292 | 309 | echo ' |
293 | 310 | <input type="submit" name="search2" value="', $txt['search'], '" class="button"> |
@@ -319,12 +336,13 @@ discard block |
||
319 | 336 | </div>'; |
320 | 337 | |
321 | 338 | // Show a random news item? (or you could pick one from news_lines...) |
322 | - if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) |
|
323 | - echo ' |
|
339 | + if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) { |
|
340 | + echo ' |
|
324 | 341 | <div class="news"> |
325 | 342 | <h2>', $txt['news'], ': </h2> |
326 | 343 | <p>', $context['random_news_line'], '</p> |
327 | 344 | </div>'; |
345 | + } |
|
328 | 346 | |
329 | 347 | echo ' |
330 | 348 | <hr class="clear"> |
@@ -385,9 +403,10 @@ discard block |
||
385 | 403 | </ul>'; |
386 | 404 | |
387 | 405 | // Show the load time? |
388 | - if ($context['show_load_time']) |
|
389 | - echo ' |
|
406 | + if ($context['show_load_time']) { |
|
407 | + echo ' |
|
390 | 408 | <p>', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</p>'; |
409 | + } |
|
391 | 410 | |
392 | 411 | echo ' |
393 | 412 | </div> |
@@ -418,18 +437,20 @@ discard block |
||
418 | 437 | global $context, $shown_linktree, $scripturl, $txt; |
419 | 438 | |
420 | 439 | // If linktree is empty, just return - also allow an override. |
421 | - if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) |
|
422 | - return; |
|
440 | + if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) { |
|
441 | + return; |
|
442 | + } |
|
423 | 443 | echo ' |
424 | 444 | <div class="navigate_section"> |
425 | 445 | <ul>'; |
426 | 446 | |
427 | - if ($context['user']['is_logged']) |
|
428 | - echo ' |
|
447 | + if ($context['user']['is_logged']) { |
|
448 | + echo ' |
|
429 | 449 | <li class="unread_links"> |
430 | 450 | <a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a> |
431 | 451 | <a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a> |
432 | 452 | </li>'; |
453 | + } |
|
433 | 454 | |
434 | 455 | // Each tree item has a URL and name. Some may have extra_before and extra_after. |
435 | 456 | foreach ($context['linktree'] as $link_num => $tree) |
@@ -440,25 +461,29 @@ discard block |
||
440 | 461 | // Don't show a separator for the first one. |
441 | 462 | // Better here. Always points to the next level when the linktree breaks to a second line. |
442 | 463 | // Picked a better looking HTML entity, and added support for RTL plus a span for styling. |
443 | - if ($link_num != 0) |
|
444 | - echo ' |
|
464 | + if ($link_num != 0) { |
|
465 | + echo ' |
|
445 | 466 | <span class="dividers">', $context['right_to_left'] ? ' ◄ ' : ' ► ', '</span>'; |
467 | + } |
|
446 | 468 | |
447 | 469 | // Show something before the link? |
448 | - if (isset($tree['extra_before'])) |
|
449 | - echo $tree['extra_before'], ' '; |
|
470 | + if (isset($tree['extra_before'])) { |
|
471 | + echo $tree['extra_before'], ' '; |
|
472 | + } |
|
450 | 473 | |
451 | 474 | // Show the link, including a URL if it should have one. |
452 | - if (isset($tree['url'])) |
|
453 | - echo ' |
|
475 | + if (isset($tree['url'])) { |
|
476 | + echo ' |
|
454 | 477 | <a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>'; |
455 | - else |
|
456 | - echo ' |
|
478 | + } else { |
|
479 | + echo ' |
|
457 | 480 | <span>' . $tree['name'] . '</span>'; |
481 | + } |
|
458 | 482 | |
459 | 483 | // Show something after the link...? |
460 | - if (isset($tree['extra_after'])) |
|
461 | - echo ' ', $tree['extra_after']; |
|
484 | + if (isset($tree['extra_after'])) { |
|
485 | + echo ' ', $tree['extra_after']; |
|
486 | + } |
|
462 | 487 | |
463 | 488 | echo ' |
464 | 489 | </li>'; |
@@ -509,13 +534,14 @@ discard block |
||
509 | 534 | echo ' |
510 | 535 | <ul>'; |
511 | 536 | |
512 | - foreach ($childbutton['sub_buttons'] as $grandchildbutton) |
|
513 | - echo ' |
|
537 | + foreach ($childbutton['sub_buttons'] as $grandchildbutton) { |
|
538 | + echo ' |
|
514 | 539 | <li> |
515 | 540 | <a href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '> |
516 | 541 | ', $grandchildbutton['title'], ' |
517 | 542 | </a> |
518 | 543 | </li>'; |
544 | + } |
|
519 | 545 | |
520 | 546 | echo ' |
521 | 547 | </ul>'; |
@@ -546,8 +572,9 @@ discard block |
||
546 | 572 | { |
547 | 573 | global $context, $txt; |
548 | 574 | |
549 | - if (!is_array($strip_options)) |
|
550 | - $strip_options = array(); |
|
575 | + if (!is_array($strip_options)) { |
|
576 | + $strip_options = array(); |
|
577 | + } |
|
551 | 578 | |
552 | 579 | // Create the buttons... |
553 | 580 | $buttons = array(); |
@@ -556,8 +583,9 @@ discard block |
||
556 | 583 | // As of 2.1, the 'test' for each button happens while the array is being generated. The extra 'test' check here is deprecated but kept for backward compatibility (update your mods, folks!) |
557 | 584 | if (!isset($value['test']) || !empty($context[$value['test']])) |
558 | 585 | { |
559 | - if (!isset($value['id'])) |
|
560 | - $value['id'] = $key; |
|
586 | + if (!isset($value['id'])) { |
|
587 | + $value['id'] = $key; |
|
588 | + } |
|
561 | 589 | |
562 | 590 | $button = ' |
563 | 591 | <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>'; |
@@ -570,13 +598,15 @@ discard block |
||
570 | 598 | <div class="overview">'; |
571 | 599 | foreach ($value['sub_buttons'] as $element) |
572 | 600 | { |
573 | - if (isset($element['test']) && empty($context[$element['test']])) |
|
574 | - continue; |
|
601 | + if (isset($element['test']) && empty($context[$element['test']])) { |
|
602 | + continue; |
|
603 | + } |
|
575 | 604 | |
576 | 605 | $button .= ' |
577 | 606 | <a href="' . $element['url'] . '"><strong>' . $txt[$element['text']] . '</strong>'; |
578 | - if (isset($txt[$element['text'] . '_desc'])) |
|
579 | - $button .= '<br><span>' . $txt[$element['text'] . '_desc'] . '</span>'; |
|
607 | + if (isset($txt[$element['text'] . '_desc'])) { |
|
608 | + $button .= '<br><span>' . $txt[$element['text'] . '_desc'] . '</span>'; |
|
609 | + } |
|
580 | 610 | $button .= '</a>'; |
581 | 611 | } |
582 | 612 | $button .= ' |
@@ -590,8 +620,9 @@ discard block |
||
590 | 620 | } |
591 | 621 | |
592 | 622 | // No buttons? No button strip either. |
593 | - if (empty($buttons)) |
|
594 | - return; |
|
623 | + if (empty($buttons)) { |
|
624 | + return; |
|
625 | + } |
|
595 | 626 | |
596 | 627 | echo ' |
597 | 628 | <div class="buttonlist', !empty($direction) ? ' float' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"' : ''), '> |
@@ -121,9 +121,10 @@ discard block |
||
121 | 121 | <h3 class="catbg">', $txt['attachment_transfer'], '</h3> |
122 | 122 | </div>'; |
123 | 123 | |
124 | - if (!empty($context['results'])) |
|
125 | - echo ' |
|
124 | + if (!empty($context['results'])) { |
|
125 | + echo ' |
|
126 | 126 | <div class="noticebox">', $context['results'], '</div>'; |
127 | + } |
|
127 | 128 | |
128 | 129 | echo ' |
129 | 130 | <div class="windowbg2 noup"> |
@@ -135,9 +136,10 @@ discard block |
||
135 | 136 | <select name="from"> |
136 | 137 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
137 | 138 | |
138 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
139 | - echo ' |
|
139 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
140 | + echo ' |
|
140 | 141 | <option value="', $id, '">', $dir, '</option>'; |
142 | + } |
|
141 | 143 | |
142 | 144 | echo ' |
143 | 145 | </select> |
@@ -148,13 +150,14 @@ discard block |
||
148 | 150 | <option value="0">', $txt['attachment_transfer_auto_select'], '</option> |
149 | 151 | <option value="-1">', $txt['attachment_transfer_forum_root'], '</option>'; |
150 | 152 | |
151 | - if (!empty($context['base_dirs'])) |
|
152 | - foreach ($context['base_dirs'] as $id => $dir) |
|
153 | + if (!empty($context['base_dirs'])) { |
|
154 | + foreach ($context['base_dirs'] as $id => $dir) |
|
153 | 155 | echo ' |
154 | 156 | <option value="', $id, '">', $dir, '</option>'; |
155 | - else |
|
156 | - echo ' |
|
157 | + } else { |
|
158 | + echo ' |
|
157 | 159 | <option value="0" disabled>', $txt['attachment_transfer_no_base'], '</option>'; |
160 | + } |
|
158 | 161 | |
159 | 162 | echo ' |
160 | 163 | </select> |
@@ -164,18 +167,20 @@ discard block |
||
164 | 167 | <select name="to"> |
165 | 168 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
166 | 169 | |
167 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
168 | - echo ' |
|
170 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
171 | + echo ' |
|
169 | 172 | <option value="', $id, '">', $dir, '</option>'; |
173 | + } |
|
170 | 174 | |
171 | 175 | echo ' |
172 | 176 | </select> |
173 | 177 | </dd>'; |
174 | 178 | |
175 | - if (!empty($modSettings['attachmentDirFileLimit'])) |
|
176 | - echo ' |
|
179 | + if (!empty($modSettings['attachmentDirFileLimit'])) { |
|
180 | + echo ' |
|
177 | 181 | <dt>', $txt['attachment_transfer_empty'], '</dt> |
178 | 182 | <dd><input type="checkbox" name="empty_it"', $context['checked'] ? ' checked' : '', '></dd>'; |
183 | + } |
|
179 | 184 | |
180 | 185 | echo ' |
181 | 186 | </dl> |
@@ -211,8 +216,8 @@ discard block |
||
211 | 216 | global $context, $txt, $scripturl; |
212 | 217 | |
213 | 218 | // If we've completed just let them know! |
214 | - if ($context['completed']) |
|
215 | - echo ' |
|
219 | + if ($context['completed']) { |
|
220 | + echo ' |
|
216 | 221 | <div id="manage_attachments"> |
217 | 222 | <div class="cat_bar"> |
218 | 223 | <h3 class="catbg">', $txt['repair_attachments_complete'], '</h3> |
@@ -221,10 +226,11 @@ discard block |
||
221 | 226 | ', $txt['repair_attachments_complete_desc'], ' |
222 | 227 | </div> |
223 | 228 | </div>'; |
229 | + } |
|
224 | 230 | |
225 | 231 | // What about if no errors were even found? |
226 | - elseif (!$context['errors_found']) |
|
227 | - echo ' |
|
232 | + elseif (!$context['errors_found']) { |
|
233 | + echo ' |
|
228 | 234 | <div id="manage_attachments"> |
229 | 235 | <div class="cat_bar"> |
230 | 236 | <h3 class="catbg">', $txt['repair_attachments_complete'], '</h3> |
@@ -233,6 +239,7 @@ discard block |
||
233 | 239 | ', $txt['repair_attachments_no_errors'], ' |
234 | 240 | </div> |
235 | 241 | </div>'; |
242 | + } |
|
236 | 243 | |
237 | 244 | // Otherwise, I'm sad to say, we have a problem! |
238 | 245 | else |
@@ -247,11 +254,12 @@ discard block |
||
247 | 254 | <p>', $txt['repair_attachments_error_desc'], '</p>'; |
248 | 255 | |
249 | 256 | // Loop through each error reporting the status |
250 | - foreach ($context['repair_errors'] as $error => $number) |
|
251 | - if (!empty($number)) |
|
257 | + foreach ($context['repair_errors'] as $error => $number) { |
|
258 | + if (!empty($number)) |
|
252 | 259 | echo ' |
253 | 260 | <input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '"> |
254 | 261 | <label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label><br>'; |
262 | + } |
|
255 | 263 | |
256 | 264 | echo ' |
257 | 265 | <br> |
@@ -270,8 +278,9 @@ discard block |
||
270 | 278 | { |
271 | 279 | global $modSettings; |
272 | 280 | |
273 | - if (!empty($modSettings['attachment_basedirectories'])) |
|
274 | - template_show_list('base_paths'); |
|
281 | + if (!empty($modSettings['attachment_basedirectories'])) { |
|
282 | + template_show_list('base_paths'); |
|
283 | + } |
|
275 | 284 | |
276 | 285 | template_show_list('attach_paths'); |
277 | 286 | } |
@@ -55,9 +55,10 @@ discard block |
||
55 | 55 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
56 | 56 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0" checked onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
57 | 57 | |
58 | - if ($context['allow_protected']) |
|
59 | - echo ' |
|
58 | + if ($context['allow_protected']) { |
|
59 | + echo ' |
|
60 | 60 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
61 | + } |
|
61 | 62 | |
62 | 63 | echo ' |
63 | 64 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -67,14 +68,15 @@ discard block |
||
67 | 68 | </dd>'; |
68 | 69 | } |
69 | 70 | |
70 | - if ($context['post_group'] || $context['undefined_group']) |
|
71 | - echo ' |
|
71 | + if ($context['post_group'] || $context['undefined_group']) { |
|
72 | + echo ' |
|
72 | 73 | <dt id="min_posts_text"> |
73 | 74 | <strong>', $txt['membergroups_min_posts'], ':</strong> |
74 | 75 | </dt> |
75 | 76 | <dd> |
76 | 77 | <input type="number" name="min_posts" id="min_posts_input" size="5"> |
77 | 78 | </dd>'; |
79 | + } |
|
78 | 80 | |
79 | 81 | if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups'])) |
80 | 82 | { |
@@ -92,9 +94,10 @@ discard block |
||
92 | 94 | <option value="-1">', $txt['membergroups_guests'], '</option> |
93 | 95 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
94 | 96 | |
95 | - foreach ($context['groups'] as $group) |
|
96 | - echo ' |
|
97 | + foreach ($context['groups'] as $group) { |
|
98 | + echo ' |
|
97 | 99 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
100 | + } |
|
98 | 101 | |
99 | 102 | echo ' |
100 | 103 | </select> |
@@ -105,9 +108,10 @@ discard block |
||
105 | 108 | <option value="-1">', $txt['membergroups_guests'], '</option> |
106 | 109 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
107 | 110 | |
108 | - foreach ($context['groups'] as $group) |
|
109 | - echo ' |
|
111 | + foreach ($context['groups'] as $group) { |
|
112 | + echo ' |
|
110 | 113 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
114 | + } |
|
111 | 115 | |
112 | 116 | echo ' |
113 | 117 | </select> |
@@ -139,8 +143,8 @@ discard block |
||
139 | 143 | <input type="submit" value="', $txt['membergroups_add_group'], '" class="button"> |
140 | 144 | </div><!-- .windowbg2 -->'; |
141 | 145 | |
142 | - if ($context['undefined_group']) |
|
143 | - echo ' |
|
146 | + if ($context['undefined_group']) { |
|
147 | + echo ' |
|
144 | 148 | <script> |
145 | 149 | function swapPostGroup(isChecked) |
146 | 150 | { |
@@ -150,6 +154,7 @@ discard block |
||
150 | 154 | } |
151 | 155 | swapPostGroup(', $context['post_group'] ? 'true' : 'false', '); |
152 | 156 | </script>'; |
157 | + } |
|
153 | 158 | |
154 | 159 | echo ' |
155 | 160 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -181,14 +186,15 @@ discard block |
||
181 | 186 | <input type="text" name="group_name" id="group_name_input" value="', $context['group']['editable_name'], '" size="30"> |
182 | 187 | </dd>'; |
183 | 188 | |
184 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
185 | - echo ' |
|
189 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
190 | + echo ' |
|
186 | 191 | <dt id="group_desc_text"> |
187 | 192 | <label for="group_desc_input"><strong>', $txt['membergroups_edit_desc'], ':</strong></label> |
188 | 193 | </dt> |
189 | 194 | <dd> |
190 | 195 | <textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea> |
191 | 196 | </dd>'; |
197 | + } |
|
192 | 198 | |
193 | 199 | // Group type... |
194 | 200 | if ($context['group']['allow_post_group']) |
@@ -202,9 +208,10 @@ discard block |
||
202 | 208 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
203 | 209 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0"', !$context['group']['is_post_group'] && $context['group']['type'] == 0 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
204 | 210 | |
205 | - if ($context['group']['allow_protected']) |
|
206 | - echo ' |
|
211 | + if ($context['group']['allow_protected']) { |
|
212 | + echo ' |
|
207 | 213 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1"', $context['group']['type'] == 1 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
214 | + } |
|
208 | 215 | |
209 | 216 | echo ' |
210 | 217 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2"', $context['group']['type'] == 2 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -214,8 +221,8 @@ discard block |
||
214 | 221 | </dd>'; |
215 | 222 | } |
216 | 223 | |
217 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
218 | - echo ' |
|
224 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
225 | + echo ' |
|
219 | 226 | <dt id="group_moderators_text"> |
220 | 227 | <label for="group_moderators"><strong>', $txt['moderators'], ':</strong></label> |
221 | 228 | </dt> |
@@ -233,6 +240,7 @@ discard block |
||
233 | 240 | <option value="2"', $context['group']['hidden'] == 2 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_all'], '</option> |
234 | 241 | </select> |
235 | 242 | </dd>'; |
243 | + } |
|
236 | 244 | |
237 | 245 | // Can they inherit permissions? |
238 | 246 | if ($context['group']['id'] > 1 && $context['group']['id'] != 3) |
@@ -249,9 +257,10 @@ discard block |
||
249 | 257 | <option value="0"', $context['group']['inherited_from'] == 0 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>'; |
250 | 258 | |
251 | 259 | // For all the inheritable groups show an option. |
252 | - foreach ($context['inheritable_groups'] as $id => $group) |
|
253 | - echo ' |
|
260 | + foreach ($context['inheritable_groups'] as $id => $group) { |
|
261 | + echo ' |
|
254 | 262 | <option value="', $id, '"', $context['group']['inherited_from'] == $id ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>'; |
263 | + } |
|
255 | 264 | |
256 | 265 | echo ' |
257 | 266 | </select> |
@@ -259,8 +268,8 @@ discard block |
||
259 | 268 | </dd>'; |
260 | 269 | } |
261 | 270 | |
262 | - if ($context['group']['allow_post_group']) |
|
263 | - echo ' |
|
271 | + if ($context['group']['allow_post_group']) { |
|
272 | + echo ' |
|
264 | 273 | |
265 | 274 | <dt id="min_posts_text"> |
266 | 275 | <label for="min_posts_input"><strong>', $txt['membergroups_min_posts'], ':</strong></label> |
@@ -268,6 +277,7 @@ discard block |
||
268 | 277 | <dd> |
269 | 278 | <input type="number" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6"> |
270 | 279 | </dd>'; |
280 | + } |
|
271 | 281 | |
272 | 282 | echo ' |
273 | 283 | <dt> |
@@ -297,9 +307,10 @@ discard block |
||
297 | 307 | <select name="icon_image" id="icon_image_input">'; |
298 | 308 | |
299 | 309 | // For every possible icon, create an option. |
300 | - foreach ($context['possible_icons'] as $icon) |
|
301 | - echo ' |
|
310 | + foreach ($context['possible_icons'] as $icon) { |
|
311 | + echo ' |
|
302 | 312 | <option value="', $icon, '"', $context['group']['icon_image'] == $icon ? ' selected' : '', '>', $icon, '</option>'; |
313 | + } |
|
303 | 314 | |
304 | 315 | echo ' |
305 | 316 | </select> |
@@ -308,9 +319,10 @@ discard block |
||
308 | 319 | } |
309 | 320 | |
310 | 321 | // No? Hide the entire control. |
311 | - else |
|
312 | - echo ' |
|
322 | + else { |
|
323 | + echo ' |
|
313 | 324 | <input type="hidden" name="icon_image" value="">'; |
325 | + } |
|
314 | 326 | |
315 | 327 | echo ' |
316 | 328 | <dt> |
@@ -322,8 +334,8 @@ discard block |
||
322 | 334 | </dd>'; |
323 | 335 | |
324 | 336 | // Force 2FA for this membergroup? |
325 | - if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) |
|
326 | - echo ' |
|
337 | + if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) { |
|
338 | + echo ' |
|
327 | 339 | <dt> |
328 | 340 | <label for="group_tfa_force_input"><strong>', $txt['membergroups_tfa_force'], ':</strong></label><br> |
329 | 341 | <span class="smalltext">', $txt['membergroups_tfa_force_note'], '</span> |
@@ -331,6 +343,7 @@ discard block |
||
331 | 343 | <dd> |
332 | 344 | <input type="checkbox" name="group_tfa_force"', $context['group']['tfa_required'] ? ' checked' : '', '> |
333 | 345 | </dd>'; |
346 | + } |
|
334 | 347 | |
335 | 348 | if (!empty($context['categories'])) |
336 | 349 | { |
@@ -341,11 +354,11 @@ discard block |
||
341 | 354 | </dt> |
342 | 355 | <dd>'; |
343 | 356 | |
344 | - if (!empty($context['can_manage_boards'])) |
|
345 | - echo $txt['membergroups_can_manage_access']; |
|
346 | - |
|
347 | - else |
|
348 | - template_add_edit_group_boards_list(); |
|
357 | + if (!empty($context['can_manage_boards'])) { |
|
358 | + echo $txt['membergroups_can_manage_access']; |
|
359 | + } else { |
|
360 | + template_add_edit_group_boards_list(); |
|
361 | + } |
|
349 | 362 | |
350 | 363 | echo ' |
351 | 364 | </dd>'; |
@@ -375,20 +388,21 @@ discard block |
||
375 | 388 | sItemListContainerId: \'moderator_container\', |
376 | 389 | aListItems: ['; |
377 | 390 | |
378 | - foreach ($context['group']['moderators'] as $id_member => $member_name) |
|
379 | - echo ' |
|
391 | + foreach ($context['group']['moderators'] as $id_member => $member_name) { |
|
392 | + echo ' |
|
380 | 393 | { |
381 | 394 | sItemId: ', JavaScriptEscape($id_member), ', |
382 | 395 | sItemName: ', JavaScriptEscape($member_name), ' |
383 | 396 | }', $id_member == $context['group']['last_moderator_id'] ? '' : ','; |
397 | + } |
|
384 | 398 | |
385 | 399 | echo ' |
386 | 400 | ] |
387 | 401 | }); |
388 | 402 | </script>'; |
389 | 403 | |
390 | - if ($context['group']['allow_post_group']) |
|
391 | - echo ' |
|
404 | + if ($context['group']['allow_post_group']) { |
|
405 | + echo ' |
|
392 | 406 | <script> |
393 | 407 | function swapPostGroup(isChecked) |
394 | 408 | { |
@@ -436,7 +450,8 @@ discard block |
||
436 | 450 | |
437 | 451 | swapPostGroup(', $context['group']['is_post_group'] ? 'true' : 'false', '); |
438 | 452 | </script>'; |
439 | -} |
|
453 | + } |
|
454 | + } |
|
440 | 455 | |
441 | 456 | /** |
442 | 457 | * The template for determining which boards a group has access to. |
@@ -454,13 +469,13 @@ discard block |
||
454 | 469 | |
455 | 470 | foreach ($context['categories'] as $category) |
456 | 471 | { |
457 | - if (empty($modSettings['deny_boards_access'])) |
|
458 | - echo ' |
|
472 | + if (empty($modSettings['deny_boards_access'])) { |
|
473 | + echo ' |
|
459 | 474 | <li class="category"> |
460 | 475 | <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'new_group\'); return false;"><strong>', $category['name'], '</strong></a> |
461 | 476 | <ul>'; |
462 | - else |
|
463 | - echo ' |
|
477 | + } else { |
|
478 | + echo ' |
|
464 | 479 | <li class="category"> |
465 | 480 | <strong>', $category['name'], '</strong> |
466 | 481 | <span class="select_all_box"> |
@@ -473,16 +488,17 @@ discard block |
||
473 | 488 | </select> |
474 | 489 | </span> |
475 | 490 | <ul id="boards_list_', $category['id'], '">'; |
491 | + } |
|
476 | 492 | |
477 | 493 | foreach ($category['boards'] as $board) |
478 | 494 | { |
479 | - if (empty($modSettings['deny_boards_access'])) |
|
480 | - echo ' |
|
495 | + if (empty($modSettings['deny_boards_access'])) { |
|
496 | + echo ' |
|
481 | 497 | <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"> |
482 | 498 | <input type="checkbox" name="boardaccess[', $board['id'], ']" id="brd', $board['id'], '" value="allow"', $board['allow'] ? ' checked' : '', '> <label for="brd', $board['id'], '">', $board['name'], '</label> |
483 | 499 | </li>'; |
484 | - else |
|
485 | - echo ' |
|
500 | + } else { |
|
501 | + echo ' |
|
486 | 502 | <li class="board" style="width:100%"> |
487 | 503 | <span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span> |
488 | 504 | <span style="width:50%;float:right"> |
@@ -491,6 +507,7 @@ discard block |
||
491 | 507 | <input type="radio" name="boardaccess[', $board['id'], ']" id="deny_brd', $board['id'], '" value="deny"', $board['deny'] ? ' checked' : '', '> <label for="deny_brd', $board['id'], '">', $txt['permissions_option_deny'], '</label> |
492 | 508 | </span> |
493 | 509 | </li>'; |
510 | + } |
|
494 | 511 | } |
495 | 512 | |
496 | 513 | echo ' |
@@ -501,14 +518,14 @@ discard block |
||
501 | 518 | echo ' |
502 | 519 | </ul>'; |
503 | 520 | |
504 | - if (empty($modSettings['deny_boards_access'])) |
|
505 | - echo ' |
|
521 | + if (empty($modSettings['deny_boards_access'])) { |
|
522 | + echo ' |
|
506 | 523 | <br class="clear"><br> |
507 | 524 | <input type="checkbox" id="checkall_check" onclick="invertAll(this, this.form, \'boardaccess\');"> |
508 | 525 | <label for="checkall_check"><em>', $txt['check_all'], '</em></label> |
509 | 526 | </fieldset>'; |
510 | - else |
|
511 | - echo ' |
|
527 | + } else { |
|
528 | + echo ' |
|
512 | 529 | <br class="clear"> |
513 | 530 | <span class="select_all_box"> |
514 | 531 | <em>', $txt['all'], ': </em> |
@@ -524,15 +541,17 @@ discard block |
||
524 | 541 | }); |
525 | 542 | }); |
526 | 543 | </script>'; |
544 | + } |
|
527 | 545 | |
528 | - if ($collapse) |
|
529 | - echo ' |
|
546 | + if ($collapse) { |
|
547 | + echo ' |
|
530 | 548 | <a href="javascript:void(0);" onclick="document.getElementById(\'visible_boards\').style.display = \'block\'; document.getElementById(\'visible_boards_link\').style.display = \'none\'; return false;" id="visible_boards_link" style="display: none;">[ ', $txt['membergroups_select_visible_boards'], ' ]</a> |
531 | 549 | <script> |
532 | 550 | document.getElementById("visible_boards_link").style.display = ""; |
533 | 551 | document.getElementById("visible_boards").style.display = "none"; |
534 | 552 | </script>'; |
535 | -} |
|
553 | + } |
|
554 | + } |
|
536 | 555 | |
537 | 556 | /** |
538 | 557 | * Templatine for viewing the members of a group. |
@@ -557,14 +576,15 @@ discard block |
||
557 | 576 | </dd>'; |
558 | 577 | |
559 | 578 | // Any description to show? |
560 | - if (!empty($context['group']['description'])) |
|
561 | - echo ' |
|
579 | + if (!empty($context['group']['description'])) { |
|
580 | + echo ' |
|
562 | 581 | <dt> |
563 | 582 | <strong>' . $txt['membergroups_members_description'] . ':</strong> |
564 | 583 | </dt> |
565 | 584 | <dd> |
566 | 585 | ', $context['group']['description'], ' |
567 | 586 | </dd>'; |
587 | + } |
|
568 | 588 | |
569 | 589 | echo ' |
570 | 590 | <dt> |
@@ -578,8 +598,9 @@ discard block |
||
578 | 598 | if (!empty($context['group']['moderators'])) |
579 | 599 | { |
580 | 600 | $moderators = array(); |
581 | - foreach ($context['group']['moderators'] as $moderator) |
|
582 | - $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
601 | + foreach ($context['group']['moderators'] as $moderator) { |
|
602 | + $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
603 | + } |
|
583 | 604 | |
584 | 605 | echo ' |
585 | 606 | <dt> |
@@ -604,9 +625,10 @@ discard block |
||
604 | 625 | <tr class="title_bar"> |
605 | 626 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
606 | 627 | |
607 | - if ($context['can_send_email']) |
|
608 | - echo ' |
|
628 | + if ($context['can_send_email']) { |
|
629 | + echo ' |
|
609 | 630 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=email', $context['sort_by'] == 'email' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['email'], $context['sort_by'] == 'email' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
631 | + } |
|
610 | 632 | |
611 | 633 | echo ' |
612 | 634 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
@@ -615,20 +637,22 @@ discard block |
||
615 | 637 | <a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a> |
616 | 638 | </th>'; |
617 | 639 | |
618 | - if (!empty($context['group']['assignable'])) |
|
619 | - echo ' |
|
640 | + if (!empty($context['group']['assignable'])) { |
|
641 | + echo ' |
|
620 | 642 | <th style="width: 4%"><input type="checkbox" onclick="invertAll(this, this.form);"></th>'; |
643 | + } |
|
621 | 644 | |
622 | 645 | echo ' |
623 | 646 | </tr> |
624 | 647 | </thead> |
625 | 648 | <tbody>'; |
626 | 649 | |
627 | - if (empty($context['members'])) |
|
628 | - echo ' |
|
650 | + if (empty($context['members'])) { |
|
651 | + echo ' |
|
629 | 652 | <tr class="windowbg"> |
630 | 653 | <td colspan="6">', $txt['membergroups_members_no_members'], '</td> |
631 | 654 | </tr>'; |
655 | + } |
|
632 | 656 | |
633 | 657 | foreach ($context['members'] as $member) |
634 | 658 | { |
@@ -636,20 +660,22 @@ discard block |
||
636 | 660 | <tr class="windowbg"> |
637 | 661 | <td>', $member['name'], '</td>'; |
638 | 662 | |
639 | - if ($context['can_send_email']) |
|
640 | - echo ' |
|
663 | + if ($context['can_send_email']) { |
|
664 | + echo ' |
|
641 | 665 | <td> |
642 | 666 | <a href="mailto:', $member['email'], '">', $member['email'], '</a> |
643 | 667 | </td>'; |
668 | + } |
|
644 | 669 | |
645 | 670 | echo ' |
646 | 671 | <td>', $member['last_online'], '</td> |
647 | 672 | <td>', $member['registered'], '</td> |
648 | 673 | <td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>'; |
649 | 674 | |
650 | - if (!empty($context['group']['assignable'])) |
|
651 | - echo ' |
|
675 | + if (!empty($context['group']['assignable'])) { |
|
676 | + echo ' |
|
652 | 677 | <td style="width: 4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>'; |
678 | + } |
|
653 | 679 | |
654 | 680 | echo ' |
655 | 681 | </tr>'; |
@@ -659,11 +685,12 @@ discard block |
||
659 | 685 | </tbody> |
660 | 686 | </table>'; |
661 | 687 | |
662 | - if (!empty($context['group']['assignable'])) |
|
663 | - echo ' |
|
688 | + if (!empty($context['group']['assignable'])) { |
|
689 | + echo ' |
|
664 | 690 | <div class="floatright"> |
665 | 691 | <input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button "> |
666 | 692 | </div>'; |
693 | + } |
|
667 | 694 | |
668 | 695 | echo ' |
669 | 696 | <div class="pagesection flow_hidden"> |
@@ -671,8 +698,8 @@ discard block |
||
671 | 698 | </div> |
672 | 699 | <br>'; |
673 | 700 | |
674 | - if (!empty($context['group']['assignable'])) |
|
675 | - echo ' |
|
701 | + if (!empty($context['group']['assignable'])) { |
|
702 | + echo ' |
|
676 | 703 | <div class="cat_bar"> |
677 | 704 | <h3 class="catbg">', $txt['membergroups_members_add_title'], '</h3> |
678 | 705 | </div> |
@@ -688,6 +715,7 @@ discard block |
||
688 | 715 | </dl> |
689 | 716 | <input type="submit" name="add" value="', $txt['membergroups_members_add'], '" class="button"> |
690 | 717 | </div>'; |
718 | + } |
|
691 | 719 | |
692 | 720 | echo ' |
693 | 721 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -695,8 +723,8 @@ discard block |
||
695 | 723 | </form> |
696 | 724 | </div><!-- #admincenter -->'; |
697 | 725 | |
698 | - if (!empty($context['group']['assignable'])) |
|
699 | - echo ' |
|
726 | + if (!empty($context['group']['assignable'])) { |
|
727 | + echo ' |
|
700 | 728 | <script> |
701 | 729 | var oAddMemberSuggest = new smc_AutoSuggest({ |
702 | 730 | sSelf: \'oAddMemberSuggest\', |
@@ -712,7 +740,8 @@ discard block |
||
712 | 740 | sItemListContainerId: \'toAddItemContainer\' |
713 | 741 | }); |
714 | 742 | </script>'; |
715 | -} |
|
743 | + } |
|
744 | + } |
|
716 | 745 | |
717 | 746 | /** |
718 | 747 | * Allow the moderator to enter a reason to each user being rejected. |
@@ -732,8 +761,8 @@ discard block |
||
732 | 761 | <dl class="settings">'; |
733 | 762 | |
734 | 763 | // Loop through and print out a reason box for each... |
735 | - foreach ($context['group_requests'] as $request) |
|
736 | - echo ' |
|
764 | + foreach ($context['group_requests'] as $request) { |
|
765 | + echo ' |
|
737 | 766 | <dt> |
738 | 767 | <strong>', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</strong> |
739 | 768 | </dt> |
@@ -741,6 +770,7 @@ discard block |
||
741 | 770 | <input type="hidden" name="groupr[]" value="', $request['id'], '"> |
742 | 771 | <textarea name="groupreason[', $request['id'], ']" rows="3" cols="40"></textarea> |
743 | 772 | </dd>'; |
773 | + } |
|
744 | 774 | |
745 | 775 | echo ' |
746 | 776 | </dl> |
@@ -18,11 +18,12 @@ discard block |
||
18 | 18 | global $context, $txt, $scripturl, $modSettings; |
19 | 19 | |
20 | 20 | // If maintenance has finished tell the user. |
21 | - if (!empty($context['maintenance_finished'])) |
|
22 | - echo ' |
|
21 | + if (!empty($context['maintenance_finished'])) { |
|
22 | + echo ' |
|
23 | 23 | <div class="infobox"> |
24 | 24 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
25 | 25 | </div>'; |
26 | + } |
|
26 | 27 | |
27 | 28 | echo ' |
28 | 29 | <div id="manage_maintenance"> |
@@ -39,8 +40,8 @@ discard block |
||
39 | 40 | </div>'; |
40 | 41 | |
41 | 42 | // Show an option to convert the body column of the post table to MEDIUMTEXT or TEXT |
42 | - if (isset($context['convert_to'])) |
|
43 | - echo ' |
|
43 | + if (isset($context['convert_to'])) { |
|
44 | + echo ' |
|
44 | 45 | <div class="cat_bar"> |
45 | 46 | <h3 class="catbg">', $txt[$context['convert_to'] . '_title'], '</h3> |
46 | 47 | </div> |
@@ -53,10 +54,11 @@ discard block |
||
53 | 54 | <input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '"> |
54 | 55 | </form> |
55 | 56 | </div>'; |
57 | + } |
|
56 | 58 | |
57 | 59 | // Show an option to convert to UTF-8 if we're not on UTF-8 yet. |
58 | - if ($context['convert_utf8']) |
|
59 | - echo ' |
|
60 | + if ($context['convert_utf8']) { |
|
61 | + echo ' |
|
60 | 62 | <div class="cat_bar"> |
61 | 63 | <h3 class="catbg">', $txt['utf8_title'], '</h3> |
62 | 64 | </div> |
@@ -69,10 +71,11 @@ discard block |
||
69 | 71 | <input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '"> |
70 | 72 | </form> |
71 | 73 | </div>'; |
74 | + } |
|
72 | 75 | |
73 | 76 | // We might want to convert entities if we're on UTF-8. |
74 | - if ($context['convert_entities']) |
|
75 | - echo ' |
|
77 | + if ($context['convert_entities']) { |
|
78 | + echo ' |
|
76 | 79 | <div class="cat_bar"> |
77 | 80 | <h3 class="catbg">', $txt['entity_convert_title'], '</h3> |
78 | 81 | </div> |
@@ -84,6 +87,7 @@ discard block |
||
84 | 87 | <input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '"> |
85 | 88 | </form> |
86 | 89 | </div>'; |
90 | + } |
|
87 | 91 | |
88 | 92 | echo ' |
89 | 93 | </div><!-- #manage_maintenance -->'; |
@@ -101,11 +105,12 @@ discard block |
||
101 | 105 | <div id="manage_maintenance">'; |
102 | 106 | |
103 | 107 | // If maintenance has finished tell the user. |
104 | - if (!empty($context['maintenance_finished'])) |
|
105 | - echo ' |
|
108 | + if (!empty($context['maintenance_finished'])) { |
|
109 | + echo ' |
|
106 | 110 | <div class="infobox"> |
107 | 111 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
108 | 112 | </div>'; |
113 | + } |
|
109 | 114 | |
110 | 115 | echo ' |
111 | 116 | <div class="cat_bar"> |
@@ -237,11 +242,12 @@ discard block |
||
237 | 242 | <div id="manage_maintenance">'; |
238 | 243 | |
239 | 244 | // If maintenance has finished, tell the user. |
240 | - if (!empty($context['maintenance_finished'])) |
|
241 | - echo ' |
|
245 | + if (!empty($context['maintenance_finished'])) { |
|
246 | + echo ' |
|
242 | 247 | <div class="infobox"> |
243 | 248 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
244 | 249 | </div>'; |
250 | + } |
|
245 | 251 | |
246 | 252 | echo ' |
247 | 253 | <div class="cat_bar"> |
@@ -303,9 +309,10 @@ discard block |
||
303 | 309 | </p> |
304 | 310 | <div style="display: none;" id="membersPanel">'; |
305 | 311 | |
306 | - foreach ($context['membergroups'] as $group) |
|
307 | - echo ' |
|
312 | + foreach ($context['membergroups'] as $group) { |
|
313 | + echo ' |
|
308 | 314 | <label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked> ', $group['name'], '</label><br>'; |
315 | + } |
|
309 | 316 | |
310 | 317 | echo ' |
311 | 318 | </div> |
@@ -349,11 +356,12 @@ discard block |
||
349 | 356 | global $scripturl, $txt, $context, $settings, $modSettings; |
350 | 357 | |
351 | 358 | // If maintenance has finished tell the user. |
352 | - if (!empty($context['maintenance_finished'])) |
|
353 | - echo ' |
|
359 | + if (!empty($context['maintenance_finished'])) { |
|
360 | + echo ' |
|
354 | 361 | <div class="infobox"> |
355 | 362 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
356 | 363 | </div>'; |
364 | + } |
|
357 | 365 | |
358 | 366 | // Bit of javascript for showing which boards to prune in an otherwise hidden list. |
359 | 367 | echo ' |
@@ -421,21 +429,23 @@ discard block |
||
421 | 429 | <ul>'; |
422 | 430 | |
423 | 431 | // Display a checkbox with every board. |
424 | - foreach ($category['boards'] as $board) |
|
425 | - echo ' |
|
432 | + foreach ($category['boards'] as $board) { |
|
433 | + echo ' |
|
426 | 434 | <li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"> |
427 | 435 | <label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked>', $board['name'], '</label> |
428 | 436 | </li>'; |
437 | + } |
|
429 | 438 | |
430 | 439 | echo ' |
431 | 440 | </ul> |
432 | 441 | </fieldset>'; |
433 | 442 | |
434 | 443 | // Increase $i, and check if we're at the middle yet. |
435 | - if (++$i == $middle) |
|
436 | - echo ' |
|
444 | + if (++$i == $middle) { |
|
445 | + echo ' |
|
437 | 446 | </div><!-- .floatleft --> |
438 | 447 | <div class="floatright" style="width: 49%;">'; |
448 | + } |
|
439 | 449 | } |
440 | 450 | |
441 | 451 | echo ' |
@@ -477,9 +487,10 @@ discard block |
||
477 | 487 | echo ' |
478 | 488 | <optgroup label="', $category['name'], '">'; |
479 | 489 | |
480 | - foreach ($category['boards'] as $board) |
|
481 | - echo ' |
|
490 | + foreach ($category['boards'] as $board) { |
|
491 | + echo ' |
|
482 | 492 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
493 | + } |
|
483 | 494 | |
484 | 495 | echo ' |
485 | 496 | </optgroup>'; |
@@ -497,9 +508,10 @@ discard block |
||
497 | 508 | echo ' |
498 | 509 | <optgroup label="', $category['name'], '">'; |
499 | 510 | |
500 | - foreach ($category['boards'] as $board) |
|
501 | - echo ' |
|
511 | + foreach ($category['boards'] as $board) { |
|
512 | + echo ' |
|
502 | 513 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
514 | + } |
|
503 | 515 | |
504 | 516 | echo ' |
505 | 517 | </optgroup>'; |
@@ -540,9 +552,10 @@ discard block |
||
540 | 552 | ', $txt['database_optimize_attempt'], '<br>'; |
541 | 553 | |
542 | 554 | // List each table being optimized... |
543 | - foreach ($context['optimized_tables'] as $table) |
|
544 | - echo ' |
|
555 | + foreach ($context['optimized_tables'] as $table) { |
|
556 | + echo ' |
|
545 | 557 | ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>'; |
558 | + } |
|
546 | 559 | |
547 | 560 | // How did we go? |
548 | 561 | echo ' |
@@ -602,13 +615,14 @@ discard block |
||
602 | 615 | </li> |
603 | 616 | </ul>'; |
604 | 617 | |
605 | - if (!empty($context['exceeding_messages_morethan'])) |
|
606 | - echo ' |
|
618 | + if (!empty($context['exceeding_messages_morethan'])) { |
|
619 | + echo ' |
|
607 | 620 | <p>', $context['exceeding_messages_morethan'], '</p>'; |
608 | - } |
|
609 | - else |
|
610 | - echo ' |
|
621 | + } |
|
622 | + } else { |
|
623 | + echo ' |
|
611 | 624 | <p class="infobox">', $txt['convert_to_text'], '</p>'; |
625 | + } |
|
612 | 626 | |
613 | 627 | echo ' |
614 | 628 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '"> |
@@ -18,11 +18,12 @@ discard block |
||
18 | 18 | global $context, $txt, $scripturl; |
19 | 19 | |
20 | 20 | // Let them know the action was a success. |
21 | - if (!empty($context['report_post_action'])) |
|
22 | - echo ' |
|
21 | + if (!empty($context['report_post_action'])) { |
|
22 | + echo ' |
|
23 | 23 | <div class="infobox"> |
24 | 24 | ', $txt['report_action_' . $context['report_post_action']], ' |
25 | 25 | </div>'; |
26 | + } |
|
26 | 27 | |
27 | 28 | echo ' |
28 | 29 | <form id="reported_posts" action="', $scripturl, '?action=moderate;area=reportedposts;sa=show', $context['view_closed'] ? ';closed' : '', ';start=', $context['start'], '" method="post" accept-charset="', $context['character_set'], '"> |
@@ -52,8 +53,9 @@ discard block |
||
52 | 53 | |
53 | 54 | // Prepare the comments... |
54 | 55 | $comments = array(); |
55 | - foreach ($report['comments'] as $comment) |
|
56 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
56 | + foreach ($report['comments'] as $comment) { |
|
57 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
58 | + } |
|
57 | 59 | |
58 | 60 | echo ' |
59 | 61 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -69,18 +71,21 @@ discard block |
||
69 | 71 | <li><a href="', $scripturl, '?action=moderate;area=reportedposts;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>'; |
70 | 72 | |
71 | 73 | // Delete message button. |
72 | - if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) |
|
73 | - echo ' |
|
74 | + if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) { |
|
75 | + echo ' |
|
74 | 76 | <li><a href="', $scripturl, '?action=deletemsg;topic=', $report['topic']['id'], '.0;msg=', $report['topic']['id_msg'], ';modcenter;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['mc_reportedp_delete_confirm'], '" class="you_sure">', $delete_button, '</a></li>'; |
77 | + } |
|
75 | 78 | |
76 | 79 | // Ban this user button. |
77 | - if (!$report['closed'] && !empty($context['report_manage_bans'])) |
|
78 | - echo ' |
|
80 | + if (!$report['closed'] && !empty($context['report_manage_bans'])) { |
|
81 | + echo ' |
|
79 | 82 | <li><a href="', $scripturl, '?action=admin;area=ban;sa=add', (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']), ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>'; |
83 | + } |
|
80 | 84 | |
81 | - if (!$context['view_closed']) |
|
82 | - echo ' |
|
85 | + if (!$context['view_closed']) { |
|
86 | + echo ' |
|
83 | 87 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>'; |
88 | + } |
|
84 | 89 | |
85 | 90 | echo ' |
86 | 91 | </ul> |
@@ -88,18 +93,20 @@ discard block |
||
88 | 93 | } |
89 | 94 | |
90 | 95 | // Were none found? |
91 | - if (empty($context['reports'])) |
|
92 | - echo ' |
|
96 | + if (empty($context['reports'])) { |
|
97 | + echo ' |
|
93 | 98 | <div class="windowbg2"> |
94 | 99 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
95 | 100 | </div>'; |
101 | + } |
|
96 | 102 | |
97 | 103 | echo ' |
98 | 104 | <div class="pagesection">'; |
99 | 105 | |
100 | - if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many']) |
|
101 | - echo ' |
|
106 | + if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many']) { |
|
107 | + echo ' |
|
102 | 108 | <div class="pagelinks floatleft">' . $context['page_index'] . '</div>'; |
109 | + } |
|
103 | 110 | |
104 | 111 | echo ' |
105 | 112 | <div class="floatright">', !$context['view_closed'] ? ' |
@@ -130,18 +137,20 @@ discard block |
||
130 | 137 | <div class="modbox"> |
131 | 138 | <ul>'; |
132 | 139 | |
133 | - foreach ($context['reported_posts'] as $report) |
|
134 | - echo ' |
|
140 | + foreach ($context['reported_posts'] as $report) { |
|
141 | + echo ' |
|
135 | 142 | <li class="smalltext"> |
136 | 143 | <a href="', $report['report_href'], '">', $report['subject'], '</a> ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], ' |
137 | 144 | </li>'; |
145 | + } |
|
138 | 146 | |
139 | 147 | // Don't have any watched users right now? |
140 | - if (empty($context['reported_posts'])) |
|
141 | - echo ' |
|
148 | + if (empty($context['reported_posts'])) { |
|
149 | + echo ' |
|
142 | 150 | <li> |
143 | 151 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
144 | 152 | </li>'; |
153 | + } |
|
145 | 154 | |
146 | 155 | echo ' |
147 | 156 | </ul> |
@@ -189,11 +198,12 @@ discard block |
||
189 | 198 | global $context, $scripturl, $txt; |
190 | 199 | |
191 | 200 | // Let them know the action was a success. |
192 | - if (!empty($context['report_post_action'])) |
|
193 | - echo ' |
|
201 | + if (!empty($context['report_post_action'])) { |
|
202 | + echo ' |
|
194 | 203 | <div class="infobox"> |
195 | 204 | ', $txt['report_action_' . $context['report_post_action']], ' |
196 | 205 | </div>'; |
206 | + } |
|
197 | 207 | |
198 | 208 | echo ' |
199 | 209 | <div id="modcenter"> |
@@ -229,14 +239,15 @@ discard block |
||
229 | 239 | <h3 class="catbg">', $txt['mc_modreport_whoreported_title'], '</h3> |
230 | 240 | </div>'; |
231 | 241 | |
232 | - foreach ($context['report']['comments'] as $comment) |
|
233 | - echo ' |
|
242 | + foreach ($context['report']['comments'] as $comment) { |
|
243 | + echo ' |
|
234 | 244 | <div class="windowbg"> |
235 | 245 | <p class="smalltext"> |
236 | 246 | ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' |
237 | 247 | </p> |
238 | 248 | <p>', $comment['message'], '</p> |
239 | 249 | </div>'; |
250 | + } |
|
240 | 251 | |
241 | 252 | echo ' |
242 | 253 | <br> |
@@ -245,11 +256,12 @@ discard block |
||
245 | 256 | </div> |
246 | 257 | <div>'; |
247 | 258 | |
248 | - if (empty($context['report']['mod_comments'])) |
|
249 | - echo ' |
|
259 | + if (empty($context['report']['mod_comments'])) { |
|
260 | + echo ' |
|
250 | 261 | <div class="information"> |
251 | 262 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
252 | 263 | </div>'; |
264 | + } |
|
253 | 265 | |
254 | 266 | foreach ($context['report']['mod_comments'] as $comment) |
255 | 267 | { |
@@ -335,18 +347,20 @@ discard block |
||
335 | 347 | <div class="modbox"> |
336 | 348 | <ul>'; |
337 | 349 | |
338 | - foreach ($context['reported_members'] as $report) |
|
339 | - echo ' |
|
350 | + foreach ($context['reported_members'] as $report) { |
|
351 | + echo ' |
|
340 | 352 | <li class="smalltext"> |
341 | 353 | <a href="', $report['report_href'], '">', $report['user_name'], '</a> |
342 | 354 | </li>'; |
355 | + } |
|
343 | 356 | |
344 | 357 | // Don't have any reported members right now? |
345 | - if (empty($context['reported_members'])) |
|
346 | - echo ' |
|
358 | + if (empty($context['reported_members'])) { |
|
359 | + echo ' |
|
347 | 360 | <li> |
348 | 361 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
349 | 362 | </li>'; |
363 | + } |
|
350 | 364 | |
351 | 365 | echo ' |
352 | 366 | </ul> |
@@ -394,11 +408,12 @@ discard block |
||
394 | 408 | global $context, $txt, $scripturl; |
395 | 409 | |
396 | 410 | // Let them know the action was a success. |
397 | - if (!empty($context['report_post_action']) && !empty($txt['report_action_' . $context['report_post_action']])) |
|
398 | - echo ' |
|
411 | + if (!empty($context['report_post_action']) && !empty($txt['report_action_' . $context['report_post_action']])) { |
|
412 | + echo ' |
|
399 | 413 | <div class="infobox"> |
400 | 414 | ', $txt['report_action_' . $context['report_post_action']], ' |
401 | 415 | </div>'; |
416 | + } |
|
402 | 417 | |
403 | 418 | echo ' |
404 | 419 | <form id="reported_members" action="', $scripturl, '?action=moderate;area=reportedmembers;sa=show', $context['view_closed'] ? ';closed' : '', ';start=', $context['start'], '" method="post" accept-charset="', $context['character_set'], '"> |
@@ -430,8 +445,9 @@ discard block |
||
430 | 445 | |
431 | 446 | // Prepare the comments... |
432 | 447 | $comments = array(); |
433 | - foreach ($report['comments'] as $comment) |
|
434 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
448 | + foreach ($report['comments'] as $comment) { |
|
449 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
450 | + } |
|
435 | 451 | |
436 | 452 | echo ' |
437 | 453 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -443,13 +459,15 @@ discard block |
||
443 | 459 | <li><a href="', $scripturl, '?action=moderate;area=reportedmembers;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>'; |
444 | 460 | |
445 | 461 | // Ban this user button. |
446 | - if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) |
|
447 | - echo ' |
|
462 | + if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) { |
|
463 | + echo ' |
|
448 | 464 | <li><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $report['user']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>'; |
465 | + } |
|
449 | 466 | |
450 | - if (!$context['view_closed']) |
|
451 | - echo ' |
|
467 | + if (!$context['view_closed']) { |
|
468 | + echo ' |
|
452 | 469 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>'; |
470 | + } |
|
453 | 471 | |
454 | 472 | echo ' |
455 | 473 | </ul> |
@@ -457,11 +475,12 @@ discard block |
||
457 | 475 | } |
458 | 476 | |
459 | 477 | // Were none found? |
460 | - if (empty($context['reports'])) |
|
461 | - echo ' |
|
478 | + if (empty($context['reports'])) { |
|
479 | + echo ' |
|
462 | 480 | <div class="windowbg2"> |
463 | 481 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
464 | 482 | </div>'; |
483 | + } |
|
465 | 484 | |
466 | 485 | echo ' |
467 | 486 | <div class="pagesection"> |
@@ -482,11 +501,12 @@ discard block |
||
482 | 501 | global $context, $scripturl, $txt; |
483 | 502 | |
484 | 503 | // Let them know the action was a success. |
485 | - if (!empty($context['report_post_action'])) |
|
486 | - echo ' |
|
504 | + if (!empty($context['report_post_action'])) { |
|
505 | + echo ' |
|
487 | 506 | <div class="infobox"> |
488 | 507 | ', $txt['report_action_' . $context['report_post_action']], ' |
489 | 508 | </div>'; |
509 | + } |
|
490 | 510 | |
491 | 511 | echo ' |
492 | 512 | <div id="modcenter"> |
@@ -519,14 +539,15 @@ discard block |
||
519 | 539 | <h3 class="catbg">', $txt['mc_memberreport_whoreported_title'], '</h3> |
520 | 540 | </div>'; |
521 | 541 | |
522 | - foreach ($context['report']['comments'] as $comment) |
|
523 | - echo ' |
|
542 | + foreach ($context['report']['comments'] as $comment) { |
|
543 | + echo ' |
|
524 | 544 | <div class="windowbg"> |
525 | 545 | <p class="smalltext"> |
526 | 546 | ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' |
527 | 547 | </p> |
528 | 548 | <p>', $comment['message'], '</p> |
529 | 549 | </div>'; |
550 | + } |
|
530 | 551 | |
531 | 552 | echo ' |
532 | 553 | <br> |
@@ -535,11 +556,12 @@ discard block |
||
535 | 556 | </div> |
536 | 557 | <div>'; |
537 | 558 | |
538 | - if (empty($context['report']['mod_comments'])) |
|
539 | - echo ' |
|
559 | + if (empty($context['report']['mod_comments'])) { |
|
560 | + echo ' |
|
540 | 561 | <div class="information"> |
541 | 562 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
542 | 563 | </div>'; |
564 | + } |
|
543 | 565 | |
544 | 566 | foreach ($context['report']['mod_comments'] as $comment) |
545 | 567 | { |