@@ -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="windowbg"> |
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="windowbg"> |
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 | { |
@@ -40,9 +40,10 @@ discard block |
||
40 | 40 | <option value="0000"', $context['holiday']['year'] == '0000' ? ' selected' : '', '>', $txt['every_year'], '</option>'; |
41 | 41 | |
42 | 42 | // Show a list of all the years we allow... |
43 | - for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) |
|
44 | - echo ' |
|
43 | + for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) { |
|
44 | + echo ' |
|
45 | 45 | <option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected' : '', '>', $year, '</option>'; |
46 | + } |
|
46 | 47 | |
47 | 48 | echo ' |
48 | 49 | </select> |
@@ -50,9 +51,10 @@ discard block |
||
50 | 51 | <select name="month" id="month" onchange="generateDays();">'; |
51 | 52 | |
52 | 53 | // There are 12 months per year - ensure that they all get listed. |
53 | - for ($month = 1; $month <= 12; $month++) |
|
54 | - echo ' |
|
54 | + for ($month = 1; $month <= 12; $month++) { |
|
55 | + echo ' |
|
55 | 56 | <option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
57 | + } |
|
56 | 58 | |
57 | 59 | echo ' |
58 | 60 | </select> |
@@ -60,23 +62,25 @@ discard block |
||
60 | 62 | <select name="day" id="day" onchange="generateDays();">'; |
61 | 63 | |
62 | 64 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
63 | - for ($day = 1; $day <= $context['holiday']['last_day']; $day++) |
|
64 | - echo ' |
|
65 | + for ($day = 1; $day <= $context['holiday']['last_day']; $day++) { |
|
66 | + echo ' |
|
65 | 67 | <option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected' : '', '>', $day, '</option>'; |
68 | + } |
|
66 | 69 | |
67 | 70 | echo ' |
68 | 71 | </select> |
69 | 72 | </dd> |
70 | 73 | </dl>'; |
71 | 74 | |
72 | - if ($context['is_new']) |
|
73 | - echo ' |
|
75 | + if ($context['is_new']) { |
|
76 | + echo ' |
|
74 | 77 | <input type="submit" value="', $txt['holidays_button_add'], '" class="button">'; |
75 | - else |
|
76 | - echo ' |
|
78 | + } else { |
|
79 | + echo ' |
|
77 | 80 | <input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" class="button"> |
78 | 81 | <input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" class="button"> |
79 | 82 | <input type="hidden" name="holiday" value="', $context['holiday']['id'], '">'; |
83 | + } |
|
80 | 84 | echo ' |
81 | 85 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
82 | 86 | </div><!-- .windowbg --> |
@@ -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><!-- .windowbg -->'; |
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> |
@@ -106,7 +106,7 @@ |
||
106 | 106 | if (!empty($context['custom_profile_fields']['columns'])) |
107 | 107 | foreach ($context['custom_profile_fields']['columns'] as $key => $column) |
108 | 108 | echo ' |
109 | - <td class="' , $key , ' centertext">', $member['options'][$key], '</td>'; |
|
109 | + <td class="' , $key, ' centertext">', $member['options'][$key], '</td>'; |
|
110 | 110 | |
111 | 111 | echo ' |
112 | 112 | </tr>'; |
@@ -27,9 +27,10 @@ discard block |
||
27 | 27 | <h3 class="catbg"> |
28 | 28 | <span class="floatleft">', $txt['members_list'], '</span>'; |
29 | 29 | |
30 | - if (!isset($context['old_search'])) |
|
31 | - echo ' |
|
30 | + if (!isset($context['old_search'])) { |
|
31 | + echo ' |
|
32 | 32 | <span class="floatright">', $context['letter_links'], '</span>'; |
33 | + } |
|
33 | 34 | echo ' |
34 | 35 | </h3> |
35 | 36 | </div>'; |
@@ -44,20 +45,23 @@ discard block |
||
44 | 45 | foreach ($context['columns'] as $key => $column) |
45 | 46 | { |
46 | 47 | // @TODO maybe find something nicer? |
47 | - if ($key == 'email_address' && !$context['can_send_email']) |
|
48 | - continue; |
|
48 | + if ($key == 'email_address' && !$context['can_send_email']) { |
|
49 | + continue; |
|
50 | + } |
|
49 | 51 | |
50 | 52 | // This is a selected column, so underline it or some such. |
51 | - if ($column['selected']) |
|
52 | - echo ' |
|
53 | + if ($column['selected']) { |
|
54 | + echo ' |
|
53 | 55 | <th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', ' selected" style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . '> |
54 | 56 | <a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . '</a><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></th>'; |
57 | + } |
|
55 | 58 | |
56 | 59 | // This is just some column... show the link and be done with it. |
57 | - else |
|
58 | - echo ' |
|
60 | + else { |
|
61 | + echo ' |
|
59 | 62 | <th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' style="width: ' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '> |
60 | 63 | ', $column['link'], '</th>'; |
64 | + } |
|
61 | 65 | } |
62 | 66 | |
63 | 67 | echo ' |
@@ -77,9 +81,10 @@ discard block |
||
77 | 81 | </td> |
78 | 82 | <td class="real_name lefttext">', $member['link'], '</td>'; |
79 | 83 | |
80 | - if (!isset($context['disabled_fields']['website'])) |
|
81 | - echo ' |
|
84 | + if (!isset($context['disabled_fields']['website'])) { |
|
85 | + echo ' |
|
82 | 86 | <td class="website_url centertext">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" rel="noopener"><span class="generic_icons www" title="' . $member['website']['title'] . '"></span></a>' : '', '</td>'; |
87 | + } |
|
83 | 88 | |
84 | 89 | // Group and date. |
85 | 90 | echo ' |
@@ -92,32 +97,35 @@ discard block |
||
92 | 97 | <td class="post_count centertext">', $member['posts'], '</td> |
93 | 98 | <td class="statsbar">'; |
94 | 99 | |
95 | - if (!empty($member['post_percent'])) |
|
96 | - echo ' |
|
100 | + if (!empty($member['post_percent'])) { |
|
101 | + echo ' |
|
97 | 102 | <div class="generic_bar"> |
98 | 103 | <div class="bar" style="width: ', $member['post_percent'], '%;"></div> |
99 | 104 | </div>'; |
105 | + } |
|
100 | 106 | |
101 | 107 | echo ' |
102 | 108 | </td>'; |
103 | 109 | } |
104 | 110 | |
105 | 111 | // Show custom fields marked to be shown here |
106 | - if (!empty($context['custom_profile_fields']['columns'])) |
|
107 | - foreach ($context['custom_profile_fields']['columns'] as $key => $column) |
|
112 | + if (!empty($context['custom_profile_fields']['columns'])) { |
|
113 | + foreach ($context['custom_profile_fields']['columns'] as $key => $column) |
|
108 | 114 | echo ' |
109 | 115 | <td class="' , $key , ' centertext">', $member['options'][$key], '</td>'; |
116 | + } |
|
110 | 117 | |
111 | 118 | echo ' |
112 | 119 | </tr>'; |
113 | 120 | } |
114 | 121 | } |
115 | 122 | // No members? |
116 | - else |
|
117 | - echo ' |
|
123 | + else { |
|
124 | + echo ' |
|
118 | 125 | <tr> |
119 | 126 | <td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td> |
120 | 127 | </tr>'; |
128 | + } |
|
121 | 129 | |
122 | 130 | echo ' |
123 | 131 | </tbody> |
@@ -130,11 +138,12 @@ discard block |
||
130 | 138 | <div class="pagelinks floatleft">', $context['page_index'], '</div>'; |
131 | 139 | |
132 | 140 | // If it is displaying the result of a search show a "search again" link to edit their criteria. |
133 | - if (isset($context['old_search'])) |
|
134 | - echo ' |
|
141 | + if (isset($context['old_search'])) { |
|
142 | + echo ' |
|
135 | 143 | <div class="buttonlist floatright"> |
136 | 144 | <a class="button" href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a> |
137 | 145 | </div>'; |
146 | + } |
|
138 | 147 | echo ' |
139 | 148 | </div> |
140 | 149 | </div><!-- #memberlist -->'; |
@@ -174,12 +183,13 @@ discard block |
||
174 | 183 | <dd> |
175 | 184 | <ul>'; |
176 | 185 | |
177 | - foreach ($context['search_fields'] as $id => $title) |
|
178 | - echo ' |
|
186 | + foreach ($context['search_fields'] as $id => $title) { |
|
187 | + echo ' |
|
179 | 188 | <li> |
180 | 189 | <input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '"', in_array($id, $context['search_defaults']) ? ' checked' : '', '> |
181 | 190 | <label for="fields-', $id, '">', $title, '</label> |
182 | 191 | </li>'; |
192 | + } |
|
183 | 193 | |
184 | 194 | echo ' |
185 | 195 | </ul> |
@@ -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 | // We might want to convert entities if we're on UTF-8. |
58 | - if ($context['convert_entities']) |
|
59 | - echo ' |
|
60 | + if ($context['convert_entities']) { |
|
61 | + echo ' |
|
60 | 62 | <div class="cat_bar"> |
61 | 63 | <h3 class="catbg">', $txt['entity_convert_title'], '</h3> |
62 | 64 | </div> |
@@ -68,6 +70,7 @@ discard block |
||
68 | 70 | <input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '"> |
69 | 71 | </form> |
70 | 72 | </div>'; |
73 | + } |
|
71 | 74 | |
72 | 75 | echo ' |
73 | 76 | </div><!-- #manage_maintenance -->'; |
@@ -85,11 +88,12 @@ discard block |
||
85 | 88 | <div id="manage_maintenance">'; |
86 | 89 | |
87 | 90 | // If maintenance has finished tell the user. |
88 | - if (!empty($context['maintenance_finished'])) |
|
89 | - echo ' |
|
91 | + if (!empty($context['maintenance_finished'])) { |
|
92 | + echo ' |
|
90 | 93 | <div class="infobox"> |
91 | 94 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
92 | 95 | </div>'; |
96 | + } |
|
93 | 97 | |
94 | 98 | echo ' |
95 | 99 | <div class="cat_bar"> |
@@ -221,11 +225,12 @@ discard block |
||
221 | 225 | <div id="manage_maintenance">'; |
222 | 226 | |
223 | 227 | // If maintenance has finished, tell the user. |
224 | - if (!empty($context['maintenance_finished'])) |
|
225 | - echo ' |
|
228 | + if (!empty($context['maintenance_finished'])) { |
|
229 | + echo ' |
|
226 | 230 | <div class="infobox"> |
227 | 231 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
228 | 232 | </div>'; |
233 | + } |
|
229 | 234 | |
230 | 235 | echo ' |
231 | 236 | <div class="cat_bar"> |
@@ -287,9 +292,10 @@ discard block |
||
287 | 292 | </p> |
288 | 293 | <div style="display: none;" id="membersPanel">'; |
289 | 294 | |
290 | - foreach ($context['membergroups'] as $group) |
|
291 | - echo ' |
|
295 | + foreach ($context['membergroups'] as $group) { |
|
296 | + echo ' |
|
292 | 297 | <label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked> ', $group['name'], '</label><br>'; |
298 | + } |
|
293 | 299 | |
294 | 300 | echo ' |
295 | 301 | </div> |
@@ -333,11 +339,12 @@ discard block |
||
333 | 339 | global $scripturl, $txt, $context, $settings, $modSettings; |
334 | 340 | |
335 | 341 | // If maintenance has finished tell the user. |
336 | - if (!empty($context['maintenance_finished'])) |
|
337 | - echo ' |
|
342 | + if (!empty($context['maintenance_finished'])) { |
|
343 | + echo ' |
|
338 | 344 | <div class="infobox"> |
339 | 345 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
340 | 346 | </div>'; |
347 | + } |
|
341 | 348 | |
342 | 349 | // Bit of javascript for showing which boards to prune in an otherwise hidden list. |
343 | 350 | echo ' |
@@ -405,21 +412,23 @@ discard block |
||
405 | 412 | <ul>'; |
406 | 413 | |
407 | 414 | // Display a checkbox with every board. |
408 | - foreach ($category['boards'] as $board) |
|
409 | - echo ' |
|
415 | + foreach ($category['boards'] as $board) { |
|
416 | + echo ' |
|
410 | 417 | <li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"> |
411 | 418 | <label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked>', $board['name'], '</label> |
412 | 419 | </li>'; |
420 | + } |
|
413 | 421 | |
414 | 422 | echo ' |
415 | 423 | </ul> |
416 | 424 | </fieldset>'; |
417 | 425 | |
418 | 426 | // Increase $i, and check if we're at the middle yet. |
419 | - if (++$i == $middle) |
|
420 | - echo ' |
|
427 | + if (++$i == $middle) { |
|
428 | + echo ' |
|
421 | 429 | </div><!-- .floatleft --> |
422 | 430 | <div class="floatright" style="width: 49%;">'; |
431 | + } |
|
423 | 432 | } |
424 | 433 | |
425 | 434 | echo ' |
@@ -461,9 +470,10 @@ discard block |
||
461 | 470 | echo ' |
462 | 471 | <optgroup label="', $category['name'], '">'; |
463 | 472 | |
464 | - foreach ($category['boards'] as $board) |
|
465 | - echo ' |
|
473 | + foreach ($category['boards'] as $board) { |
|
474 | + echo ' |
|
466 | 475 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
476 | + } |
|
467 | 477 | |
468 | 478 | echo ' |
469 | 479 | </optgroup>'; |
@@ -481,9 +491,10 @@ discard block |
||
481 | 491 | echo ' |
482 | 492 | <optgroup label="', $category['name'], '">'; |
483 | 493 | |
484 | - foreach ($category['boards'] as $board) |
|
485 | - echo ' |
|
494 | + foreach ($category['boards'] as $board) { |
|
495 | + echo ' |
|
486 | 496 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
497 | + } |
|
487 | 498 | |
488 | 499 | echo ' |
489 | 500 | </optgroup>'; |
@@ -526,9 +537,10 @@ discard block |
||
526 | 537 | ', $txt['database_optimize_attempt'], '<br>'; |
527 | 538 | |
528 | 539 | // List each table being optimized... |
529 | - foreach ($context['optimized_tables'] as $table) |
|
530 | - echo ' |
|
540 | + foreach ($context['optimized_tables'] as $table) { |
|
541 | + echo ' |
|
531 | 542 | ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>'; |
543 | + } |
|
532 | 544 | |
533 | 545 | // How did we go? |
534 | 546 | echo ' |
@@ -588,13 +600,14 @@ discard block |
||
588 | 600 | </li> |
589 | 601 | </ul>'; |
590 | 602 | |
591 | - if (!empty($context['exceeding_messages_morethan'])) |
|
592 | - echo ' |
|
603 | + if (!empty($context['exceeding_messages_morethan'])) { |
|
604 | + echo ' |
|
593 | 605 | <p>', $context['exceeding_messages_morethan'], '</p>'; |
594 | - } |
|
595 | - else |
|
596 | - echo ' |
|
606 | + } |
|
607 | + } else { |
|
608 | + echo ' |
|
597 | 609 | <p class="infobox">', $txt['convert_to_text'], '</p>'; |
610 | + } |
|
598 | 611 | |
599 | 612 | echo ' |
600 | 613 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '"> |
@@ -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 noup"> |
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="windowbg 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><!-- .windowbg --> |
383 | 393 | <input type="hidden" name="reorder" value="1"> |
@@ -414,14 +424,15 @@ discard block |
||
414 | 424 | <div class="windowbg"> |
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"> |
@@ -25,18 +25,20 @@ discard block |
||
25 | 25 | </div> |
26 | 26 | <div class="windowbg">'; |
27 | 27 | |
28 | - if (!empty($context['move_board'])) |
|
29 | - echo ' |
|
28 | + if (!empty($context['move_board'])) { |
|
29 | + echo ' |
|
30 | 30 | <div class="noticebox"> |
31 | 31 | ', $context['move_title'], ' [<a href="', $scripturl, '?action=admin;area=manageboards">', $txt['mboards_cancel_moving'], '</a>]', ' |
32 | 32 | </div>'; |
33 | + } |
|
33 | 34 | |
34 | 35 | // No categories so show a label. |
35 | - if (empty($context['categories'])) |
|
36 | - echo ' |
|
36 | + if (empty($context['categories'])) { |
|
37 | + echo ' |
|
37 | 38 | <div class="windowbg centertext"> |
38 | 39 | ', $txt['mboards_no_cats'], ' |
39 | 40 | </div>'; |
41 | + } |
|
40 | 42 | |
41 | 43 | // Loop through every category, listing the boards in each as we go. |
42 | 44 | foreach ($context['categories'] as $category) |
@@ -54,9 +56,10 @@ discard block |
||
54 | 56 | <form action="', $scripturl, '?action=admin;area=manageboards;sa=newboard;cat=', $category['id'], '" method="post" accept-charset="', $context['character_set'], '"> |
55 | 57 | <ul id="category_', $category['id'], '" class="nolist">'; |
56 | 58 | |
57 | - if (!empty($category['move_link'])) |
|
58 | - echo ' |
|
59 | + if (!empty($category['move_link'])) { |
|
60 | + echo ' |
|
59 | 61 | <li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><span class="generic_icons select_above"></span></a></li>'; |
62 | + } |
|
60 | 63 | |
61 | 64 | $recycle_board = '<a href="' . $scripturl . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.png" alt="' . $txt['recycle_board'] . '" title="' . $txt['recycle_board'] . '"></a>'; |
62 | 65 | $redirect_board = '<img src="' . $settings['images_url'] . '/new_redirect.png" alt="' . $txt['redirect_board_desc'] . '" title="' . $txt['redirect_board_desc'] . '">'; |
@@ -79,9 +82,10 @@ discard block |
||
79 | 82 | echo ' |
80 | 83 | <li class="windowbg" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">'; |
81 | 84 | |
82 | - foreach ($board['move_links'] as $link) |
|
83 | - echo ' |
|
85 | + foreach ($board['move_links'] as $link) { |
|
86 | + echo ' |
|
84 | 87 | <a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="generic_icons select_', $link['class'], '" title="', $link['label'], '"></span></a>'; |
88 | + } |
|
85 | 89 | |
86 | 90 | echo ' |
87 | 91 | </li>'; |
@@ -130,9 +134,10 @@ discard block |
||
130 | 134 | <select name="cat_order">'; |
131 | 135 | |
132 | 136 | // Print every existing category into a select box. |
133 | - foreach ($context['category_order'] as $order) |
|
134 | - echo ' |
|
137 | + foreach ($context['category_order'] as $order) { |
|
138 | + echo ' |
|
135 | 139 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
140 | + } |
|
136 | 141 | echo ' |
137 | 142 | </select> |
138 | 143 | </dd>'; |
@@ -167,14 +172,15 @@ discard block |
||
167 | 172 | { |
168 | 173 | foreach ($context['custom_category_settings'] as $catset_id => $catset) |
169 | 174 | { |
170 | - if (!empty($catset['dt']) && !empty($catset['dd'])) |
|
171 | - echo ' |
|
175 | + if (!empty($catset['dt']) && !empty($catset['dd'])) { |
|
176 | + echo ' |
|
172 | 177 | <dt class="clear', !is_numeric($catset_id) ? ' catset_' . $catset_id : '', '"> |
173 | 178 | ', $catset['dt'], ' |
174 | 179 | </dt> |
175 | 180 | <dd', !is_numeric($catset_id) ? ' class="catset_' . $catset_id . '"' : '', '> |
176 | 181 | ', $catset['dd'], ' |
177 | 182 | </dd>'; |
183 | + } |
|
178 | 184 | } |
179 | 185 | } |
180 | 186 | |
@@ -182,21 +188,23 @@ discard block |
||
182 | 188 | echo ' |
183 | 189 | </dl>'; |
184 | 190 | |
185 | - if (isset($context['category']['is_new'])) |
|
186 | - echo ' |
|
191 | + if (isset($context['category']['is_new'])) { |
|
192 | + echo ' |
|
187 | 193 | <input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button">'; |
188 | - else |
|
189 | - echo ' |
|
194 | + } else { |
|
195 | + echo ' |
|
190 | 196 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button"> |
191 | 197 | <input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button you_sure">'; |
198 | + } |
|
192 | 199 | echo ' |
193 | 200 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
194 | 201 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
195 | 202 | |
196 | 203 | // If this category is empty we don't bother with the next confirmation screen. |
197 | - if ($context['category']['is_empty']) |
|
198 | - echo ' |
|
204 | + if ($context['category']['is_empty']) { |
|
205 | + echo ' |
|
199 | 206 | <input type="hidden" name="empty" value="1">'; |
207 | + } |
|
200 | 208 | |
201 | 209 | echo ' |
202 | 210 | </div><!-- .windowbg --> |
@@ -223,9 +231,10 @@ discard block |
||
223 | 231 | <p>', $txt['mboards_delete_cat_contains'], ':</p> |
224 | 232 | <ul>'; |
225 | 233 | |
226 | - foreach ($context['category']['children'] as $child) |
|
227 | - echo ' |
|
234 | + foreach ($context['category']['children'] as $child) { |
|
235 | + echo ' |
|
228 | 236 | <li>', $child, '</li>'; |
237 | + } |
|
229 | 238 | |
230 | 239 | echo ' |
231 | 240 | </ul> |
@@ -239,10 +248,11 @@ discard block |
||
239 | 248 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1"', count($context['category_order']) == 1 ? ' disabled' : '', '>', $txt['mboards_delete_option2'], '</label>: |
240 | 249 | <select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>'; |
241 | 250 | |
242 | - foreach ($context['category_order'] as $cat) |
|
243 | - if ($cat['id'] != 0) |
|
251 | + foreach ($context['category_order'] as $cat) { |
|
252 | + if ($cat['id'] != 0) |
|
244 | 253 | echo ' |
245 | 254 | <option value="', $cat['id'], '">', $cat['true_name'], '</option>'; |
255 | + } |
|
246 | 256 | |
247 | 257 | echo ' |
248 | 258 | </select> |
@@ -285,9 +295,10 @@ discard block |
||
285 | 295 | <dd> |
286 | 296 | <select name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">'; |
287 | 297 | |
288 | - foreach ($context['categories'] as $category) |
|
289 | - echo ' |
|
298 | + foreach ($context['categories'] as $category) { |
|
299 | + echo ' |
|
290 | 300 | <option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>'; |
301 | + } |
|
291 | 302 | echo ' |
292 | 303 | </select> |
293 | 304 | </dd>'; |
@@ -315,9 +326,10 @@ discard block |
||
315 | 326 | <select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '> |
316 | 327 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : ''; |
317 | 328 | |
318 | - foreach ($context['board_order'] as $order) |
|
319 | - echo ' |
|
329 | + foreach ($context['board_order'] as $order) { |
|
330 | + echo ' |
|
320 | 331 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
332 | + } |
|
321 | 333 | echo ' |
322 | 334 | </select> |
323 | 335 | </dd>'; |
@@ -346,13 +358,15 @@ discard block |
||
346 | 358 | <dd> |
347 | 359 | <select name="profile">'; |
348 | 360 | |
349 | - if (isset($context['board']['is_new'])) |
|
350 | - echo ' |
|
361 | + if (isset($context['board']['is_new'])) { |
|
362 | + echo ' |
|
351 | 363 | <option value="-1">[', $txt['permission_profile_inherit'], ']</option>'; |
364 | + } |
|
352 | 365 | |
353 | - foreach ($context['profiles'] as $id => $profile) |
|
354 | - echo ' |
|
366 | + foreach ($context['profiles'] as $id => $profile) { |
|
367 | + echo ' |
|
355 | 368 | <option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
369 | + } |
|
356 | 370 | |
357 | 371 | echo ' |
358 | 372 | </select> |
@@ -365,8 +379,8 @@ discard block |
||
365 | 379 | </dt> |
366 | 380 | <dd>'; |
367 | 381 | |
368 | - if (!empty($modSettings['deny_boards_access'])) |
|
369 | - echo ' |
|
382 | + if (!empty($modSettings['deny_boards_access'])) { |
|
383 | + echo ' |
|
370 | 384 | <table> |
371 | 385 | <tr> |
372 | 386 | <td></td> |
@@ -374,10 +388,11 @@ discard block |
||
374 | 388 | <th>', $txt['permissions_option_off'], '</th> |
375 | 389 | <th>', $txt['permissions_option_deny'], '</th> |
376 | 390 | </tr>'; |
391 | + } |
|
377 | 392 | |
378 | 393 | // List all the membergroups so the user can choose who may access this board. |
379 | - foreach ($context['groups'] as $group) |
|
380 | - if (empty($modSettings['deny_boards_access'])) |
|
394 | + foreach ($context['groups'] as $group) { |
|
395 | + if (empty($modSettings['deny_boards_access'])) |
|
381 | 396 | echo ' |
382 | 397 | <label for="groups_', $group['id'], '"> |
383 | 398 | <input type="checkbox" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), '> |
@@ -385,8 +400,9 @@ discard block |
||
385 | 400 | ', $group['name'], ' |
386 | 401 | </span> |
387 | 402 | </label><br>'; |
388 | - else |
|
389 | - echo ' |
|
403 | + } |
|
404 | + else { |
|
405 | + echo ' |
|
390 | 406 | <tr> |
391 | 407 | <td> |
392 | 408 | <label for="groups_', $group['id'], '_a"> |
@@ -406,16 +422,17 @@ discard block |
||
406 | 422 | </td> |
407 | 423 | <td></td> |
408 | 424 | </tr>'; |
425 | + } |
|
409 | 426 | |
410 | - if (empty($modSettings['deny_boards_access'])) |
|
411 | - echo ' |
|
427 | + if (empty($modSettings['deny_boards_access'])) { |
|
428 | + echo ' |
|
412 | 429 | <span class="select_all_box"> |
413 | 430 | <em>', $txt['check_all'], '</em> <input type="checkbox" onclick="invertAll(this, this.form, \'groups[\');"> |
414 | 431 | </span> |
415 | 432 | <br><br> |
416 | 433 | </dd>'; |
417 | - else |
|
418 | - echo ' |
|
434 | + } else { |
|
435 | + echo ' |
|
419 | 436 | <tr class="select_all_box"> |
420 | 437 | <td> |
421 | 438 | </td> |
@@ -434,6 +451,7 @@ discard block |
||
434 | 451 | </tr> |
435 | 452 | </table> |
436 | 453 | </dd>'; |
454 | + } |
|
437 | 455 | |
438 | 456 | // Options to choose moderators, specify as announcement board and choose whether to count posts here. |
439 | 457 | echo ' |
@@ -488,8 +506,8 @@ discard block |
||
488 | 506 | </dl> |
489 | 507 | </div>'; |
490 | 508 | |
491 | - if ($context['board']['redirect']) |
|
492 | - echo ' |
|
509 | + if ($context['board']['redirect']) { |
|
510 | + echo ' |
|
493 | 511 | <div id="reset_redirect_div"> |
494 | 512 | <dl class="settings"> |
495 | 513 | <dt> |
@@ -502,6 +520,7 @@ discard block |
||
502 | 520 | </dd> |
503 | 521 | </dl> |
504 | 522 | </div>'; |
523 | + } |
|
505 | 524 | } |
506 | 525 | |
507 | 526 | echo ' |
@@ -529,9 +548,10 @@ discard block |
||
529 | 548 | <select name="boardtheme" id="boardtheme" onchange="refreshOptions();"> |
530 | 549 | <option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>'; |
531 | 550 | |
532 | - foreach ($context['themes'] as $theme) |
|
533 | - echo ' |
|
551 | + foreach ($context['themes'] as $theme) { |
|
552 | + echo ' |
|
534 | 553 | <option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
554 | + } |
|
535 | 555 | |
536 | 556 | echo ' |
537 | 557 | </select> |
@@ -560,14 +580,15 @@ discard block |
||
560 | 580 | |
561 | 581 | foreach ($context['custom_board_settings'] as $cbs_id => $cbs) |
562 | 582 | { |
563 | - if (!empty($cbs['dt']) && !empty($cbs['dd'])) |
|
564 | - echo ' |
|
583 | + if (!empty($cbs['dt']) && !empty($cbs['dd'])) { |
|
584 | + echo ' |
|
565 | 585 | <dt class="clear', !is_numeric($cbs_id) ? ' cbs_' . $cbs_id : '', '"> |
566 | 586 | ', $cbs['dt'], ' |
567 | 587 | </dt> |
568 | 588 | <dd', !is_numeric($cbs_id) ? ' class="cbs_' . $cbs_id . '"' : '', '> |
569 | 589 | ', $cbs['dd'], ' |
570 | 590 | </dd>'; |
591 | + } |
|
571 | 592 | } |
572 | 593 | |
573 | 594 | echo ' |
@@ -575,9 +596,10 @@ discard block |
||
575 | 596 | </div>'; |
576 | 597 | } |
577 | 598 | |
578 | - if (!empty($context['board']['is_recycle'])) |
|
579 | - echo ' |
|
599 | + if (!empty($context['board']['is_recycle'])) { |
|
600 | + echo ' |
|
580 | 601 | <div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>'; |
602 | + } |
|
581 | 603 | |
582 | 604 | echo ' |
583 | 605 | <input type="hidden" name="rid" value="', $context['redirect_location'], '"> |
@@ -585,21 +607,24 @@ discard block |
||
585 | 607 | <input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">'; |
586 | 608 | |
587 | 609 | // If this board has no children don't bother with the next confirmation screen. |
588 | - if ($context['board']['no_children']) |
|
589 | - echo ' |
|
610 | + if ($context['board']['no_children']) { |
|
611 | + echo ' |
|
590 | 612 | <input type="hidden" name="no_children" value="1">'; |
613 | + } |
|
591 | 614 | |
592 | - if (isset($context['board']['is_new'])) |
|
593 | - echo ' |
|
615 | + if (isset($context['board']['is_new'])) { |
|
616 | + echo ' |
|
594 | 617 | <input type="hidden" name="cur_cat" value="', $context['board']['category'], '"> |
595 | 618 | <input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
596 | - else |
|
597 | - echo ' |
|
619 | + } else { |
|
620 | + echo ' |
|
598 | 621 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
622 | + } |
|
599 | 623 | |
600 | - if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) |
|
601 | - echo ' |
|
624 | + if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) { |
|
625 | + echo ' |
|
602 | 626 | <input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button you_sure">'; |
627 | + } |
|
603 | 628 | echo ' |
604 | 629 | </div><!-- .windowbg --> |
605 | 630 | </form> |
@@ -620,12 +645,13 @@ discard block |
||
620 | 645 | sItemListContainerId: \'moderator_container\', |
621 | 646 | aListItems: ['; |
622 | 647 | |
623 | - foreach ($context['board']['moderators'] as $id_member => $member_name) |
|
624 | - echo ' |
|
648 | + foreach ($context['board']['moderators'] as $id_member => $member_name) { |
|
649 | + echo ' |
|
625 | 650 | { |
626 | 651 | sItemId: ', JavaScriptEscape($id_member), ', |
627 | 652 | sItemName: ', JavaScriptEscape($member_name), ' |
628 | 653 | }', $id_member == $context['board']['last_moderator_id'] ? '' : ','; |
654 | + } |
|
629 | 655 | |
630 | 656 | echo ' |
631 | 657 | ] |
@@ -645,12 +671,13 @@ discard block |
||
645 | 671 | sItemListContainerId: \'moderator_group_container\', |
646 | 672 | aListItems: ['; |
647 | 673 | |
648 | - foreach ($context['board']['moderator_groups'] as $id_group => $group_name) |
|
649 | - echo ' |
|
674 | + foreach ($context['board']['moderator_groups'] as $id_group => $group_name) { |
|
675 | + echo ' |
|
650 | 676 | { |
651 | 677 | sItemId: ', JavaScriptEscape($id_group), ', |
652 | 678 | sItemName: ', JavaScriptEscape($group_name), ' |
653 | 679 | }', $id_group == $context['board']['last_moderator_group_id'] ? '' : ','; |
680 | + } |
|
654 | 681 | |
655 | 682 | echo ' |
656 | 683 | ] |
@@ -676,17 +703,19 @@ discard block |
||
676 | 703 | echo ' |
677 | 704 | document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";'; |
678 | 705 | |
679 | - if ($context['board']['redirect']) |
|
680 | - echo ' |
|
706 | + if ($context['board']['redirect']) { |
|
707 | + echo ' |
|
681 | 708 | document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";'; |
709 | + } |
|
682 | 710 | } |
683 | 711 | |
684 | 712 | // Include any JavaScript added by mods using the 'integrate_edit_board' hook. |
685 | 713 | if (!empty($context['custom_refreshOptions']) && is_array($context['custom_refreshOptions'])) |
686 | 714 | { |
687 | - foreach ($context['custom_refreshOptions'] as $refreshOption) |
|
688 | - echo ' |
|
715 | + foreach ($context['custom_refreshOptions'] as $refreshOption) { |
|
716 | + echo ' |
|
689 | 717 | ', $refreshOption; |
718 | + } |
|
690 | 719 | } |
691 | 720 | |
692 | 721 | echo ' |
@@ -715,9 +744,10 @@ discard block |
||
715 | 744 | <p>', $txt['mboards_delete_board_contains'], '</p> |
716 | 745 | <ul>'; |
717 | 746 | |
718 | - foreach ($context['children'] as $child) |
|
719 | - echo ' |
|
747 | + foreach ($context['children'] as $child) { |
|
748 | + echo ' |
|
720 | 749 | <li>', $child['node']['name'], '</li>'; |
750 | + } |
|
721 | 751 | |
722 | 752 | echo ' |
723 | 753 | </ul> |
@@ -731,10 +761,11 @@ discard block |
||
731 | 761 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1"', empty($context['can_move_children']) ? ' disabled' : '', '>', $txt['mboards_delete_board_option2'], '</label>: |
732 | 762 | <select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>'; |
733 | 763 | |
734 | - foreach ($context['board_order'] as $board) |
|
735 | - if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
764 | + foreach ($context['board_order'] as $board) { |
|
765 | + if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
736 | 766 | echo ' |
737 | 767 | <option value="', $board['id'], '">', $board['name'], '</option>'; |
768 | + } |
|
738 | 769 | |
739 | 770 | echo ' |
740 | 771 | </select> |
@@ -28,14 +28,15 @@ discard block |
||
28 | 28 | <div id="confirm_buttons">'; |
29 | 29 | |
30 | 30 | // Age restriction in effect? |
31 | - if ($context['show_coppa']) |
|
32 | - echo ' |
|
31 | + if ($context['show_coppa']) { |
|
32 | + echo ' |
|
33 | 33 | <input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button"><br> |
34 | 34 | <br> |
35 | 35 | <input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button">'; |
36 | - else |
|
37 | - echo ' |
|
36 | + } else { |
|
37 | + echo ' |
|
38 | 38 | <input type="submit" name="accept_agreement" value="', $txt['agreement_agree'], '" class="button">'; |
39 | + } |
|
39 | 40 | |
40 | 41 | echo ' |
41 | 42 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -78,9 +79,10 @@ discard block |
||
78 | 79 | <ul>'; |
79 | 80 | |
80 | 81 | // Cycle through each error and display an error message. |
81 | - foreach ($context['registration_errors'] as $error) |
|
82 | - echo ' |
|
82 | + foreach ($context['registration_errors'] as $error) { |
|
83 | + echo ' |
|
83 | 84 | <li>', $error, '</li>'; |
85 | + } |
|
84 | 86 | |
85 | 87 | echo ' |
86 | 88 | </ul> |
@@ -149,14 +151,15 @@ discard block |
||
149 | 151 | echo ' |
150 | 152 | <dl class="register_form">'; |
151 | 153 | |
152 | - foreach ($context['custom_fields'] as $field) |
|
153 | - if ($field['show_reg'] > 1) |
|
154 | + foreach ($context['custom_fields'] as $field) { |
|
155 | + if ($field['show_reg'] > 1) |
|
154 | 156 | echo ' |
155 | 157 | <dt> |
156 | 158 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong> |
157 | 159 | <span class="smalltext">', $field['desc'], '</span> |
158 | 160 | </dt> |
159 | 161 | <dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>'; |
162 | + } |
|
160 | 163 | |
161 | 164 | echo ' |
162 | 165 | </dl>'; |
@@ -167,14 +170,15 @@ discard block |
||
167 | 170 | </div><!-- .roundframe -->'; |
168 | 171 | |
169 | 172 | // If we have either of these, show the extra group. |
170 | - if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) |
|
171 | - echo ' |
|
173 | + if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) { |
|
174 | + echo ' |
|
172 | 175 | <div class="title_bar"> |
173 | 176 | <h3 class="titlebg">', $txt['additional_information'], '</h3> |
174 | 177 | </div> |
175 | 178 | <div class="roundframe noup"> |
176 | 179 | <fieldset> |
177 | 180 | <dl class="register_form" id="custom_group">'; |
181 | + } |
|
178 | 182 | |
179 | 183 | if (!empty($context['profile_fields'])) |
180 | 184 | { |
@@ -188,41 +192,45 @@ discard block |
||
188 | 192 | $callback_func = 'template_profile_' . $field['callback_func']; |
189 | 193 | $callback_func(); |
190 | 194 | } |
191 | - } |
|
192 | - else |
|
195 | + } else |
|
193 | 196 | { |
194 | 197 | echo ' |
195 | 198 | <dt> |
196 | 199 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['label'], ':</strong>'; |
197 | 200 | |
198 | 201 | // Does it have any subtext to show? |
199 | - if (!empty($field['subtext'])) |
|
200 | - echo ' |
|
202 | + if (!empty($field['subtext'])) { |
|
203 | + echo ' |
|
201 | 204 | <span class="smalltext">', $field['subtext'], '</span>'; |
205 | + } |
|
202 | 206 | |
203 | 207 | echo ' |
204 | 208 | </dt> |
205 | 209 | <dd>'; |
206 | 210 | |
207 | 211 | // Want to put something infront of the box? |
208 | - if (!empty($field['preinput'])) |
|
209 | - echo ' |
|
212 | + if (!empty($field['preinput'])) { |
|
213 | + echo ' |
|
210 | 214 | ', $field['preinput']; |
215 | + } |
|
211 | 216 | |
212 | 217 | // What type of data are we showing? |
213 | - if ($field['type'] == 'label') |
|
214 | - echo ' |
|
218 | + if ($field['type'] == 'label') { |
|
219 | + echo ' |
|
215 | 220 | ', $field['value']; |
221 | + } |
|
216 | 222 | |
217 | 223 | // Maybe it's a text box - very likely! |
218 | - elseif (in_array($field['type'], array('int', 'float', 'text', 'password', 'url'))) |
|
219 | - echo ' |
|
224 | + elseif (in_array($field['type'], array('int', 'float', 'text', 'password', 'url'))) { |
|
225 | + echo ' |
|
220 | 226 | <input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>'; |
227 | + } |
|
221 | 228 | |
222 | 229 | // You "checking" me out? ;) |
223 | - elseif ($field['type'] == 'check') |
|
224 | - echo ' |
|
230 | + elseif ($field['type'] == 'check') { |
|
231 | + echo ' |
|
225 | 232 | <input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>'; |
233 | + } |
|
226 | 234 | |
227 | 235 | // Always fun - select boxes! |
228 | 236 | elseif ($field['type'] == 'select') |
@@ -233,14 +241,16 @@ discard block |
||
233 | 241 | if (isset($field['options'])) |
234 | 242 | { |
235 | 243 | // Is this some code to generate the options? |
236 | - if (!is_array($field['options'])) |
|
237 | - $field['options'] = eval($field['options']); |
|
244 | + if (!is_array($field['options'])) { |
|
245 | + $field['options'] = eval($field['options']); |
|
246 | + } |
|
238 | 247 | |
239 | 248 | // Assuming we now have some! |
240 | - if (is_array($field['options'])) |
|
241 | - foreach ($field['options'] as $value => $name) |
|
249 | + if (is_array($field['options'])) { |
|
250 | + foreach ($field['options'] as $value => $name) |
|
242 | 251 | echo ' |
243 | 252 | <option', is_numeric($value) ? ' value="" disabled' : ' value="' . $value . '"', $value === $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
253 | + } |
|
244 | 254 | } |
245 | 255 | |
246 | 256 | echo ' |
@@ -248,9 +258,10 @@ discard block |
||
248 | 258 | } |
249 | 259 | |
250 | 260 | // Something to end with? |
251 | - if (!empty($field['postinput'])) |
|
252 | - echo ' |
|
261 | + if (!empty($field['postinput'])) { |
|
262 | + echo ' |
|
253 | 263 | ', $field['postinput']; |
264 | + } |
|
254 | 265 | |
255 | 266 | echo ' |
256 | 267 | </dd>'; |
@@ -261,25 +272,27 @@ discard block |
||
261 | 272 | // Are there any custom fields? |
262 | 273 | if (!empty($context['custom_fields'])) |
263 | 274 | { |
264 | - foreach ($context['custom_fields'] as $field) |
|
265 | - if ($field['show_reg'] < 2) |
|
275 | + foreach ($context['custom_fields'] as $field) { |
|
276 | + if ($field['show_reg'] < 2) |
|
266 | 277 | echo ' |
267 | 278 | <dt> |
268 | 279 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong> |
269 | 280 | <span class="smalltext">', $field['desc'], '</span> |
270 | 281 | </dt> |
271 | 282 | <dd>', $field['input_html'], '</dd>'; |
283 | + } |
|
272 | 284 | } |
273 | 285 | |
274 | 286 | // If we have either of these, close the list like a proper gent. |
275 | - if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) |
|
276 | - echo ' |
|
287 | + if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) { |
|
288 | + echo ' |
|
277 | 289 | </dl> |
278 | 290 | </fieldset> |
279 | 291 | </div><!-- .roundframe -->'; |
292 | + } |
|
280 | 293 | |
281 | - if ($context['visual_verification']) |
|
282 | - echo ' |
|
294 | + if ($context['visual_verification']) { |
|
295 | + echo ' |
|
283 | 296 | <div class="title_bar"> |
284 | 297 | <h3 class="titlebg">', $txt['verification'], '</h3> |
285 | 298 | </div> |
@@ -288,19 +301,21 @@ discard block |
||
288 | 301 | ', template_control_verification($context['visual_verification_id'], 'all'), ' |
289 | 302 | </fieldset> |
290 | 303 | </div>'; |
304 | + } |
|
291 | 305 | |
292 | 306 | echo ' |
293 | 307 | <div id="confirm_buttons" class="flow_auto">'; |
294 | 308 | |
295 | 309 | // Age restriction in effect? |
296 | - if (!$context['require_agreement'] && $context['show_coppa']) |
|
297 | - echo ' |
|
310 | + if (!$context['require_agreement'] && $context['show_coppa']) { |
|
311 | + echo ' |
|
298 | 312 | <input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button"><br> |
299 | 313 | <br> |
300 | 314 | <input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button">'; |
301 | - else |
|
302 | - echo ' |
|
315 | + } else { |
|
316 | + echo ' |
|
303 | 317 | <input type="submit" name="regSubmit" value="', $txt['register'], '" tabindex="', $context['tabindex']++, '" class="button">'; |
318 | + } |
|
304 | 319 | |
305 | 320 | echo ' |
306 | 321 | </div> |
@@ -362,25 +377,28 @@ discard block |
||
362 | 377 | <p>', $context['coppa']['many_options'] ? $txt['coppa_send_to_two_options'] : $txt['coppa_send_to_one_option'], '</p>'; |
363 | 378 | |
364 | 379 | // Can they send by post? |
365 | - if (!empty($context['coppa']['post'])) |
|
366 | - echo ' |
|
380 | + if (!empty($context['coppa']['post'])) { |
|
381 | + echo ' |
|
367 | 382 | <h4>1) ', $txt['coppa_send_by_post'], '</h4> |
368 | 383 | <div class="coppa_contact"> |
369 | 384 | ', $context['coppa']['post'], ' |
370 | 385 | </div>'; |
386 | + } |
|
371 | 387 | |
372 | 388 | // Can they send by fax?? |
373 | - if (!empty($context['coppa']['fax'])) |
|
374 | - echo ' |
|
389 | + if (!empty($context['coppa']['fax'])) { |
|
390 | + echo ' |
|
375 | 391 | <h4>', !empty($context['coppa']['post']) ? '2' : '1', ') ', $txt['coppa_send_by_fax'], '</h4> |
376 | 392 | <div class="coppa_contact"> |
377 | 393 | ', $context['coppa']['fax'], ' |
378 | 394 | </div>'; |
395 | + } |
|
379 | 396 | |
380 | 397 | // Offer an alternative Phone Number? |
381 | - if ($context['coppa']['phone']) |
|
382 | - echo ' |
|
398 | + if ($context['coppa']['phone']) { |
|
399 | + echo ' |
|
383 | 400 | <p>', $context['coppa']['phone'], '</p>'; |
401 | + } |
|
384 | 402 | |
385 | 403 | echo ' |
386 | 404 | </div><!-- #coppa -->'; |
@@ -445,19 +463,20 @@ discard block |
||
445 | 463 | <body style="margin: 1ex;"> |
446 | 464 | <div class="windowbg description" style="text-align: center;">'; |
447 | 465 | |
448 | - if (isBrowser('is_ie') || isBrowser('is_ie11')) |
|
449 | - echo ' |
|
466 | + if (isBrowser('is_ie') || isBrowser('is_ie11')) { |
|
467 | + echo ' |
|
450 | 468 | <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="audio/x-wav"> |
451 | 469 | <param name="AutoStart" value="1"> |
452 | 470 | <param name="FileName" value="', $context['verification_sound_href'], '"> |
453 | 471 | </object>'; |
454 | - else |
|
455 | - echo ' |
|
472 | + } else { |
|
473 | + echo ' |
|
456 | 474 | <audio src="', $context['verification_sound_href'], '" controls> |
457 | 475 | <object type="audio/x-wav" data="', $context['verification_sound_href'], '"> |
458 | 476 | <a href="', $context['verification_sound_href'], '" rel="nofollow">', $context['verification_sound_href'], '</a> |
459 | 477 | </object> |
460 | 478 | </audio>'; |
479 | + } |
|
461 | 480 | |
462 | 481 | echo ' |
463 | 482 | <br> |
@@ -485,11 +504,12 @@ discard block |
||
485 | 504 | </div> |
486 | 505 | <div id="register_screen" class="windowbg">'; |
487 | 506 | |
488 | - if (!empty($context['registration_done'])) |
|
489 | - echo ' |
|
507 | + if (!empty($context['registration_done'])) { |
|
508 | + echo ' |
|
490 | 509 | <div class="infobox"> |
491 | 510 | ', $context['registration_done'], ' |
492 | 511 | </div>'; |
512 | + } |
|
493 | 513 | |
494 | 514 | echo ' |
495 | 515 | <dl class="register_form" id="admin_register_form"> |
@@ -525,9 +545,10 @@ discard block |
||
525 | 545 | <dd> |
526 | 546 | <select name="group" id="group_select" tabindex="', $context['tabindex']++, '">'; |
527 | 547 | |
528 | - foreach ($context['member_groups'] as $id => $name) |
|
529 | - echo ' |
|
548 | + foreach ($context['member_groups'] as $id => $name) { |
|
549 | + echo ' |
|
530 | 550 | <option value="', $id, '">', $name, '</option>'; |
551 | + } |
|
531 | 552 | |
532 | 553 | echo ' |
533 | 554 | </select> |
@@ -535,8 +556,8 @@ discard block |
||
535 | 556 | } |
536 | 557 | |
537 | 558 | // If there is any field marked as required, show it here! |
538 | - if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) |
|
539 | - foreach ($context['custom_fields'] as $field) |
|
559 | + if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) { |
|
560 | + foreach ($context['custom_fields'] as $field) |
|
540 | 561 | if ($field['show_reg'] > 1) |
541 | 562 | echo ' |
542 | 563 | <dt> |
@@ -546,6 +567,7 @@ discard block |
||
546 | 567 | <dd> |
547 | 568 | ', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), ' |
548 | 569 | </dd>'; |
570 | + } |
|
549 | 571 | |
550 | 572 | echo ' |
551 | 573 | <dt> |
@@ -582,18 +604,19 @@ discard block |
||
582 | 604 | { |
583 | 605 | global $context, $scripturl, $txt; |
584 | 606 | |
585 | - if (!empty($context['saved_successful'])) |
|
586 | - echo ' |
|
607 | + if (!empty($context['saved_successful'])) { |
|
608 | + echo ' |
|
587 | 609 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
588 | - |
|
589 | - elseif (!empty($context['could_not_save'])) |
|
590 | - echo ' |
|
610 | + } elseif (!empty($context['could_not_save'])) { |
|
611 | + echo ' |
|
591 | 612 | <div class="errorbox">', $txt['admin_agreement_not_saved'], '</div>'; |
613 | + } |
|
592 | 614 | |
593 | 615 | // Warning for if the file isn't writable. |
594 | - if (!empty($context['warning'])) |
|
595 | - echo ' |
|
616 | + if (!empty($context['warning'])) { |
|
617 | + echo ' |
|
596 | 618 | <div class="errorbox">', $context['warning'], '</div>'; |
619 | + } |
|
597 | 620 | |
598 | 621 | // Just a big box to edit the text file ;) |
599 | 622 | echo ' |
@@ -615,9 +638,10 @@ discard block |
||
615 | 638 | <strong>', $txt['admin_agreement_select_language'], ':</strong> |
616 | 639 | <select name="agree_lang" onchange="document.getElementById(\'change_reg\').submit();" tabindex="', $context['tabindex']++, '">'; |
617 | 640 | |
618 | - foreach ($context['editable_agreements'] as $file => $name) |
|
619 | - echo ' |
|
641 | + foreach ($context['editable_agreements'] as $file => $name) { |
|
642 | + echo ' |
|
620 | 643 | <option value="', $file, '"', $context['current_agreement'] == $file ? ' selected' : '', '>', $name, '</option>'; |
644 | + } |
|
621 | 645 | |
622 | 646 | echo ' |
623 | 647 | </select> |
@@ -657,9 +681,10 @@ discard block |
||
657 | 681 | { |
658 | 682 | global $context, $scripturl, $txt; |
659 | 683 | |
660 | - if (!empty($context['saved_successful'])) |
|
661 | - echo ' |
|
684 | + if (!empty($context['saved_successful'])) { |
|
685 | + echo ' |
|
662 | 686 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
687 | + } |
|
663 | 688 | |
664 | 689 | echo ' |
665 | 690 | <form id="admin_form_wrapper" action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '"> |
@@ -29,9 +29,10 @@ discard block |
||
29 | 29 | <strong>', $txt['ban_errors_detected'], '</strong> |
30 | 30 | <ul>'; |
31 | 31 | |
32 | - foreach ($context['error_messages'] as $error) |
|
33 | - echo ' |
|
32 | + foreach ($context['error_messages'] as $error) { |
|
33 | + echo ' |
|
34 | 34 | <li class="error">', $error, '</li>'; |
35 | + } |
|
35 | 36 | |
36 | 37 | echo ' |
37 | 38 | </ul> |
@@ -45,9 +46,10 @@ discard block |
||
45 | 46 | </h3> |
46 | 47 | </div>'; |
47 | 48 | |
48 | - if ($context['ban']['is_new']) |
|
49 | - echo ' |
|
49 | + if ($context['ban']['is_new']) { |
|
50 | + echo ' |
|
50 | 51 | <div class="information noup">', $txt['ban_add_notes'], '</div>'; |
52 | + } |
|
51 | 53 | |
52 | 54 | echo ' |
53 | 55 | <div class="windowbg noup"> |
@@ -59,8 +61,8 @@ discard block |
||
59 | 61 | <input type="text" id="ban_name" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60"> |
60 | 62 | </dd>'; |
61 | 63 | |
62 | - if (isset($context['ban']['reason'])) |
|
63 | - echo ' |
|
64 | + if (isset($context['ban']['reason'])) { |
|
65 | + echo ' |
|
64 | 66 | <dt> |
65 | 67 | <strong><label for="reason">', $txt['ban_reason'], ':</label></strong><br> |
66 | 68 | <span class="smalltext">', $txt['ban_reason_desc'], '</span> |
@@ -68,9 +70,10 @@ discard block |
||
68 | 70 | <dd> |
69 | 71 | <textarea name="reason" id="reason" cols="40" rows="3">', $context['ban']['reason'], '</textarea> |
70 | 72 | </dd>'; |
73 | + } |
|
71 | 74 | |
72 | - if (isset($context['ban']['notes'])) |
|
73 | - echo ' |
|
75 | + if (isset($context['ban']['notes'])) { |
|
76 | + echo ' |
|
74 | 77 | <dt> |
75 | 78 | <strong><label for="ban_notes">', $txt['ban_notes'], ':</label></strong><br> |
76 | 79 | <span class="smalltext">', $txt['ban_notes_desc'], '</span> |
@@ -78,6 +81,7 @@ discard block |
||
78 | 81 | <dd> |
79 | 82 | <textarea name="notes" id="ban_notes" cols="40" rows="3">', $context['ban']['notes'], '</textarea> |
80 | 83 | </dd>'; |
84 | + } |
|
81 | 85 | |
82 | 86 | echo ' |
83 | 87 | </dl> |
@@ -117,8 +121,8 @@ discard block |
||
117 | 121 | <input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
118 | 122 | </dd>'; |
119 | 123 | |
120 | - if (empty($modSettings['disableHostnameLookup'])) |
|
121 | - echo ' |
|
124 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
125 | + echo ' |
|
122 | 126 | <dt> |
123 | 127 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', !empty($context['ban_suggestions']['hostname']) ? ' checked' : '', '> |
124 | 128 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -126,6 +130,7 @@ discard block |
||
126 | 130 | <dd> |
127 | 131 | <input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
128 | 132 | </dd>'; |
133 | + } |
|
129 | 134 | |
130 | 135 | echo ' |
131 | 136 | <dt> |
@@ -155,14 +160,15 @@ discard block |
||
155 | 160 | <dl class="settings">'; |
156 | 161 | |
157 | 162 | $count = 0; |
158 | - foreach ($ban_ips as $ip) |
|
159 | - echo ' |
|
163 | + foreach ($ban_ips as $ip) { |
|
164 | + echo ' |
|
160 | 165 | <dt> |
161 | 166 | <input type="checkbox" id="suggestions_', $key, '_', $count, '" name="ban_suggestions[', $key, '][]"', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? ' checked' : '', ' value="', $ip, '"> |
162 | 167 | </dt> |
163 | 168 | <dd> |
164 | 169 | <label for="suggestions_', $key, '_', $count++, '">', $ip, '</label> |
165 | 170 | </dd>'; |
171 | + } |
|
166 | 172 | |
167 | 173 | echo ' |
168 | 174 | </dl>'; |
@@ -204,8 +210,8 @@ discard block |
||
204 | 210 | addLoadEvent(fUpdateStatus);'; |
205 | 211 | |
206 | 212 | // Auto suggest only needed for adding new bans, not editing |
207 | - if ($context['ban']['is_new'] && empty($_REQUEST['u'])) |
|
208 | - echo ' |
|
213 | + if ($context['ban']['is_new'] && empty($_REQUEST['u'])) { |
|
214 | + echo ' |
|
209 | 215 | var oAddMemberSuggest = new smc_AutoSuggest({ |
210 | 216 | sSelf: \'oAddMemberSuggest\', |
211 | 217 | sSessionId: smf_session_id, |
@@ -223,6 +229,7 @@ discard block |
||
223 | 229 | return true; |
224 | 230 | } |
225 | 231 | oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\');'; |
232 | + } |
|
226 | 233 | |
227 | 234 | echo ' |
228 | 235 | function confirmBan(aForm) |
@@ -271,8 +278,8 @@ discard block |
||
271 | 278 | <input type="text" name="main_ip" value="', $context['ban_trigger']['ip']['value'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
272 | 279 | </dd>'; |
273 | 280 | |
274 | - if (empty($modSettings['disableHostnameLookup'])) |
|
275 | - echo ' |
|
281 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
282 | + echo ' |
|
276 | 283 | <dt> |
277 | 284 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', $context['ban_trigger']['hostname']['selected'] ? ' checked' : '', '> |
278 | 285 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -280,6 +287,7 @@ discard block |
||
280 | 287 | <dd> |
281 | 288 | <input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
282 | 289 | </dd>'; |
290 | + } |
|
283 | 291 | |
284 | 292 | echo ' |
285 | 293 | <dt> |