@@ -86,11 +86,12 @@ discard block |
||
86 | 86 | <span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br>'; |
87 | 87 | |
88 | 88 | // Only offer to search for buddies if we have some! |
89 | - if (!empty($context['show_buddies'])) |
|
90 | - echo ' |
|
89 | + if (!empty($context['show_buddies'])) { |
|
90 | + echo ' |
|
91 | 91 | <span class="smalltext"> |
92 | 92 | <label for="buddies"><input type="checkbox" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked' : '', '> ', $txt['find_buddies'], '</label> |
93 | 93 | </span><br>'; |
94 | + } |
|
94 | 95 | |
95 | 96 | echo ' |
96 | 97 | <div class="padding righttext"> |
@@ -105,20 +106,21 @@ discard block |
||
105 | 106 | <h3 class="catbg">', $txt['find_results'], '</h3> |
106 | 107 | </div>'; |
107 | 108 | |
108 | - if (empty($context['results'])) |
|
109 | - echo ' |
|
109 | + if (empty($context['results'])) { |
|
110 | + echo ' |
|
110 | 111 | <p class="error">', $txt['find_no_results'], '</p>'; |
111 | - else |
|
112 | + } else |
|
112 | 113 | { |
113 | 114 | echo ' |
114 | 115 | <ul class="padding">'; |
115 | 116 | |
116 | - foreach ($context['results'] as $result) |
|
117 | - echo ' |
|
117 | + foreach ($context['results'] as $result) { |
|
118 | + echo ' |
|
118 | 119 | <li class="windowbg"> |
119 | 120 | <a href="', $result['href'], '" target="_blank"> <span class="generic_icons profile_sm"></span> |
120 | 121 | <a href="javascript:void(0);" onclick="addMember(this.innerHTML); return false;">', $result['name'], '</a> |
121 | 122 | </li>'; |
123 | + } |
|
122 | 124 | |
123 | 125 | echo ' |
124 | 126 | </ul> |
@@ -134,11 +136,12 @@ discard block |
||
134 | 136 | <input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '"> |
135 | 137 | </form>'; |
136 | 138 | |
137 | - if (empty($context['results'])) |
|
138 | - echo ' |
|
139 | + if (empty($context['results'])) { |
|
140 | + echo ' |
|
139 | 141 | <script> |
140 | 142 | document.getElementById("search").focus(); |
141 | 143 | </script>'; |
144 | + } |
|
142 | 145 | |
143 | 146 | echo ' |
144 | 147 | </body> |
@@ -162,9 +165,10 @@ discard block |
||
162 | 165 | <p>', $txt['manual_introduction'], '</p> |
163 | 166 | <ul>'; |
164 | 167 | |
165 | - foreach ($context['manual_sections'] as $section_id => $wiki_id) |
|
166 | - echo ' |
|
168 | + foreach ($context['manual_sections'] as $section_id => $wiki_id) { |
|
169 | + echo ' |
|
167 | 170 | <li><a href="', $context['wiki_url'], '/', $context['wiki_prefix'], $wiki_id, ($txt['lang_dictionary'] != 'en' ? '/' . $txt['lang_dictionary'] : ''), '" target="_blank">', $txt['manual_section_' . $section_id . '_title'], '</a> - ', $txt['manual_section_' . $section_id . '_desc'], '</li>'; |
171 | + } |
|
168 | 172 | |
169 | 173 | echo ' |
170 | 174 | </ul> |
@@ -180,8 +184,8 @@ discard block |
||
180 | 184 | { |
181 | 185 | global $txt, $context, $modSettings; |
182 | 186 | |
183 | - if (!empty($modSettings['requireAgreement'])) |
|
184 | - echo ' |
|
187 | + if (!empty($modSettings['requireAgreement'])) { |
|
188 | + echo ' |
|
185 | 189 | <div class="cat_bar"> |
186 | 190 | <h3 class="catbg"> |
187 | 191 | ', $txt['terms_and_rules'], ' - ', $context['forum_name_html_safe'], ' |
@@ -190,11 +194,12 @@ discard block |
||
190 | 194 | <div class="roundframe"> |
191 | 195 | ', $context['agreement'], ' |
192 | 196 | </div>'; |
193 | - else |
|
194 | - echo ' |
|
197 | + } else { |
|
198 | + echo ' |
|
195 | 199 | <div class="noticebox"> |
196 | 200 | ', $txt['agreement_disabled'], ' |
197 | 201 | </div>'; |
198 | -} |
|
202 | + } |
|
203 | + } |
|
199 | 204 | |
200 | 205 | ?> |
201 | 206 | \ No newline at end of file |
@@ -31,25 +31,27 @@ discard block |
||
31 | 31 | </div> |
32 | 32 | <div class="information">'; |
33 | 33 | |
34 | - if ($context['is_installed']) |
|
35 | - echo ' |
|
34 | + if ($context['is_installed']) { |
|
35 | + echo ' |
|
36 | 36 | <strong>', $txt['package_installed_warning1'], '</strong><br> |
37 | 37 | <br> |
38 | 38 | ', $txt['package_installed_warning2'], '<br> |
39 | 39 | <br>'; |
40 | + } |
|
40 | 41 | |
41 | 42 | echo $txt['package_installed_warning3'], ' |
42 | 43 | </div> |
43 | 44 | <br>'; |
44 | 45 | |
45 | 46 | // Do errors exist in the install? If so light them up like a christmas tree. |
46 | - if ($context['has_failure']) |
|
47 | - echo ' |
|
47 | + if ($context['has_failure']) { |
|
48 | + echo ' |
|
48 | 49 | <div class="errorbox"> |
49 | 50 | ', sprintf($txt['package_will_fail_title'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), '<br> |
50 | 51 | ', sprintf($txt['package_will_fail_warning'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), |
51 | 52 | !empty($context['failure_details']) ? '<br><br><strong>' . $context['failure_details'] . '</strong>' : '', ' |
52 | 53 | </div>'; |
54 | + } |
|
53 | 55 | |
54 | 56 | // Display the package readme if one exists |
55 | 57 | if (isset($context['package_readme'])) |
@@ -63,9 +65,10 @@ discard block |
||
63 | 65 | <span class="floatright">', $txt['package_available_readme_language'], ' |
64 | 66 | <select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value + \';license=\' + get_selected(\'license_language\'));">'; |
65 | 67 | |
66 | - foreach ($context['readmes'] as $a => $b) |
|
67 | - echo ' |
|
68 | + foreach ($context['readmes'] as $a => $b) { |
|
69 | + echo ' |
|
68 | 70 | <option value="', $b, '"', $a === 'selected' ? ' selected' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>'; |
71 | + } |
|
69 | 72 | |
70 | 73 | echo ' |
71 | 74 | </select> |
@@ -86,9 +89,10 @@ discard block |
||
86 | 89 | <span class="floatright">', $txt['package_available_license_language'], ' |
87 | 90 | <select name="license_language" id="license_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=install', ';package=', $context['filename'], ';license=\' + this.options[this.selectedIndex].value + \';readme=\' + get_selected(\'readme_language\'));">'; |
88 | 91 | |
89 | - foreach ($context['licenses'] as $a => $b) |
|
90 | - echo ' |
|
92 | + foreach ($context['licenses'] as $a => $b) { |
|
93 | + echo ' |
|
91 | 94 | <option value="', $b, '"', $a === 'selected' ? ' selected' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>'; |
95 | + } |
|
92 | 96 | echo ' |
93 | 97 | </select> |
94 | 98 | </span> |
@@ -115,9 +119,10 @@ discard block |
||
115 | 119 | ', $txt['package_db_uninstall_actions'], ': |
116 | 120 | <ul>'; |
117 | 121 | |
118 | - foreach ($context['database_changes'] as $change) |
|
119 | - echo ' |
|
122 | + foreach ($context['database_changes'] as $change) { |
|
123 | + echo ' |
|
120 | 124 | <li>', $change, '</li>'; |
125 | + } |
|
121 | 126 | |
122 | 127 | echo ' |
123 | 128 | </ul> |
@@ -128,14 +133,14 @@ discard block |
||
128 | 133 | echo ' |
129 | 134 | <div class="information">'; |
130 | 135 | |
131 | - if (empty($context['actions']) && empty($context['database_changes'])) |
|
132 | - echo ' |
|
136 | + if (empty($context['actions']) && empty($context['database_changes'])) { |
|
137 | + echo ' |
|
133 | 138 | <br> |
134 | 139 | <div class="errorbox"> |
135 | 140 | ', $txt['corrupt_compatible'], ' |
136 | 141 | </div> |
137 | 142 | </div><!-- .information -->'; |
138 | - else |
|
143 | + } else |
|
139 | 144 | { |
140 | 145 | echo ' |
141 | 146 | ', $txt['perform_actions'], ' |
@@ -239,9 +244,10 @@ discard block |
||
239 | 244 | <td></td> |
240 | 245 | <td>'; |
241 | 246 | |
242 | - if (!empty($context['themes_locked'])) |
|
243 | - echo ' |
|
247 | + if (!empty($context['themes_locked'])) { |
|
248 | + echo ' |
|
244 | 249 | <input type="hidden" name="custom_theme[]" value="', $id, '">'; |
250 | + } |
|
245 | 251 | echo ' |
246 | 252 | <input type="checkbox" name="custom_theme[]" id="custom_theme_', $id, '" value="', $id, '" onclick="', (!empty($theme['has_failure']) ? 'if (this.form.custom_theme_' . $id . '.checked && !confirm(\'' . $txt['package_theme_failure_warning'] . '\')) return false;' : ''), 'invertAll(this, this.form, \'dummy_theme_', $id, '\', true);"', !empty($context['themes_locked']) ? ' disabled checked' : '', '> |
247 | 253 | </td> |
@@ -307,21 +313,23 @@ discard block |
||
307 | 313 | } |
308 | 314 | |
309 | 315 | // Are we effectively ready to install? |
310 | - if (!$context['ftp_needed'] && (!empty($context['actions']) || !empty($context['database_changes']))) |
|
311 | - echo ' |
|
316 | + if (!$context['ftp_needed'] && (!empty($context['actions']) || !empty($context['database_changes']))) { |
|
317 | + echo ' |
|
312 | 318 | <div class="righttext padding"> |
313 | 319 | <input type="submit" value="', $context['uninstalling'] ? $txt['package_uninstall_now'] : $txt['package_install_now'], '" onclick="return ', !empty($context['has_failure']) ? '(submitThisOnce(this) && confirm(\'' . ($context['uninstalling'] ? $txt['package_will_fail_popup_uninstall'] : $txt['package_will_fail_popup']) . '\'))' : 'submitThisOnce(this)', ';" class="button"> |
314 | 320 | </div>'; |
321 | + } |
|
315 | 322 | |
316 | 323 | // If we need ftp information then demand it! |
317 | - elseif ($context['ftp_needed']) |
|
318 | - echo ' |
|
324 | + elseif ($context['ftp_needed']) { |
|
325 | + echo ' |
|
319 | 326 | <div class="cat_bar"> |
320 | 327 | <h3 class="catbg">', $txt['package_ftp_necessary'], '</h3> |
321 | 328 | </div> |
322 | 329 | <div> |
323 | 330 | ', template_control_chmod(), ' |
324 | 331 | </div>'; |
332 | + } |
|
325 | 333 | |
326 | 334 | echo ' |
327 | 335 | |
@@ -338,8 +346,8 @@ discard block |
||
338 | 346 | // Operations. |
339 | 347 | if (!empty($js_operations)) |
340 | 348 | { |
341 | - foreach ($js_operations as $key => $operation) |
|
342 | - echo ' |
|
349 | + foreach ($js_operations as $key => $operation) { |
|
350 | + echo ' |
|
343 | 351 | aOperationElements[', $key, '] = new smc_Toggle({ |
344 | 352 | bToggleEnabled: true, |
345 | 353 | bNoAnimate: true, |
@@ -357,6 +365,7 @@ discard block |
||
357 | 365 | } |
358 | 366 | ] |
359 | 367 | });'; |
368 | + } |
|
360 | 369 | } |
361 | 370 | |
362 | 371 | echo ' |
@@ -378,14 +387,15 @@ discard block |
||
378 | 387 | </script>'; |
379 | 388 | |
380 | 389 | // And a bit more for database changes. |
381 | - if (!empty($context['database_changes'])) |
|
382 | - echo ' |
|
390 | + if (!empty($context['database_changes'])) { |
|
391 | + echo ' |
|
383 | 392 | <script> |
384 | 393 | var database_changes_area = document.getElementById(\'db_changes_div\'); |
385 | 394 | var db_vis = false; |
386 | 395 | database_changes_area.style.display = "none"; |
387 | 396 | </script>'; |
388 | -} |
|
397 | + } |
|
398 | + } |
|
389 | 399 | |
390 | 400 | /** |
391 | 401 | * Extract package contents |
@@ -394,8 +404,8 @@ discard block |
||
394 | 404 | { |
395 | 405 | global $context, $txt, $scripturl; |
396 | 406 | |
397 | - if (!empty($context['redirect_url'])) |
|
398 | - echo ' |
|
407 | + if (!empty($context['redirect_url'])) { |
|
408 | + echo ' |
|
399 | 409 | <script> |
400 | 410 | setTimeout("doRedirect();", ', empty($context['redirect_timeout']) ? '5000' : $context['redirect_timeout'], '); |
401 | 411 | |
@@ -404,52 +414,51 @@ discard block |
||
404 | 414 | window.location = "', $context['redirect_url'], '"; |
405 | 415 | } |
406 | 416 | </script>'; |
417 | + } |
|
407 | 418 | |
408 | 419 | echo ' |
409 | 420 | <div id="admincenter">'; |
410 | 421 | |
411 | - if (empty($context['redirect_url'])) |
|
412 | - echo ' |
|
422 | + if (empty($context['redirect_url'])) { |
|
423 | + echo ' |
|
413 | 424 | <div class="cat_bar"> |
414 | 425 | <h3 class="catbg">', $context['uninstalling'] ? $txt['uninstall'] : $txt['extracting'], '</h3> |
415 | 426 | </div> |
416 | 427 | <div class="information">', $txt['package_installed_extract'], '</div>'; |
417 | - else |
|
418 | - echo ' |
|
428 | + } else { |
|
429 | + echo ' |
|
419 | 430 | <div class="cat_bar"> |
420 | 431 | <h3 class="catbg">', $txt['package_installed_redirecting'], '</h3> |
421 | 432 | </div>'; |
433 | + } |
|
422 | 434 | |
423 | 435 | echo ' |
424 | 436 | <div class="windowbg">'; |
425 | 437 | |
426 | 438 | // If we are going to redirect we have a slightly different agenda. |
427 | - if (!empty($context['redirect_url'])) |
|
428 | - echo ' |
|
439 | + if (!empty($context['redirect_url'])) { |
|
440 | + echo ' |
|
429 | 441 | ', $context['redirect_text'], '<br><br> |
430 | 442 | <a href="', $context['redirect_url'], '">', $txt['package_installed_redirect_go_now'], '</a> | <a href="', $scripturl, '?action=admin;area=packages;sa=browse">', $txt['package_installed_redirect_cancel'], '</a>'; |
431 | - |
|
432 | - elseif ($context['uninstalling']) |
|
433 | - echo ' |
|
443 | + } elseif ($context['uninstalling']) { |
|
444 | + echo ' |
|
434 | 445 | ', $txt['package_uninstall_done']; |
435 | - |
|
436 | - elseif ($context['install_finished']) |
|
446 | + } elseif ($context['install_finished']) |
|
437 | 447 | { |
438 | - if ($context['extract_type'] == 'avatar') |
|
439 | - echo ' |
|
448 | + if ($context['extract_type'] == 'avatar') { |
|
449 | + echo ' |
|
440 | 450 | ', $txt['avatars_extracted']; |
441 | - |
|
442 | - elseif ($context['extract_type'] == 'language') |
|
443 | - echo ' |
|
451 | + } elseif ($context['extract_type'] == 'language') { |
|
452 | + echo ' |
|
444 | 453 | ', $txt['language_extracted']; |
445 | - |
|
446 | - else |
|
447 | - echo ' |
|
454 | + } else { |
|
455 | + echo ' |
|
448 | 456 | ', $txt['package_installed_done']; |
449 | - } |
|
450 | - else |
|
451 | - echo ' |
|
457 | + } |
|
458 | + } else { |
|
459 | + echo ' |
|
452 | 460 | ', $txt['corrupt_compatible']; |
461 | + } |
|
453 | 462 | |
454 | 463 | echo ' |
455 | 464 | </div><!-- .windowbg -->'; |
@@ -483,9 +492,10 @@ discard block |
||
483 | 492 | <div class="windowbg"> |
484 | 493 | <ol>'; |
485 | 494 | |
486 | - foreach ($context['files'] as $fileinfo) |
|
487 | - echo ' |
|
495 | + foreach ($context['files'] as $fileinfo) { |
|
496 | + echo ' |
|
488 | 497 | <li><a href="', $scripturl, '?action=admin;area=packages;sa=examine;package=', $context['filename'], ';file=', $fileinfo['filename'], '" title="', $txt['view'], '">', $fileinfo['filename'], '</a> (', $fileinfo['size'], ' ', $txt['package_bytes'], ')</li>'; |
498 | + } |
|
489 | 499 | |
490 | 500 | echo ' |
491 | 501 | </ol> |
@@ -549,9 +559,10 @@ discard block |
||
549 | 559 | </script> |
550 | 560 | <div id="yourVersion" style="display:none">', $context['forum_version'], '</div>'; |
551 | 561 | |
552 | - if (empty($modSettings['disable_smf_js'])) |
|
553 | - echo ' |
|
562 | + if (empty($modSettings['disable_smf_js'])) { |
|
563 | + echo ' |
|
554 | 564 | <script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>'; |
565 | + } |
|
555 | 566 | |
556 | 567 | // This sets the announcements and current versions themselves ;). |
557 | 568 | echo ' |
@@ -590,12 +601,13 @@ discard block |
||
590 | 601 | } |
591 | 602 | } |
592 | 603 | |
593 | - if (!$mods_available) |
|
594 | - echo ' |
|
604 | + if (!$mods_available) { |
|
605 | + echo ' |
|
595 | 606 | <div class="noticebox">', $txt['no_packages'], '</div>'; |
596 | - else |
|
597 | - echo ' |
|
607 | + } else { |
|
608 | + echo ' |
|
598 | 609 | <br>'; |
610 | + } |
|
599 | 611 | |
600 | 612 | // The advanced (emulation) box, collapsed by default |
601 | 613 | echo ' |
@@ -622,9 +634,10 @@ discard block |
||
622 | 634 | <a id="revert" name="revert"></a> |
623 | 635 | <select name="version_emulate" id="ve">'; |
624 | 636 | |
625 | - foreach ($context['emulation_versions'] as $version) |
|
626 | - echo ' |
|
637 | + foreach ($context['emulation_versions'] as $version) { |
|
638 | + echo ' |
|
627 | 639 | <option value="', $version, '"', ($version == $context['selected_version'] ? ' selected="selected"' : ''), '>', $version, '</option>'; |
640 | + } |
|
628 | 641 | |
629 | 642 | echo ' |
630 | 643 | </select> |
@@ -680,11 +693,12 @@ discard block |
||
680 | 693 | { |
681 | 694 | global $context, $txt, $scripturl; |
682 | 695 | |
683 | - if (!empty($context['package_ftp']['error'])) |
|
684 | - echo ' |
|
696 | + if (!empty($context['package_ftp']['error'])) { |
|
697 | + echo ' |
|
685 | 698 | <div class="errorbox"> |
686 | 699 | <pre>', $context['package_ftp']['error'], '</pre> |
687 | 700 | </div>'; |
701 | + } |
|
688 | 702 | |
689 | 703 | echo ' |
690 | 704 | <div id="admin_form_wrapper"> |
@@ -767,13 +781,14 @@ discard block |
||
767 | 781 | <legend>' . $txt['package_servers'] . '</legend> |
768 | 782 | <ul class="package_servers">'; |
769 | 783 | |
770 | - foreach ($context['servers'] as $server) |
|
771 | - echo ' |
|
784 | + foreach ($context['servers'] as $server) { |
|
785 | + echo ' |
|
772 | 786 | <li class="flow_auto"> |
773 | 787 | <span class="floatleft">' . $server['name'] . '</span> |
774 | 788 | <span class="package_server floatright"><a href="' . $scripturl . '?action=admin;area=packages;get;sa=remove;server=' . $server['id'] . ';', $context['session_var'], '=', $context['session_id'], '">[ ' . $txt['delete'] . ' ]</a></span> |
775 | 789 | <span class="package_server floatright"><a href="' . $scripturl . '?action=admin;area=packages;get;sa=browse;server=' . $server['id'] . '">[ ' . $txt['package_browse'] . ' ]</a></span> |
776 | 790 | </li>'; |
791 | + } |
|
777 | 792 | echo ' |
778 | 793 | </ul> |
779 | 794 | </fieldset> |
@@ -860,11 +875,12 @@ discard block |
||
860 | 875 | <div class="windowbg2">'; |
861 | 876 | |
862 | 877 | // No packages, as yet. |
863 | - if (empty($context['package_list'])) |
|
864 | - echo ' |
|
878 | + if (empty($context['package_list'])) { |
|
879 | + echo ' |
|
865 | 880 | <ul> |
866 | 881 | <li>', $txt['no_packages'], '</li> |
867 | 882 | </ul>'; |
883 | + } |
|
868 | 884 | |
869 | 885 | // List out the packages... |
870 | 886 | else |
@@ -878,11 +894,12 @@ discard block |
||
878 | 894 | <li> |
879 | 895 | <strong><span id="ps_img_', $i, '" class="toggle_up" alt="*" style="display: none;"></span> ', $packageSection['title'], '</strong>'; |
880 | 896 | |
881 | - if (!empty($packageSection['text'])) |
|
882 | - echo ' |
|
897 | + if (!empty($packageSection['text'])) { |
|
898 | + echo ' |
|
883 | 899 | <div class="sub_bar"> |
884 | 900 | <h3 class="subbg">', $packageSection['text'], '</h3> |
885 | 901 | </div>'; |
902 | + } |
|
886 | 903 | |
887 | 904 | echo ' |
888 | 905 | <', $context['list_type'], ' id="package_section_', $i, '" class="packages">'; |
@@ -893,24 +910,28 @@ discard block |
||
893 | 910 | <li>'; |
894 | 911 | |
895 | 912 | // Textual message. Could be empty just for a blank line... |
896 | - if ($package['is_text']) |
|
897 | - echo ' |
|
913 | + if ($package['is_text']) { |
|
914 | + echo ' |
|
898 | 915 | ', empty($package['name']) ? ' ' : $package['name']; |
916 | + } |
|
899 | 917 | |
900 | 918 | // This is supposed to be a rule.. |
901 | - elseif ($package['is_line']) |
|
902 | - echo ' |
|
919 | + elseif ($package['is_line']) { |
|
920 | + echo ' |
|
903 | 921 | <hr>'; |
922 | + } |
|
904 | 923 | |
905 | 924 | // A remote link. |
906 | - elseif ($package['is_remote']) |
|
907 | - echo ' |
|
925 | + elseif ($package['is_remote']) { |
|
926 | + echo ' |
|
908 | 927 | <strong>', $package['link'], '</strong>'; |
928 | + } |
|
909 | 929 | |
910 | 930 | // A title? |
911 | - elseif ($package['is_heading'] || $package['is_title']) |
|
912 | - echo ' |
|
931 | + elseif ($package['is_heading'] || $package['is_title']) { |
|
932 | + echo ' |
|
913 | 933 | <strong>', $package['name'], '</strong>'; |
934 | + } |
|
914 | 935 | |
915 | 936 | // Otherwise, it's a package. |
916 | 937 | else |
@@ -921,32 +942,36 @@ discard block |
||
921 | 942 | <ul id="package_section_', $i, '_pkg_', $id, '" class="package_section">'; |
922 | 943 | |
923 | 944 | // Show the mod type? |
924 | - if ($package['type'] != '') |
|
925 | - echo ' |
|
945 | + if ($package['type'] != '') { |
|
946 | + echo ' |
|
926 | 947 | <li class="package_section"> |
927 | 948 | ', $txt['package_type'], ': ', $smcFunc['ucwords']($smcFunc['strtolower']($package['type'])), ' |
928 | 949 | </li>'; |
950 | + } |
|
929 | 951 | |
930 | 952 | // Show the version number? |
931 | - if ($package['version'] != '') |
|
932 | - echo ' |
|
953 | + if ($package['version'] != '') { |
|
954 | + echo ' |
|
933 | 955 | <li class="package_section"> |
934 | 956 | ', $txt['mod_version'], ': ', $package['version'], ' |
935 | 957 | </li>'; |
958 | + } |
|
936 | 959 | |
937 | 960 | // How 'bout the author? |
938 | - if (!empty($package['author']) && $package['author']['name'] != '' && isset($package['author']['link'])) |
|
939 | - echo ' |
|
961 | + if (!empty($package['author']) && $package['author']['name'] != '' && isset($package['author']['link'])) { |
|
962 | + echo ' |
|
940 | 963 | <li class="package_section"> |
941 | 964 | ', $txt['mod_author'], ': ', $package['author']['link'], ' |
942 | 965 | </li>'; |
966 | + } |
|
943 | 967 | |
944 | 968 | // The homepage... |
945 | - if ($package['author']['website']['link'] != '') |
|
946 | - echo ' |
|
969 | + if ($package['author']['website']['link'] != '') { |
|
970 | + echo ' |
|
947 | 971 | <li class="package_section"> |
948 | 972 | ', $txt['author_website'], ': ', $package['author']['website']['link'], ' |
949 | 973 | </li>'; |
974 | + } |
|
950 | 975 | |
951 | 976 | // Description: bleh bleh! |
952 | 977 | // Location of file: http://someplace/. |
@@ -1005,8 +1030,8 @@ discard block |
||
1005 | 1030 | |
1006 | 1031 | foreach ($ps['items'] as $id => $package) |
1007 | 1032 | { |
1008 | - if (!$package['is_text'] && !$package['is_line'] && !$package['is_remote']) |
|
1009 | - echo ' |
|
1033 | + if (!$package['is_text'] && !$package['is_line'] && !$package['is_remote']) { |
|
1034 | + echo ' |
|
1010 | 1035 | var oPackageToggle_', $section, '_pkg_', $id, ' = new smc_Toggle({ |
1011 | 1036 | bToggleEnabled: true, |
1012 | 1037 | bCurrentlyCollapsed: true, |
@@ -1021,6 +1046,7 @@ discard block |
||
1021 | 1046 | } |
1022 | 1047 | ] |
1023 | 1048 | });'; |
1049 | + } |
|
1024 | 1050 | } |
1025 | 1051 | } |
1026 | 1052 | |
@@ -1065,9 +1091,10 @@ discard block |
||
1065 | 1091 | { |
1066 | 1092 | global $context, $txt, $scripturl; |
1067 | 1093 | |
1068 | - if (!empty($context['saved_successful'])) |
|
1069 | - echo ' |
|
1094 | + if (!empty($context['saved_successful'])) { |
|
1095 | + echo ' |
|
1070 | 1096 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
1097 | + } |
|
1071 | 1098 | |
1072 | 1099 | echo ' |
1073 | 1100 | <div id="admincenter"> |
@@ -1129,8 +1156,9 @@ discard block |
||
1129 | 1156 | global $context, $txt; |
1130 | 1157 | |
1131 | 1158 | // Nothing to do? Brilliant! |
1132 | - if (empty($context['package_ftp'])) |
|
1133 | - return false; |
|
1159 | + if (empty($context['package_ftp'])) { |
|
1160 | + return false; |
|
1161 | + } |
|
1134 | 1162 | |
1135 | 1163 | if (empty($context['package_ftp']['form_elements_only'])) |
1136 | 1164 | { |
@@ -1140,19 +1168,21 @@ discard block |
||
1140 | 1168 | ', $txt['package_ftp_why_file_list'], ' |
1141 | 1169 | <ul style="display: inline;">'; |
1142 | 1170 | |
1143 | - if (!empty($context['notwritable_files'])) |
|
1144 | - foreach ($context['notwritable_files'] as $file) |
|
1171 | + if (!empty($context['notwritable_files'])) { |
|
1172 | + foreach ($context['notwritable_files'] as $file) |
|
1145 | 1173 | echo ' |
1146 | 1174 | <li>', $file, '</li>'; |
1175 | + } |
|
1147 | 1176 | |
1148 | 1177 | echo ' |
1149 | 1178 | </ul>'; |
1150 | 1179 | |
1151 | - if (!$context['server']['is_windows']) |
|
1152 | - echo ' |
|
1180 | + if (!$context['server']['is_windows']) { |
|
1181 | + echo ' |
|
1153 | 1182 | <hr> |
1154 | 1183 | ', $txt['package_chmod_linux'], '<br> |
1155 | 1184 | <tt># chmod a+w ', implode(' ', $context['notwritable_files']), '</tt>'; |
1185 | + } |
|
1156 | 1186 | |
1157 | 1187 | echo ' |
1158 | 1188 | </div><!-- #need_writable_list -->'; |
@@ -1165,9 +1195,10 @@ discard block |
||
1165 | 1195 | </div> |
1166 | 1196 | </div>'; |
1167 | 1197 | |
1168 | - if (!empty($context['package_ftp']['destination'])) |
|
1169 | - echo ' |
|
1198 | + if (!empty($context['package_ftp']['destination'])) { |
|
1199 | + echo ' |
|
1170 | 1200 | <form action="', $context['package_ftp']['destination'], '" method="post" accept-charset="', $context['character_set'], '">'; |
1201 | + } |
|
1171 | 1202 | |
1172 | 1203 | echo ' |
1173 | 1204 | <fieldset> |
@@ -1201,24 +1232,27 @@ discard block |
||
1201 | 1232 | </dl> |
1202 | 1233 | </fieldset>'; |
1203 | 1234 | |
1204 | - if (empty($context['package_ftp']['form_elements_only'])) |
|
1205 | - echo ' |
|
1235 | + if (empty($context['package_ftp']['form_elements_only'])) { |
|
1236 | + echo ' |
|
1206 | 1237 | <div class="righttext" style="margin: 1ex;"> |
1207 | 1238 | <span id="test_ftp_placeholder_full"></span> |
1208 | 1239 | <input type="submit" value="', $txt['package_proceed'], '" class="button"> |
1209 | 1240 | </div>'; |
1241 | + } |
|
1210 | 1242 | |
1211 | - if (!empty($context['package_ftp']['destination'])) |
|
1212 | - echo ' |
|
1243 | + if (!empty($context['package_ftp']['destination'])) { |
|
1244 | + echo ' |
|
1213 | 1245 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
1214 | 1246 | </form>'; |
1247 | + } |
|
1215 | 1248 | |
1216 | 1249 | // Hide the details of the list. |
1217 | - if (empty($context['package_ftp']['form_elements_only'])) |
|
1218 | - echo ' |
|
1250 | + if (empty($context['package_ftp']['form_elements_only'])) { |
|
1251 | + echo ' |
|
1219 | 1252 | <script> |
1220 | 1253 | document.getElementById(\'need_writable_list\').style.display = \'none\'; |
1221 | 1254 | </script>'; |
1255 | + } |
|
1222 | 1256 | |
1223 | 1257 | // Quick generate the test button. |
1224 | 1258 | echo ' |
@@ -1575,9 +1609,10 @@ discard block |
||
1575 | 1609 | <td width="30%"> |
1576 | 1610 | <strong>'; |
1577 | 1611 | |
1578 | - if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) |
|
1579 | - echo ' |
|
1612 | + if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) { |
|
1613 | + echo ' |
|
1580 | 1614 | <span class="generic_icons folder"></span>'; |
1615 | + } |
|
1581 | 1616 | |
1582 | 1617 | echo ' |
1583 | 1618 | ', $name, ' |
@@ -1604,8 +1639,9 @@ discard block |
||
1604 | 1639 | </td> |
1605 | 1640 | </tr>'; |
1606 | 1641 | |
1607 | - if (!empty($dir['contents'])) |
|
1608 | - template_permission_show_contents($name, $dir['contents'], 1); |
|
1642 | + if (!empty($dir['contents'])) { |
|
1643 | + template_permission_show_contents($name, $dir['contents'], 1); |
|
1644 | + } |
|
1609 | 1645 | } |
1610 | 1646 | |
1611 | 1647 | echo ' |
@@ -1641,13 +1677,14 @@ discard block |
||
1641 | 1677 | </fieldset>'; |
1642 | 1678 | |
1643 | 1679 | // Likely to need FTP? |
1644 | - if (empty($context['ftp_connected'])) |
|
1645 | - echo ' |
|
1680 | + if (empty($context['ftp_connected'])) { |
|
1681 | + echo ' |
|
1646 | 1682 | <p> |
1647 | 1683 | ', $txt['package_file_perms_ftp_details'], ': |
1648 | 1684 | </p> |
1649 | 1685 | ', template_control_chmod(), ' |
1650 | 1686 | <div class="noticebox">', $txt['package_file_perms_ftp_retain'], '</div>'; |
1687 | + } |
|
1651 | 1688 | |
1652 | 1689 | echo ' |
1653 | 1690 | <span id="test_ftp_placeholder_full"></span> |
@@ -1656,9 +1693,10 @@ discard block |
||
1656 | 1693 | </div><!-- .windowbg2 -->'; |
1657 | 1694 | |
1658 | 1695 | // Any looks fors we've already done? |
1659 | - foreach ($context['look_for'] as $path) |
|
1660 | - echo ' |
|
1696 | + foreach ($context['look_for'] as $path) { |
|
1697 | + echo ' |
|
1661 | 1698 | <input type="hidden" name="back_look[]" value="', $path, '">'; |
1699 | + } |
|
1662 | 1700 | |
1663 | 1701 | echo ' |
1664 | 1702 | </form> |
@@ -1700,9 +1738,10 @@ discard block |
||
1700 | 1738 | <td class="smalltext" width="30%">' . str_repeat(' ', $level * 5), ' |
1701 | 1739 | ', (!empty($dir['type']) && $dir['type'] == 'dir_recursive') || !empty($dir['list_contents']) ? '<a id="link_' . $cur_ident . '" href="' . $scripturl . '?action=admin;area=packages;sa=perms;find=' . base64_encode($ident . '/' . $name) . ';back_look=' . $context['back_look_data'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '#fol_' . $cur_ident . '" onclick="return expandFolder(\'' . $cur_ident . '\', \'' . addcslashes($ident . '/' . $name, "'\\") . '\');">' : ''; |
1702 | 1740 | |
1703 | - if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) |
|
1704 | - echo ' |
|
1741 | + if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) { |
|
1742 | + echo ' |
|
1705 | 1743 | <span class="generic_icons folder"></span>'; |
1744 | + } |
|
1706 | 1745 | |
1707 | 1746 | echo ' |
1708 | 1747 | ', $name, ' |
@@ -1720,34 +1759,38 @@ discard block |
||
1720 | 1759 | </tr> |
1721 | 1760 | <tr id="insert_div_loc_' . $cur_ident . '" style="display: none;"><td></td></tr>'; |
1722 | 1761 | |
1723 | - if (!empty($dir['contents'])) |
|
1724 | - template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); |
|
1762 | + if (!empty($dir['contents'])) { |
|
1763 | + template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); |
|
1764 | + } |
|
1725 | 1765 | } |
1726 | 1766 | } |
1727 | 1767 | |
1728 | 1768 | // We have more files to show? |
1729 | - if ($has_more) |
|
1730 | - echo ' |
|
1769 | + if ($has_more) { |
|
1770 | + echo ' |
|
1731 | 1771 | <tr class="windowbg" id="content_', $js_ident, '_more"> |
1732 | 1772 | <td class="smalltext" width="40%">' . str_repeat(' ', $level * 5), ' |
1733 | 1773 | « <a href="' . $scripturl . '?action=admin;area=packages;sa=perms;find=' . base64_encode($ident) . ';fileoffset=', ($context['file_offset'] + $context['file_limit']), ';' . $context['session_var'] . '=' . $context['session_id'] . '#fol_' . preg_replace('~[^A-Za-z0-9_\-=:]~', ':-:', $ident) . '">', $txt['package_file_perms_more_files'], '</a> » |
1734 | 1774 | </td> |
1735 | 1775 | <td colspan="6"></td> |
1736 | 1776 | </tr>'; |
1777 | + } |
|
1737 | 1778 | |
1738 | 1779 | if ($drawn_div) |
1739 | 1780 | { |
1740 | 1781 | // Hide anything too far down the tree. |
1741 | 1782 | $isFound = false; |
1742 | - foreach ($context['look_for'] as $tree) |
|
1743 | - if (substr($tree, 0, strlen($ident)) == $ident) |
|
1783 | + foreach ($context['look_for'] as $tree) { |
|
1784 | + if (substr($tree, 0, strlen($ident)) == $ident) |
|
1744 | 1785 | $isFound = true; |
1786 | + } |
|
1745 | 1787 | |
1746 | - if ($level > 1 && !$isFound) |
|
1747 | - echo ' |
|
1788 | + if ($level > 1 && !$isFound) { |
|
1789 | + echo ' |
|
1748 | 1790 | <script> |
1749 | 1791 | expandFolder(\'', $js_ident, '\', \'\'); |
1750 | 1792 | </script>'; |
1793 | + } |
|
1751 | 1794 | } |
1752 | 1795 | } |
1753 | 1796 | |
@@ -1767,11 +1810,12 @@ discard block |
||
1767 | 1810 | <h3 class="catbg">', $txt['package_file_perms_applying'], '</h3> |
1768 | 1811 | </div>'; |
1769 | 1812 | |
1770 | - if (!empty($context['skip_ftp'])) |
|
1771 | - echo ' |
|
1813 | + if (!empty($context['skip_ftp'])) { |
|
1814 | + echo ' |
|
1772 | 1815 | <div class="errorbox"> |
1773 | 1816 | ', $txt['package_file_perms_skipping_ftp'], ' |
1774 | 1817 | </div>'; |
1818 | + } |
|
1775 | 1819 | |
1776 | 1820 | // How many have we done? |
1777 | 1821 | $remaining_items = count($context['method'] == 'individual' ? $context['to_process'] : $context['directory_list']); |
@@ -1810,28 +1854,31 @@ discard block |
||
1810 | 1854 | <br>'; |
1811 | 1855 | |
1812 | 1856 | // Put out the right hidden data. |
1813 | - if ($context['method'] == 'individual') |
|
1814 | - echo ' |
|
1857 | + if ($context['method'] == 'individual') { |
|
1858 | + echo ' |
|
1815 | 1859 | <input type="hidden" name="custom_value" value="', $context['custom_value'], '"> |
1816 | 1860 | <input type="hidden" name="totalItems" value="', $context['total_items'], '"> |
1817 | 1861 | <input type="hidden" name="toProcess" value="', $context['to_process_encode'], '">'; |
1818 | - else |
|
1819 | - echo ' |
|
1862 | + } else { |
|
1863 | + echo ' |
|
1820 | 1864 | <input type="hidden" name="predefined" value="', $context['predefined_type'], '"> |
1821 | 1865 | <input type="hidden" name="fileOffset" value="', $context['file_offset'], '"> |
1822 | 1866 | <input type="hidden" name="totalItems" value="', $context['total_items'], '"> |
1823 | 1867 | <input type="hidden" name="dirList" value="', $context['directory_list_encode'], '"> |
1824 | 1868 | <input type="hidden" name="specialFiles" value="', $context['special_files_encode'], '">'; |
1869 | + } |
|
1825 | 1870 | |
1826 | 1871 | // Are we not using FTP for whatever reason. |
1827 | - if (!empty($context['skip_ftp'])) |
|
1828 | - echo ' |
|
1872 | + if (!empty($context['skip_ftp'])) { |
|
1873 | + echo ' |
|
1829 | 1874 | <input type="hidden" name="skip_ftp" value="1">'; |
1875 | + } |
|
1830 | 1876 | |
1831 | 1877 | // Retain state. |
1832 | - foreach ($context['back_look_data'] as $path) |
|
1833 | - echo ' |
|
1878 | + foreach ($context['back_look_data'] as $path) { |
|
1879 | + echo ' |
|
1834 | 1880 | <input type="hidden" name="back_look[]" value="', $path, '">'; |
1881 | + } |
|
1835 | 1882 | |
1836 | 1883 | echo ' |
1837 | 1884 | <input type="hidden" name="method" value="', $context['method'], '"> |
@@ -25,18 +25,20 @@ discard block |
||
25 | 25 | </div> |
26 | 26 | <div class="windowbg2 noup">'; |
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'] . '">'; |
@@ -81,9 +84,10 @@ discard block |
||
81 | 84 | echo ' |
82 | 85 | <li class="windowbg" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">'; |
83 | 86 | |
84 | - foreach ($board['move_links'] as $link) |
|
85 | - echo ' |
|
87 | + foreach ($board['move_links'] as $link) { |
|
88 | + echo ' |
|
86 | 89 | <a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="generic_icons select_', $link['class'], '" title="', $link['label'], '"></span></a>'; |
90 | + } |
|
87 | 91 | |
88 | 92 | echo ' |
89 | 93 | </li>'; |
@@ -132,9 +136,10 @@ discard block |
||
132 | 136 | <select name="cat_order">'; |
133 | 137 | |
134 | 138 | // Print every existing category into a select box. |
135 | - foreach ($context['category_order'] as $order) |
|
136 | - echo ' |
|
139 | + foreach ($context['category_order'] as $order) { |
|
140 | + echo ' |
|
137 | 141 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
142 | + } |
|
138 | 143 | echo ' |
139 | 144 | </select> |
140 | 145 | </dd>'; |
@@ -169,14 +174,15 @@ discard block |
||
169 | 174 | { |
170 | 175 | foreach ($context['custom_category_settings'] as $catset_id => $catset) |
171 | 176 | { |
172 | - if (!empty($catset['dt']) && !empty($catset['dd'])) |
|
173 | - echo ' |
|
177 | + if (!empty($catset['dt']) && !empty($catset['dd'])) { |
|
178 | + echo ' |
|
174 | 179 | <dt class="clear', !is_numeric($catset_id) ? ' catset_' . $catset_id : '', '"> |
175 | 180 | ', $catset['dt'], ' |
176 | 181 | </dt> |
177 | 182 | <dd', !is_numeric($catset_id) ? ' class="catset_' . $catset_id . '"' : '', '> |
178 | 183 | ', $catset['dd'], ' |
179 | 184 | </dd>'; |
185 | + } |
|
180 | 186 | } |
181 | 187 | } |
182 | 188 | |
@@ -184,21 +190,23 @@ discard block |
||
184 | 190 | echo ' |
185 | 191 | </dl>'; |
186 | 192 | |
187 | - if (isset($context['category']['is_new'])) |
|
188 | - echo ' |
|
193 | + if (isset($context['category']['is_new'])) { |
|
194 | + echo ' |
|
189 | 195 | <input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button">'; |
190 | - else |
|
191 | - echo ' |
|
196 | + } else { |
|
197 | + echo ' |
|
192 | 198 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button"> |
193 | 199 | <input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button you_sure">'; |
200 | + } |
|
194 | 201 | echo ' |
195 | 202 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
196 | 203 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
197 | 204 | |
198 | 205 | // If this category is empty we don't bother with the next confirmation screen. |
199 | - if ($context['category']['is_empty']) |
|
200 | - echo ' |
|
206 | + if ($context['category']['is_empty']) { |
|
207 | + echo ' |
|
201 | 208 | <input type="hidden" name="empty" value="1">'; |
209 | + } |
|
202 | 210 | |
203 | 211 | echo ' |
204 | 212 | </div><!-- .windowbg2 --> |
@@ -225,9 +233,10 @@ discard block |
||
225 | 233 | <p>', $txt['mboards_delete_cat_contains'], ':</p> |
226 | 234 | <ul>'; |
227 | 235 | |
228 | - foreach ($context['category']['children'] as $child) |
|
229 | - echo ' |
|
236 | + foreach ($context['category']['children'] as $child) { |
|
237 | + echo ' |
|
230 | 238 | <li>', $child, '</li>'; |
239 | + } |
|
231 | 240 | |
232 | 241 | echo ' |
233 | 242 | </ul> |
@@ -241,10 +250,11 @@ discard block |
||
241 | 250 | <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>: |
242 | 251 | <select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>'; |
243 | 252 | |
244 | - foreach ($context['category_order'] as $cat) |
|
245 | - if ($cat['id'] != 0) |
|
253 | + foreach ($context['category_order'] as $cat) { |
|
254 | + if ($cat['id'] != 0) |
|
246 | 255 | echo ' |
247 | 256 | <option value="', $cat['id'], '">', $cat['true_name'], '</option>'; |
257 | + } |
|
248 | 258 | |
249 | 259 | echo ' |
250 | 260 | </select> |
@@ -287,9 +297,10 @@ discard block |
||
287 | 297 | <dd> |
288 | 298 | <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 == \'\';}">'; |
289 | 299 | |
290 | - foreach ($context['categories'] as $category) |
|
291 | - echo ' |
|
300 | + foreach ($context['categories'] as $category) { |
|
301 | + echo ' |
|
292 | 302 | <option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>'; |
303 | + } |
|
293 | 304 | echo ' |
294 | 305 | </select> |
295 | 306 | </dd>'; |
@@ -317,9 +328,10 @@ discard block |
||
317 | 328 | <select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '> |
318 | 329 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : ''; |
319 | 330 | |
320 | - foreach ($context['board_order'] as $order) |
|
321 | - echo ' |
|
331 | + foreach ($context['board_order'] as $order) { |
|
332 | + echo ' |
|
322 | 333 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
334 | + } |
|
323 | 335 | echo ' |
324 | 336 | </select> |
325 | 337 | </dd>'; |
@@ -348,13 +360,15 @@ discard block |
||
348 | 360 | <dd> |
349 | 361 | <select name="profile">'; |
350 | 362 | |
351 | - if (isset($context['board']['is_new'])) |
|
352 | - echo ' |
|
363 | + if (isset($context['board']['is_new'])) { |
|
364 | + echo ' |
|
353 | 365 | <option value="-1">[', $txt['permission_profile_inherit'], ']</option>'; |
366 | + } |
|
354 | 367 | |
355 | - foreach ($context['profiles'] as $id => $profile) |
|
356 | - echo ' |
|
368 | + foreach ($context['profiles'] as $id => $profile) { |
|
369 | + echo ' |
|
357 | 370 | <option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
371 | + } |
|
358 | 372 | |
359 | 373 | echo ' |
360 | 374 | </select> |
@@ -367,8 +381,8 @@ discard block |
||
367 | 381 | </dt> |
368 | 382 | <dd>'; |
369 | 383 | |
370 | - if (!empty($modSettings['deny_boards_access'])) |
|
371 | - echo ' |
|
384 | + if (!empty($modSettings['deny_boards_access'])) { |
|
385 | + echo ' |
|
372 | 386 | <table> |
373 | 387 | <tr> |
374 | 388 | <td></td> |
@@ -376,10 +390,11 @@ discard block |
||
376 | 390 | <th>', $txt['permissions_option_off'], '</th> |
377 | 391 | <th>', $txt['permissions_option_deny'], '</th> |
378 | 392 | </tr>'; |
393 | + } |
|
379 | 394 | |
380 | 395 | // List all the membergroups so the user can choose who may access this board. |
381 | - foreach ($context['groups'] as $group) |
|
382 | - if (empty($modSettings['deny_boards_access'])) |
|
396 | + foreach ($context['groups'] as $group) { |
|
397 | + if (empty($modSettings['deny_boards_access'])) |
|
383 | 398 | echo ' |
384 | 399 | <label for="groups_', $group['id'], '"> |
385 | 400 | <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' : ''), '> |
@@ -387,8 +402,9 @@ discard block |
||
387 | 402 | ', $group['name'], ' |
388 | 403 | </span> |
389 | 404 | </label><br>'; |
390 | - else |
|
391 | - echo ' |
|
405 | + } |
|
406 | + else { |
|
407 | + echo ' |
|
392 | 408 | <tr> |
393 | 409 | <td> |
394 | 410 | <label for="groups_', $group['id'], '_a"> |
@@ -408,16 +424,17 @@ discard block |
||
408 | 424 | </td> |
409 | 425 | <td></td> |
410 | 426 | </tr>'; |
427 | + } |
|
411 | 428 | |
412 | - if (empty($modSettings['deny_boards_access'])) |
|
413 | - echo ' |
|
429 | + if (empty($modSettings['deny_boards_access'])) { |
|
430 | + echo ' |
|
414 | 431 | <span class="select_all_box"> |
415 | 432 | <em>', $txt['check_all'], '</em> <input type="checkbox" onclick="invertAll(this, this.form, \'groups[\');"> |
416 | 433 | </span> |
417 | 434 | <br><br> |
418 | 435 | </dd>'; |
419 | - else |
|
420 | - echo ' |
|
436 | + } else { |
|
437 | + echo ' |
|
421 | 438 | <tr class="select_all_box"> |
422 | 439 | <td> |
423 | 440 | </td> |
@@ -436,6 +453,7 @@ discard block |
||
436 | 453 | </tr> |
437 | 454 | </table> |
438 | 455 | </dd>'; |
456 | + } |
|
439 | 457 | |
440 | 458 | // Options to choose moderators, specify as announcement board and choose whether to count posts here. |
441 | 459 | echo ' |
@@ -490,8 +508,8 @@ discard block |
||
490 | 508 | </dl> |
491 | 509 | </div>'; |
492 | 510 | |
493 | - if ($context['board']['redirect']) |
|
494 | - echo ' |
|
511 | + if ($context['board']['redirect']) { |
|
512 | + echo ' |
|
495 | 513 | <div id="reset_redirect_div"> |
496 | 514 | <dl class="settings"> |
497 | 515 | <dt> |
@@ -504,6 +522,7 @@ discard block |
||
504 | 522 | </dd> |
505 | 523 | </dl> |
506 | 524 | </div>'; |
525 | + } |
|
507 | 526 | } |
508 | 527 | |
509 | 528 | echo ' |
@@ -531,9 +550,10 @@ discard block |
||
531 | 550 | <select name="boardtheme" id="boardtheme" onchange="refreshOptions();"> |
532 | 551 | <option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>'; |
533 | 552 | |
534 | - foreach ($context['themes'] as $theme) |
|
535 | - echo ' |
|
553 | + foreach ($context['themes'] as $theme) { |
|
554 | + echo ' |
|
536 | 555 | <option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
556 | + } |
|
537 | 557 | |
538 | 558 | echo ' |
539 | 559 | </select> |
@@ -562,14 +582,15 @@ discard block |
||
562 | 582 | |
563 | 583 | foreach ($context['custom_board_settings'] as $cbs_id => $cbs) |
564 | 584 | { |
565 | - if (!empty($cbs['dt']) && !empty($cbs['dd'])) |
|
566 | - echo ' |
|
585 | + if (!empty($cbs['dt']) && !empty($cbs['dd'])) { |
|
586 | + echo ' |
|
567 | 587 | <dt class="clear', !is_numeric($cbs_id) ? ' cbs_' . $cbs_id : '', '"> |
568 | 588 | ', $cbs['dt'], ' |
569 | 589 | </dt> |
570 | 590 | <dd', !is_numeric($cbs_id) ? ' class="cbs_' . $cbs_id . '"' : '', '> |
571 | 591 | ', $cbs['dd'], ' |
572 | 592 | </dd>'; |
593 | + } |
|
573 | 594 | } |
574 | 595 | |
575 | 596 | echo ' |
@@ -577,9 +598,10 @@ discard block |
||
577 | 598 | </div>'; |
578 | 599 | } |
579 | 600 | |
580 | - if (!empty($context['board']['is_recycle'])) |
|
581 | - echo ' |
|
601 | + if (!empty($context['board']['is_recycle'])) { |
|
602 | + echo ' |
|
582 | 603 | <div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>'; |
604 | + } |
|
583 | 605 | |
584 | 606 | echo ' |
585 | 607 | <input type="hidden" name="rid" value="', $context['redirect_location'], '"> |
@@ -587,21 +609,24 @@ discard block |
||
587 | 609 | <input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">'; |
588 | 610 | |
589 | 611 | // If this board has no children don't bother with the next confirmation screen. |
590 | - if ($context['board']['no_children']) |
|
591 | - echo ' |
|
612 | + if ($context['board']['no_children']) { |
|
613 | + echo ' |
|
592 | 614 | <input type="hidden" name="no_children" value="1">'; |
615 | + } |
|
593 | 616 | |
594 | - if (isset($context['board']['is_new'])) |
|
595 | - echo ' |
|
617 | + if (isset($context['board']['is_new'])) { |
|
618 | + echo ' |
|
596 | 619 | <input type="hidden" name="cur_cat" value="', $context['board']['category'], '"> |
597 | 620 | <input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
598 | - else |
|
599 | - echo ' |
|
621 | + } else { |
|
622 | + echo ' |
|
600 | 623 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
624 | + } |
|
601 | 625 | |
602 | - if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) |
|
603 | - echo ' |
|
626 | + if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) { |
|
627 | + echo ' |
|
604 | 628 | <input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button you_sure">'; |
629 | + } |
|
605 | 630 | echo ' |
606 | 631 | </div><!-- .windowbg2 --> |
607 | 632 | </form> |
@@ -622,12 +647,13 @@ discard block |
||
622 | 647 | sItemListContainerId: \'moderator_container\', |
623 | 648 | aListItems: ['; |
624 | 649 | |
625 | - foreach ($context['board']['moderators'] as $id_member => $member_name) |
|
626 | - echo ' |
|
650 | + foreach ($context['board']['moderators'] as $id_member => $member_name) { |
|
651 | + echo ' |
|
627 | 652 | { |
628 | 653 | sItemId: ', JavaScriptEscape($id_member), ', |
629 | 654 | sItemName: ', JavaScriptEscape($member_name), ' |
630 | 655 | }', $id_member == $context['board']['last_moderator_id'] ? '' : ','; |
656 | + } |
|
631 | 657 | |
632 | 658 | echo ' |
633 | 659 | ] |
@@ -647,12 +673,13 @@ discard block |
||
647 | 673 | sItemListContainerId: \'moderator_group_container\', |
648 | 674 | aListItems: ['; |
649 | 675 | |
650 | - foreach ($context['board']['moderator_groups'] as $id_group => $group_name) |
|
651 | - echo ' |
|
676 | + foreach ($context['board']['moderator_groups'] as $id_group => $group_name) { |
|
677 | + echo ' |
|
652 | 678 | { |
653 | 679 | sItemId: ', JavaScriptEscape($id_group), ', |
654 | 680 | sItemName: ', JavaScriptEscape($group_name), ' |
655 | 681 | }', $id_group == $context['board']['last_moderator_group_id'] ? '' : ','; |
682 | + } |
|
656 | 683 | |
657 | 684 | echo ' |
658 | 685 | ] |
@@ -678,17 +705,19 @@ discard block |
||
678 | 705 | echo ' |
679 | 706 | document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";'; |
680 | 707 | |
681 | - if ($context['board']['redirect']) |
|
682 | - echo ' |
|
708 | + if ($context['board']['redirect']) { |
|
709 | + echo ' |
|
683 | 710 | document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";'; |
711 | + } |
|
684 | 712 | } |
685 | 713 | |
686 | 714 | // Include any JavaScript added by mods using the 'integrate_edit_board' hook. |
687 | 715 | if (!empty($context['custom_refreshOptions']) && is_array($context['custom_refreshOptions'])) |
688 | 716 | { |
689 | - foreach ($context['custom_refreshOptions'] as $refreshOption) |
|
690 | - echo ' |
|
717 | + foreach ($context['custom_refreshOptions'] as $refreshOption) { |
|
718 | + echo ' |
|
691 | 719 | ', $refreshOption; |
720 | + } |
|
692 | 721 | } |
693 | 722 | |
694 | 723 | echo ' |
@@ -717,9 +746,10 @@ discard block |
||
717 | 746 | <p>', $txt['mboards_delete_board_contains'], '</p> |
718 | 747 | <ul>'; |
719 | 748 | |
720 | - foreach ($context['children'] as $child) |
|
721 | - echo ' |
|
749 | + foreach ($context['children'] as $child) { |
|
750 | + echo ' |
|
722 | 751 | <li>', $child['node']['name'], '</li>'; |
752 | + } |
|
723 | 753 | |
724 | 754 | echo ' |
725 | 755 | </ul> |
@@ -733,10 +763,11 @@ discard block |
||
733 | 763 | <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>: |
734 | 764 | <select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>'; |
735 | 765 | |
736 | - foreach ($context['board_order'] as $board) |
|
737 | - if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
766 | + foreach ($context['board_order'] as $board) { |
|
767 | + if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
738 | 768 | echo ' |
739 | 769 | <option value="', $board['id'], '">', $board['name'], '</option>'; |
770 | + } |
|
740 | 771 | |
741 | 772 | echo ' |
742 | 773 | </select> |
@@ -26,9 +26,10 @@ discard block |
||
26 | 26 | </h3> |
27 | 27 | </div>'; |
28 | 28 | |
29 | - if ($context['ban']['is_new']) |
|
30 | - echo ' |
|
29 | + if ($context['ban']['is_new']) { |
|
30 | + echo ' |
|
31 | 31 | <div class="information noup">', $txt['ban_add_notes'], '</div>'; |
32 | + } |
|
32 | 33 | |
33 | 34 | // If there were errors creating the ban, show them. |
34 | 35 | if (!empty($context['error_messages'])) |
@@ -38,9 +39,10 @@ discard block |
||
38 | 39 | <strong>', $txt['ban_errors_detected'], '</strong> |
39 | 40 | <ul>'; |
40 | 41 | |
41 | - foreach ($context['error_messages'] as $error) |
|
42 | - echo ' |
|
42 | + foreach ($context['error_messages'] as $error) { |
|
43 | + echo ' |
|
43 | 44 | <li class="error">', $error, '</li>'; |
45 | + } |
|
44 | 46 | |
45 | 47 | echo ' |
46 | 48 | </ul> |
@@ -57,8 +59,8 @@ discard block |
||
57 | 59 | <input type="text" id="ban_name" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60"> |
58 | 60 | </dd>'; |
59 | 61 | |
60 | - if (isset($context['ban']['reason'])) |
|
61 | - echo ' |
|
62 | + if (isset($context['ban']['reason'])) { |
|
63 | + echo ' |
|
62 | 64 | <dt> |
63 | 65 | <strong><label for="reason">', $txt['ban_reason'], ':</label></strong><br> |
64 | 66 | <span class="smalltext">', $txt['ban_reason_desc'], '</span> |
@@ -66,9 +68,10 @@ discard block |
||
66 | 68 | <dd> |
67 | 69 | <textarea name="reason" id="reason" cols="40" rows="3">', $context['ban']['reason'], '</textarea> |
68 | 70 | </dd>'; |
71 | + } |
|
69 | 72 | |
70 | - if (isset($context['ban']['notes'])) |
|
71 | - echo ' |
|
73 | + if (isset($context['ban']['notes'])) { |
|
74 | + echo ' |
|
72 | 75 | <dt> |
73 | 76 | <strong><label for="ban_notes">', $txt['ban_notes'], ':</label></strong><br> |
74 | 77 | <span class="smalltext">', $txt['ban_notes_desc'], '</span> |
@@ -76,6 +79,7 @@ discard block |
||
76 | 79 | <dd> |
77 | 80 | <textarea name="notes" id="ban_notes" cols="40" rows="3">', $context['ban']['notes'], '</textarea> |
78 | 81 | </dd>'; |
82 | + } |
|
79 | 83 | |
80 | 84 | echo ' |
81 | 85 | </dl> |
@@ -115,8 +119,8 @@ discard block |
||
115 | 119 | <input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
116 | 120 | </dd>'; |
117 | 121 | |
118 | - if (empty($modSettings['disableHostnameLookup'])) |
|
119 | - echo ' |
|
122 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
123 | + echo ' |
|
120 | 124 | <dt> |
121 | 125 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', !empty($context['ban_suggestions']['hostname']) ? ' checked' : '', '> |
122 | 126 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -124,6 +128,7 @@ discard block |
||
124 | 128 | <dd> |
125 | 129 | <input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
126 | 130 | </dd>'; |
131 | + } |
|
127 | 132 | |
128 | 133 | echo ' |
129 | 134 | <dt> |
@@ -153,14 +158,15 @@ discard block |
||
153 | 158 | <dl class="settings">'; |
154 | 159 | |
155 | 160 | $count = 0; |
156 | - foreach ($ban_ips as $ip) |
|
157 | - echo ' |
|
161 | + foreach ($ban_ips as $ip) { |
|
162 | + echo ' |
|
158 | 163 | <dt> |
159 | 164 | <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, '"> |
160 | 165 | </dt> |
161 | 166 | <dd> |
162 | 167 | <label for="suggestions_', $key, '_', $count++, '">', $ip, '</label> |
163 | 168 | </dd>'; |
169 | + } |
|
164 | 170 | |
165 | 171 | echo ' |
166 | 172 | </dl>'; |
@@ -202,8 +208,8 @@ discard block |
||
202 | 208 | addLoadEvent(fUpdateStatus);'; |
203 | 209 | |
204 | 210 | // Auto suggest only needed for adding new bans, not editing |
205 | - if ($context['ban']['is_new'] && empty($_REQUEST['u'])) |
|
206 | - echo ' |
|
211 | + if ($context['ban']['is_new'] && empty($_REQUEST['u'])) { |
|
212 | + echo ' |
|
207 | 213 | var oAddMemberSuggest = new smc_AutoSuggest({ |
208 | 214 | sSelf: \'oAddMemberSuggest\', |
209 | 215 | sSessionId: smf_session_id, |
@@ -221,6 +227,7 @@ discard block |
||
221 | 227 | return true; |
222 | 228 | } |
223 | 229 | oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\');'; |
230 | + } |
|
224 | 231 | |
225 | 232 | echo ' |
226 | 233 | function confirmBan(aForm) |
@@ -269,8 +276,8 @@ discard block |
||
269 | 276 | <input type="text" name="main_ip" value="', $context['ban_trigger']['ip']['value'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
270 | 277 | </dd>'; |
271 | 278 | |
272 | - if (empty($modSettings['disableHostnameLookup'])) |
|
273 | - echo ' |
|
279 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
280 | + echo ' |
|
274 | 281 | <dt> |
275 | 282 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', $context['ban_trigger']['hostname']['selected'] ? ' checked' : '', '> |
276 | 283 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -278,6 +285,7 @@ discard block |
||
278 | 285 | <dd> |
279 | 286 | <input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
280 | 287 | </dd>'; |
288 | + } |
|
281 | 289 | |
282 | 290 | echo ' |
283 | 291 | <dt> |
@@ -29,9 +29,10 @@ discard block |
||
29 | 29 | // Go through each type of report they can run. |
30 | 30 | foreach ($context['report_types'] as $type) |
31 | 31 | { |
32 | - if (isset($type['description'])) |
|
33 | - echo ' |
|
32 | + if (isset($type['description'])) { |
|
33 | + echo ' |
|
34 | 34 | <dt>', $type['description'], '</dt>'; |
35 | + } |
|
35 | 36 | |
36 | 37 | echo ' |
37 | 38 | <dd> |
@@ -62,8 +63,9 @@ discard block |
||
62 | 63 | </div> |
63 | 64 | <div id="report_buttons">'; |
64 | 65 | |
65 | - if (!empty($context['report_buttons'])) |
|
66 | - template_button_strip($context['report_buttons'], 'right'); |
|
66 | + if (!empty($context['report_buttons'])) { |
|
67 | + template_button_strip($context['report_buttons'], 'right'); |
|
68 | + } |
|
67 | 69 | |
68 | 70 | echo ' |
69 | 71 | </div>'; |
@@ -74,25 +76,27 @@ discard block |
||
74 | 76 | echo ' |
75 | 77 | <table class="table_grid report_results">'; |
76 | 78 | |
77 | - if (!empty($table['title'])) |
|
78 | - echo ' |
|
79 | + if (!empty($table['title'])) { |
|
80 | + echo ' |
|
79 | 81 | <thead> |
80 | 82 | <tr class="title_bar"> |
81 | 83 | <th scope="col" colspan="', $table['column_count'], '">', $table['title'], '</th> |
82 | 84 | </tr> |
83 | 85 | </thead> |
84 | 86 | <tbody>'; |
87 | + } |
|
85 | 88 | |
86 | 89 | // Now do each row! |
87 | 90 | $row_number = 0; |
88 | 91 | foreach ($table['data'] as $row) |
89 | 92 | { |
90 | - if ($row_number == 0 && !empty($table['shading']['top'])) |
|
91 | - echo ' |
|
93 | + if ($row_number == 0 && !empty($table['shading']['top'])) { |
|
94 | + echo ' |
|
92 | 95 | <tr class="windowbg table_caption">'; |
93 | - else |
|
94 | - echo ' |
|
96 | + } else { |
|
97 | + echo ' |
|
95 | 98 | <tr class="', !empty($row[0]['separator']) ? 'title_bar' : 'windowbg', '">'; |
99 | + } |
|
96 | 100 | |
97 | 101 | // Now do each column. |
98 | 102 | $column_number = 0; |
@@ -110,16 +114,17 @@ discard block |
||
110 | 114 | } |
111 | 115 | |
112 | 116 | // Shaded? |
113 | - if ($column_number == 0 && !empty($table['shading']['left'])) |
|
114 | - echo ' |
|
117 | + if ($column_number == 0 && !empty($table['shading']['left'])) { |
|
118 | + echo ' |
|
115 | 119 | <td class="table_caption ', $table['align']['shaded'], 'text"', $table['width']['shaded'] != 'auto' ? ' width="' . $table['width']['shaded'] . '"' : '', '> |
116 | 120 | ', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), ' |
117 | 121 | </td>'; |
118 | - else |
|
119 | - echo ' |
|
122 | + } else { |
|
123 | + echo ' |
|
120 | 124 | <td class="smalltext centertext" ', $table['width']['normal'] != 'auto' ? ' width="' . $table['width']['normal'] . '"' : '', !empty($data['style']) ? ' style="' . $data['style'] . '"' : '', '> |
121 | 125 | ', $data['v'], ' |
122 | 126 | </td>'; |
127 | + } |
|
123 | 128 | |
124 | 129 | $column_number++; |
125 | 130 | } |
@@ -168,24 +173,26 @@ discard block |
||
168 | 173 | <div style="overflow: visible;', $table['max_width'] != 'auto' ? ' width: ' . $table['max_width'] . 'px;' : '', '"> |
169 | 174 | <table class="bordercolor">'; |
170 | 175 | |
171 | - if (!empty($table['title'])) |
|
172 | - echo ' |
|
176 | + if (!empty($table['title'])) { |
|
177 | + echo ' |
|
173 | 178 | <tr class="title_bar"> |
174 | 179 | <td colspan="', $table['column_count'], '"> |
175 | 180 | ', $table['title'], ' |
176 | 181 | </td> |
177 | 182 | </tr>'; |
183 | + } |
|
178 | 184 | |
179 | 185 | // Now do each row! |
180 | 186 | $row_number = 0; |
181 | 187 | foreach ($table['data'] as $row) |
182 | 188 | { |
183 | - if ($row_number == 0 && !empty($table['shading']['top'])) |
|
184 | - echo ' |
|
189 | + if ($row_number == 0 && !empty($table['shading']['top'])) { |
|
190 | + echo ' |
|
185 | 191 | <tr class="titlebg">'; |
186 | - else |
|
187 | - echo ' |
|
192 | + } else { |
|
193 | + echo ' |
|
188 | 194 | <tr class="windowbg">'; |
195 | + } |
|
189 | 196 | |
190 | 197 | // Now do each column!! |
191 | 198 | $column_number = 0; |
@@ -202,16 +209,17 @@ discard block |
||
202 | 209 | } |
203 | 210 | |
204 | 211 | // Shaded? |
205 | - if ($column_number == 0 && !empty($table['shading']['left'])) |
|
206 | - echo ' |
|
212 | + if ($column_number == 0 && !empty($table['shading']['left'])) { |
|
213 | + echo ' |
|
207 | 214 | <td class="titlebg ', $table['align']['shaded'], 'text"', $table['width']['shaded'] != 'auto' ? ' width="' . $table['width']['shaded'] . '"' : '', '> |
208 | 215 | ', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), ' |
209 | 216 | </td>'; |
210 | - else |
|
211 | - echo ' |
|
217 | + } else { |
|
218 | + echo ' |
|
212 | 219 | <td class="centertext" ', $table['width']['normal'] != 'auto' ? ' width="' . $table['width']['normal'] . '"' : '', !empty($data['style']) ? ' style="' . $data['style'] . '"' : '', '> |
213 | 220 | ', $data['v'], ' |
214 | 221 | </td>'; |
222 | + } |
|
215 | 223 | |
216 | 224 | $column_number++; |
217 | 225 | } |
@@ -31,9 +31,10 @@ discard block |
||
31 | 31 | echo ' |
32 | 32 | <ul id="smf_slider" class="roundframe">'; |
33 | 33 | |
34 | - foreach ($context['news_lines'] as $news) |
|
35 | - echo ' |
|
34 | + foreach ($context['news_lines'] as $news) { |
|
35 | + echo ' |
|
36 | 36 | <li>', $news, '</li>'; |
37 | + } |
|
37 | 38 | |
38 | 39 | echo ' |
39 | 40 | </ul> |
@@ -65,8 +66,9 @@ discard block |
||
65 | 66 | foreach ($context['categories'] as $category) |
66 | 67 | { |
67 | 68 | // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed) |
68 | - if (empty($category['boards']) && !$category['is_collapsed']) |
|
69 | - continue; |
|
69 | + if (empty($category['boards']) && !$category['is_collapsed']) { |
|
70 | + continue; |
|
71 | + } |
|
70 | 72 | |
71 | 73 | echo ' |
72 | 74 | <div class="main_container"> |
@@ -74,9 +76,10 @@ discard block |
||
74 | 76 | <h3 class="catbg">'; |
75 | 77 | |
76 | 78 | // If this category even can collapse, show a link to collapse it. |
77 | - if ($category['can_collapse']) |
|
78 | - echo ' |
|
79 | + if ($category['can_collapse']) { |
|
80 | + echo ' |
|
79 | 81 | <span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>'; |
82 | + } |
|
80 | 83 | |
81 | 84 | echo ' |
82 | 85 | ', $category['link'], ' |
@@ -106,10 +109,11 @@ discard block |
||
106 | 109 | </div>'; |
107 | 110 | |
108 | 111 | // Won't somebody think of the children! |
109 | - if (function_exists('template_bi_' . $board['type'] . '_children')) |
|
110 | - call_user_func('template_bi_' . $board['type'] . '_children', $board); |
|
111 | - else |
|
112 | - template_bi_board_children($board); |
|
112 | + if (function_exists('template_bi_' . $board['type'] . '_children')) { |
|
113 | + call_user_func('template_bi_' . $board['type'] . '_children', $board); |
|
114 | + } else { |
|
115 | + template_bi_board_children($board); |
|
116 | + } |
|
113 | 117 | |
114 | 118 | echo ' |
115 | 119 | </div><!-- #board_[id] -->'; |
@@ -124,12 +128,13 @@ discard block |
||
124 | 128 | </div><!-- #boardindex_table -->'; |
125 | 129 | |
126 | 130 | // Show the mark all as read button? |
127 | - if ($context['user']['is_logged'] && !empty($context['categories'])) |
|
128 | - echo ' |
|
131 | + if ($context['user']['is_logged'] && !empty($context['categories'])) { |
|
132 | + echo ' |
|
129 | 133 | <div class="mark_read"> |
130 | 134 | ', template_button_strip($context['mark_read_button'], 'right'), ' |
131 | 135 | </div>'; |
132 | -} |
|
136 | + } |
|
137 | + } |
|
133 | 138 | |
134 | 139 | /** |
135 | 140 | * Outputs the board icon for a standard board. |
@@ -173,18 +178,20 @@ discard block |
||
173 | 178 | </a>'; |
174 | 179 | |
175 | 180 | // Has it outstanding posts for approval? |
176 | - if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) |
|
177 | - echo ' |
|
181 | + if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) { |
|
182 | + echo ' |
|
178 | 183 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>'; |
184 | + } |
|
179 | 185 | |
180 | 186 | echo ' |
181 | 187 | <p class="board_description">', $board['description'], '</p>'; |
182 | 188 | |
183 | 189 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
184 | - if (!empty($board['link_moderators'])) |
|
185 | - echo ' |
|
190 | + if (!empty($board['link_moderators'])) { |
|
191 | + echo ' |
|
186 | 192 | <p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>'; |
187 | -} |
|
193 | + } |
|
194 | + } |
|
188 | 195 | |
189 | 196 | /** |
190 | 197 | * Outputs the board stats for a standard board. |
@@ -225,10 +232,11 @@ discard block |
||
225 | 232 | */ |
226 | 233 | function template_bi_board_lastpost($board) |
227 | 234 | { |
228 | - if (!empty($board['last_post']['id'])) |
|
229 | - echo ' |
|
235 | + if (!empty($board['last_post']['id'])) { |
|
236 | + echo ' |
|
230 | 237 | <p>', $board['last_post']['last_post_message'], '</p>'; |
231 | -} |
|
238 | + } |
|
239 | + } |
|
232 | 240 | |
233 | 241 | /** |
234 | 242 | * Outputs the board children for a standard board. |
@@ -248,14 +256,16 @@ discard block |
||
248 | 256 | id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ |
249 | 257 | foreach ($board['children'] as $child) |
250 | 258 | { |
251 | - if (!$child['is_redirect']) |
|
252 | - $child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>'; |
|
253 | - else |
|
254 | - $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>'; |
|
259 | + if (!$child['is_redirect']) { |
|
260 | + $child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>'; |
|
261 | + } else { |
|
262 | + $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>'; |
|
263 | + } |
|
255 | 264 | |
256 | 265 | // Has it posts awaiting approval? |
257 | - if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) |
|
258 | - $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
266 | + if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) { |
|
267 | + $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
268 | + } |
|
259 | 269 | |
260 | 270 | $children[] = $child['new'] ? '<span class="strong">' . $child['link'] . '</span>' : '<span>' . $child['link'] . '</span>'; |
261 | 271 | } |
@@ -282,8 +292,9 @@ discard block |
||
282 | 292 | { |
283 | 293 | global $context, $options, $txt; |
284 | 294 | |
285 | - if (empty($context['info_center'])) |
|
286 | - return; |
|
295 | + if (empty($context['info_center'])) { |
|
296 | + return; |
|
297 | + } |
|
287 | 298 | |
288 | 299 | // Here's where the "Info Center" starts... |
289 | 300 | echo ' |
@@ -383,14 +394,15 @@ discard block |
||
383 | 394 | /* Each post in latest_posts has: |
384 | 395 | board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), |
385 | 396 | subject, short_subject (shortened with...), time, link, and href. */ |
386 | - foreach ($context['latest_posts'] as $post) |
|
387 | - echo ' |
|
397 | + foreach ($context['latest_posts'] as $post) { |
|
398 | + echo ' |
|
388 | 399 | <tr class="windowbg"> |
389 | 400 | <td class="recentpost"><strong>', $post['link'], '</strong></td> |
390 | 401 | <td class="recentposter">', $post['poster']['link'], '</td> |
391 | 402 | <td class="recentboard">', $post['board']['link'], '</td> |
392 | 403 | <td class="recenttime">', $post['time'], '</td> |
393 | 404 | </tr>'; |
405 | + } |
|
394 | 406 | echo ' |
395 | 407 | </table>'; |
396 | 408 | } |
@@ -414,11 +426,12 @@ discard block |
||
414 | 426 | </div>'; |
415 | 427 | |
416 | 428 | // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P |
417 | - if (!empty($context['calendar_holidays'])) |
|
418 | - echo ' |
|
429 | + if (!empty($context['calendar_holidays'])) { |
|
430 | + echo ' |
|
419 | 431 | <p class="inline holiday"> |
420 | 432 | <span>', $txt['calendar_prompt'], '</span> ', implode(', ', $context['calendar_holidays']), ' |
421 | 433 | </p>'; |
434 | + } |
|
422 | 435 | |
423 | 436 | // People's birthdays. Like mine. And yours, I guess. Kidding. |
424 | 437 | if (!empty($context['calendar_birthdays'])) |
@@ -428,9 +441,10 @@ discard block |
||
428 | 441 | <span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>'; |
429 | 442 | |
430 | 443 | // Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) |
431 | - foreach ($context['calendar_birthdays'] as $member) |
|
432 | - echo ' |
|
444 | + foreach ($context['calendar_birthdays'] as $member) { |
|
445 | + echo ' |
|
433 | 446 | <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', '; |
447 | + } |
|
434 | 448 | |
435 | 449 | echo ' |
436 | 450 | </p>'; |
@@ -445,9 +459,10 @@ discard block |
||
445 | 459 | |
446 | 460 | // Each event in calendar_events should have: |
447 | 461 | // title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. |
448 | - foreach ($context['calendar_events'] as $event) |
|
449 | - echo ' |
|
462 | + foreach ($context['calendar_events'] as $event) { |
|
463 | + echo ' |
|
450 | 464 | ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><span class="generic_icons calendar_modify"></span></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br>' : ', '; |
465 | + } |
|
451 | 466 | echo ' |
452 | 467 | </p>'; |
453 | 468 | } |
@@ -493,17 +508,21 @@ discard block |
||
493 | 508 | // Handle hidden users and buddies. |
494 | 509 | $bracketList = array(); |
495 | 510 | |
496 | - if ($context['show_buddies']) |
|
497 | - $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
511 | + if ($context['show_buddies']) { |
|
512 | + $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
513 | + } |
|
498 | 514 | |
499 | - if (!empty($context['num_spiders'])) |
|
500 | - $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
515 | + if (!empty($context['num_spiders'])) { |
|
516 | + $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
517 | + } |
|
501 | 518 | |
502 | - if (!empty($context['num_users_hidden'])) |
|
503 | - $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
519 | + if (!empty($context['num_users_hidden'])) { |
|
520 | + $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
521 | + } |
|
504 | 522 | |
505 | - if (!empty($bracketList)) |
|
506 | - echo ' (' . implode(', ', $bracketList) . ')'; |
|
523 | + if (!empty($bracketList)) { |
|
524 | + echo ' (' . implode(', ', $bracketList) . ')'; |
|
525 | + } |
|
507 | 526 | |
508 | 527 | echo $context['show_who'] ? '</a>' : '', ' |
509 | 528 | |
@@ -517,9 +536,10 @@ discard block |
||
517 | 536 | ', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']); |
518 | 537 | |
519 | 538 | // Showing membergroups? |
520 | - if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) |
|
521 | - echo ' |
|
539 | + if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) { |
|
540 | + echo ' |
|
522 | 541 | <span class="membergroups">' . implode(', ', $context['membergroups']) . '</span>'; |
542 | + } |
|
523 | 543 | } |
524 | 544 | |
525 | 545 | echo ' |
@@ -53,14 +53,15 @@ discard block |
||
53 | 53 | foreach ($context['smileys'] as $location => $smileyRows) |
54 | 54 | { |
55 | 55 | $countLocations--; |
56 | - if ($location == 'postform') |
|
57 | - echo ' |
|
56 | + if ($location == 'postform') { |
|
57 | + echo ' |
|
58 | 58 | dropdown: |
59 | 59 | {'; |
60 | - elseif ($location == 'popup') |
|
61 | - echo ' |
|
60 | + } elseif ($location == 'popup') { |
|
61 | + echo ' |
|
62 | 62 | popup: |
63 | 63 | {'; |
64 | + } |
|
64 | 65 | |
65 | 66 | $numRows = count($smileyRows); |
66 | 67 | |
@@ -68,25 +69,27 @@ discard block |
||
68 | 69 | $emptyPlaceholder = 0; |
69 | 70 | foreach ($smileyRows as $smileyRow) |
70 | 71 | { |
71 | - foreach ($smileyRow['smileys'] as $smiley) |
|
72 | - echo ' |
|
72 | + foreach ($smileyRow['smileys'] as $smiley) { |
|
73 | + echo ' |
|
73 | 74 | ', JavaScriptEscape($smiley['code']), ': ', JavaScriptEscape($settings['smileys_url'] . '/' . $smiley['filename']), empty($smiley['isLast']) ? ',' : ''; |
75 | + } |
|
74 | 76 | |
75 | - if (empty($smileyRow['isLast']) && $numRows != 1) |
|
76 | - echo ', |
|
77 | + if (empty($smileyRow['isLast']) && $numRows != 1) { |
|
78 | + echo ', |
|
77 | 79 | \'-', $emptyPlaceholder++, '\': \'\','; |
80 | + } |
|
78 | 81 | } |
79 | 82 | echo ' |
80 | 83 | }', $countLocations != 0 ? ',' : ''; |
81 | 84 | } |
82 | 85 | echo ' |
83 | 86 | }'; |
84 | - } |
|
85 | - else |
|
86 | - echo ', |
|
87 | + } else { |
|
88 | + echo ', |
|
87 | 89 | emoticons: |
88 | 90 | {}, |
89 | 91 | emoticonsEnabled:false'; |
92 | + } |
|
90 | 93 | |
91 | 94 | if ($context['show_bbc'] && $bbcContainer !== null) |
92 | 95 | { |
@@ -100,15 +103,16 @@ discard block |
||
100 | 103 | |
101 | 104 | $count_tags--; |
102 | 105 | |
103 | - if (!empty($count_tags)) |
|
104 | - echo '||'; |
|
106 | + if (!empty($count_tags)) { |
|
107 | + echo '||'; |
|
108 | + } |
|
105 | 109 | } |
106 | 110 | |
107 | 111 | echo '",'; |
108 | - } |
|
109 | - else |
|
110 | - echo ', |
|
112 | + } else { |
|
113 | + echo ', |
|
111 | 114 | toolbar: "",'; |
115 | + } |
|
112 | 116 | |
113 | 117 | echo ' |
114 | 118 | }); |
@@ -150,42 +154,47 @@ discard block |
||
150 | 154 | |
151 | 155 | $tempTab = $context['tabindex']; |
152 | 156 | |
153 | - if (!empty($context['drafts_pm_save'])) |
|
154 | - $tempTab++; |
|
155 | - elseif (!empty($context['drafts_save'])) |
|
156 | - $tempTab++; |
|
157 | - elseif ($editor_context['preview_type']) |
|
158 | - $tempTab++; |
|
159 | - elseif ($context['show_spellchecking']) |
|
160 | - $tempTab++; |
|
157 | + if (!empty($context['drafts_pm_save'])) { |
|
158 | + $tempTab++; |
|
159 | + } elseif (!empty($context['drafts_save'])) { |
|
160 | + $tempTab++; |
|
161 | + } elseif ($editor_context['preview_type']) { |
|
162 | + $tempTab++; |
|
163 | + } elseif ($context['show_spellchecking']) { |
|
164 | + $tempTab++; |
|
165 | + } |
|
161 | 166 | |
162 | 167 | $tempTab++; |
163 | 168 | $context['tabindex'] = $tempTab; |
164 | 169 | |
165 | - if (!empty($context['drafts_pm_save'])) |
|
166 | - echo ' |
|
170 | + if (!empty($context['drafts_pm_save'])) { |
|
171 | + echo ' |
|
167 | 172 | <input type="submit" name="save_draft" value="', $txt['draft_save'], '" tabindex="', --$tempTab, '" onclick="submitThisOnce(this);" accesskey="d" class="button"> |
168 | 173 | <input type="hidden" id="id_pm_draft" name="id_pm_draft" value="', empty($context['id_pm_draft']) ? 0 : $context['id_pm_draft'], '">'; |
174 | + } |
|
169 | 175 | |
170 | - if (!empty($context['drafts_save'])) |
|
171 | - echo ' |
|
176 | + if (!empty($context['drafts_save'])) { |
|
177 | + echo ' |
|
172 | 178 | <input type="submit" name="save_draft" value="', $txt['draft_save'], '" tabindex="', --$tempTab, '" onclick="return confirm(' . JavaScriptEscape($txt['draft_save_note']) . ') && submitThisOnce(this);" accesskey="d" class="button"> |
173 | 179 | <input type="hidden" id="id_draft" name="id_draft" value="', empty($context['id_draft']) ? 0 : $context['id_draft'], '">'; |
180 | + } |
|
174 | 181 | |
175 | - if ($context['show_spellchecking']) |
|
176 | - echo ' |
|
182 | + if ($context['show_spellchecking']) { |
|
183 | + echo ' |
|
177 | 184 | <input type="button" value="', $txt['spell_check'], '" tabindex="', --$tempTab, '" onclick="oEditorHandle_', $editor_id, '.spellCheckStart();" class="button">'; |
185 | + } |
|
178 | 186 | |
179 | - if ($editor_context['preview_type']) |
|
180 | - echo ' |
|
187 | + if ($editor_context['preview_type']) { |
|
188 | + echo ' |
|
181 | 189 | <input type="submit" name="preview" value="', isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $txt['preview'], '" tabindex="', --$tempTab, '" onclick="', $editor_context['preview_type'] == 2 ? 'return event.ctrlKey || previewPost();' : 'return submitThisOnce(this);', '" accesskey="p" class="button">'; |
190 | + } |
|
182 | 191 | |
183 | 192 | echo ' |
184 | 193 | <input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : $txt['post'], '" name="post" tabindex="', --$tempTab, '" onclick="return submitThisOnce(this);" accesskey="s" class="button">'; |
185 | 194 | |
186 | 195 | // Load in the PM autosaver if it's enabled |
187 | - if (!empty($context['drafts_pm_save']) && !empty($context['drafts_autosave'])) |
|
188 | - echo ' |
|
196 | + if (!empty($context['drafts_pm_save']) && !empty($context['drafts_autosave'])) { |
|
197 | + echo ' |
|
189 | 198 | <span class="righttext padding" style="display: block"> |
190 | 199 | <span id="throbber" style="display:none"><img src="' . $settings['images_url'] . '/loading_sm.gif" alt="" class="centericon"></span> |
191 | 200 | <span id="draft_lastautosave" ></span> |
@@ -203,10 +212,11 @@ discard block |
||
203 | 212 | iFreq: ', (empty($modSettings['drafts_autosave_frequency']) ? 60000 : $modSettings['drafts_autosave_frequency'] * 1000), ' |
204 | 213 | }); |
205 | 214 | </script>'; |
215 | + } |
|
206 | 216 | |
207 | 217 | // Start an instance of the auto saver if its enabled |
208 | - if (!empty($context['drafts_save']) && !empty($context['drafts_autosave'])) |
|
209 | - echo ' |
|
218 | + if (!empty($context['drafts_save']) && !empty($context['drafts_autosave'])) { |
|
219 | + echo ' |
|
210 | 220 | <span class="righttext padding" style="display: block"> |
211 | 221 | <span id="throbber" style="display:none"><img src="', $settings['images_url'], '/loading_sm.gif" alt="" class="centericon"></span> |
212 | 222 | <span id="draft_lastautosave" ></span> |
@@ -223,7 +233,8 @@ discard block |
||
223 | 233 | iFreq: ', $context['drafts_autosave_frequency'], ' |
224 | 234 | }); |
225 | 235 | </script>'; |
226 | -} |
|
236 | + } |
|
237 | + } |
|
227 | 238 | |
228 | 239 | /** |
229 | 240 | * This template displays a verification form |
@@ -240,51 +251,57 @@ discard block |
||
240 | 251 | $verify_context = &$context['controls']['verification'][$verify_id]; |
241 | 252 | |
242 | 253 | // Keep track of where we are. |
243 | - if (empty($verify_context['tracking']) || $reset) |
|
244 | - $verify_context['tracking'] = 0; |
|
254 | + if (empty($verify_context['tracking']) || $reset) { |
|
255 | + $verify_context['tracking'] = 0; |
|
256 | + } |
|
245 | 257 | |
246 | 258 | // How many items are there to display in total. |
247 | 259 | $total_items = count($verify_context['questions']) + ($verify_context['show_visual'] || $verify_context['can_recaptcha'] ? 1 : 0); |
248 | 260 | |
249 | 261 | // If we've gone too far, stop. |
250 | - if ($verify_context['tracking'] > $total_items) |
|
251 | - return false; |
|
262 | + if ($verify_context['tracking'] > $total_items) { |
|
263 | + return false; |
|
264 | + } |
|
252 | 265 | |
253 | 266 | // Loop through each item to show them. |
254 | 267 | for ($i = 0; $i < $total_items; $i++) |
255 | 268 | { |
256 | 269 | // If we're after a single item only show it if we're in the right place. |
257 | - if ($display_type == 'single' && $verify_context['tracking'] != $i) |
|
258 | - continue; |
|
270 | + if ($display_type == 'single' && $verify_context['tracking'] != $i) { |
|
271 | + continue; |
|
272 | + } |
|
259 | 273 | |
260 | - if ($display_type != 'single') |
|
261 | - echo ' |
|
274 | + if ($display_type != 'single') { |
|
275 | + echo ' |
|
262 | 276 | <div id="verification_control_', $i, '" class="verification_control">'; |
277 | + } |
|
263 | 278 | |
264 | 279 | // Display empty field, but only if we have one, and it's the first time. |
265 | - if ($verify_context['empty_field'] && empty($i)) |
|
266 | - echo ' |
|
280 | + if ($verify_context['empty_field'] && empty($i)) { |
|
281 | + echo ' |
|
267 | 282 | <div class="smalltext vv_special"> |
268 | 283 | ', $txt['visual_verification_hidden'], ': |
269 | 284 | <input type="text" name="', $_SESSION[$verify_id . '_vv']['empty_field'], '" autocomplete="off" size="30" value=""> |
270 | 285 | </div>'; |
286 | + } |
|
271 | 287 | |
272 | 288 | // Do the actual stuff |
273 | 289 | if ($i == 0 && ($verify_context['show_visual'] || $verify_context['can_recaptcha'])) |
274 | 290 | { |
275 | 291 | if ($verify_context['show_visual']) |
276 | 292 | { |
277 | - if ($context['use_graphic_library']) |
|
278 | - echo ' |
|
293 | + if ($context['use_graphic_library']) { |
|
294 | + echo ' |
|
279 | 295 | <img src="', $verify_context['image_href'], '" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '">'; |
280 | - else |
|
281 | - echo ' |
|
296 | + } else { |
|
297 | + echo ' |
|
282 | 298 | <img src="', $verify_context['image_href'], ';letter=1" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_1"> |
283 | 299 | <img src="', $verify_context['image_href'], ';letter=2" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_2"> |
284 | 300 | <img src="', $verify_context['image_href'], ';letter=3" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_3"> |
285 | 301 | <img src="', $verify_context['image_href'], ';letter=4" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_4"> |
286 | 302 | <img src="', $verify_context['image_href'], ';letter=5" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_5"> |
287 | 303 | <img src="', $verify_context['image_href'], ';letter=6" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_6">'; |
304 | + } |
|
288 | 305 | |
289 | 306 | echo ' |
290 | 307 | <div class="smalltext" style="margin: 4px 0 8px 0;"> |
@@ -294,13 +311,13 @@ discard block |
||
294 | 311 | </div>'; |
295 | 312 | } |
296 | 313 | |
297 | - if ($verify_context['can_recaptcha']) |
|
298 | - echo ' |
|
314 | + if ($verify_context['can_recaptcha']) { |
|
315 | + echo ' |
|
299 | 316 | <div class="g-recaptcha centertext" data-sitekey="' . $verify_context['recaptcha_site_key'] . '" data-theme="' . $verify_context['recaptcha_theme'] . '"></div> |
300 | 317 | <br> |
301 | 318 | <script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>'; |
302 | - } |
|
303 | - else |
|
319 | + } |
|
320 | + } else |
|
304 | 321 | { |
305 | 322 | // Where in the question array is this question? |
306 | 323 | $qIndex = $verify_context['show_visual'] ? $i - 1 : $i; |
@@ -312,21 +329,24 @@ discard block |
||
312 | 329 | </div>'; |
313 | 330 | } |
314 | 331 | |
315 | - if ($display_type != 'single') |
|
316 | - echo ' |
|
332 | + if ($display_type != 'single') { |
|
333 | + echo ' |
|
317 | 334 | </div><!-- #verification_control_[i] -->'; |
335 | + } |
|
318 | 336 | |
319 | 337 | // If we were displaying just one and we did it, break. |
320 | - if ($display_type == 'single' && $verify_context['tracking'] == $i) |
|
321 | - break; |
|
338 | + if ($display_type == 'single' && $verify_context['tracking'] == $i) { |
|
339 | + break; |
|
340 | + } |
|
322 | 341 | } |
323 | 342 | |
324 | 343 | // Assume we found something, always. |
325 | 344 | $verify_context['tracking']++; |
326 | 345 | |
327 | 346 | // Tell something displaying piecemeal to keep going. |
328 | - if ($display_type == 'single') |
|
329 | - return true; |
|
330 | -} |
|
347 | + if ($display_type == 'single') { |
|
348 | + return true; |
|
349 | + } |
|
350 | + } |
|
331 | 351 | |
332 | 352 | ?> |
333 | 353 | \ No newline at end of file |
@@ -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> |
@@ -321,11 +329,12 @@ discard block |
||
321 | 329 | global $context, $txt, $scripturl; |
322 | 330 | |
323 | 331 | // Let them know the action was a success. |
324 | - if (!empty($context['report_post_action'])) |
|
325 | - echo ' |
|
332 | + if (!empty($context['report_post_action'])) { |
|
333 | + echo ' |
|
326 | 334 | <div class="infobox"> |
327 | 335 | ', $txt['report_action_' . $context['report_post_action']], ' |
328 | 336 | </div>'; |
337 | + } |
|
329 | 338 | |
330 | 339 | echo ' |
331 | 340 | <div class="modnotes"> |
@@ -342,11 +351,12 @@ discard block |
||
342 | 351 | <ul class="moderation_notes">'; |
343 | 352 | |
344 | 353 | // Cycle through the notes. |
345 | - foreach ($context['notes'] as $note) |
|
346 | - echo ' |
|
354 | + foreach ($context['notes'] as $note) { |
|
355 | + echo ' |
|
347 | 356 | <li class="smalltext"> |
348 | 357 | ', ($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'], ' |
349 | 358 | </li>'; |
359 | + } |
|
350 | 360 | |
351 | 361 | echo ' |
352 | 362 | </ul> |
@@ -388,18 +398,19 @@ discard block |
||
388 | 398 | $remove_button = create_button('delete', 'remove_message', 'remove'); |
389 | 399 | |
390 | 400 | // No posts? |
391 | - if (empty($context['unapproved_items'])) |
|
392 | - echo ' |
|
401 | + if (empty($context['unapproved_items'])) { |
|
402 | + echo ' |
|
393 | 403 | <div class="windowbg2"> |
394 | 404 | <p class="centertext"> |
395 | 405 | ', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], ' |
396 | 406 | </p> |
397 | 407 | </div>'; |
398 | - else |
|
399 | - echo ' |
|
408 | + } else { |
|
409 | + echo ' |
|
400 | 410 | <div class="pagesection floatleft"> |
401 | 411 | ', $context['page_index'], ' |
402 | 412 | </div>'; |
413 | + } |
|
403 | 414 | |
404 | 415 | foreach ($context['unapproved_items'] as $item) |
405 | 416 | { |
@@ -418,14 +429,16 @@ discard block |
||
418 | 429 | <span class="floatright"> |
419 | 430 | <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>'; |
420 | 431 | |
421 | - if ($item['can_delete']) |
|
422 | - echo ' |
|
432 | + if ($item['can_delete']) { |
|
433 | + echo ' |
|
423 | 434 | ', $context['menu_separator'], ' |
424 | 435 | <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>'; |
436 | + } |
|
425 | 437 | |
426 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
427 | - echo ' |
|
438 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
439 | + echo ' |
|
428 | 440 | <input type="checkbox" name="item[]" value="', $item['id'], '" checked> '; |
441 | + } |
|
429 | 442 | |
430 | 443 | echo ' |
431 | 444 | </span> |
@@ -435,8 +448,8 @@ discard block |
||
435 | 448 | echo ' |
436 | 449 | <div class="pagesection">'; |
437 | 450 | |
438 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
439 | - echo ' |
|
451 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
452 | + echo ' |
|
440 | 453 | <div class="floatright"> |
441 | 454 | <select name="do" onchange="if (this.value != 0 && confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();"> |
442 | 455 | <option value="0">', $txt['with_selected'], ':</option> |
@@ -448,12 +461,14 @@ discard block |
||
448 | 461 | <input type="submit" name="mc_go" value="', $txt['go'], '" class="button"> |
449 | 462 | </noscript> |
450 | 463 | </div>'; |
464 | + } |
|
451 | 465 | |
452 | - if (!empty($context['unapproved_items'])) |
|
453 | - echo ' |
|
466 | + if (!empty($context['unapproved_items'])) { |
|
467 | + echo ' |
|
454 | 468 | <div class="floatleft"> |
455 | 469 | <div class="pagelinks">', $context['page_index'], '</div> |
456 | 470 | </div>'; |
471 | + } |
|
457 | 472 | |
458 | 473 | echo ' |
459 | 474 | </div><!-- .pagesection --> |
@@ -473,8 +488,9 @@ discard block |
||
473 | 488 | global $scripturl, $context, $txt, $delete_button; |
474 | 489 | |
475 | 490 | // We'll have a delete please bob. |
476 | - if (empty($delete_button)) |
|
477 | - $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
491 | + if (empty($delete_button)) { |
|
492 | + $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
493 | + } |
|
478 | 494 | |
479 | 495 | $output_html = ' |
480 | 496 | <div> |
@@ -483,10 +499,11 @@ discard block |
||
483 | 499 | </div> |
484 | 500 | <div class="floatright">'; |
485 | 501 | |
486 | - if ($post['can_delete']) |
|
487 | - $output_html .= ' |
|
502 | + if ($post['can_delete']) { |
|
503 | + $output_html .= ' |
|
488 | 504 | <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> |
489 | 505 | <input type="checkbox" name="delete[]" value="' . $post['id'] . '">'; |
506 | + } |
|
490 | 507 | |
491 | 508 | $output_html .= ' |
492 | 509 | </div> |
@@ -529,12 +546,12 @@ discard block |
||
529 | 546 | <input type="submit" name="save" value="', $txt['save'], '" class="button"> |
530 | 547 | </div> |
531 | 548 | </form>'; |
532 | - } |
|
533 | - else |
|
534 | - echo ' |
|
549 | + } else { |
|
550 | + echo ' |
|
535 | 551 | <div class="windowbg"> |
536 | 552 | <div class="centertext">', $txt['mc_no_settings'], '</div> |
537 | 553 | </div>'; |
554 | + } |
|
538 | 555 | |
539 | 556 | echo ' |
540 | 557 | </div><!-- #modcenter -->'; |
@@ -630,13 +647,14 @@ discard block |
||
630 | 647 | </dd> |
631 | 648 | </dl>'; |
632 | 649 | |
633 | - if ($context['template_data']['can_edit_personal']) |
|
634 | - echo ' |
|
650 | + if ($context['template_data']['can_edit_personal']) { |
|
651 | + echo ' |
|
635 | 652 | <input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', '> |
636 | 653 | <label for="make_personal"> |
637 | 654 | <strong>', $txt['mc_warning_template_personal'], '</strong> |
638 | 655 | </label><br> |
639 | 656 | <span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span><br>'; |
657 | + } |
|
640 | 658 | |
641 | 659 | echo ' |
642 | 660 | <hr> |
@@ -22,24 +22,26 @@ discard block |
||
22 | 22 | <script>'; |
23 | 23 | |
24 | 24 | // When using Go Back due to fatal_error, allow the form to be re-submitted with changes. |
25 | - if (isBrowser('is_firefox')) |
|
26 | - echo ' |
|
25 | + if (isBrowser('is_firefox')) { |
|
26 | + echo ' |
|
27 | 27 | window.addEventListener("pageshow", reActivate, false);'; |
28 | + } |
|
28 | 29 | |
29 | 30 | // Start with message icons - and any missing from this theme. |
30 | 31 | echo ' |
31 | 32 | var icon_urls = {'; |
32 | 33 | |
33 | - foreach ($context['icons'] as $icon) |
|
34 | - echo ' |
|
34 | + foreach ($context['icons'] as $icon) { |
|
35 | + echo ' |
|
35 | 36 | \'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ','; |
37 | + } |
|
36 | 38 | |
37 | 39 | echo ' |
38 | 40 | };'; |
39 | 41 | |
40 | 42 | // If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations. |
41 | - if ($context['make_poll']) |
|
42 | - echo ' |
|
43 | + if ($context['make_poll']) { |
|
44 | + echo ' |
|
43 | 45 | var pollOptionNum = 0, pollTabIndex; |
44 | 46 | var pollOptionId = ', $context['last_choice_id'], '; |
45 | 47 | function addPollOption() |
@@ -58,11 +60,13 @@ discard block |
||
58 | 60 | |
59 | 61 | setOuterHTML(document.getElementById(\'pollMoreOptions\'), ', JavaScriptEscape('<dt><label for="options-'), ' + pollOptionId + ', JavaScriptEscape('">' . $txt['option'] . ' '), ' + pollOptionNum + ', JavaScriptEscape('</label>:</dt><dd><input type="text" name="options['), ' + pollOptionId + ', JavaScriptEscape(']" id="options-'), ' + pollOptionId + ', JavaScriptEscape('" value="" size="80" maxlength="255" tabindex="'), ' + pollTabIndex + ', JavaScriptEscape('"></dd><p id="pollMoreOptions"></p>'), '); |
60 | 62 | }'; |
63 | + } |
|
61 | 64 | |
62 | 65 | // If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here. |
63 | - if ($context['make_event']) |
|
64 | - echo ' |
|
66 | + if ($context['make_event']) { |
|
67 | + echo ' |
|
65 | 68 | var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];'; |
69 | + } |
|
66 | 70 | |
67 | 71 | // End of the javascript, start the form and display the link tree. |
68 | 72 | echo ' |
@@ -83,9 +87,10 @@ discard block |
||
83 | 87 | </div> |
84 | 88 | <br>'; |
85 | 89 | |
86 | - if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) |
|
87 | - echo ' |
|
90 | + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) { |
|
91 | + echo ' |
|
88 | 92 | <input type="hidden" name="eventid" value="', $context['event']['id'], '">'; |
93 | + } |
|
89 | 94 | |
90 | 95 | // Start the main table. |
91 | 96 | echo ' |
@@ -110,26 +115,29 @@ discard block |
||
110 | 115 | </div>'; |
111 | 116 | |
112 | 117 | // If this won't be approved let them know! |
113 | - if (!$context['becomes_approved']) |
|
114 | - echo ' |
|
118 | + if (!$context['becomes_approved']) { |
|
119 | + echo ' |
|
115 | 120 | <div class="noticebox"> |
116 | 121 | <em>', $txt['wait_for_approval'], '</em> |
117 | 122 | <input type="hidden" name="not_approved" value="1"> |
118 | 123 | </div>'; |
124 | + } |
|
119 | 125 | |
120 | 126 | // If it's locked, show a message to warn the replier. |
121 | - if (!empty($context['locked'])) |
|
122 | - echo ' |
|
127 | + if (!empty($context['locked'])) { |
|
128 | + echo ' |
|
123 | 129 | <div class="errorbox"> |
124 | 130 | ', $txt['topic_locked_no_reply'], ' |
125 | 131 | </div>'; |
132 | + } |
|
126 | 133 | |
127 | - if (!empty($modSettings['drafts_post_enabled'])) |
|
128 | - echo ' |
|
134 | + if (!empty($modSettings['drafts_post_enabled'])) { |
|
135 | + echo ' |
|
129 | 136 | <div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>', |
130 | 137 | sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), ' |
131 | 138 | ', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), ' |
132 | 139 | </div>'; |
140 | + } |
|
133 | 141 | |
134 | 142 | // The post header... important stuff |
135 | 143 | echo ' |
@@ -139,14 +147,15 @@ discard block |
||
139 | 147 | // Mod & theme authors can use the 'integrate_post_end' hook to modify or add to these (see Post.php) |
140 | 148 | if (!empty($context['posting_fields']) && is_array($context['posting_fields'])) |
141 | 149 | { |
142 | - foreach ($context['posting_fields'] as $pfid => $pf) |
|
143 | - echo ' |
|
150 | + foreach ($context['posting_fields'] as $pfid => $pf) { |
|
151 | + echo ' |
|
144 | 152 | <dt class="clear', !is_numeric($pfid) ? ' pf_' . $pfid : '', '"> |
145 | 153 | ', $pf['dt'], ' |
146 | 154 | </dt> |
147 | 155 | <dd', !is_numeric($pfid) ? ' class="pf_' . $pfid . '"' : '', '> |
148 | 156 | ', preg_replace('~<(input|select|textarea|button|area|a|object)\b~', '<$1 tabindex="' . $context['tabindex']++ . '"', $pf['dd']), ' |
149 | 157 | </dd>'; |
158 | + } |
|
150 | 159 | } |
151 | 160 | |
152 | 161 | echo ' |
@@ -180,9 +189,10 @@ discard block |
||
180 | 189 | echo ' |
181 | 190 | <optgroup label="', $category['name'], '">'; |
182 | 191 | |
183 | - foreach ($category['boards'] as $board) |
|
184 | - echo ' |
|
192 | + foreach ($category['boards'] as $board) { |
|
193 | + echo ' |
|
185 | 194 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
195 | + } |
|
186 | 196 | echo ' |
187 | 197 | </optgroup>'; |
188 | 198 | } |
@@ -218,9 +228,10 @@ discard block |
||
218 | 228 | <span class="label">', $txt['calendar_timezone'], '</span> |
219 | 229 | <select name="tz" id="tz"', !empty($context['event']['allday']) ? ' disabled' : '', '>'; |
220 | 230 | |
221 | - foreach ($context['all_timezones'] as $tz => $tzname) |
|
222 | - echo ' |
|
231 | + foreach ($context['all_timezones'] as $tz => $tzname) { |
|
232 | + echo ' |
|
223 | 233 | <option value="', $tz, '"', $tz == $context['event']['tz'] ? ' selected' : '', '>', $tzname, '</option>'; |
234 | + } |
|
224 | 235 | |
225 | 236 | echo ' |
226 | 237 | </select> |
@@ -249,14 +260,15 @@ discard block |
||
249 | 260 | </dd>'; |
250 | 261 | |
251 | 262 | // Loop through all the choices and print them out. |
252 | - foreach ($context['choices'] as $choice) |
|
253 | - echo ' |
|
263 | + foreach ($context['choices'] as $choice) { |
|
264 | + echo ' |
|
254 | 265 | <dt> |
255 | 266 | <label for="options-', $choice['id'], '">', $txt['option'], ' ', $choice['number'], '</label>: |
256 | 267 | </dt> |
257 | 268 | <dd> |
258 | 269 | <input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="255"> |
259 | 270 | </dd>'; |
271 | + } |
|
260 | 272 | |
261 | 273 | echo ' |
262 | 274 | <p id="pollMoreOptions"></p> |
@@ -286,14 +298,15 @@ discard block |
||
286 | 298 | <input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', '> |
287 | 299 | </dd>'; |
288 | 300 | |
289 | - if ($context['poll_options']['guest_vote_enabled']) |
|
290 | - echo ' |
|
301 | + if ($context['poll_options']['guest_vote_enabled']) { |
|
302 | + echo ' |
|
291 | 303 | <dt> |
292 | 304 | <label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label> |
293 | 305 | </dt> |
294 | 306 | <dd> |
295 | 307 | <input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll_options']['guest_vote']) ? ' checked' : '', '> |
296 | 308 | </dd>'; |
309 | + } |
|
297 | 310 | |
298 | 311 | echo ' |
299 | 312 | <dt> |
@@ -314,8 +327,8 @@ discard block |
||
314 | 327 | ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); |
315 | 328 | |
316 | 329 | // If we're editing and displaying edit details, show a box where they can say why |
317 | - if (isset($context['editing']) && $modSettings['show_modify']) |
|
318 | - echo ' |
|
330 | + if (isset($context['editing']) && $modSettings['show_modify']) { |
|
331 | + echo ' |
|
319 | 332 | <dl> |
320 | 333 | <dt class="clear"> |
321 | 334 | <span id="caption_edit_reason">', $txt['reason_for_edit'], ':</span> |
@@ -324,20 +337,23 @@ discard block |
||
324 | 337 | <input type="text" name="modify_reason"', isset($context['last_modified_reason']) ? ' value="' . $context['last_modified_reason'] . '"' : '', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80"> |
325 | 338 | </dd> |
326 | 339 | </dl>'; |
340 | + } |
|
327 | 341 | |
328 | 342 | // If this message has been edited in the past - display when it was. |
329 | - if (isset($context['last_modified'])) |
|
330 | - echo ' |
|
343 | + if (isset($context['last_modified'])) { |
|
344 | + echo ' |
|
331 | 345 | <div class="padding smalltext"> |
332 | 346 | ', $context['last_modified_text'], ' |
333 | 347 | </div>'; |
348 | + } |
|
334 | 349 | |
335 | 350 | // If the admin has enabled the hiding of the additional options - show a link and image for it. |
336 | - if (!empty($modSettings['additional_options_collapsable'])) |
|
337 | - echo ' |
|
351 | + if (!empty($modSettings['additional_options_collapsable'])) { |
|
352 | + echo ' |
|
338 | 353 | <div id="postAdditionalOptionsHeader"> |
339 | 354 | <strong><a href="#" id="postMoreExpandLink"> ', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong> |
340 | 355 | </div>'; |
356 | + } |
|
341 | 357 | |
342 | 358 | echo ' |
343 | 359 | <div id="postAdditionalOptions">'; |
@@ -370,19 +386,21 @@ discard block |
||
370 | 386 | ', $txt['uncheck_unwatchd_attach'], ': |
371 | 387 | </dd>'; |
372 | 388 | |
373 | - foreach ($context['current_attachments'] as $attachment) |
|
374 | - echo ' |
|
389 | + foreach ($context['current_attachments'] as $attachment) { |
|
390 | + echo ' |
|
375 | 391 | <dd class="smalltext"> |
376 | 392 | <label for="attachment_', $attachment['attachID'], '"><input type="checkbox" id="attachment_', $attachment['attachID'], '" name="attach_del[]" value="', $attachment['attachID'], '"', empty($attachment['unchecked']) ? ' checked' : '', '> ', $attachment['name'], (empty($attachment['approved']) ? ' (' . $txt['awaiting_approval'] . ')' : ''), |
377 | 393 | !empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit']) ? sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0)) : '', '</label> |
378 | 394 | </dd>'; |
395 | + } |
|
379 | 396 | |
380 | 397 | echo ' |
381 | 398 | </dl>'; |
382 | 399 | |
383 | - if (!empty($context['files_in_session_warning'])) |
|
384 | - echo ' |
|
400 | + if (!empty($context['files_in_session_warning'])) { |
|
401 | + echo ' |
|
385 | 402 | <div class="smalltext">', $context['files_in_session_warning'], '</div>'; |
403 | + } |
|
386 | 404 | } |
387 | 405 | |
388 | 406 | // Is the user allowed to post any additional ones? If so give them the boxes to do it! |
@@ -443,8 +461,8 @@ discard block |
||
443 | 461 | ', empty($modSettings['attachmentSizeLimit']) ? '' : ('<input type="hidden" name="MAX_FILE_SIZE" value="' . $modSettings['attachmentSizeLimit'] * 1024 . '">'); |
444 | 462 | |
445 | 463 | // Show more boxes if they aren't approaching that limit. |
446 | - if ($context['num_allowed_attachments'] > 1) |
|
447 | - echo ' |
|
464 | + if ($context['num_allowed_attachments'] > 1) { |
|
465 | + echo ' |
|
448 | 466 | <script> |
449 | 467 | var allowed_attachments = ', $context['num_allowed_attachments'], '; |
450 | 468 | var current_attachment = 1; |
@@ -464,6 +482,7 @@ discard block |
||
464 | 482 | <a href="#" onclick="addAttachment(); return false;">(', $txt['more_attachments'], ')</a> |
465 | 483 | </div><!-- .fallback --> |
466 | 484 | </div><!-- #attachUpload -->'; |
485 | + } |
|
467 | 486 | |
468 | 487 | echo ' |
469 | 488 | </dd>'; |
@@ -475,21 +494,25 @@ discard block |
||
475 | 494 | <dd class="smalltext">'; |
476 | 495 | |
477 | 496 | // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. |
478 | - if (!empty($modSettings['attachmentCheckExtensions'])) |
|
479 | - echo ' |
|
497 | + if (!empty($modSettings['attachmentCheckExtensions'])) { |
|
498 | + echo ' |
|
480 | 499 | ', $txt['allowed_types'], ': ', $context['allowed_extensions'], '<br>'; |
500 | + } |
|
481 | 501 | |
482 | - if (!empty($context['attachment_restrictions'])) |
|
483 | - echo ' |
|
502 | + if (!empty($context['attachment_restrictions'])) { |
|
503 | + echo ' |
|
484 | 504 | ', $txt['attach_restrictions'], ' ', implode(', ', $context['attachment_restrictions']), '<br>'; |
505 | + } |
|
485 | 506 | |
486 | - if ($context['num_allowed_attachments'] == 0) |
|
487 | - echo ' |
|
507 | + if ($context['num_allowed_attachments'] == 0) { |
|
508 | + echo ' |
|
488 | 509 | ', $txt['attach_limit_nag'], '<br>'; |
510 | + } |
|
489 | 511 | |
490 | - if (!$context['can_post_attachment_unapproved']) |
|
491 | - echo ' |
|
512 | + if (!$context['can_post_attachment_unapproved']) { |
|
513 | + echo ' |
|
492 | 514 | <span class="alert">', $txt['attachment_requires_approval'], '</span>', '<br>'; |
515 | + } |
|
493 | 516 | |
494 | 517 | echo ' |
495 | 518 | </dd> |
@@ -513,24 +536,26 @@ discard block |
||
513 | 536 | <dt><strong>', $txt['subject'], '</strong></dt> |
514 | 537 | <dd><strong>', $txt['draft_saved_on'], '</strong></dd>'; |
515 | 538 | |
516 | - foreach ($context['drafts'] as $draft) |
|
517 | - echo ' |
|
539 | + foreach ($context['drafts'] as $draft) { |
|
540 | + echo ' |
|
518 | 541 | <dt>', $draft['link'], '</dt> |
519 | 542 | <dd>', $draft['poster_time'], '</dd>'; |
543 | + } |
|
520 | 544 | echo ' |
521 | 545 | </dl> |
522 | 546 | </div>'; |
523 | 547 | } |
524 | 548 | |
525 | 549 | // Is visual verification enabled? |
526 | - if ($context['require_verification']) |
|
527 | - echo ' |
|
550 | + if ($context['require_verification']) { |
|
551 | + echo ' |
|
528 | 552 | <div class="post_verification"> |
529 | 553 | <span', !empty($context['post_error']['need_qr_verification']) ? ' class="error"' : '', '> |
530 | 554 | <strong>', $txt['verification'], ':</strong> |
531 | 555 | </span> |
532 | 556 | ', template_control_verification($context['visual_verification_id'], 'all'), ' |
533 | 557 | </div>'; |
558 | + } |
|
534 | 559 | |
535 | 560 | // Finally, the submit buttons. |
536 | 561 | echo ' |
@@ -539,9 +564,10 @@ discard block |
||
539 | 564 | ', template_control_richedit_buttons($context['post_box_name']); |
540 | 565 | |
541 | 566 | // Option to delete an event if user is editing one. |
542 | - if ($context['make_event'] && !$context['event']['new']) |
|
543 | - echo ' |
|
567 | + if ($context['make_event'] && !$context['event']['new']) { |
|
568 | + echo ' |
|
544 | 569 | <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button you_sure">'; |
570 | + } |
|
545 | 571 | |
546 | 572 | echo ' |
547 | 573 | </span> |
@@ -550,9 +576,10 @@ discard block |
||
550 | 576 | <br class="clear">'; |
551 | 577 | |
552 | 578 | // Assuming this isn't a new topic pass across the last message id. |
553 | - if (isset($context['topic_last_message'])) |
|
554 | - echo ' |
|
579 | + if (isset($context['topic_last_message'])) { |
|
580 | + echo ' |
|
555 | 581 | <input type="hidden" name="last_msg" value="', $context['topic_last_message'], '">'; |
582 | + } |
|
556 | 583 | |
557 | 584 | echo ' |
558 | 585 | <input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '"> |
@@ -694,9 +721,10 @@ discard block |
||
694 | 721 | |
695 | 722 | newPostsHTML += \'<div class="windowbg\' + (++reply_counter % 2 == 0 ? \'2\' : \'\') + \'"><div id="msg\' + newPosts[i].getAttribute("id") + \'"><div class="floatleft"><h5>', $txt['posted_by'], ': \' + newPosts[i].getElementsByTagName("poster")[0].firstChild.nodeValue + \'</h5><span class="smalltext">« <strong>', $txt['on'], ':</strong> \' + newPosts[i].getElementsByTagName("time")[0].firstChild.nodeValue + \' »</span> <span class="new_posts" id="image_new_\' + newPosts[i].getAttribute("id") + \'">', $txt['new'], '</span></div>\';'; |
696 | 723 | |
697 | - if ($context['can_quote']) |
|
698 | - echo ' |
|
724 | + if ($context['can_quote']) { |
|
725 | + echo ' |
|
699 | 726 | newPostsHTML += \'<ul class="quickbuttons" id="msg_\' + newPosts[i].getAttribute("id") + \'_quote"><li><a href="#postmodify" onclick="return insertQuoteFast(\\\'\' + newPosts[i].getAttribute("id") + \'\\\');" class="quote_button"><span>', $txt['quote'], '</span><\' + \'/a></li></ul>\';'; |
727 | + } |
|
700 | 728 | |
701 | 729 | echo ' |
702 | 730 | newPostsHTML += \'<br class="clear">\'; |
@@ -739,8 +767,8 @@ discard block |
||
739 | 767 | }'; |
740 | 768 | |
741 | 769 | // Code for showing and hiding additional options. |
742 | - if (!empty($modSettings['additional_options_collapsable'])) |
|
743 | - echo ' |
|
770 | + if (!empty($modSettings['additional_options_collapsable'])) { |
|
771 | + echo ' |
|
744 | 772 | var oSwapAdditionalOptions = new smc_Toggle({ |
745 | 773 | bToggleEnabled: true, |
746 | 774 | bCurrentlyCollapsed: ', $context['show_additional_options'] ? 'false' : 'true', ', |
@@ -768,10 +796,11 @@ discard block |
||
768 | 796 | } |
769 | 797 | ] |
770 | 798 | });'; |
799 | + } |
|
771 | 800 | |
772 | 801 | // Code for showing and hiding drafts |
773 | - if (!empty($context['drafts'])) |
|
774 | - echo ' |
|
802 | + if (!empty($context['drafts'])) { |
|
803 | + echo ' |
|
775 | 804 | var oSwapDraftOptions = new smc_Toggle({ |
776 | 805 | bToggleEnabled: true, |
777 | 806 | bCurrentlyCollapsed: true, |
@@ -793,6 +822,7 @@ discard block |
||
793 | 822 | } |
794 | 823 | ] |
795 | 824 | });'; |
825 | + } |
|
796 | 826 | |
797 | 827 | echo ' |
798 | 828 | var oEditorID = "', $context['post_box_name'] ,'"; |
@@ -813,8 +843,9 @@ discard block |
||
813 | 843 | foreach ($context['previous_posts'] as $post) |
814 | 844 | { |
815 | 845 | $ignoring = false; |
816 | - if (!empty($post['is_ignored'])) |
|
817 | - $ignored_posts[] = $ignoring = $post['id']; |
|
846 | + if (!empty($post['is_ignored'])) { |
|
847 | + $ignored_posts[] = $ignoring = $post['id']; |
|
848 | + } |
|
818 | 849 | |
819 | 850 | echo ' |
820 | 851 | <div class="windowbg"> |
@@ -824,22 +855,24 @@ discard block |
||
824 | 855 | </h5> |
825 | 856 | - ', $post['time']; |
826 | 857 | |
827 | - if ($context['can_quote']) |
|
828 | - echo ' |
|
858 | + if ($context['can_quote']) { |
|
859 | + echo ' |
|
829 | 860 | <ul class="quickbuttons" id="msg_', $post['id'], '_quote"> |
830 | 861 | <li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'] ,'</a></li> |
831 | 862 | <li id="post_modify"><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');"><span class="generic_icons quote"></span>', $txt['quote'], '</a></li> |
832 | 863 | </ul>'; |
864 | + } |
|
833 | 865 | |
834 | 866 | echo ' |
835 | 867 | <br class="clear">'; |
836 | 868 | |
837 | - if ($ignoring) |
|
838 | - echo ' |
|
869 | + if ($ignoring) { |
|
870 | + echo ' |
|
839 | 871 | <div id="msg_', $post['id'], '_ignored_prompt" class="smalltext"> |
840 | 872 | ', $txt['ignoring_user'], ' |
841 | 873 | <a href="#" id="msg_', $post['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a> |
842 | 874 | </div>'; |
875 | + } |
|
843 | 876 | |
844 | 877 | echo ' |
845 | 878 | <div class="list_posts smalltext" id="msg_', $post['id'], '_body" data-msgid="', $post['id'], '">', $post['message'], '</div> |
@@ -993,10 +1026,10 @@ discard block |
||
993 | 1026 | <div id="temporary_posting_area" style="display: none;"></div> |
994 | 1027 | <script>'; |
995 | 1028 | |
996 | - if ($context['close_window']) |
|
997 | - echo ' |
|
1029 | + if ($context['close_window']) { |
|
1030 | + echo ' |
|
998 | 1031 | window.close();'; |
999 | - else |
|
1032 | + } else |
|
1000 | 1033 | { |
1001 | 1034 | // Lucky for us, Internet Explorer has an "innerText" feature which basically converts entities <--> text. Use it if possible ;) |
1002 | 1035 | echo ' |
@@ -1050,11 +1083,12 @@ discard block |
||
1050 | 1083 | </p> |
1051 | 1084 | <ul>'; |
1052 | 1085 | |
1053 | - foreach ($context['groups'] as $group) |
|
1054 | - echo ' |
|
1086 | + foreach ($context['groups'] as $group) { |
|
1087 | + echo ' |
|
1055 | 1088 | <li> |
1056 | 1089 | <label for="who_', $group['id'], '"><input type="checkbox" name="who[', $group['id'], ']" id="who_', $group['id'], '" value="', $group['id'], '" checked> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em> |
1057 | 1090 | </li>'; |
1091 | + } |
|
1058 | 1092 | |
1059 | 1093 | echo ' |
1060 | 1094 | <li> |