@@ -18,9 +18,10 @@ discard block |
||
18 | 18 | global $context, $txt, $scripturl; |
19 | 19 | |
20 | 20 | // Are we done sending the newsletter? |
21 | - if (!empty($context['newsletter_sent'])) |
|
22 | - echo ' |
|
21 | + if (!empty($context['newsletter_sent'])) { |
|
22 | + echo ' |
|
23 | 23 | <div class="infobox">', $txt['admin_news_newsletter_' . $context['newsletter_sent']], '</div>'; |
24 | + } |
|
24 | 25 | |
25 | 26 | echo ' |
26 | 27 | <div id="admincenter"> |
@@ -39,9 +40,10 @@ discard block |
||
39 | 40 | </dt> |
40 | 41 | <dd>'; |
41 | 42 | |
42 | - foreach ($context['groups'] as $group) |
|
43 | - echo ' |
|
43 | + foreach ($context['groups'] as $group) { |
|
44 | + echo ' |
|
44 | 45 | <label for="groups_', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups_', $group['id'], '" value="', $group['id'], '" checked> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
46 | + } |
|
45 | 47 | |
46 | 48 | echo ' |
47 | 49 | <br> |
@@ -82,9 +84,10 @@ discard block |
||
82 | 84 | </dt> |
83 | 85 | <dd>'; |
84 | 86 | |
85 | - foreach ($context['groups'] as $group) |
|
86 | - echo ' |
|
87 | + foreach ($context['groups'] as $group) { |
|
88 | + echo ' |
|
87 | 89 | <label for="exclude_groups_', $group['id'], '"><input type="checkbox" name="exclude_groups[', $group['id'], ']" id="exclude_groups_', $group['id'], '" value="', $group['id'], '"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
90 | + } |
|
88 | 91 | |
89 | 92 | echo ' |
90 | 93 | <br> |
@@ -230,9 +233,10 @@ discard block |
||
230 | 233 | <div id="bbcBox_message"></div>'; |
231 | 234 | |
232 | 235 | // What about smileys? |
233 | - if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) |
|
234 | - echo ' |
|
236 | + if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) { |
|
237 | + echo ' |
|
235 | 238 | <div id="smileyBox_message"></div>'; |
239 | + } |
|
236 | 240 | |
237 | 241 | // Show BBC buttons, smileys and textbox. |
238 | 242 | echo ' |
@@ -253,9 +257,10 @@ discard block |
||
253 | 257 | <input type="hidden" name="email_force" value="', $context['email_force'], '"> |
254 | 258 | <input type="hidden" name="total_emails" value="', $context['total_emails'], '">'; |
255 | 259 | |
256 | - foreach ($context['recipients'] as $key => $values) |
|
257 | - echo ' |
|
260 | + foreach ($context['recipients'] as $key => $values) { |
|
261 | + echo ' |
|
258 | 262 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
263 | + } |
|
259 | 264 | |
260 | 265 | echo ' |
261 | 266 | <script>'; |
@@ -411,9 +416,10 @@ discard block |
||
411 | 416 | <input type="hidden" name="parse_html" value="', $context['parse_html'], '">'; |
412 | 417 | |
413 | 418 | // All the things we must remember! |
414 | - foreach ($context['recipients'] as $key => $values) |
|
415 | - echo ' |
|
419 | + foreach ($context['recipients'] as $key => $values) { |
|
420 | + echo ' |
|
416 | 421 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
422 | + } |
|
417 | 423 | |
418 | 424 | echo ' |
419 | 425 | </div><!-- .windowbg --> |
@@ -446,9 +452,10 @@ discard block |
||
446 | 452 | { |
447 | 453 | global $context, $txt; |
448 | 454 | |
449 | - if (!empty($context['saved_successful'])) |
|
450 | - echo ' |
|
455 | + if (!empty($context['saved_successful'])) { |
|
456 | + echo ' |
|
451 | 457 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
458 | + } |
|
452 | 459 | |
453 | 460 | template_show_list('news_lists'); |
454 | 461 | } |
@@ -44,10 +44,11 @@ discard block |
||
44 | 44 | <dt>', $txt['users_online_today'], ':</dt> |
45 | 45 | <dd>', $context['online_today'], '</dd>'; |
46 | 46 | |
47 | - if (!empty($modSettings['hitStats'])) |
|
48 | - echo ' |
|
47 | + if (!empty($modSettings['hitStats'])) { |
|
48 | + echo ' |
|
49 | 49 | <dt>', $txt['num_hits'], ':</dt> |
50 | 50 | <dd>', $context['num_hits'], '</dd>'; |
51 | + } |
|
51 | 52 | |
52 | 53 | echo ' |
53 | 54 | </dl> |
@@ -71,17 +72,19 @@ discard block |
||
71 | 72 | <dt>', $txt['gender_stats'], ':</dt> |
72 | 73 | <dd>'; |
73 | 74 | |
74 | - foreach ($context['gender'] as $g => $n) |
|
75 | - echo $g, ': ', $n, '<br>'; |
|
75 | + foreach ($context['gender'] as $g => $n) { |
|
76 | + echo $g, ': ', $n, '<br>'; |
|
77 | + } |
|
76 | 78 | |
77 | 79 | echo ' |
78 | 80 | </dd>'; |
79 | 81 | } |
80 | 82 | |
81 | - if (!empty($modSettings['hitStats'])) |
|
82 | - echo ' |
|
83 | + if (!empty($modSettings['hitStats'])) { |
|
84 | + echo ' |
|
83 | 85 | <dt>', $txt['average_hits'], ':</dt> |
84 | 86 | <dd>', $context['average_hits'], '</dd>'; |
87 | + } |
|
85 | 88 | |
86 | 89 | echo ' |
87 | 90 | </dl>'; |
@@ -105,14 +108,15 @@ discard block |
||
105 | 108 | </dt> |
106 | 109 | <dd class="statsbar">'; |
107 | 110 | |
108 | - if (!empty($item['percent'])) |
|
109 | - echo ' |
|
111 | + if (!empty($item['percent'])) { |
|
112 | + echo ' |
|
110 | 113 | <div class="bar" style="width: ', $item['percent'], '%;"> |
111 | 114 | <span class="righttext">', $item['num'], '</span> |
112 | 115 | </div>'; |
113 | - else |
|
114 | - echo ' |
|
116 | + } else { |
|
117 | + echo ' |
|
115 | 118 | <div class="bar empty"><span class="righttext">', $item['num'], '</span></div>'; |
119 | + } |
|
116 | 120 | |
117 | 121 | echo ' |
118 | 122 | </dd>'; |
@@ -144,9 +148,10 @@ discard block |
||
144 | 148 | <th>', $txt['stats_new_members'], '</th> |
145 | 149 | <th>', $txt['most_online'], '</th>'; |
146 | 150 | |
147 | - if (!empty($modSettings['hitStats'])) |
|
148 | - echo ' |
|
151 | + if (!empty($modSettings['hitStats'])) { |
|
152 | + echo ' |
|
149 | 153 | <th>', $txt['page_views'], '</th>'; |
154 | + } |
|
150 | 155 | |
151 | 156 | echo ' |
152 | 157 | </tr> |
@@ -165,9 +170,10 @@ discard block |
||
165 | 170 | <th>', $year['new_members'], '</th> |
166 | 171 | <th>', $year['most_members_online'], '</th>'; |
167 | 172 | |
168 | - if (!empty($modSettings['hitStats'])) |
|
169 | - echo ' |
|
173 | + if (!empty($modSettings['hitStats'])) { |
|
174 | + echo ' |
|
170 | 175 | <th>', $year['hits'], '</th>'; |
176 | + } |
|
171 | 177 | |
172 | 178 | echo ' |
173 | 179 | </tr>'; |
@@ -184,9 +190,10 @@ discard block |
||
184 | 190 | <th>', $month['new_members'], '</th> |
185 | 191 | <th>', $month['most_members_online'], '</th>'; |
186 | 192 | |
187 | - if (!empty($modSettings['hitStats'])) |
|
188 | - echo ' |
|
193 | + if (!empty($modSettings['hitStats'])) { |
|
194 | + echo ' |
|
189 | 195 | <th>', $month['hits'], '</th>'; |
196 | + } |
|
190 | 197 | |
191 | 198 | echo ' |
192 | 199 | </tr>'; |
@@ -203,9 +210,10 @@ discard block |
||
203 | 210 | <td>', $day['new_members'], '</td> |
204 | 211 | <td>', $day['most_members_online'], '</td>'; |
205 | 212 | |
206 | - if (!empty($modSettings['hitStats'])) |
|
207 | - echo ' |
|
213 | + if (!empty($modSettings['hitStats'])) { |
|
214 | + echo ' |
|
208 | 215 | <td>', $day['hits'], '</td>'; |
216 | + } |
|
209 | 217 | |
210 | 218 | echo ' |
211 | 219 | </tr>'; |
@@ -55,18 +55,20 @@ discard block |
||
55 | 55 | <div class="modbox"> |
56 | 56 | <ul>'; |
57 | 57 | |
58 | - foreach ($context['group_requests'] as $request) |
|
59 | - echo ' |
|
58 | + foreach ($context['group_requests'] as $request) { |
|
59 | + echo ' |
|
60 | 60 | <li class="smalltext"> |
61 | 61 | <a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], ' |
62 | 62 | </li>'; |
63 | + } |
|
63 | 64 | |
64 | 65 | // Don't have any watched users right now? |
65 | - if (empty($context['group_requests'])) |
|
66 | - echo ' |
|
66 | + if (empty($context['group_requests'])) { |
|
67 | + echo ' |
|
67 | 68 | <li> |
68 | 69 | <strong class="smalltext">', $txt['mc_group_requests_none'], '</strong> |
69 | 70 | </li>'; |
71 | + } |
|
70 | 72 | |
71 | 73 | echo ' |
72 | 74 | </ul> |
@@ -124,18 +126,20 @@ discard block |
||
124 | 126 | <div class="modbox"> |
125 | 127 | <ul>'; |
126 | 128 | |
127 | - foreach ($context['watched_users'] as $user) |
|
128 | - echo ' |
|
129 | + foreach ($context['watched_users'] as $user) { |
|
130 | + echo ' |
|
129 | 131 | <li> |
130 | 132 | <span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span> |
131 | 133 | </li>'; |
134 | + } |
|
132 | 135 | |
133 | 136 | // Don't have any watched users right now? |
134 | - if (empty($context['watched_users'])) |
|
135 | - echo ' |
|
137 | + if (empty($context['watched_users'])) { |
|
138 | + echo ' |
|
136 | 139 | <li> |
137 | 140 | <strong class="smalltext">', $txt['mc_watched_users_none'], '</strong> |
138 | 141 | </li>'; |
142 | + } |
|
139 | 143 | |
140 | 144 | echo ' |
141 | 145 | </ul> |
@@ -193,18 +197,20 @@ discard block |
||
193 | 197 | <div class="modbox"> |
194 | 198 | <ul>'; |
195 | 199 | |
196 | - foreach ($context['reported_posts'] as $post) |
|
197 | - echo ' |
|
200 | + foreach ($context['reported_posts'] as $post) { |
|
201 | + echo ' |
|
198 | 202 | <li> |
199 | 203 | <span class="smalltext">', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), '</span> |
200 | 204 | </li>'; |
205 | + } |
|
201 | 206 | |
202 | 207 | // Don't have any watched users right now? |
203 | - if (empty($context['reported_posts'])) |
|
204 | - echo ' |
|
208 | + if (empty($context['reported_posts'])) { |
|
209 | + echo ' |
|
205 | 210 | <li> |
206 | 211 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
207 | 212 | </li>'; |
213 | + } |
|
208 | 214 | |
209 | 215 | echo ' |
210 | 216 | </ul> |
@@ -262,18 +268,20 @@ discard block |
||
262 | 268 | <div class="modbox"> |
263 | 269 | <ul>'; |
264 | 270 | |
265 | - foreach ($context['reported_users'] as $user) |
|
266 | - echo ' |
|
271 | + foreach ($context['reported_users'] as $user) { |
|
272 | + echo ' |
|
267 | 273 | <li> |
268 | 274 | <span class="smalltext">', $user['user']['link'], '</span> |
269 | 275 | </li>'; |
276 | + } |
|
270 | 277 | |
271 | 278 | // Don't have any watched users right now? |
272 | - if (empty($context['reported_users'])) |
|
273 | - echo ' |
|
279 | + if (empty($context['reported_users'])) { |
|
280 | + echo ' |
|
274 | 281 | <li> |
275 | 282 | <strong class="smalltext">', $txt['mc_reported_users_none'], '</strong> |
276 | 283 | </li>'; |
284 | + } |
|
277 | 285 | |
278 | 286 | echo ' |
279 | 287 | </ul> |
@@ -344,11 +352,12 @@ discard block |
||
344 | 352 | <ul class="moderation_notes">'; |
345 | 353 | |
346 | 354 | // Cycle through the notes. |
347 | - foreach ($context['notes'] as $note) |
|
348 | - echo ' |
|
355 | + foreach ($context['notes'] as $note) { |
|
356 | + echo ' |
|
349 | 357 | <li class="smalltext"> |
350 | 358 | ', ($note['can_delete'] ? '<a href="' . $note['delete_href'] . ';' . $context['mod-modnote-del_token_var'] . '=' . $context['mod-modnote-del_token'] . '" data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'], ' <strong>', $note['author']['link'], ':</strong> ', $note['text'], ' |
351 | 359 | </li>'; |
360 | + } |
|
352 | 361 | |
353 | 362 | echo ' |
354 | 363 | </ul> |
@@ -390,18 +399,19 @@ discard block |
||
390 | 399 | $remove_button = create_button('delete', 'remove_message', 'remove'); |
391 | 400 | |
392 | 401 | // No posts? |
393 | - if (empty($context['unapproved_items'])) |
|
394 | - echo ' |
|
402 | + if (empty($context['unapproved_items'])) { |
|
403 | + echo ' |
|
395 | 404 | <div class="windowbg2"> |
396 | 405 | <p class="centertext"> |
397 | 406 | ', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], ' |
398 | 407 | </p> |
399 | 408 | </div>'; |
400 | - else |
|
401 | - echo ' |
|
409 | + } else { |
|
410 | + echo ' |
|
402 | 411 | <div class="pagesection floatleft"> |
403 | 412 | ', $context['page_index'], ' |
404 | 413 | </div>'; |
414 | + } |
|
405 | 415 | |
406 | 416 | foreach ($context['unapproved_items'] as $item) |
407 | 417 | { |
@@ -420,14 +430,16 @@ discard block |
||
420 | 430 | <span class="floatright"> |
421 | 431 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';approve=', $item['id'], '">', $approve_button, '</a>'; |
422 | 432 | |
423 | - if ($item['can_delete']) |
|
424 | - echo ' |
|
433 | + if ($item['can_delete']) { |
|
434 | + echo ' |
|
425 | 435 | ', $context['menu_separator'], ' |
426 | 436 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';delete=', $item['id'], '">', $remove_button, '</a>'; |
437 | + } |
|
427 | 438 | |
428 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
429 | - echo ' |
|
439 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
440 | + echo ' |
|
430 | 441 | <input type="checkbox" name="item[]" value="', $item['id'], '" checked> '; |
442 | + } |
|
431 | 443 | |
432 | 444 | echo ' |
433 | 445 | </span> |
@@ -437,8 +449,8 @@ discard block |
||
437 | 449 | echo ' |
438 | 450 | <div class="pagesection">'; |
439 | 451 | |
440 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
441 | - echo ' |
|
452 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
453 | + echo ' |
|
442 | 454 | <div class="floatright"> |
443 | 455 | <select name="do" onchange="if (this.value != 0 && confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();"> |
444 | 456 | <option value="0">', $txt['with_selected'], ':</option> |
@@ -450,12 +462,14 @@ discard block |
||
450 | 462 | <input type="submit" name="mc_go" value="', $txt['go'], '" class="button"> |
451 | 463 | </noscript> |
452 | 464 | </div>'; |
465 | + } |
|
453 | 466 | |
454 | - if (!empty($context['unapproved_items'])) |
|
455 | - echo ' |
|
467 | + if (!empty($context['unapproved_items'])) { |
|
468 | + echo ' |
|
456 | 469 | <div class="floatleft"> |
457 | 470 | <div class="pagelinks">', $context['page_index'], '</div> |
458 | 471 | </div>'; |
472 | + } |
|
459 | 473 | |
460 | 474 | echo ' |
461 | 475 | </div><!-- .pagesection --> |
@@ -475,8 +489,9 @@ discard block |
||
475 | 489 | global $scripturl, $context, $txt, $delete_button; |
476 | 490 | |
477 | 491 | // We'll have a delete please bob. |
478 | - if (empty($delete_button)) |
|
479 | - $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
492 | + if (empty($delete_button)) { |
|
493 | + $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
494 | + } |
|
480 | 495 | |
481 | 496 | $output_html = ' |
482 | 497 | <div> |
@@ -485,10 +500,11 @@ discard block |
||
485 | 500 | </div> |
486 | 501 | <div class="floatright">'; |
487 | 502 | |
488 | - if ($post['can_delete']) |
|
489 | - $output_html .= ' |
|
503 | + if ($post['can_delete']) { |
|
504 | + $output_html .= ' |
|
490 | 505 | <a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a> |
491 | 506 | <input type="checkbox" name="delete[]" value="' . $post['id'] . '">'; |
507 | + } |
|
492 | 508 | |
493 | 509 | $output_html .= ' |
494 | 510 | </div> |
@@ -531,12 +547,12 @@ discard block |
||
531 | 547 | <input type="submit" name="save" value="', $txt['save'], '" class="button"> |
532 | 548 | </div> |
533 | 549 | </form>'; |
534 | - } |
|
535 | - else |
|
536 | - echo ' |
|
550 | + } else { |
|
551 | + echo ' |
|
537 | 552 | <div class="windowbg"> |
538 | 553 | <div class="centertext">', $txt['mc_no_settings'], '</div> |
539 | 554 | </div>'; |
555 | + } |
|
540 | 556 | |
541 | 557 | echo ' |
542 | 558 | </div><!-- #modcenter -->'; |
@@ -632,13 +648,14 @@ discard block |
||
632 | 648 | </dd> |
633 | 649 | </dl>'; |
634 | 650 | |
635 | - if ($context['template_data']['can_edit_personal']) |
|
636 | - echo ' |
|
651 | + if ($context['template_data']['can_edit_personal']) { |
|
652 | + echo ' |
|
637 | 653 | <input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', '> |
638 | 654 | <label for="make_personal"> |
639 | 655 | <strong>', $txt['mc_warning_template_personal'], '</strong> |
640 | 656 | </label><br> |
641 | 657 | <span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span><br>'; |
658 | + } |
|
642 | 659 | |
643 | 660 | echo ' |
644 | 661 | <hr> |
@@ -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><!-- .windowbg2 --> |
@@ -55,8 +55,9 @@ discard block |
||
55 | 55 | // Prepare the comments... |
56 | 56 | $comments = array(); |
57 | 57 | |
58 | - foreach ($report['comments'] as $comment) |
|
59 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
58 | + foreach ($report['comments'] as $comment) { |
|
59 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
60 | + } |
|
60 | 61 | |
61 | 62 | echo ' |
62 | 63 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -72,18 +73,21 @@ discard block |
||
72 | 73 | <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>'; |
73 | 74 | |
74 | 75 | // Delete message button. |
75 | - if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) |
|
76 | - echo ' |
|
76 | + if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) { |
|
77 | + echo ' |
|
77 | 78 | <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>'; |
79 | + } |
|
78 | 80 | |
79 | 81 | // Ban this user button. |
80 | - if (!$report['closed'] && !empty($context['report_manage_bans'])) |
|
81 | - echo ' |
|
82 | + if (!$report['closed'] && !empty($context['report_manage_bans'])) { |
|
83 | + echo ' |
|
82 | 84 | <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>'; |
85 | + } |
|
83 | 86 | |
84 | - if (!$context['view_closed']) |
|
85 | - echo ' |
|
87 | + if (!$context['view_closed']) { |
|
88 | + echo ' |
|
86 | 89 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>'; |
90 | + } |
|
87 | 91 | |
88 | 92 | echo ' |
89 | 93 | </ul> |
@@ -91,18 +95,20 @@ discard block |
||
91 | 95 | } |
92 | 96 | |
93 | 97 | // Were none found? |
94 | - if (empty($context['reports'])) |
|
95 | - echo ' |
|
98 | + if (empty($context['reports'])) { |
|
99 | + echo ' |
|
96 | 100 | <div class="windowbg2"> |
97 | 101 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
98 | 102 | </div>'; |
103 | + } |
|
99 | 104 | |
100 | 105 | echo ' |
101 | 106 | <div class="pagesection">'; |
102 | 107 | |
103 | - if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many']) |
|
104 | - echo ' |
|
108 | + if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many']) { |
|
109 | + echo ' |
|
105 | 110 | <div class="pagelinks floatleft">' . $context['page_index'] . '</div>'; |
111 | + } |
|
106 | 112 | |
107 | 113 | echo ' |
108 | 114 | <div class="floatright">', !$context['view_closed'] ? ' |
@@ -133,18 +139,20 @@ discard block |
||
133 | 139 | <div class="modbox"> |
134 | 140 | <ul>'; |
135 | 141 | |
136 | - foreach ($context['reported_posts'] as $report) |
|
137 | - echo ' |
|
142 | + foreach ($context['reported_posts'] as $report) { |
|
143 | + echo ' |
|
138 | 144 | <li class="smalltext"> |
139 | 145 | <a href="', $report['report_href'], '">', $report['subject'], '</a> ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], ' |
140 | 146 | </li>'; |
147 | + } |
|
141 | 148 | |
142 | 149 | // Don't have any watched users right now? |
143 | - if (empty($context['reported_posts'])) |
|
144 | - echo ' |
|
150 | + if (empty($context['reported_posts'])) { |
|
151 | + echo ' |
|
145 | 152 | <li> |
146 | 153 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
147 | 154 | </li>'; |
155 | + } |
|
148 | 156 | |
149 | 157 | echo ' |
150 | 158 | </ul> |
@@ -234,14 +242,15 @@ discard block |
||
234 | 242 | <h3 class="catbg">', $txt['mc_modreport_whoreported_title'], '</h3> |
235 | 243 | </div>'; |
236 | 244 | |
237 | - foreach ($context['report']['comments'] as $comment) |
|
238 | - echo ' |
|
245 | + foreach ($context['report']['comments'] as $comment) { |
|
246 | + echo ' |
|
239 | 247 | <div class="windowbg"> |
240 | 248 | <p class="smalltext"> |
241 | 249 | ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' |
242 | 250 | </p> |
243 | 251 | <p>', $comment['message'], '</p> |
244 | 252 | </div>'; |
253 | + } |
|
245 | 254 | |
246 | 255 | echo ' |
247 | 256 | <br> |
@@ -250,11 +259,12 @@ discard block |
||
250 | 259 | </div> |
251 | 260 | <div>'; |
252 | 261 | |
253 | - if (empty($context['report']['mod_comments'])) |
|
254 | - echo ' |
|
262 | + if (empty($context['report']['mod_comments'])) { |
|
263 | + echo ' |
|
255 | 264 | <div class="information"> |
256 | 265 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
257 | 266 | </div>'; |
267 | + } |
|
258 | 268 | |
259 | 269 | foreach ($context['report']['mod_comments'] as $comment) |
260 | 270 | { |
@@ -346,18 +356,20 @@ discard block |
||
346 | 356 | <div class="modbox"> |
347 | 357 | <ul>'; |
348 | 358 | |
349 | - foreach ($context['reported_members'] as $report) |
|
350 | - echo ' |
|
359 | + foreach ($context['reported_members'] as $report) { |
|
360 | + echo ' |
|
351 | 361 | <li class="smalltext"> |
352 | 362 | <a href="', $report['report_href'], '">', $report['user_name'], '</a> |
353 | 363 | </li>'; |
364 | + } |
|
354 | 365 | |
355 | 366 | // Don't have any reported members right now? |
356 | - if (empty($context['reported_members'])) |
|
357 | - echo ' |
|
367 | + if (empty($context['reported_members'])) { |
|
368 | + echo ' |
|
358 | 369 | <li> |
359 | 370 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
360 | 371 | </li>'; |
372 | + } |
|
361 | 373 | |
362 | 374 | echo ' |
363 | 375 | </ul> |
@@ -443,8 +455,9 @@ discard block |
||
443 | 455 | |
444 | 456 | // Prepare the comments... |
445 | 457 | $comments = array(); |
446 | - foreach ($report['comments'] as $comment) |
|
447 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
458 | + foreach ($report['comments'] as $comment) { |
|
459 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
460 | + } |
|
448 | 461 | |
449 | 462 | echo ' |
450 | 463 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -456,13 +469,15 @@ discard block |
||
456 | 469 | <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>'; |
457 | 470 | |
458 | 471 | // Ban this user button. |
459 | - if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) |
|
460 | - echo ' |
|
472 | + if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) { |
|
473 | + echo ' |
|
461 | 474 | <li><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $report['user']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>'; |
475 | + } |
|
462 | 476 | |
463 | - if (!$context['view_closed']) |
|
464 | - echo ' |
|
477 | + if (!$context['view_closed']) { |
|
478 | + echo ' |
|
465 | 479 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>'; |
480 | + } |
|
466 | 481 | |
467 | 482 | echo ' |
468 | 483 | </ul> |
@@ -470,11 +485,12 @@ discard block |
||
470 | 485 | } |
471 | 486 | |
472 | 487 | // Were none found? |
473 | - if (empty($context['reports'])) |
|
474 | - echo ' |
|
488 | + if (empty($context['reports'])) { |
|
489 | + echo ' |
|
475 | 490 | <div class="windowbg2"> |
476 | 491 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
477 | 492 | </div>'; |
493 | + } |
|
478 | 494 | |
479 | 495 | echo ' |
480 | 496 | <div class="pagesection"> |
@@ -534,14 +550,15 @@ discard block |
||
534 | 550 | <h3 class="catbg">', $txt['mc_memberreport_whoreported_title'], '</h3> |
535 | 551 | </div>'; |
536 | 552 | |
537 | - foreach ($context['report']['comments'] as $comment) |
|
538 | - echo ' |
|
553 | + foreach ($context['report']['comments'] as $comment) { |
|
554 | + echo ' |
|
539 | 555 | <div class="windowbg"> |
540 | 556 | <p class="smalltext"> |
541 | 557 | ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' |
542 | 558 | </p> |
543 | 559 | <p>', $comment['message'], '</p> |
544 | 560 | </div>'; |
561 | + } |
|
545 | 562 | |
546 | 563 | echo ' |
547 | 564 | <br> |
@@ -550,11 +567,12 @@ discard block |
||
550 | 567 | </div> |
551 | 568 | <div>'; |
552 | 569 | |
553 | - if (empty($context['report']['mod_comments'])) |
|
554 | - echo ' |
|
570 | + if (empty($context['report']['mod_comments'])) { |
|
571 | + echo ' |
|
555 | 572 | <div class="information"> |
556 | 573 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
557 | 574 | </div>'; |
575 | + } |
|
558 | 576 | |
559 | 577 | foreach ($context['report']['mod_comments'] as $comment) |
560 | 578 | { |
@@ -62,16 +62,17 @@ |
||
62 | 62 | <div id="error_box" class="errorbox"> |
63 | 63 | <ul id="error_list">'; |
64 | 64 | |
65 | - foreach ($context['post_errors'] as $key => $error) |
|
66 | - echo ' |
|
65 | + foreach ($context['post_errors'] as $key => $error) { |
|
66 | + echo ' |
|
67 | 67 | <li id="error_', $key, '" class="error">', $error, '</li>'; |
68 | + } |
|
68 | 69 | |
69 | 70 | echo ' |
70 | 71 | </ul>'; |
71 | - } |
|
72 | - else |
|
73 | - echo ' |
|
72 | + } else { |
|
73 | + echo ' |
|
74 | 74 | <div style="display:none" id="error_box" class="errorbox">'; |
75 | + } |
|
75 | 76 | |
76 | 77 | echo ' |
77 | 78 | </div>'; |
@@ -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"> |
@@ -107,11 +108,12 @@ discard block |
||
107 | 108 | <div id="manage_maintenance">'; |
108 | 109 | |
109 | 110 | // If maintenance has finished tell the user. |
110 | - if (!empty($context['maintenance_finished'])) |
|
111 | - echo ' |
|
111 | + if (!empty($context['maintenance_finished'])) { |
|
112 | + echo ' |
|
112 | 113 | <div class="infobox"> |
113 | 114 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
114 | 115 | </div>'; |
116 | + } |
|
115 | 117 | |
116 | 118 | echo ' |
117 | 119 | <div class="cat_bar"> |
@@ -243,11 +245,12 @@ discard block |
||
243 | 245 | <div id="manage_maintenance">'; |
244 | 246 | |
245 | 247 | // If maintenance has finished tell the user. |
246 | - if (!empty($context['maintenance_finished'])) |
|
247 | - echo ' |
|
248 | + if (!empty($context['maintenance_finished'])) { |
|
249 | + echo ' |
|
248 | 250 | <div class="infobox"> |
249 | 251 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
250 | 252 | </div>'; |
253 | + } |
|
251 | 254 | |
252 | 255 | echo ' |
253 | 256 | <div class="cat_bar"> |
@@ -311,9 +314,10 @@ discard block |
||
311 | 314 | </p> |
312 | 315 | <div style="display: none; padding: 3px" id="membersPanel">'; |
313 | 316 | |
314 | - foreach ($context['membergroups'] as $group) |
|
315 | - echo ' |
|
317 | + foreach ($context['membergroups'] as $group) { |
|
318 | + echo ' |
|
316 | 319 | <label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked> ', $group['name'], '</label><br>'; |
320 | + } |
|
317 | 321 | |
318 | 322 | echo ' |
319 | 323 | </div> |
@@ -357,11 +361,12 @@ discard block |
||
357 | 361 | global $scripturl, $txt, $context, $settings, $modSettings; |
358 | 362 | |
359 | 363 | // If maintenance has finished tell the user. |
360 | - if (!empty($context['maintenance_finished'])) |
|
361 | - echo ' |
|
364 | + if (!empty($context['maintenance_finished'])) { |
|
365 | + echo ' |
|
362 | 366 | <div class="infobox"> |
363 | 367 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
364 | 368 | </div>'; |
369 | + } |
|
365 | 370 | |
366 | 371 | // Bit of javascript for showing which boards to prune in an otherwise hidden list. |
367 | 372 | echo ' |
@@ -429,21 +434,23 @@ discard block |
||
429 | 434 | <ul>'; |
430 | 435 | |
431 | 436 | // Display a checkbox with every board. |
432 | - foreach ($category['boards'] as $board) |
|
433 | - echo ' |
|
437 | + foreach ($category['boards'] as $board) { |
|
438 | + echo ' |
|
434 | 439 | <li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"> |
435 | 440 | <label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked>', $board['name'], '</label> |
436 | 441 | </li>'; |
442 | + } |
|
437 | 443 | |
438 | 444 | echo ' |
439 | 445 | </ul> |
440 | 446 | </fieldset>'; |
441 | 447 | |
442 | 448 | // Increase $i, and check if we're at the middle yet. |
443 | - if (++$i == $middle) |
|
444 | - echo ' |
|
449 | + if (++$i == $middle) { |
|
450 | + echo ' |
|
445 | 451 | </div><!-- .floatleft --> |
446 | 452 | <div class="floatright" style="width: 49%;">'; |
453 | + } |
|
447 | 454 | } |
448 | 455 | |
449 | 456 | echo ' |
@@ -485,9 +492,10 @@ discard block |
||
485 | 492 | echo ' |
486 | 493 | <optgroup label="', $category['name'], '">'; |
487 | 494 | |
488 | - foreach ($category['boards'] as $board) |
|
489 | - echo ' |
|
495 | + foreach ($category['boards'] as $board) { |
|
496 | + echo ' |
|
490 | 497 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
498 | + } |
|
491 | 499 | |
492 | 500 | echo ' |
493 | 501 | </optgroup>'; |
@@ -505,9 +513,10 @@ discard block |
||
505 | 513 | echo ' |
506 | 514 | <optgroup label="', $category['name'], '">'; |
507 | 515 | |
508 | - foreach ($category['boards'] as $board) |
|
509 | - echo ' |
|
516 | + foreach ($category['boards'] as $board) { |
|
517 | + echo ' |
|
510 | 518 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
519 | + } |
|
511 | 520 | |
512 | 521 | echo ' |
513 | 522 | </optgroup>'; |
@@ -548,9 +557,10 @@ discard block |
||
548 | 557 | ', $txt['database_optimize_attempt'], '<br>'; |
549 | 558 | |
550 | 559 | // List each table being optimized... |
551 | - foreach ($context['optimized_tables'] as $table) |
|
552 | - echo ' |
|
560 | + foreach ($context['optimized_tables'] as $table) { |
|
561 | + echo ' |
|
553 | 562 | ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>'; |
563 | + } |
|
554 | 564 | |
555 | 565 | // How did we go? |
556 | 566 | echo ' |
@@ -610,13 +620,14 @@ discard block |
||
610 | 620 | </li> |
611 | 621 | </ul>'; |
612 | 622 | |
613 | - if (!empty($context['exceeding_messages_morethan'])) |
|
614 | - echo ' |
|
623 | + if (!empty($context['exceeding_messages_morethan'])) { |
|
624 | + echo ' |
|
615 | 625 | <p>', $context['exceeding_messages_morethan'], '</p>'; |
616 | - } |
|
617 | - else |
|
618 | - echo ' |
|
626 | + } |
|
627 | + } else { |
|
628 | + echo ' |
|
619 | 629 | <p class="infobox">', $txt['convert_to_text'], '</p>'; |
630 | + } |
|
620 | 631 | |
621 | 632 | echo ' |
622 | 633 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '"> |
@@ -31,9 +31,10 @@ discard block |
||
31 | 31 | <div class="selectbox floatright" id="upper_show">', $txt['who_show1'], ' |
32 | 32 | <select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
33 | 33 | |
34 | - foreach ($context['show_methods'] as $value => $label) |
|
35 | - echo ' |
|
34 | + foreach ($context['show_methods'] as $value => $label) { |
|
35 | + echo ' |
|
36 | 36 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
37 | + } |
|
37 | 38 | echo ' |
38 | 39 | </select> |
39 | 40 | <noscript> |
@@ -71,9 +72,10 @@ discard block |
||
71 | 72 | ', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', ' |
72 | 73 | </span>'; |
73 | 74 | |
74 | - if (!empty($member['ip'])) |
|
75 | - echo ' |
|
75 | + if (!empty($member['ip'])) { |
|
76 | + echo ' |
|
76 | 77 | (<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)'; |
78 | + } |
|
77 | 79 | |
78 | 80 | echo ' |
79 | 81 | </td> |
@@ -103,9 +105,10 @@ discard block |
||
103 | 105 | <div class="selectbox floatright">', $txt['who_show1'], ' |
104 | 106 | <select name="show" onchange="document.forms.whoFilter.submit();">'; |
105 | 107 | |
106 | - foreach ($context['show_methods'] as $value => $label) |
|
107 | - echo ' |
|
108 | + foreach ($context['show_methods'] as $value => $label) { |
|
109 | + echo ' |
|
108 | 110 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
111 | + } |
|
109 | 112 | echo ' |
110 | 113 | </select> |
111 | 114 | <noscript> |
@@ -134,17 +137,19 @@ discard block |
||
134 | 137 | |
135 | 138 | foreach ($context['credits'] as $section) |
136 | 139 | { |
137 | - if (isset($section['pretext'])) |
|
138 | - echo ' |
|
140 | + if (isset($section['pretext'])) { |
|
141 | + echo ' |
|
139 | 142 | <div class="windowbg noup"> |
140 | 143 | <p>', $section['pretext'], '</p> |
141 | 144 | </div>'; |
145 | + } |
|
142 | 146 | |
143 | - if (isset($section['title'])) |
|
144 | - echo ' |
|
147 | + if (isset($section['title'])) { |
|
148 | + echo ' |
|
145 | 149 | <div class="cat_bar"> |
146 | 150 | <h3 class="catbg">', $section['title'], '</h3> |
147 | 151 | </div>'; |
152 | + } |
|
148 | 153 | |
149 | 154 | echo ' |
150 | 155 | <div class="windowbg2 noup"> |
@@ -152,17 +157,18 @@ discard block |
||
152 | 157 | |
153 | 158 | foreach ($section['groups'] as $group) |
154 | 159 | { |
155 | - if (isset($group['title'])) |
|
156 | - echo ' |
|
160 | + if (isset($group['title'])) { |
|
161 | + echo ' |
|
157 | 162 | <dt> |
158 | 163 | <strong>', $group['title'], '</strong> |
159 | 164 | </dt> |
160 | 165 | <dd>'; |
166 | + } |
|
161 | 167 | |
162 | 168 | // Try to make this read nicely. |
163 | - if (count($group['members']) <= 2) |
|
164 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
165 | - else |
|
169 | + if (count($group['members']) <= 2) { |
|
170 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
171 | + } else |
|
166 | 172 | { |
167 | 173 | $last_peep = array_pop($group['members']); |
168 | 174 | echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep; |
@@ -175,9 +181,10 @@ discard block |
||
175 | 181 | echo ' |
176 | 182 | </dl>'; |
177 | 183 | |
178 | - if (isset($section['posttext'])) |
|
179 | - echo ' |
|
184 | + if (isset($section['posttext'])) { |
|
185 | + echo ' |
|
180 | 186 | <p class="posttext">', $section['posttext'], '</p>'; |
187 | + } |
|
181 | 188 | |
182 | 189 | echo ' |
183 | 190 | </div>'; |
@@ -192,26 +199,29 @@ discard block |
||
192 | 199 | </div> |
193 | 200 | <div class="windowbg noup">'; |
194 | 201 | |
195 | - if (!empty($context['credits_software_graphics']['graphics'])) |
|
196 | - echo ' |
|
202 | + if (!empty($context['credits_software_graphics']['graphics'])) { |
|
203 | + echo ' |
|
197 | 204 | <dl> |
198 | 205 | <dt><strong>', $txt['credits_graphics'], '</strong></dt> |
199 | 206 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd> |
200 | 207 | </dl>'; |
208 | + } |
|
201 | 209 | |
202 | - if (!empty($context['credits_software_graphics']['software'])) |
|
203 | - echo ' |
|
210 | + if (!empty($context['credits_software_graphics']['software'])) { |
|
211 | + echo ' |
|
204 | 212 | <dl> |
205 | 213 | <dt><strong>', $txt['credits_software'], '</strong></dt> |
206 | 214 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd> |
207 | 215 | </dl>'; |
216 | + } |
|
208 | 217 | |
209 | - if (!empty($context['credits_software_graphics']['fonts'])) |
|
210 | - echo ' |
|
218 | + if (!empty($context['credits_software_graphics']['fonts'])) { |
|
219 | + echo ' |
|
211 | 220 | <dl> |
212 | 221 | <dt><strong>', $txt['credits_fonts'], '</strong></dt> |
213 | 222 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd> |
214 | 223 | </dl>'; |
224 | + } |
|
215 | 225 | echo ' |
216 | 226 | </div>'; |
217 | 227 | } |
@@ -227,14 +237,16 @@ discard block |
||
227 | 237 | <ul>'; |
228 | 238 | |
229 | 239 | // Display the credits. |
230 | - if (!empty($context['credits_modifications'])) |
|
231 | - echo ' |
|
240 | + if (!empty($context['credits_modifications'])) { |
|
241 | + echo ' |
|
232 | 242 | <li>', implode('</li><li>', $context['credits_modifications']), '</li>'; |
243 | + } |
|
233 | 244 | |
234 | 245 | // Legacy. |
235 | - if (!empty($context['copyrights']['mods'])) |
|
236 | - echo ' |
|
246 | + if (!empty($context['copyrights']['mods'])) { |
|
247 | + echo ' |
|
237 | 248 | <li>', implode('</li><li>', $context['copyrights']['mods']), '</li>'; |
249 | + } |
|
238 | 250 | |
239 | 251 | echo ' |
240 | 252 | </ul> |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | <h3 class="catbg">', $context['page_title'], '</h3> |
47 | 47 | </div>'; |
48 | 48 | |
49 | - if (!empty($context['poll_error']['messages'])) |
|
50 | - echo ' |
|
49 | + if (!empty($context['poll_error']['messages'])) { |
|
50 | + echo ' |
|
51 | 51 | <div class="errorbox"> |
52 | 52 | <dl class="poll_error"> |
53 | 53 | <dt> |
@@ -58,6 +58,7 @@ discard block |
||
58 | 58 | </dt> |
59 | 59 | </dl> |
60 | 60 | </div>'; |
61 | + } |
|
61 | 62 | |
62 | 63 | echo ' |
63 | 64 | <div> |
@@ -79,8 +80,9 @@ discard block |
||
79 | 80 | <input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" size="80" maxlength="255">'; |
80 | 81 | |
81 | 82 | // Does this option have a vote count yet, or is it new? |
82 | - if ($choice['votes'] != -1) |
|
83 | - echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; |
|
83 | + if ($choice['votes'] != -1) { |
|
84 | + echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; |
|
85 | + } |
|
84 | 86 | |
85 | 87 | echo ' |
86 | 88 | </dd>'; |
@@ -118,14 +120,15 @@ discard block |
||
118 | 120 | <input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', '> |
119 | 121 | </dd>'; |
120 | 122 | |
121 | - if ($context['poll']['guest_vote_allowed']) |
|
122 | - echo ' |
|
123 | + if ($context['poll']['guest_vote_allowed']) { |
|
124 | + echo ' |
|
123 | 125 | <dt> |
124 | 126 | <label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label> |
125 | 127 | </dt> |
126 | 128 | <dd> |
127 | 129 | <input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll']['guest_vote']) ? ' checked' : '', '> |
128 | 130 | </dd>'; |
131 | + } |
|
129 | 132 | } |
130 | 133 | |
131 | 134 | echo ' |
@@ -141,12 +144,13 @@ discard block |
||
141 | 144 | </fieldset>'; |
142 | 145 | |
143 | 146 | // If this is an edit, we can allow them to reset the vote counts. |
144 | - if ($context['is_edit']) |
|
145 | - echo ' |
|
147 | + if ($context['is_edit']) { |
|
148 | + echo ' |
|
146 | 149 | <fieldset id="poll_reset"> |
147 | 150 | <legend>', $txt['reset_votes'], '</legend> |
148 | 151 | <input type="checkbox" name="resetVoteCount" value="on"> ' . $txt['reset_votes_check'] . ' |
149 | 152 | </fieldset>'; |
153 | + } |
|
150 | 154 | echo ' |
151 | 155 | <input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button"> |
152 | 156 | </div><!-- .roundframe --> |