@@ -51,9 +51,10 @@ discard block |
||
| 51 | 51 | <dd> |
| 52 | 52 | <div id="known_themes_list">'; |
| 53 | 53 | |
| 54 | - foreach ($context['themes'] as $theme) |
|
| 55 | - echo ' |
|
| 54 | + foreach ($context['themes'] as $theme) { |
|
| 55 | + echo ' |
|
| 56 | 56 | <label for="options-known_themes_', $theme['id'], '"><input type="checkbox" name="options[known_themes][]" id="options-known_themes_', $theme['id'], '" value="', $theme['id'], '"', $theme['known'] ? ' checked' : '', '> ', $theme['name'], '</label><br>'; |
| 57 | + } |
|
| 57 | 58 | |
| 58 | 59 | echo ' |
| 59 | 60 | </div> |
@@ -70,9 +71,10 @@ discard block |
||
| 70 | 71 | <select name="options[theme_guests]" id="theme_guests">'; |
| 71 | 72 | |
| 72 | 73 | // Put an option for each theme in the select box. |
| 73 | - foreach ($context['themes'] as $theme) |
|
| 74 | - echo ' |
|
| 74 | + foreach ($context['themes'] as $theme) { |
|
| 75 | + echo ' |
|
| 75 | 76 | <option value="', $theme['id'], '"', $modSettings['theme_guests'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
| 77 | + } |
|
| 76 | 78 | |
| 77 | 79 | echo ' |
| 78 | 80 | </select> |
@@ -87,9 +89,10 @@ discard block |
||
| 87 | 89 | <option value="0">', $txt['theme_forum_default'], '</option>'; |
| 88 | 90 | |
| 89 | 91 | // Same thing, this time for changing the theme of everyone. |
| 90 | - foreach ($context['themes'] as $theme) |
|
| 91 | - echo ' |
|
| 92 | + foreach ($context['themes'] as $theme) { |
|
| 93 | + echo ' |
|
| 92 | 94 | <option value="', $theme['id'], '">', $theme['name'], '</option>'; |
| 95 | + } |
|
| 93 | 96 | |
| 94 | 97 | echo ' |
| 95 | 98 | </select> |
@@ -183,11 +186,12 @@ discard block |
||
| 183 | 186 | global $context, $scripturl, $txt; |
| 184 | 187 | |
| 185 | 188 | // Show a nice confirmation message. |
| 186 | - if (isset($_GET['done'])) |
|
| 187 | - echo ' |
|
| 189 | + if (isset($_GET['done'])) { |
|
| 190 | + echo ' |
|
| 188 | 191 | <div class="infobox"> |
| 189 | 192 | ', $txt['theme_confirmed_' . $_GET['done']], ' |
| 190 | 193 | </div>'; |
| 194 | + } |
|
| 191 | 195 | |
| 192 | 196 | echo ' |
| 193 | 197 | <div class="cat_bar"> |
@@ -344,11 +348,12 @@ discard block |
||
| 344 | 348 | if (empty($setting) || !is_array($setting)) |
| 345 | 349 | { |
| 346 | 350 | // Insert a separator (unless this is the first item in the list) |
| 347 | - if ($i !== $first_option_key) |
|
| 348 | - echo ' |
|
| 351 | + if ($i !== $first_option_key) { |
|
| 352 | + echo ' |
|
| 349 | 353 | </dl> |
| 350 | 354 | <hr> |
| 351 | 355 | <dl class="settings">'; |
| 356 | + } |
|
| 352 | 357 | |
| 353 | 358 | // Should we give a name to this section? |
| 354 | 359 | if (is_string($setting) && !empty($setting)) |
@@ -357,9 +362,9 @@ discard block |
||
| 357 | 362 | echo ' |
| 358 | 363 | <dt><strong>' . $setting . '</strong></dt> |
| 359 | 364 | <dd></dd>'; |
| 365 | + } else { |
|
| 366 | + $titled_section = false; |
|
| 360 | 367 | } |
| 361 | - else |
|
| 362 | - $titled_section = false; |
|
| 363 | 368 | |
| 364 | 369 | continue; |
| 365 | 370 | } |
@@ -368,8 +373,8 @@ discard block |
||
| 368 | 373 | <dt>'; |
| 369 | 374 | |
| 370 | 375 | // Show the change option box? |
| 371 | - if ($context['theme_options_reset']) |
|
| 372 | - echo ' |
|
| 376 | + if ($context['theme_options_reset']) { |
|
| 377 | + echo ' |
|
| 373 | 378 | <span class="floatleft"> |
| 374 | 379 | <select name="', !empty($setting['default']) ? 'default_' : '', 'options_master[', $setting['id'], ']" onchange="this.form.options_', $setting['id'], '.disabled = this.selectedIndex != 1;"> |
| 375 | 380 | <option value="0" selected>', $txt['themeadmin_reset_options_none'], '</option> |
@@ -377,23 +382,26 @@ discard block |
||
| 377 | 382 | <option value="2">', $txt['themeadmin_reset_options_default'], '</option> |
| 378 | 383 | </select> |
| 379 | 384 | </span>'; |
| 385 | + } |
|
| 380 | 386 | |
| 381 | 387 | echo ' |
| 382 | 388 | <label for="options_', $setting['id'], '">', !$titled_section ? '<strong>' : '', $setting['label'], !$titled_section ? '</strong>' : '', '</label>'; |
| 383 | 389 | |
| 384 | - if (isset($setting['description'])) |
|
| 385 | - echo ' |
|
| 390 | + if (isset($setting['description'])) { |
|
| 391 | + echo ' |
|
| 386 | 392 | <br> |
| 387 | 393 | <span class="smalltext">', $setting['description'], '</span>'; |
| 394 | + } |
|
| 388 | 395 | echo ' |
| 389 | 396 | </dt>'; |
| 390 | 397 | |
| 391 | 398 | // Display checkbox options |
| 392 | - if ($setting['type'] == 'checkbox') |
|
| 393 | - echo ' |
|
| 399 | + if ($setting['type'] == 'checkbox') { |
|
| 400 | + echo ' |
|
| 394 | 401 | <dd> |
| 395 | 402 | <input type="hidden" name="' . (!empty($setting['default']) ? 'default_' : '') . 'options[' . $setting['id'] . ']" value="0"> |
| 396 | 403 | <input type="checkbox" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', !empty($setting['value']) ? ' checked' : '', $context['theme_options_reset'] ? ' disabled' : '', ' value="1" class="floatleft">'; |
| 404 | + } |
|
| 397 | 405 | |
| 398 | 406 | // How about selection lists, we all love them |
| 399 | 407 | elseif ($setting['type'] == 'list') |
@@ -402,9 +410,10 @@ discard block |
||
| 402 | 410 | <dd> |
| 403 | 411 | <select class="floatleft" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', $context['theme_options_reset'] ? ' disabled' : '', '>'; |
| 404 | 412 | |
| 405 | - foreach ($setting['options'] as $value => $label) |
|
| 406 | - echo ' |
|
| 413 | + foreach ($setting['options'] as $value => $label) { |
|
| 414 | + echo ' |
|
| 407 | 415 | <option value="', $value, '"', $value == $setting['value'] ? ' selected' : '', '>', $label, '</option>'; |
| 416 | + } |
|
| 408 | 417 | |
| 409 | 418 | echo ' |
| 410 | 419 | </select>'; |
@@ -423,14 +432,13 @@ discard block |
||
| 423 | 432 | |
| 424 | 433 | echo ' |
| 425 | 434 | <input type="number"', $min . $max . $step; |
| 426 | - } |
|
| 427 | - elseif (isset($setting['type']) && $setting['type'] == 'url') |
|
| 428 | - echo' |
|
| 435 | + } elseif (isset($setting['type']) && $setting['type'] == 'url') { |
|
| 436 | + echo' |
|
| 429 | 437 | <input type="url"'; |
| 430 | - |
|
| 431 | - else |
|
| 432 | - echo ' |
|
| 438 | + } else { |
|
| 439 | + echo ' |
|
| 433 | 440 | <input type="text"'; |
| 441 | + } |
|
| 434 | 442 | |
| 435 | 443 | echo ' name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '" value="', $setting['value'], '"', $setting['type'] == 'number' ? ' size="5"' : '', $context['theme_options_reset'] ? ' disabled' : '', '>'; |
| 436 | 444 | } |
@@ -468,8 +476,8 @@ discard block |
||
| 468 | 476 | <div class="windowbg">'; |
| 469 | 477 | |
| 470 | 478 | // @todo Why can't I edit the default theme popup. |
| 471 | - if ($context['theme_settings']['theme_id'] != 1) |
|
| 472 | - echo ' |
|
| 479 | + if ($context['theme_settings']['theme_id'] != 1) { |
|
| 480 | + echo ' |
|
| 473 | 481 | <div class="title_bar"> |
| 474 | 482 | <h3 class="titlebg config_hd"> |
| 475 | 483 | ', $txt['theme_edit'], ' |
@@ -485,6 +493,7 @@ discard block |
||
| 485 | 493 | </li> |
| 486 | 494 | </ul> |
| 487 | 495 | </div>'; |
| 496 | + } |
|
| 488 | 497 | |
| 489 | 498 | echo ' |
| 490 | 499 | <div class="title_bar"> |
@@ -535,9 +544,10 @@ discard block |
||
| 535 | 544 | <dd> |
| 536 | 545 | <select id="variant" name="options[default_variant]" onchange="changeVariant(this.value)">'; |
| 537 | 546 | |
| 538 | - foreach ($context['theme_variants'] as $key => $variant) |
|
| 539 | - echo ' |
|
| 547 | + foreach ($context['theme_variants'] as $key => $variant) { |
|
| 548 | + echo ' |
|
| 540 | 549 | <option value="', $key, '"', $context['default_variant'] == $key ? ' selected' : '', '>', $variant['label'], '</option>'; |
| 550 | + } |
|
| 541 | 551 | |
| 542 | 552 | echo ' |
| 543 | 553 | </select> |
@@ -571,11 +581,12 @@ discard block |
||
| 571 | 581 | if (empty($setting) || !is_array($setting)) |
| 572 | 582 | { |
| 573 | 583 | // We don't need a separator before the first list element |
| 574 | - if ($i !== $first_setting_key) |
|
| 575 | - echo ' |
|
| 584 | + if ($i !== $first_setting_key) { |
|
| 585 | + echo ' |
|
| 576 | 586 | </dl> |
| 577 | 587 | <hr> |
| 578 | 588 | <dl class="settings">'; |
| 589 | + } |
|
| 579 | 590 | |
| 580 | 591 | // Add a fake heading? |
| 581 | 592 | if (is_string($setting) && !empty($setting)) |
@@ -584,9 +595,9 @@ discard block |
||
| 584 | 595 | echo ' |
| 585 | 596 | <dt><strong>' . $setting . '</strong></dt> |
| 586 | 597 | <dd></dd>'; |
| 598 | + } else { |
|
| 599 | + $titled_section = false; |
|
| 587 | 600 | } |
| 588 | - else |
|
| 589 | - $titled_section = false; |
|
| 590 | 601 | |
| 591 | 602 | continue; |
| 592 | 603 | } |
@@ -595,20 +606,22 @@ discard block |
||
| 595 | 606 | <dt> |
| 596 | 607 | <label for="', $setting['id'], '">', !$titled_section ? '<strong>' : '', $setting['label'], !$titled_section ? '</strong>' : '', '</label>:'; |
| 597 | 608 | |
| 598 | - if (isset($setting['description'])) |
|
| 599 | - echo '<br> |
|
| 609 | + if (isset($setting['description'])) { |
|
| 610 | + echo '<br> |
|
| 600 | 611 | <span class="smalltext">', $setting['description'], '</span>'; |
| 612 | + } |
|
| 601 | 613 | |
| 602 | 614 | echo ' |
| 603 | 615 | </dt>'; |
| 604 | 616 | |
| 605 | 617 | // A checkbox? |
| 606 | - if ($setting['type'] == 'checkbox') |
|
| 607 | - echo ' |
|
| 618 | + if ($setting['type'] == 'checkbox') { |
|
| 619 | + echo ' |
|
| 608 | 620 | <dd> |
| 609 | 621 | <input type="hidden" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" value="0"> |
| 610 | 622 | <input type="checkbox" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '"', !empty($setting['value']) ? ' checked' : '', ' value="1"> |
| 611 | 623 | </dd>'; |
| 624 | + } |
|
| 612 | 625 | |
| 613 | 626 | // A list with options? |
| 614 | 627 | elseif ($setting['type'] == 'list') |
@@ -617,9 +630,10 @@ discard block |
||
| 617 | 630 | <dd> |
| 618 | 631 | <select name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '">'; |
| 619 | 632 | |
| 620 | - foreach ($setting['options'] as $value => $label) |
|
| 621 | - echo ' |
|
| 633 | + foreach ($setting['options'] as $value => $label) { |
|
| 634 | + echo ' |
|
| 622 | 635 | <option value="', $value, '"', $value == $setting['value'] ? ' selected' : '', '>', $label, '</option>'; |
| 636 | + } |
|
| 623 | 637 | |
| 624 | 638 | echo ' |
| 625 | 639 | </select> |
@@ -647,14 +661,13 @@ discard block |
||
| 647 | 661 | |
| 648 | 662 | echo ' |
| 649 | 663 | <input type="number"', $min . $max . $step; |
| 650 | - } |
|
| 651 | - elseif (isset($setting['type']) && $setting['type'] == 'url') |
|
| 652 | - echo' |
|
| 664 | + } elseif (isset($setting['type']) && $setting['type'] == 'url') { |
|
| 665 | + echo' |
|
| 653 | 666 | <input type="url"'; |
| 654 | - |
|
| 655 | - else |
|
| 656 | - echo ' |
|
| 667 | + } else { |
|
| 668 | + echo ' |
|
| 657 | 669 | <input type="text"'; |
| 670 | + } |
|
| 658 | 671 | |
| 659 | 672 | echo ' name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '" value="', $setting['value'], '"', $setting['type'] == 'number' ? ' size="5"' : (empty($settings['size']) ? ' size="40"' : ' size="' . $setting['size'] . '"'), '> |
| 660 | 673 | </dd>'; |
@@ -726,9 +739,10 @@ discard block |
||
| 726 | 739 | <label for="variant', $theme['id'], '"><strong>', $theme['pick_label'], '</strong></label>: |
| 727 | 740 | <select id="variant', $theme['id'], '" name="vrt[', $theme['id'], ']" onchange="changeVariant', $theme['id'], '(this.value);">'; |
| 728 | 741 | |
| 729 | - foreach ($theme['variants'] as $key => $variant) |
|
| 730 | - echo ' |
|
| 742 | + foreach ($theme['variants'] as $key => $variant) { |
|
| 743 | + echo ' |
|
| 731 | 744 | <option value="', $key, '"', $theme['selected_variant'] == $key ? ' selected' : '', '>', $variant['label'], '</option>'; |
| 745 | + } |
|
| 732 | 746 | |
| 733 | 747 | echo ' |
| 734 | 748 | </select> |
@@ -805,21 +819,23 @@ discard block |
||
| 805 | 819 | <div class="windowbg">'; |
| 806 | 820 | |
| 807 | 821 | // Oops! there was an error :( |
| 808 | - if (!empty($context['error_message'])) |
|
| 809 | - echo ' |
|
| 822 | + if (!empty($context['error_message'])) { |
|
| 823 | + echo ' |
|
| 810 | 824 | <p> |
| 811 | 825 | ', $context['error_message'], ' |
| 812 | 826 | </p>'; |
| 827 | + } |
|
| 813 | 828 | |
| 814 | 829 | // Not much to show except a link back... |
| 815 | - else |
|
| 816 | - echo ' |
|
| 830 | + else { |
|
| 831 | + echo ' |
|
| 817 | 832 | <p> |
| 818 | 833 | <a href="', $scripturl, '?action=admin;area=theme;sa=list;th=', $context['installed_theme']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $context['installed_theme']['name'], '</a> ', $txt['theme_' . (isset($context['installed_theme']['updated']) ? 'updated' : 'installed') . '_message'], ' |
| 819 | 834 | </p> |
| 820 | 835 | <p> |
| 821 | 836 | <a href="', $scripturl, '?action=admin;area=theme;sa=admin;', $context['session_var'], '=', $context['session_id'], '">', $txt['back'], '</a> |
| 822 | 837 | </p>'; |
| 838 | + } |
|
| 823 | 839 | |
| 824 | 840 | echo ' |
| 825 | 841 | </div><!-- .windowbg -->'; |
@@ -884,11 +900,12 @@ discard block |
||
| 884 | 900 | <span class="floatleft">', $template['filename'], $template['already_exists'] ? ' <span class="error">(' . $txt['themeadmin_edit_exists'] . ')</span>' : '', '</span> |
| 885 | 901 | <span class="floatright">'; |
| 886 | 902 | |
| 887 | - if ($template['can_copy']) |
|
| 888 | - echo ' |
|
| 903 | + if ($template['can_copy']) { |
|
| 904 | + echo ' |
|
| 889 | 905 | <a href="', $scripturl, '?action=admin;area=theme;th=', $context['theme_id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=copy;template=', $template['value'], '" data-confirm="', $template['already_exists'] ? $txt['themeadmin_edit_overwrite_confirm'] : $txt['themeadmin_edit_copy_confirm'], '" class="you_sure">', $txt['themeadmin_edit_do_copy'], '</a>'; |
| 890 | - else |
|
| 891 | - echo $txt['themeadmin_edit_no_copy']; |
|
| 906 | + } else { |
|
| 907 | + echo $txt['themeadmin_edit_no_copy']; |
|
| 908 | + } |
|
| 892 | 909 | |
| 893 | 910 | echo ' |
| 894 | 911 | </span> |
@@ -907,11 +924,12 @@ discard block |
||
| 907 | 924 | { |
| 908 | 925 | global $context, $txt; |
| 909 | 926 | |
| 910 | - if (!empty($context['browse_title'])) |
|
| 911 | - echo ' |
|
| 927 | + if (!empty($context['browse_title'])) { |
|
| 928 | + echo ' |
|
| 912 | 929 | <div class="cat_bar"> |
| 913 | 930 | <h3 class="catbg">', $context['browse_title'], '</h3> |
| 914 | 931 | </div>'; |
| 932 | + } |
|
| 915 | 933 | |
| 916 | 934 | echo ' |
| 917 | 935 | <table class="table_grid tborder"> |
@@ -930,16 +948,15 @@ discard block |
||
| 930 | 948 | <tr class="windowbg"> |
| 931 | 949 | <td>'; |
| 932 | 950 | |
| 933 | - if ($file['is_editable']) |
|
| 934 | - echo ' |
|
| 951 | + if ($file['is_editable']) { |
|
| 952 | + echo ' |
|
| 935 | 953 | <a href="', $file['href'], '"', $file['is_template'] ? ' style="font-weight: bold;"' : '', '>', $file['filename'], '</a>'; |
| 936 | - |
|
| 937 | - elseif ($file['is_directory']) |
|
| 938 | - echo ' |
|
| 954 | + } elseif ($file['is_directory']) { |
|
| 955 | + echo ' |
|
| 939 | 956 | <a href="', $file['href'], '" class="is_directory"><span class="generic_icons folder"></span>', $file['filename'], '</a>'; |
| 940 | - |
|
| 941 | - else |
|
| 942 | - echo $file['filename']; |
|
| 957 | + } else { |
|
| 958 | + echo $file['filename']; |
|
| 959 | + } |
|
| 943 | 960 | |
| 944 | 961 | echo ' |
| 945 | 962 | </td> |
@@ -960,11 +977,12 @@ discard block |
||
| 960 | 977 | { |
| 961 | 978 | global $context, $settings, $scripturl, $txt; |
| 962 | 979 | |
| 963 | - if ($context['session_error']) |
|
| 964 | - echo ' |
|
| 980 | + if ($context['session_error']) { |
|
| 981 | + echo ' |
|
| 965 | 982 | <div class="errorbox"> |
| 966 | 983 | ', $txt['error_session_timeout'], ' |
| 967 | 984 | </div>'; |
| 985 | + } |
|
| 968 | 986 | |
| 969 | 987 | // From now on no one can complain that editing css is difficult. If you disagree, go to www.w3schools.com. |
| 970 | 988 | echo ' |
@@ -1027,17 +1045,18 @@ discard block |
||
| 1027 | 1045 | { |
| 1028 | 1046 | '; |
| 1029 | 1047 | |
| 1030 | - if (isBrowser('is_ie')) |
|
| 1031 | - echo ' |
|
| 1048 | + if (isBrowser('is_ie')) { |
|
| 1049 | + echo ' |
|
| 1032 | 1050 | var sheets = frames["css_preview_box"].document.styleSheets; |
| 1033 | 1051 | for (var j = 0; j < sheets.length; j++) |
| 1034 | 1052 | { |
| 1035 | 1053 | if (sheets[j].id == "css_preview_box") |
| 1036 | 1054 | sheets[j].cssText = document.forms.stylesheetForm.entire_file.value; |
| 1037 | 1055 | }'; |
| 1038 | - else |
|
| 1039 | - echo ' |
|
| 1056 | + } else { |
|
| 1057 | + echo ' |
|
| 1040 | 1058 | setInnerHTML(frames["css_preview_box"].document.getElementById("css_preview_sheet"), document.forms.stylesheetForm.entire_file.value);'; |
| 1059 | + } |
|
| 1041 | 1060 | echo ' |
| 1042 | 1061 | } |
| 1043 | 1062 | catch (e) |
@@ -1089,9 +1108,10 @@ discard block |
||
| 1089 | 1108 | </div> |
| 1090 | 1109 | <div class="windowbg">'; |
| 1091 | 1110 | |
| 1092 | - if (!$context['allow_save']) |
|
| 1093 | - echo ' |
|
| 1111 | + if (!$context['allow_save']) { |
|
| 1112 | + echo ' |
|
| 1094 | 1113 | ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br>'; |
| 1114 | + } |
|
| 1095 | 1115 | |
| 1096 | 1116 | echo ' |
| 1097 | 1117 | <textarea class="edit_file" name="entire_file" cols="80" rows="20" onkeyup="setPreviewTimeout();" onchange="refreshPreview(true);">', $context['entire_file'], '</textarea> |
@@ -1105,9 +1125,10 @@ discard block |
||
| 1105 | 1125 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
| 1106 | 1126 | |
| 1107 | 1127 | // Hopefully it exists. |
| 1108 | - if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) |
|
| 1109 | - echo ' |
|
| 1128 | + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) { |
|
| 1129 | + echo ' |
|
| 1110 | 1130 | <input type="hidden" name="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token_var'], '" value="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'], '">'; |
| 1131 | + } |
|
| 1111 | 1132 | |
| 1112 | 1133 | echo ' |
| 1113 | 1134 | </form>'; |
@@ -1120,18 +1141,20 @@ discard block |
||
| 1120 | 1141 | { |
| 1121 | 1142 | global $context, $scripturl, $txt; |
| 1122 | 1143 | |
| 1123 | - if ($context['session_error']) |
|
| 1124 | - echo ' |
|
| 1144 | + if ($context['session_error']) { |
|
| 1145 | + echo ' |
|
| 1125 | 1146 | <div class="errorbox"> |
| 1126 | 1147 | ', $txt['error_session_timeout'], ' |
| 1127 | 1148 | </div>'; |
| 1149 | + } |
|
| 1128 | 1150 | |
| 1129 | - if (isset($context['parse_error'])) |
|
| 1130 | - echo ' |
|
| 1151 | + if (isset($context['parse_error'])) { |
|
| 1152 | + echo ' |
|
| 1131 | 1153 | <div class="errorbox"> |
| 1132 | 1154 | ', $txt['themeadmin_edit_error'], ' |
| 1133 | 1155 | <div><pre>', $context['parse_error'], '</pre></div> |
| 1134 | 1156 | </div>'; |
| 1157 | + } |
|
| 1135 | 1158 | |
| 1136 | 1159 | // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) |
| 1137 | 1160 | echo ' |
@@ -1141,16 +1164,18 @@ discard block |
||
| 1141 | 1164 | </div> |
| 1142 | 1165 | <div class="windowbg">'; |
| 1143 | 1166 | |
| 1144 | - if (!$context['allow_save']) |
|
| 1145 | - echo ' |
|
| 1167 | + if (!$context['allow_save']) { |
|
| 1168 | + echo ' |
|
| 1146 | 1169 | ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br>'; |
| 1170 | + } |
|
| 1147 | 1171 | |
| 1148 | - foreach ($context['file_parts'] as $part) |
|
| 1149 | - echo ' |
|
| 1172 | + foreach ($context['file_parts'] as $part) { |
|
| 1173 | + echo ' |
|
| 1150 | 1174 | <label for="on_line', $part['line'], '">', $txt['themeadmin_edit_on_line'], ' ', $part['line'], '</label>:<br> |
| 1151 | 1175 | <div class="centertext"> |
| 1152 | 1176 | <textarea id="on_line', $part['line'], '" name="entire_file[]" cols="80" rows="', $part['lines'] > 14 ? '14' : $part['lines'], '" class="edit_file">', $part['data'], '</textarea> |
| 1153 | 1177 | </div>'; |
| 1178 | + } |
|
| 1154 | 1179 | |
| 1155 | 1180 | echo ' |
| 1156 | 1181 | <div class="padding righttext"> |
@@ -1159,9 +1184,10 @@ discard block |
||
| 1159 | 1184 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
| 1160 | 1185 | |
| 1161 | 1186 | // Hopefully it exists. |
| 1162 | - if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) |
|
| 1163 | - echo ' |
|
| 1187 | + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) { |
|
| 1188 | + echo ' |
|
| 1164 | 1189 | <input type="hidden" name="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token_var'], '" value="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'], '">'; |
| 1190 | + } |
|
| 1165 | 1191 | |
| 1166 | 1192 | echo ' |
| 1167 | 1193 | </div><!-- .righttext --> |
@@ -1176,18 +1202,20 @@ discard block |
||
| 1176 | 1202 | { |
| 1177 | 1203 | global $context, $scripturl, $txt; |
| 1178 | 1204 | |
| 1179 | - if ($context['session_error']) |
|
| 1180 | - echo ' |
|
| 1205 | + if ($context['session_error']) { |
|
| 1206 | + echo ' |
|
| 1181 | 1207 | <div class="errorbox"> |
| 1182 | 1208 | ', $txt['error_session_timeout'], ' |
| 1183 | 1209 | </div>'; |
| 1210 | + } |
|
| 1184 | 1211 | |
| 1185 | 1212 | // Is this file writeable? |
| 1186 | - if (!$context['allow_save']) |
|
| 1187 | - echo ' |
|
| 1213 | + if (!$context['allow_save']) { |
|
| 1214 | + echo ' |
|
| 1188 | 1215 | <div class="errorbox"> |
| 1189 | 1216 | ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], ' |
| 1190 | 1217 | </div>'; |
| 1218 | + } |
|
| 1191 | 1219 | |
| 1192 | 1220 | // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) |
| 1193 | 1221 | echo ' |
@@ -1202,9 +1230,10 @@ discard block |
||
| 1202 | 1230 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
| 1203 | 1231 | |
| 1204 | 1232 | // Hopefully it exists. |
| 1205 | - if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) |
|
| 1206 | - echo ' |
|
| 1233 | + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) { |
|
| 1234 | + echo ' |
|
| 1207 | 1235 | <input type="hidden" name="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token_var'], '" value="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'], '">'; |
| 1236 | + } |
|
| 1208 | 1237 | |
| 1209 | 1238 | echo ' |
| 1210 | 1239 | </div><!-- .windowbg --> |
@@ -54,9 +54,10 @@ discard block |
||
| 54 | 54 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
| 55 | 55 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0" checked onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
| 56 | 56 | |
| 57 | - if ($context['allow_protected']) |
|
| 58 | - echo ' |
|
| 57 | + if ($context['allow_protected']) { |
|
| 58 | + echo ' |
|
| 59 | 59 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
| 60 | + } |
|
| 60 | 61 | |
| 61 | 62 | echo ' |
| 62 | 63 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -66,14 +67,15 @@ discard block |
||
| 66 | 67 | </dd>'; |
| 67 | 68 | } |
| 68 | 69 | |
| 69 | - if ($context['post_group'] || $context['undefined_group']) |
|
| 70 | - echo ' |
|
| 70 | + if ($context['post_group'] || $context['undefined_group']) { |
|
| 71 | + echo ' |
|
| 71 | 72 | <dt id="min_posts_text"> |
| 72 | 73 | <strong>', $txt['membergroups_min_posts'], ':</strong> |
| 73 | 74 | </dt> |
| 74 | 75 | <dd> |
| 75 | 76 | <input type="number" name="min_posts" id="min_posts_input" size="5"> |
| 76 | 77 | </dd>'; |
| 78 | + } |
|
| 77 | 79 | |
| 78 | 80 | if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups'])) |
| 79 | 81 | { |
@@ -91,9 +93,10 @@ discard block |
||
| 91 | 93 | <option value="-1">', $txt['membergroups_guests'], '</option> |
| 92 | 94 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
| 93 | 95 | |
| 94 | - foreach ($context['groups'] as $group) |
|
| 95 | - echo ' |
|
| 96 | + foreach ($context['groups'] as $group) { |
|
| 97 | + echo ' |
|
| 96 | 98 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
| 99 | + } |
|
| 97 | 100 | |
| 98 | 101 | echo ' |
| 99 | 102 | </select> |
@@ -104,9 +107,10 @@ discard block |
||
| 104 | 107 | <option value="-1">', $txt['membergroups_guests'], '</option> |
| 105 | 108 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
| 106 | 109 | |
| 107 | - foreach ($context['groups'] as $group) |
|
| 108 | - echo ' |
|
| 110 | + foreach ($context['groups'] as $group) { |
|
| 111 | + echo ' |
|
| 109 | 112 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
| 113 | + } |
|
| 110 | 114 | |
| 111 | 115 | echo ' |
| 112 | 116 | </select> |
@@ -138,8 +142,8 @@ discard block |
||
| 138 | 142 | <input type="submit" value="', $txt['membergroups_add_group'], '" class="button"> |
| 139 | 143 | </div><!-- .windowbg -->'; |
| 140 | 144 | |
| 141 | - if ($context['undefined_group']) |
|
| 142 | - echo ' |
|
| 145 | + if ($context['undefined_group']) { |
|
| 146 | + echo ' |
|
| 143 | 147 | <script> |
| 144 | 148 | function swapPostGroup(isChecked) |
| 145 | 149 | { |
@@ -149,6 +153,7 @@ discard block |
||
| 149 | 153 | } |
| 150 | 154 | swapPostGroup(', $context['post_group'] ? 'true' : 'false', '); |
| 151 | 155 | </script>'; |
| 156 | + } |
|
| 152 | 157 | |
| 153 | 158 | echo ' |
| 154 | 159 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -178,14 +183,15 @@ discard block |
||
| 178 | 183 | <input type="text" name="group_name" id="group_name_input" value="', $context['group']['editable_name'], '" size="30"> |
| 179 | 184 | </dd>'; |
| 180 | 185 | |
| 181 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
| 182 | - echo ' |
|
| 186 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
| 187 | + echo ' |
|
| 183 | 188 | <dt id="group_desc_text"> |
| 184 | 189 | <label for="group_desc_input"><strong>', $txt['membergroups_edit_desc'], ':</strong></label> |
| 185 | 190 | </dt> |
| 186 | 191 | <dd> |
| 187 | 192 | <textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea> |
| 188 | 193 | </dd>'; |
| 194 | + } |
|
| 189 | 195 | |
| 190 | 196 | // Group type... |
| 191 | 197 | if ($context['group']['allow_post_group']) |
@@ -199,9 +205,10 @@ discard block |
||
| 199 | 205 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
| 200 | 206 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0"', !$context['group']['is_post_group'] && $context['group']['type'] == 0 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
| 201 | 207 | |
| 202 | - if ($context['group']['allow_protected']) |
|
| 203 | - echo ' |
|
| 208 | + if ($context['group']['allow_protected']) { |
|
| 209 | + echo ' |
|
| 204 | 210 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1"', $context['group']['type'] == 1 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
| 211 | + } |
|
| 205 | 212 | |
| 206 | 213 | echo ' |
| 207 | 214 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2"', $context['group']['type'] == 2 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -211,8 +218,8 @@ discard block |
||
| 211 | 218 | </dd>'; |
| 212 | 219 | } |
| 213 | 220 | |
| 214 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
| 215 | - echo ' |
|
| 221 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
| 222 | + echo ' |
|
| 216 | 223 | <dt id="group_moderators_text"> |
| 217 | 224 | <label for="group_moderators"><strong>', $txt['moderators'], ':</strong></label> |
| 218 | 225 | </dt> |
@@ -230,6 +237,7 @@ discard block |
||
| 230 | 237 | <option value="2"', $context['group']['hidden'] == 2 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_all'], '</option> |
| 231 | 238 | </select> |
| 232 | 239 | </dd>'; |
| 240 | + } |
|
| 233 | 241 | |
| 234 | 242 | // Can they inherit permissions? |
| 235 | 243 | if ($context['group']['id'] > 1 && $context['group']['id'] != 3) |
@@ -246,9 +254,10 @@ discard block |
||
| 246 | 254 | <option value="0"', $context['group']['inherited_from'] == 0 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>'; |
| 247 | 255 | |
| 248 | 256 | // For all the inheritable groups show an option. |
| 249 | - foreach ($context['inheritable_groups'] as $id => $group) |
|
| 250 | - echo ' |
|
| 257 | + foreach ($context['inheritable_groups'] as $id => $group) { |
|
| 258 | + echo ' |
|
| 251 | 259 | <option value="', $id, '"', $context['group']['inherited_from'] == $id ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>'; |
| 260 | + } |
|
| 252 | 261 | |
| 253 | 262 | echo ' |
| 254 | 263 | </select> |
@@ -256,8 +265,8 @@ discard block |
||
| 256 | 265 | </dd>'; |
| 257 | 266 | } |
| 258 | 267 | |
| 259 | - if ($context['group']['allow_post_group']) |
|
| 260 | - echo ' |
|
| 268 | + if ($context['group']['allow_post_group']) { |
|
| 269 | + echo ' |
|
| 261 | 270 | |
| 262 | 271 | <dt id="min_posts_text"> |
| 263 | 272 | <label for="min_posts_input"><strong>', $txt['membergroups_min_posts'], ':</strong></label> |
@@ -265,6 +274,7 @@ discard block |
||
| 265 | 274 | <dd> |
| 266 | 275 | <input type="number" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6"> |
| 267 | 276 | </dd>'; |
| 277 | + } |
|
| 268 | 278 | |
| 269 | 279 | echo ' |
| 270 | 280 | <dt> |
@@ -294,9 +304,10 @@ discard block |
||
| 294 | 304 | <select name="icon_image" id="icon_image_input">'; |
| 295 | 305 | |
| 296 | 306 | // For every possible icon, create an option. |
| 297 | - foreach ($context['possible_icons'] as $icon) |
|
| 298 | - echo ' |
|
| 307 | + foreach ($context['possible_icons'] as $icon) { |
|
| 308 | + echo ' |
|
| 299 | 309 | <option value="', $icon, '"', $context['group']['icon_image'] == $icon ? ' selected' : '', '>', $icon, '</option>'; |
| 310 | + } |
|
| 300 | 311 | |
| 301 | 312 | echo ' |
| 302 | 313 | </select> |
@@ -305,9 +316,10 @@ discard block |
||
| 305 | 316 | } |
| 306 | 317 | |
| 307 | 318 | // No? Hide the entire control. |
| 308 | - else |
|
| 309 | - echo ' |
|
| 319 | + else { |
|
| 320 | + echo ' |
|
| 310 | 321 | <input type="hidden" name="icon_image" value="">'; |
| 322 | + } |
|
| 311 | 323 | |
| 312 | 324 | echo ' |
| 313 | 325 | <dt> |
@@ -319,8 +331,8 @@ discard block |
||
| 319 | 331 | </dd>'; |
| 320 | 332 | |
| 321 | 333 | // Force 2FA for this membergroup? |
| 322 | - if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) |
|
| 323 | - echo ' |
|
| 334 | + if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) { |
|
| 335 | + echo ' |
|
| 324 | 336 | <dt> |
| 325 | 337 | <label for="group_tfa_force_input"><strong>', $txt['membergroups_tfa_force'], ':</strong></label><br> |
| 326 | 338 | <span class="smalltext">', $txt['membergroups_tfa_force_note'], '</span> |
@@ -328,6 +340,7 @@ discard block |
||
| 328 | 340 | <dd> |
| 329 | 341 | <input type="checkbox" name="group_tfa_force"', $context['group']['tfa_required'] ? ' checked' : '', '> |
| 330 | 342 | </dd>'; |
| 343 | + } |
|
| 331 | 344 | |
| 332 | 345 | if (!empty($context['categories'])) |
| 333 | 346 | { |
@@ -338,11 +351,11 @@ discard block |
||
| 338 | 351 | </dt> |
| 339 | 352 | <dd>'; |
| 340 | 353 | |
| 341 | - if (!empty($context['can_manage_boards'])) |
|
| 342 | - echo $txt['membergroups_can_manage_access']; |
|
| 343 | - |
|
| 344 | - else |
|
| 345 | - template_add_edit_group_boards_list(); |
|
| 354 | + if (!empty($context['can_manage_boards'])) { |
|
| 355 | + echo $txt['membergroups_can_manage_access']; |
|
| 356 | + } else { |
|
| 357 | + template_add_edit_group_boards_list(); |
|
| 358 | + } |
|
| 346 | 359 | |
| 347 | 360 | echo ' |
| 348 | 361 | </dd>'; |
@@ -371,20 +384,21 @@ discard block |
||
| 371 | 384 | sItemListContainerId: \'moderator_container\', |
| 372 | 385 | aListItems: ['; |
| 373 | 386 | |
| 374 | - foreach ($context['group']['moderators'] as $id_member => $member_name) |
|
| 375 | - echo ' |
|
| 387 | + foreach ($context['group']['moderators'] as $id_member => $member_name) { |
|
| 388 | + echo ' |
|
| 376 | 389 | { |
| 377 | 390 | sItemId: ', JavaScriptEscape($id_member), ', |
| 378 | 391 | sItemName: ', JavaScriptEscape($member_name), ' |
| 379 | 392 | }', $id_member == $context['group']['last_moderator_id'] ? '' : ','; |
| 393 | + } |
|
| 380 | 394 | |
| 381 | 395 | echo ' |
| 382 | 396 | ] |
| 383 | 397 | }); |
| 384 | 398 | </script>'; |
| 385 | 399 | |
| 386 | - if ($context['group']['allow_post_group']) |
|
| 387 | - echo ' |
|
| 400 | + if ($context['group']['allow_post_group']) { |
|
| 401 | + echo ' |
|
| 388 | 402 | <script> |
| 389 | 403 | function swapPostGroup(isChecked) |
| 390 | 404 | { |
@@ -432,7 +446,8 @@ discard block |
||
| 432 | 446 | |
| 433 | 447 | swapPostGroup(', $context['group']['is_post_group'] ? 'true' : 'false', '); |
| 434 | 448 | </script>'; |
| 435 | -} |
|
| 449 | + } |
|
| 450 | + } |
|
| 436 | 451 | |
| 437 | 452 | /** |
| 438 | 453 | * The template for determining which boards a group has access to. |
@@ -450,13 +465,13 @@ discard block |
||
| 450 | 465 | |
| 451 | 466 | foreach ($context['categories'] as $category) |
| 452 | 467 | { |
| 453 | - if (empty($modSettings['deny_boards_access'])) |
|
| 454 | - echo ' |
|
| 468 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 469 | + echo ' |
|
| 455 | 470 | <li class="category"> |
| 456 | 471 | <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'new_group\'); return false;"><strong>', $category['name'], '</strong></a> |
| 457 | 472 | <ul>'; |
| 458 | - else |
|
| 459 | - echo ' |
|
| 473 | + } else { |
|
| 474 | + echo ' |
|
| 460 | 475 | <li class="category"> |
| 461 | 476 | <strong>', $category['name'], '</strong> |
| 462 | 477 | <span class="select_all_box"> |
@@ -469,16 +484,17 @@ discard block |
||
| 469 | 484 | </select> |
| 470 | 485 | </span> |
| 471 | 486 | <ul id="boards_list_', $category['id'], '">'; |
| 487 | + } |
|
| 472 | 488 | |
| 473 | 489 | foreach ($category['boards'] as $board) |
| 474 | 490 | { |
| 475 | - if (empty($modSettings['deny_boards_access'])) |
|
| 476 | - echo ' |
|
| 491 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 492 | + echo ' |
|
| 477 | 493 | <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"> |
| 478 | 494 | <input type="checkbox" name="boardaccess[', $board['id'], ']" id="brd', $board['id'], '" value="allow"', $board['allow'] ? ' checked' : '', '> <label for="brd', $board['id'], '">', $board['name'], '</label> |
| 479 | 495 | </li>'; |
| 480 | - else |
|
| 481 | - echo ' |
|
| 496 | + } else { |
|
| 497 | + echo ' |
|
| 482 | 498 | <li class="board" style="width:100%"> |
| 483 | 499 | <span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span> |
| 484 | 500 | <span style="width:50%;float:right"> |
@@ -487,6 +503,7 @@ discard block |
||
| 487 | 503 | <input type="radio" name="boardaccess[', $board['id'], ']" id="deny_brd', $board['id'], '" value="deny"', $board['deny'] ? ' checked' : '', '> <label for="deny_brd', $board['id'], '">', $txt['permissions_option_deny'], '</label> |
| 488 | 504 | </span> |
| 489 | 505 | </li>'; |
| 506 | + } |
|
| 490 | 507 | } |
| 491 | 508 | |
| 492 | 509 | echo ' |
@@ -497,14 +514,14 @@ discard block |
||
| 497 | 514 | echo ' |
| 498 | 515 | </ul>'; |
| 499 | 516 | |
| 500 | - if (empty($modSettings['deny_boards_access'])) |
|
| 501 | - echo ' |
|
| 517 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 518 | + echo ' |
|
| 502 | 519 | <br class="clear"><br> |
| 503 | 520 | <input type="checkbox" id="checkall_check" onclick="invertAll(this, this.form, \'boardaccess\');"> |
| 504 | 521 | <label for="checkall_check"><em>', $txt['check_all'], '</em></label> |
| 505 | 522 | </fieldset>'; |
| 506 | - else |
|
| 507 | - echo ' |
|
| 523 | + } else { |
|
| 524 | + echo ' |
|
| 508 | 525 | <br class="clear"> |
| 509 | 526 | <span class="select_all_box"> |
| 510 | 527 | <em>', $txt['all'], ': </em> |
@@ -520,15 +537,17 @@ discard block |
||
| 520 | 537 | }); |
| 521 | 538 | }); |
| 522 | 539 | </script>'; |
| 540 | + } |
|
| 523 | 541 | |
| 524 | - if ($collapse) |
|
| 525 | - echo ' |
|
| 542 | + if ($collapse) { |
|
| 543 | + echo ' |
|
| 526 | 544 | <a href="javascript:void(0);" onclick="document.getElementById(\'visible_boards\').style.display = \'block\'; document.getElementById(\'visible_boards_link\').style.display = \'none\'; return false;" id="visible_boards_link" style="display: none;">[ ', $txt['membergroups_select_visible_boards'], ' ]</a> |
| 527 | 545 | <script> |
| 528 | 546 | document.getElementById("visible_boards_link").style.display = ""; |
| 529 | 547 | document.getElementById("visible_boards").style.display = "none"; |
| 530 | 548 | </script>'; |
| 531 | -} |
|
| 549 | + } |
|
| 550 | + } |
|
| 532 | 551 | |
| 533 | 552 | /** |
| 534 | 553 | * Templatine for viewing the members of a group. |
@@ -552,14 +571,15 @@ discard block |
||
| 552 | 571 | </dd>'; |
| 553 | 572 | |
| 554 | 573 | // Any description to show? |
| 555 | - if (!empty($context['group']['description'])) |
|
| 556 | - echo ' |
|
| 574 | + if (!empty($context['group']['description'])) { |
|
| 575 | + echo ' |
|
| 557 | 576 | <dt> |
| 558 | 577 | <strong>' . $txt['membergroups_members_description'] . ':</strong> |
| 559 | 578 | </dt> |
| 560 | 579 | <dd> |
| 561 | 580 | ', $context['group']['description'], ' |
| 562 | 581 | </dd>'; |
| 582 | + } |
|
| 563 | 583 | |
| 564 | 584 | echo ' |
| 565 | 585 | <dt> |
@@ -573,8 +593,9 @@ discard block |
||
| 573 | 593 | if (!empty($context['group']['moderators'])) |
| 574 | 594 | { |
| 575 | 595 | $moderators = array(); |
| 576 | - foreach ($context['group']['moderators'] as $moderator) |
|
| 577 | - $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
| 596 | + foreach ($context['group']['moderators'] as $moderator) { |
|
| 597 | + $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
| 598 | + } |
|
| 578 | 599 | |
| 579 | 600 | echo ' |
| 580 | 601 | <dt> |
@@ -599,9 +620,10 @@ discard block |
||
| 599 | 620 | <tr class="title_bar"> |
| 600 | 621 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
| 601 | 622 | |
| 602 | - if ($context['can_send_email']) |
|
| 603 | - echo ' |
|
| 623 | + if ($context['can_send_email']) { |
|
| 624 | + echo ' |
|
| 604 | 625 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=email', $context['sort_by'] == 'email' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['email'], $context['sort_by'] == 'email' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
| 626 | + } |
|
| 605 | 627 | |
| 606 | 628 | echo ' |
| 607 | 629 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
@@ -610,20 +632,22 @@ discard block |
||
| 610 | 632 | <a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a> |
| 611 | 633 | </th>'; |
| 612 | 634 | |
| 613 | - if (!empty($context['group']['assignable'])) |
|
| 614 | - echo ' |
|
| 635 | + if (!empty($context['group']['assignable'])) { |
|
| 636 | + echo ' |
|
| 615 | 637 | <th style="width: 4%"><input type="checkbox" onclick="invertAll(this, this.form);"></th>'; |
| 638 | + } |
|
| 616 | 639 | |
| 617 | 640 | echo ' |
| 618 | 641 | </tr> |
| 619 | 642 | </thead> |
| 620 | 643 | <tbody>'; |
| 621 | 644 | |
| 622 | - if (empty($context['members'])) |
|
| 623 | - echo ' |
|
| 645 | + if (empty($context['members'])) { |
|
| 646 | + echo ' |
|
| 624 | 647 | <tr class="windowbg"> |
| 625 | 648 | <td colspan="6">', $txt['membergroups_members_no_members'], '</td> |
| 626 | 649 | </tr>'; |
| 650 | + } |
|
| 627 | 651 | |
| 628 | 652 | foreach ($context['members'] as $member) |
| 629 | 653 | { |
@@ -631,20 +655,22 @@ discard block |
||
| 631 | 655 | <tr class="windowbg"> |
| 632 | 656 | <td>', $member['name'], '</td>'; |
| 633 | 657 | |
| 634 | - if ($context['can_send_email']) |
|
| 635 | - echo ' |
|
| 658 | + if ($context['can_send_email']) { |
|
| 659 | + echo ' |
|
| 636 | 660 | <td> |
| 637 | 661 | <a href="mailto:', $member['email'], '">', $member['email'], '</a> |
| 638 | 662 | </td>'; |
| 663 | + } |
|
| 639 | 664 | |
| 640 | 665 | echo ' |
| 641 | 666 | <td>', $member['last_online'], '</td> |
| 642 | 667 | <td>', $member['registered'], '</td> |
| 643 | 668 | <td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>'; |
| 644 | 669 | |
| 645 | - if (!empty($context['group']['assignable'])) |
|
| 646 | - echo ' |
|
| 670 | + if (!empty($context['group']['assignable'])) { |
|
| 671 | + echo ' |
|
| 647 | 672 | <td style="width: 4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>'; |
| 673 | + } |
|
| 648 | 674 | |
| 649 | 675 | echo ' |
| 650 | 676 | </tr>'; |
@@ -654,11 +680,12 @@ discard block |
||
| 654 | 680 | </tbody> |
| 655 | 681 | </table>'; |
| 656 | 682 | |
| 657 | - if (!empty($context['group']['assignable'])) |
|
| 658 | - echo ' |
|
| 683 | + if (!empty($context['group']['assignable'])) { |
|
| 684 | + echo ' |
|
| 659 | 685 | <div class="floatright"> |
| 660 | 686 | <input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button "> |
| 661 | 687 | </div>'; |
| 688 | + } |
|
| 662 | 689 | |
| 663 | 690 | echo ' |
| 664 | 691 | <div class="pagesection flow_hidden"> |
@@ -666,8 +693,8 @@ discard block |
||
| 666 | 693 | </div> |
| 667 | 694 | <br>'; |
| 668 | 695 | |
| 669 | - if (!empty($context['group']['assignable'])) |
|
| 670 | - echo ' |
|
| 696 | + if (!empty($context['group']['assignable'])) { |
|
| 697 | + echo ' |
|
| 671 | 698 | <div class="cat_bar"> |
| 672 | 699 | <h3 class="catbg">', $txt['membergroups_members_add_title'], '</h3> |
| 673 | 700 | </div> |
@@ -683,14 +710,15 @@ discard block |
||
| 683 | 710 | </dl> |
| 684 | 711 | <input type="submit" name="add" value="', $txt['membergroups_members_add'], '" class="button"> |
| 685 | 712 | </div>'; |
| 713 | + } |
|
| 686 | 714 | |
| 687 | 715 | echo ' |
| 688 | 716 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 689 | 717 | <input type="hidden" name="', $context['mod-mgm_token_var'], '" value="', $context['mod-mgm_token'], '"> |
| 690 | 718 | </form>'; |
| 691 | 719 | |
| 692 | - if (!empty($context['group']['assignable'])) |
|
| 693 | - echo ' |
|
| 720 | + if (!empty($context['group']['assignable'])) { |
|
| 721 | + echo ' |
|
| 694 | 722 | <script> |
| 695 | 723 | var oAddMemberSuggest = new smc_AutoSuggest({ |
| 696 | 724 | sSelf: \'oAddMemberSuggest\', |
@@ -706,7 +734,8 @@ discard block |
||
| 706 | 734 | sItemListContainerId: \'toAddItemContainer\' |
| 707 | 735 | }); |
| 708 | 736 | </script>'; |
| 709 | -} |
|
| 737 | + } |
|
| 738 | + } |
|
| 710 | 739 | |
| 711 | 740 | /** |
| 712 | 741 | * Allow the moderator to enter a reason to each user being rejected. |
@@ -726,8 +755,8 @@ discard block |
||
| 726 | 755 | <dl class="settings">'; |
| 727 | 756 | |
| 728 | 757 | // Loop through and print out a reason box for each... |
| 729 | - foreach ($context['group_requests'] as $request) |
|
| 730 | - echo ' |
|
| 758 | + foreach ($context['group_requests'] as $request) { |
|
| 759 | + echo ' |
|
| 731 | 760 | <dt> |
| 732 | 761 | <strong>', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</strong> |
| 733 | 762 | </dt> |
@@ -735,6 +764,7 @@ discard block |
||
| 735 | 764 | <input type="hidden" name="groupr[]" value="', $request['id'], '"> |
| 736 | 765 | <textarea name="groupreason[', $request['id'], ']" rows="3" cols="40"></textarea> |
| 737 | 766 | </dd>'; |
| 767 | + } |
|
| 738 | 768 | |
| 739 | 769 | echo ' |
| 740 | 770 | </dl> |
@@ -30,25 +30,27 @@ discard block |
||
| 30 | 30 | </div> |
| 31 | 31 | <div class="information">'; |
| 32 | 32 | |
| 33 | - if ($context['is_installed']) |
|
| 34 | - echo ' |
|
| 33 | + if ($context['is_installed']) { |
|
| 34 | + echo ' |
|
| 35 | 35 | <strong>', $txt['package_installed_warning1'], '</strong><br> |
| 36 | 36 | <br> |
| 37 | 37 | ', $txt['package_installed_warning2'], '<br> |
| 38 | 38 | <br>'; |
| 39 | + } |
|
| 39 | 40 | |
| 40 | 41 | echo $txt['package_installed_warning3'], ' |
| 41 | 42 | </div> |
| 42 | 43 | <br>'; |
| 43 | 44 | |
| 44 | 45 | // Do errors exist in the install? If so light them up like a christmas tree. |
| 45 | - if ($context['has_failure']) |
|
| 46 | - echo ' |
|
| 46 | + if ($context['has_failure']) { |
|
| 47 | + echo ' |
|
| 47 | 48 | <div class="errorbox"> |
| 48 | 49 | ', sprintf($txt['package_will_fail_title'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), '<br> |
| 49 | 50 | ', sprintf($txt['package_will_fail_warning'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), |
| 50 | 51 | !empty($context['failure_details']) ? '<br><br><strong>' . $context['failure_details'] . '</strong>' : '', ' |
| 51 | 52 | </div>'; |
| 53 | + } |
|
| 52 | 54 | |
| 53 | 55 | // Display the package readme if one exists |
| 54 | 56 | if (isset($context['package_readme'])) |
@@ -62,9 +64,10 @@ discard block |
||
| 62 | 64 | <span class="floatright">', $txt['package_available_readme_language'], ' |
| 63 | 65 | <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\'));">'; |
| 64 | 66 | |
| 65 | - foreach ($context['readmes'] as $a => $b) |
|
| 66 | - echo ' |
|
| 67 | + foreach ($context['readmes'] as $a => $b) { |
|
| 68 | + echo ' |
|
| 67 | 69 | <option value="', $b, '"', $a === 'selected' ? ' selected' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>'; |
| 70 | + } |
|
| 68 | 71 | |
| 69 | 72 | echo ' |
| 70 | 73 | </select> |
@@ -85,9 +88,10 @@ discard block |
||
| 85 | 88 | <span class="floatright">', $txt['package_available_license_language'], ' |
| 86 | 89 | <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\'));">'; |
| 87 | 90 | |
| 88 | - foreach ($context['licenses'] as $a => $b) |
|
| 89 | - echo ' |
|
| 91 | + foreach ($context['licenses'] as $a => $b) { |
|
| 92 | + echo ' |
|
| 90 | 93 | <option value="', $b, '"', $a === 'selected' ? ' selected' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>'; |
| 94 | + } |
|
| 91 | 95 | echo ' |
| 92 | 96 | </select> |
| 93 | 97 | </span> |
@@ -114,9 +118,10 @@ discard block |
||
| 114 | 118 | ', $txt['package_db_uninstall_actions'], ': |
| 115 | 119 | <ul>'; |
| 116 | 120 | |
| 117 | - foreach ($context['database_changes'] as $change) |
|
| 118 | - echo ' |
|
| 121 | + foreach ($context['database_changes'] as $change) { |
|
| 122 | + echo ' |
|
| 119 | 123 | <li>', $change, '</li>'; |
| 124 | + } |
|
| 120 | 125 | |
| 121 | 126 | echo ' |
| 122 | 127 | </ul> |
@@ -127,14 +132,14 @@ discard block |
||
| 127 | 132 | echo ' |
| 128 | 133 | <div class="information">'; |
| 129 | 134 | |
| 130 | - if (empty($context['actions']) && empty($context['database_changes'])) |
|
| 131 | - echo ' |
|
| 135 | + if (empty($context['actions']) && empty($context['database_changes'])) { |
|
| 136 | + echo ' |
|
| 132 | 137 | <br> |
| 133 | 138 | <div class="errorbox"> |
| 134 | 139 | ', $txt['corrupt_compatible'], ' |
| 135 | 140 | </div> |
| 136 | 141 | </div><!-- .information -->'; |
| 137 | - else |
|
| 142 | + } else |
|
| 138 | 143 | { |
| 139 | 144 | echo ' |
| 140 | 145 | ', $txt['perform_actions'], ' |
@@ -238,9 +243,10 @@ discard block |
||
| 238 | 243 | <td></td> |
| 239 | 244 | <td>'; |
| 240 | 245 | |
| 241 | - if (!empty($context['themes_locked'])) |
|
| 242 | - echo ' |
|
| 246 | + if (!empty($context['themes_locked'])) { |
|
| 247 | + echo ' |
|
| 243 | 248 | <input type="hidden" name="custom_theme[]" value="', $id, '">'; |
| 249 | + } |
|
| 244 | 250 | echo ' |
| 245 | 251 | <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' : '', '> |
| 246 | 252 | </td> |
@@ -306,21 +312,23 @@ discard block |
||
| 306 | 312 | } |
| 307 | 313 | |
| 308 | 314 | // Are we effectively ready to install? |
| 309 | - if (!$context['ftp_needed'] && (!empty($context['actions']) || !empty($context['database_changes']))) |
|
| 310 | - echo ' |
|
| 315 | + if (!$context['ftp_needed'] && (!empty($context['actions']) || !empty($context['database_changes']))) { |
|
| 316 | + echo ' |
|
| 311 | 317 | <div class="righttext padding"> |
| 312 | 318 | <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"> |
| 313 | 319 | </div>'; |
| 320 | + } |
|
| 314 | 321 | |
| 315 | 322 | // If we need ftp information then demand it! |
| 316 | - elseif ($context['ftp_needed']) |
|
| 317 | - echo ' |
|
| 323 | + elseif ($context['ftp_needed']) { |
|
| 324 | + echo ' |
|
| 318 | 325 | <div class="cat_bar"> |
| 319 | 326 | <h3 class="catbg">', $txt['package_ftp_necessary'], '</h3> |
| 320 | 327 | </div> |
| 321 | 328 | <div> |
| 322 | 329 | ', template_control_chmod(), ' |
| 323 | 330 | </div>'; |
| 331 | + } |
|
| 324 | 332 | |
| 325 | 333 | echo ' |
| 326 | 334 | |
@@ -336,8 +344,8 @@ discard block |
||
| 336 | 344 | // Operations. |
| 337 | 345 | if (!empty($js_operations)) |
| 338 | 346 | { |
| 339 | - foreach ($js_operations as $key => $operation) |
|
| 340 | - echo ' |
|
| 347 | + foreach ($js_operations as $key => $operation) { |
|
| 348 | + echo ' |
|
| 341 | 349 | aOperationElements[', $key, '] = new smc_Toggle({ |
| 342 | 350 | bToggleEnabled: true, |
| 343 | 351 | bNoAnimate: true, |
@@ -355,6 +363,7 @@ discard block |
||
| 355 | 363 | } |
| 356 | 364 | ] |
| 357 | 365 | });'; |
| 366 | + } |
|
| 358 | 367 | } |
| 359 | 368 | |
| 360 | 369 | echo ' |
@@ -376,14 +385,15 @@ discard block |
||
| 376 | 385 | </script>'; |
| 377 | 386 | |
| 378 | 387 | // And a bit more for database changes. |
| 379 | - if (!empty($context['database_changes'])) |
|
| 380 | - echo ' |
|
| 388 | + if (!empty($context['database_changes'])) { |
|
| 389 | + echo ' |
|
| 381 | 390 | <script> |
| 382 | 391 | var database_changes_area = document.getElementById(\'db_changes_div\'); |
| 383 | 392 | var db_vis = false; |
| 384 | 393 | database_changes_area.style.display = "none"; |
| 385 | 394 | </script>'; |
| 386 | -} |
|
| 395 | + } |
|
| 396 | + } |
|
| 387 | 397 | |
| 388 | 398 | /** |
| 389 | 399 | * Extract package contents |
@@ -392,8 +402,8 @@ discard block |
||
| 392 | 402 | { |
| 393 | 403 | global $context, $txt, $scripturl; |
| 394 | 404 | |
| 395 | - if (!empty($context['redirect_url'])) |
|
| 396 | - echo ' |
|
| 405 | + if (!empty($context['redirect_url'])) { |
|
| 406 | + echo ' |
|
| 397 | 407 | <script> |
| 398 | 408 | setTimeout("doRedirect();", ', empty($context['redirect_timeout']) ? '5000' : $context['redirect_timeout'], '); |
| 399 | 409 | |
@@ -402,49 +412,48 @@ discard block |
||
| 402 | 412 | window.location = "', $context['redirect_url'], '"; |
| 403 | 413 | } |
| 404 | 414 | </script>'; |
| 415 | + } |
|
| 405 | 416 | |
| 406 | - if (empty($context['redirect_url'])) |
|
| 407 | - echo ' |
|
| 417 | + if (empty($context['redirect_url'])) { |
|
| 418 | + echo ' |
|
| 408 | 419 | <div class="cat_bar"> |
| 409 | 420 | <h3 class="catbg">', $context['uninstalling'] ? $txt['uninstall'] : $txt['extracting'], '</h3> |
| 410 | 421 | </div> |
| 411 | 422 | <div class="information">', $txt['package_installed_extract'], '</div>'; |
| 412 | - else |
|
| 413 | - echo ' |
|
| 423 | + } else { |
|
| 424 | + echo ' |
|
| 414 | 425 | <div class="cat_bar"> |
| 415 | 426 | <h3 class="catbg">', $txt['package_installed_redirecting'], '</h3> |
| 416 | 427 | </div>'; |
| 428 | + } |
|
| 417 | 429 | |
| 418 | 430 | echo ' |
| 419 | 431 | <div class="windowbg">'; |
| 420 | 432 | |
| 421 | 433 | // If we are going to redirect we have a slightly different agenda. |
| 422 | - if (!empty($context['redirect_url'])) |
|
| 423 | - echo ' |
|
| 434 | + if (!empty($context['redirect_url'])) { |
|
| 435 | + echo ' |
|
| 424 | 436 | ', $context['redirect_text'], '<br><br> |
| 425 | 437 | <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>'; |
| 426 | - |
|
| 427 | - elseif ($context['uninstalling']) |
|
| 428 | - echo ' |
|
| 438 | + } elseif ($context['uninstalling']) { |
|
| 439 | + echo ' |
|
| 429 | 440 | ', $txt['package_uninstall_done']; |
| 430 | - |
|
| 431 | - elseif ($context['install_finished']) |
|
| 441 | + } elseif ($context['install_finished']) |
|
| 432 | 442 | { |
| 433 | - if ($context['extract_type'] == 'avatar') |
|
| 434 | - echo ' |
|
| 443 | + if ($context['extract_type'] == 'avatar') { |
|
| 444 | + echo ' |
|
| 435 | 445 | ', $txt['avatars_extracted']; |
| 436 | - |
|
| 437 | - elseif ($context['extract_type'] == 'language') |
|
| 438 | - echo ' |
|
| 446 | + } elseif ($context['extract_type'] == 'language') { |
|
| 447 | + echo ' |
|
| 439 | 448 | ', $txt['language_extracted']; |
| 440 | - |
|
| 441 | - else |
|
| 442 | - echo ' |
|
| 449 | + } else { |
|
| 450 | + echo ' |
|
| 443 | 451 | ', $txt['package_installed_done']; |
| 444 | - } |
|
| 445 | - else |
|
| 446 | - echo ' |
|
| 452 | + } |
|
| 453 | + } else { |
|
| 454 | + echo ' |
|
| 447 | 455 | ', $txt['corrupt_compatible']; |
| 456 | + } |
|
| 448 | 457 | |
| 449 | 458 | echo ' |
| 450 | 459 | </div><!-- .windowbg -->'; |
@@ -474,9 +483,10 @@ discard block |
||
| 474 | 483 | <div class="windowbg"> |
| 475 | 484 | <ol>'; |
| 476 | 485 | |
| 477 | - foreach ($context['files'] as $fileinfo) |
|
| 478 | - echo ' |
|
| 486 | + foreach ($context['files'] as $fileinfo) { |
|
| 487 | + echo ' |
|
| 479 | 488 | <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>'; |
| 489 | + } |
|
| 480 | 490 | |
| 481 | 491 | echo ' |
| 482 | 492 | </ol> |
@@ -536,9 +546,10 @@ discard block |
||
| 536 | 546 | </script> |
| 537 | 547 | <div id="yourVersion" style="display:none">', $context['forum_version'], '</div>'; |
| 538 | 548 | |
| 539 | - if (empty($modSettings['disable_smf_js'])) |
|
| 540 | - echo ' |
|
| 549 | + if (empty($modSettings['disable_smf_js'])) { |
|
| 550 | + echo ' |
|
| 541 | 551 | <script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>'; |
| 552 | + } |
|
| 542 | 553 | |
| 543 | 554 | // This sets the announcements and current versions themselves ;). |
| 544 | 555 | echo ' |
@@ -576,12 +587,13 @@ discard block |
||
| 576 | 587 | } |
| 577 | 588 | } |
| 578 | 589 | |
| 579 | - if (!$mods_available) |
|
| 580 | - echo ' |
|
| 590 | + if (!$mods_available) { |
|
| 591 | + echo ' |
|
| 581 | 592 | <div class="noticebox">', $txt['no_packages'], '</div>'; |
| 582 | - else |
|
| 583 | - echo ' |
|
| 593 | + } else { |
|
| 594 | + echo ' |
|
| 584 | 595 | <br>'; |
| 596 | + } |
|
| 585 | 597 | |
| 586 | 598 | // The advanced (emulation) box, collapsed by default |
| 587 | 599 | echo ' |
@@ -608,9 +620,10 @@ discard block |
||
| 608 | 620 | <a id="revert" name="revert"></a> |
| 609 | 621 | <select name="version_emulate" id="ve">'; |
| 610 | 622 | |
| 611 | - foreach ($context['emulation_versions'] as $version) |
|
| 612 | - echo ' |
|
| 623 | + foreach ($context['emulation_versions'] as $version) { |
|
| 624 | + echo ' |
|
| 613 | 625 | <option value="', $version, '"', ($version == $context['selected_version'] ? ' selected="selected"' : ''), '>', $version, '</option>'; |
| 626 | + } |
|
| 614 | 627 | |
| 615 | 628 | echo ' |
| 616 | 629 | </select> |
@@ -665,11 +678,12 @@ discard block |
||
| 665 | 678 | { |
| 666 | 679 | global $context, $txt, $scripturl; |
| 667 | 680 | |
| 668 | - if (!empty($context['package_ftp']['error'])) |
|
| 669 | - echo ' |
|
| 681 | + if (!empty($context['package_ftp']['error'])) { |
|
| 682 | + echo ' |
|
| 670 | 683 | <div class="errorbox"> |
| 671 | 684 | <pre>', $context['package_ftp']['error'], '</pre> |
| 672 | 685 | </div>'; |
| 686 | + } |
|
| 673 | 687 | |
| 674 | 688 | echo ' |
| 675 | 689 | <div id="admin_form_wrapper"> |
@@ -752,13 +766,14 @@ discard block |
||
| 752 | 766 | <legend>' . $txt['package_servers'] . '</legend> |
| 753 | 767 | <ul class="package_servers">'; |
| 754 | 768 | |
| 755 | - foreach ($context['servers'] as $server) |
|
| 756 | - echo ' |
|
| 769 | + foreach ($context['servers'] as $server) { |
|
| 770 | + echo ' |
|
| 757 | 771 | <li class="flow_auto"> |
| 758 | 772 | <span class="floatleft">' . $server['name'] . '</span> |
| 759 | 773 | <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> |
| 760 | 774 | <span class="package_server floatright"><a href="' . $scripturl . '?action=admin;area=packages;get;sa=browse;server=' . $server['id'] . '">[ ' . $txt['package_browse'] . ' ]</a></span> |
| 761 | 775 | </li>'; |
| 776 | + } |
|
| 762 | 777 | echo ' |
| 763 | 778 | </ul> |
| 764 | 779 | </fieldset> |
@@ -842,11 +857,12 @@ discard block |
||
| 842 | 857 | <div class="windowbg">'; |
| 843 | 858 | |
| 844 | 859 | // No packages, as yet. |
| 845 | - if (empty($context['package_list'])) |
|
| 846 | - echo ' |
|
| 860 | + if (empty($context['package_list'])) { |
|
| 861 | + echo ' |
|
| 847 | 862 | <ul> |
| 848 | 863 | <li>', $txt['no_packages'], '</li> |
| 849 | 864 | </ul>'; |
| 865 | + } |
|
| 850 | 866 | |
| 851 | 867 | // List out the packages... |
| 852 | 868 | else |
@@ -860,11 +876,12 @@ discard block |
||
| 860 | 876 | <li> |
| 861 | 877 | <strong><span id="ps_img_', $i, '" class="toggle_up" alt="*" style="display: none;"></span> ', $packageSection['title'], '</strong>'; |
| 862 | 878 | |
| 863 | - if (!empty($packageSection['text'])) |
|
| 864 | - echo ' |
|
| 879 | + if (!empty($packageSection['text'])) { |
|
| 880 | + echo ' |
|
| 865 | 881 | <div class="sub_bar"> |
| 866 | 882 | <h3 class="subbg">', $packageSection['text'], '</h3> |
| 867 | 883 | </div>'; |
| 884 | + } |
|
| 868 | 885 | |
| 869 | 886 | echo ' |
| 870 | 887 | <', $context['list_type'], ' id="package_section_', $i, '" class="packages">'; |
@@ -875,24 +892,28 @@ discard block |
||
| 875 | 892 | <li>'; |
| 876 | 893 | |
| 877 | 894 | // Textual message. Could be empty just for a blank line... |
| 878 | - if ($package['is_text']) |
|
| 879 | - echo ' |
|
| 895 | + if ($package['is_text']) { |
|
| 896 | + echo ' |
|
| 880 | 897 | ', empty($package['name']) ? ' ' : $package['name']; |
| 898 | + } |
|
| 881 | 899 | |
| 882 | 900 | // This is supposed to be a rule.. |
| 883 | - elseif ($package['is_line']) |
|
| 884 | - echo ' |
|
| 901 | + elseif ($package['is_line']) { |
|
| 902 | + echo ' |
|
| 885 | 903 | <hr>'; |
| 904 | + } |
|
| 886 | 905 | |
| 887 | 906 | // A remote link. |
| 888 | - elseif ($package['is_remote']) |
|
| 889 | - echo ' |
|
| 907 | + elseif ($package['is_remote']) { |
|
| 908 | + echo ' |
|
| 890 | 909 | <strong>', $package['link'], '</strong>'; |
| 910 | + } |
|
| 891 | 911 | |
| 892 | 912 | // A title? |
| 893 | - elseif ($package['is_heading'] || $package['is_title']) |
|
| 894 | - echo ' |
|
| 913 | + elseif ($package['is_heading'] || $package['is_title']) { |
|
| 914 | + echo ' |
|
| 895 | 915 | <strong>', $package['name'], '</strong>'; |
| 916 | + } |
|
| 896 | 917 | |
| 897 | 918 | // Otherwise, it's a package. |
| 898 | 919 | else |
@@ -903,32 +924,36 @@ discard block |
||
| 903 | 924 | <ul id="package_section_', $i, '_pkg_', $id, '" class="package_section">'; |
| 904 | 925 | |
| 905 | 926 | // Show the mod type? |
| 906 | - if ($package['type'] != '') |
|
| 907 | - echo ' |
|
| 927 | + if ($package['type'] != '') { |
|
| 928 | + echo ' |
|
| 908 | 929 | <li class="package_section"> |
| 909 | 930 | ', $txt['package_type'], ': ', $smcFunc['ucwords']($smcFunc['strtolower']($package['type'])), ' |
| 910 | 931 | </li>'; |
| 932 | + } |
|
| 911 | 933 | |
| 912 | 934 | // Show the version number? |
| 913 | - if ($package['version'] != '') |
|
| 914 | - echo ' |
|
| 935 | + if ($package['version'] != '') { |
|
| 936 | + echo ' |
|
| 915 | 937 | <li class="package_section"> |
| 916 | 938 | ', $txt['mod_version'], ': ', $package['version'], ' |
| 917 | 939 | </li>'; |
| 940 | + } |
|
| 918 | 941 | |
| 919 | 942 | // How 'bout the author? |
| 920 | - if (!empty($package['author']) && $package['author']['name'] != '' && isset($package['author']['link'])) |
|
| 921 | - echo ' |
|
| 943 | + if (!empty($package['author']) && $package['author']['name'] != '' && isset($package['author']['link'])) { |
|
| 944 | + echo ' |
|
| 922 | 945 | <li class="package_section"> |
| 923 | 946 | ', $txt['mod_author'], ': ', $package['author']['link'], ' |
| 924 | 947 | </li>'; |
| 948 | + } |
|
| 925 | 949 | |
| 926 | 950 | // The homepage... |
| 927 | - if ($package['author']['website']['link'] != '') |
|
| 928 | - echo ' |
|
| 951 | + if ($package['author']['website']['link'] != '') { |
|
| 952 | + echo ' |
|
| 929 | 953 | <li class="package_section"> |
| 930 | 954 | ', $txt['author_website'], ': ', $package['author']['website']['link'], ' |
| 931 | 955 | </li>'; |
| 956 | + } |
|
| 932 | 957 | |
| 933 | 958 | // Description: bleh bleh! |
| 934 | 959 | // Location of file: http://someplace/. |
@@ -986,8 +1011,8 @@ discard block |
||
| 986 | 1011 | |
| 987 | 1012 | foreach ($ps['items'] as $id => $package) |
| 988 | 1013 | { |
| 989 | - if (!$package['is_text'] && !$package['is_line'] && !$package['is_remote']) |
|
| 990 | - echo ' |
|
| 1014 | + if (!$package['is_text'] && !$package['is_line'] && !$package['is_remote']) { |
|
| 1015 | + echo ' |
|
| 991 | 1016 | var oPackageToggle_', $section, '_pkg_', $id, ' = new smc_Toggle({ |
| 992 | 1017 | bToggleEnabled: true, |
| 993 | 1018 | bCurrentlyCollapsed: true, |
@@ -1002,6 +1027,7 @@ discard block |
||
| 1002 | 1027 | } |
| 1003 | 1028 | ] |
| 1004 | 1029 | });'; |
| 1030 | + } |
|
| 1005 | 1031 | } |
| 1006 | 1032 | } |
| 1007 | 1033 | |
@@ -1044,9 +1070,10 @@ discard block |
||
| 1044 | 1070 | { |
| 1045 | 1071 | global $context, $txt, $scripturl; |
| 1046 | 1072 | |
| 1047 | - if (!empty($context['saved_successful'])) |
|
| 1048 | - echo ' |
|
| 1073 | + if (!empty($context['saved_successful'])) { |
|
| 1074 | + echo ' |
|
| 1049 | 1075 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 1076 | + } |
|
| 1050 | 1077 | |
| 1051 | 1078 | echo ' |
| 1052 | 1079 | <div class="cat_bar"> |
@@ -1106,8 +1133,9 @@ discard block |
||
| 1106 | 1133 | global $context, $txt; |
| 1107 | 1134 | |
| 1108 | 1135 | // Nothing to do? Brilliant! |
| 1109 | - if (empty($context['package_ftp'])) |
|
| 1110 | - return false; |
|
| 1136 | + if (empty($context['package_ftp'])) { |
|
| 1137 | + return false; |
|
| 1138 | + } |
|
| 1111 | 1139 | |
| 1112 | 1140 | if (empty($context['package_ftp']['form_elements_only'])) |
| 1113 | 1141 | { |
@@ -1117,19 +1145,21 @@ discard block |
||
| 1117 | 1145 | ', $txt['package_ftp_why_file_list'], ' |
| 1118 | 1146 | <ul style="display: inline;">'; |
| 1119 | 1147 | |
| 1120 | - if (!empty($context['notwritable_files'])) |
|
| 1121 | - foreach ($context['notwritable_files'] as $file) |
|
| 1148 | + if (!empty($context['notwritable_files'])) { |
|
| 1149 | + foreach ($context['notwritable_files'] as $file) |
|
| 1122 | 1150 | echo ' |
| 1123 | 1151 | <li>', $file, '</li>'; |
| 1152 | + } |
|
| 1124 | 1153 | |
| 1125 | 1154 | echo ' |
| 1126 | 1155 | </ul>'; |
| 1127 | 1156 | |
| 1128 | - if (!$context['server']['is_windows']) |
|
| 1129 | - echo ' |
|
| 1157 | + if (!$context['server']['is_windows']) { |
|
| 1158 | + echo ' |
|
| 1130 | 1159 | <hr> |
| 1131 | 1160 | ', $txt['package_chmod_linux'], '<br> |
| 1132 | 1161 | <samp># chmod a+w ', implode(' ', $context['notwritable_files']), '</samp>'; |
| 1162 | + } |
|
| 1133 | 1163 | |
| 1134 | 1164 | echo ' |
| 1135 | 1165 | </div><!-- #need_writable_list -->'; |
@@ -1142,9 +1172,10 @@ discard block |
||
| 1142 | 1172 | </div> |
| 1143 | 1173 | </div>'; |
| 1144 | 1174 | |
| 1145 | - if (!empty($context['package_ftp']['destination'])) |
|
| 1146 | - echo ' |
|
| 1175 | + if (!empty($context['package_ftp']['destination'])) { |
|
| 1176 | + echo ' |
|
| 1147 | 1177 | <form action="', $context['package_ftp']['destination'], '" method="post" accept-charset="', $context['character_set'], '">'; |
| 1178 | + } |
|
| 1148 | 1179 | |
| 1149 | 1180 | echo ' |
| 1150 | 1181 | <fieldset> |
@@ -1178,24 +1209,27 @@ discard block |
||
| 1178 | 1209 | </dl> |
| 1179 | 1210 | </fieldset>'; |
| 1180 | 1211 | |
| 1181 | - if (empty($context['package_ftp']['form_elements_only'])) |
|
| 1182 | - echo ' |
|
| 1212 | + if (empty($context['package_ftp']['form_elements_only'])) { |
|
| 1213 | + echo ' |
|
| 1183 | 1214 | <div class="righttext" style="margin: 1ex;"> |
| 1184 | 1215 | <span id="test_ftp_placeholder_full"></span> |
| 1185 | 1216 | <input type="submit" value="', $txt['package_proceed'], '" class="button"> |
| 1186 | 1217 | </div>'; |
| 1218 | + } |
|
| 1187 | 1219 | |
| 1188 | - if (!empty($context['package_ftp']['destination'])) |
|
| 1189 | - echo ' |
|
| 1220 | + if (!empty($context['package_ftp']['destination'])) { |
|
| 1221 | + echo ' |
|
| 1190 | 1222 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 1191 | 1223 | </form>'; |
| 1224 | + } |
|
| 1192 | 1225 | |
| 1193 | 1226 | // Hide the details of the list. |
| 1194 | - if (empty($context['package_ftp']['form_elements_only'])) |
|
| 1195 | - echo ' |
|
| 1227 | + if (empty($context['package_ftp']['form_elements_only'])) { |
|
| 1228 | + echo ' |
|
| 1196 | 1229 | <script> |
| 1197 | 1230 | document.getElementById(\'need_writable_list\').style.display = \'none\'; |
| 1198 | 1231 | </script>'; |
| 1232 | + } |
|
| 1199 | 1233 | |
| 1200 | 1234 | // Quick generate the test button. |
| 1201 | 1235 | echo ' |
@@ -1552,9 +1586,10 @@ discard block |
||
| 1552 | 1586 | <td width="30%"> |
| 1553 | 1587 | <strong>'; |
| 1554 | 1588 | |
| 1555 | - if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) |
|
| 1556 | - echo ' |
|
| 1589 | + if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) { |
|
| 1590 | + echo ' |
|
| 1557 | 1591 | <span class="generic_icons folder"></span>'; |
| 1592 | + } |
|
| 1558 | 1593 | |
| 1559 | 1594 | echo ' |
| 1560 | 1595 | ', $name, ' |
@@ -1581,8 +1616,9 @@ discard block |
||
| 1581 | 1616 | </td> |
| 1582 | 1617 | </tr>'; |
| 1583 | 1618 | |
| 1584 | - if (!empty($dir['contents'])) |
|
| 1585 | - template_permission_show_contents($name, $dir['contents'], 1); |
|
| 1619 | + if (!empty($dir['contents'])) { |
|
| 1620 | + template_permission_show_contents($name, $dir['contents'], 1); |
|
| 1621 | + } |
|
| 1586 | 1622 | } |
| 1587 | 1623 | |
| 1588 | 1624 | echo ' |
@@ -1618,13 +1654,14 @@ discard block |
||
| 1618 | 1654 | </fieldset>'; |
| 1619 | 1655 | |
| 1620 | 1656 | // Likely to need FTP? |
| 1621 | - if (empty($context['ftp_connected'])) |
|
| 1622 | - echo ' |
|
| 1657 | + if (empty($context['ftp_connected'])) { |
|
| 1658 | + echo ' |
|
| 1623 | 1659 | <p> |
| 1624 | 1660 | ', $txt['package_file_perms_ftp_details'], ': |
| 1625 | 1661 | </p> |
| 1626 | 1662 | ', template_control_chmod(), ' |
| 1627 | 1663 | <div class="noticebox">', $txt['package_file_perms_ftp_retain'], '</div>'; |
| 1664 | + } |
|
| 1628 | 1665 | |
| 1629 | 1666 | echo ' |
| 1630 | 1667 | <span id="test_ftp_placeholder_full"></span> |
@@ -1633,9 +1670,10 @@ discard block |
||
| 1633 | 1670 | </div><!-- .windowbg -->'; |
| 1634 | 1671 | |
| 1635 | 1672 | // Any looks fors we've already done? |
| 1636 | - foreach ($context['look_for'] as $path) |
|
| 1637 | - echo ' |
|
| 1673 | + foreach ($context['look_for'] as $path) { |
|
| 1674 | + echo ' |
|
| 1638 | 1675 | <input type="hidden" name="back_look[]" value="', $path, '">'; |
| 1676 | + } |
|
| 1639 | 1677 | |
| 1640 | 1678 | echo ' |
| 1641 | 1679 | </form> |
@@ -1677,9 +1715,10 @@ discard block |
||
| 1677 | 1715 | <td class="smalltext" width="30%">' . str_repeat(' ', $level * 5), ' |
| 1678 | 1716 | ', (!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, "'\\") . '\');">' : ''; |
| 1679 | 1717 | |
| 1680 | - if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) |
|
| 1681 | - echo ' |
|
| 1718 | + if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) { |
|
| 1719 | + echo ' |
|
| 1682 | 1720 | <span class="generic_icons folder"></span>'; |
| 1721 | + } |
|
| 1683 | 1722 | |
| 1684 | 1723 | echo ' |
| 1685 | 1724 | ', $name, ' |
@@ -1697,34 +1736,38 @@ discard block |
||
| 1697 | 1736 | </tr> |
| 1698 | 1737 | <tr id="insert_div_loc_' . $cur_ident . '" style="display: none;"><td></td></tr>'; |
| 1699 | 1738 | |
| 1700 | - if (!empty($dir['contents'])) |
|
| 1701 | - template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); |
|
| 1739 | + if (!empty($dir['contents'])) { |
|
| 1740 | + template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); |
|
| 1741 | + } |
|
| 1702 | 1742 | } |
| 1703 | 1743 | } |
| 1704 | 1744 | |
| 1705 | 1745 | // We have more files to show? |
| 1706 | - if ($has_more) |
|
| 1707 | - echo ' |
|
| 1746 | + if ($has_more) { |
|
| 1747 | + echo ' |
|
| 1708 | 1748 | <tr class="windowbg" id="content_', $js_ident, '_more"> |
| 1709 | 1749 | <td class="smalltext" width="40%">' . str_repeat(' ', $level * 5), ' |
| 1710 | 1750 | « <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> » |
| 1711 | 1751 | </td> |
| 1712 | 1752 | <td colspan="6"></td> |
| 1713 | 1753 | </tr>'; |
| 1754 | + } |
|
| 1714 | 1755 | |
| 1715 | 1756 | if ($drawn_div) |
| 1716 | 1757 | { |
| 1717 | 1758 | // Hide anything too far down the tree. |
| 1718 | 1759 | $isFound = false; |
| 1719 | - foreach ($context['look_for'] as $tree) |
|
| 1720 | - if (substr($tree, 0, strlen($ident)) == $ident) |
|
| 1760 | + foreach ($context['look_for'] as $tree) { |
|
| 1761 | + if (substr($tree, 0, strlen($ident)) == $ident) |
|
| 1721 | 1762 | $isFound = true; |
| 1763 | + } |
|
| 1722 | 1764 | |
| 1723 | - if ($level > 1 && !$isFound) |
|
| 1724 | - echo ' |
|
| 1765 | + if ($level > 1 && !$isFound) { |
|
| 1766 | + echo ' |
|
| 1725 | 1767 | <script> |
| 1726 | 1768 | expandFolder(\'', $js_ident, '\', \'\'); |
| 1727 | 1769 | </script>'; |
| 1770 | + } |
|
| 1728 | 1771 | } |
| 1729 | 1772 | } |
| 1730 | 1773 | |
@@ -1743,11 +1786,12 @@ discard block |
||
| 1743 | 1786 | <h3 class="catbg">', $txt['package_file_perms_applying'], '</h3> |
| 1744 | 1787 | </div>'; |
| 1745 | 1788 | |
| 1746 | - if (!empty($context['skip_ftp'])) |
|
| 1747 | - echo ' |
|
| 1789 | + if (!empty($context['skip_ftp'])) { |
|
| 1790 | + echo ' |
|
| 1748 | 1791 | <div class="errorbox"> |
| 1749 | 1792 | ', $txt['package_file_perms_skipping_ftp'], ' |
| 1750 | 1793 | </div>'; |
| 1794 | + } |
|
| 1751 | 1795 | |
| 1752 | 1796 | // How many have we done? |
| 1753 | 1797 | $remaining_items = count($context['method'] == 'individual' ? $context['to_process'] : $context['directory_list']); |
@@ -1785,28 +1829,31 @@ discard block |
||
| 1785 | 1829 | <br>'; |
| 1786 | 1830 | |
| 1787 | 1831 | // Put out the right hidden data. |
| 1788 | - if ($context['method'] == 'individual') |
|
| 1789 | - echo ' |
|
| 1832 | + if ($context['method'] == 'individual') { |
|
| 1833 | + echo ' |
|
| 1790 | 1834 | <input type="hidden" name="custom_value" value="', $context['custom_value'], '"> |
| 1791 | 1835 | <input type="hidden" name="totalItems" value="', $context['total_items'], '"> |
| 1792 | 1836 | <input type="hidden" name="toProcess" value="', $context['to_process_encode'], '">'; |
| 1793 | - else |
|
| 1794 | - echo ' |
|
| 1837 | + } else { |
|
| 1838 | + echo ' |
|
| 1795 | 1839 | <input type="hidden" name="predefined" value="', $context['predefined_type'], '"> |
| 1796 | 1840 | <input type="hidden" name="fileOffset" value="', $context['file_offset'], '"> |
| 1797 | 1841 | <input type="hidden" name="totalItems" value="', $context['total_items'], '"> |
| 1798 | 1842 | <input type="hidden" name="dirList" value="', $context['directory_list_encode'], '"> |
| 1799 | 1843 | <input type="hidden" name="specialFiles" value="', $context['special_files_encode'], '">'; |
| 1844 | + } |
|
| 1800 | 1845 | |
| 1801 | 1846 | // Are we not using FTP for whatever reason. |
| 1802 | - if (!empty($context['skip_ftp'])) |
|
| 1803 | - echo ' |
|
| 1847 | + if (!empty($context['skip_ftp'])) { |
|
| 1848 | + echo ' |
|
| 1804 | 1849 | <input type="hidden" name="skip_ftp" value="1">'; |
| 1850 | + } |
|
| 1805 | 1851 | |
| 1806 | 1852 | // Retain state. |
| 1807 | - foreach ($context['back_look_data'] as $path) |
|
| 1808 | - echo ' |
|
| 1853 | + foreach ($context['back_look_data'] as $path) { |
|
| 1854 | + echo ' |
|
| 1809 | 1855 | <input type="hidden" name="back_look[]" value="', $path, '">'; |
| 1856 | + } |
|
| 1810 | 1857 | |
| 1811 | 1858 | echo ' |
| 1812 | 1859 | <input type="hidden" name="method" value="', $context['method'], '"> |
@@ -20,9 +20,10 @@ discard block |
||
| 20 | 20 | echo ' |
| 21 | 21 | <form action="', $scripturl, '?action=admin;area=paidsubscribe;sa=modify;sid=', $context['sub_id'], '" method="post">'; |
| 22 | 22 | |
| 23 | - if (!empty($context['disable_groups'])) |
|
| 24 | - echo ' |
|
| 23 | + if (!empty($context['disable_groups'])) { |
|
| 24 | + echo ' |
|
| 25 | 25 | <div class="noticebox">', $txt['paid_mod_edit_note'], '</div>'; |
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | echo ' |
| 28 | 29 | <div class="cat_bar"> |
@@ -66,9 +67,10 @@ discard block |
||
| 66 | 67 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
| 67 | 68 | |
| 68 | 69 | // Put each group into the box. |
| 69 | - foreach ($context['groups'] as $id => $name) |
|
| 70 | - echo ' |
|
| 70 | + foreach ($context['groups'] as $id => $name) { |
|
| 71 | + echo ' |
|
| 71 | 72 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
| 73 | + } |
|
| 72 | 74 | |
| 73 | 75 | echo ' |
| 74 | 76 | </select> |
@@ -80,12 +82,13 @@ discard block |
||
| 80 | 82 | <dd>'; |
| 81 | 83 | |
| 82 | 84 | // Put a checkbox in for each group |
| 83 | - foreach ($context['groups'] as $id => $name) |
|
| 84 | - echo ' |
|
| 85 | + foreach ($context['groups'] as $id => $name) { |
|
| 86 | + echo ' |
|
| 85 | 87 | <label for="addgroup_', $id, '"> |
| 86 | 88 | <input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', '> |
| 87 | 89 | <span class="smalltext">', $name, '</span> |
| 88 | 90 | </label><br>'; |
| 91 | + } |
|
| 89 | 92 | |
| 90 | 93 | echo ' |
| 91 | 94 | </dd> |
@@ -230,8 +233,8 @@ discard block |
||
| 230 | 233 | <dl class="settings">'; |
| 231 | 234 | |
| 232 | 235 | // Do we need a username? |
| 233 | - if ($context['action_type'] == 'add') |
|
| 234 | - echo ' |
|
| 236 | + if ($context['action_type'] == 'add') { |
|
| 237 | + echo ' |
|
| 235 | 238 | <dt> |
| 236 | 239 | <strong>', $txt['paid_username'], ':</strong><br> |
| 237 | 240 | <span class="smalltext">', $txt['one_username'], '</span> |
@@ -239,6 +242,7 @@ discard block |
||
| 239 | 242 | <dd> |
| 240 | 243 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30"> |
| 241 | 244 | </dd>'; |
| 245 | + } |
|
| 242 | 246 | |
| 243 | 247 | echo ' |
| 244 | 248 | <dt> |
@@ -256,9 +260,10 @@ discard block |
||
| 256 | 260 | <select name="year" id="year" onchange="generateDays();">'; |
| 257 | 261 | |
| 258 | 262 | // Show a list of all the years we allow... |
| 259 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 260 | - echo ' |
|
| 263 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 264 | + echo ' |
|
| 261 | 265 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 266 | + } |
|
| 262 | 267 | |
| 263 | 268 | echo ' |
| 264 | 269 | </select> |
@@ -266,9 +271,10 @@ discard block |
||
| 266 | 271 | <select name="month" id="month" onchange="generateDays();">'; |
| 267 | 272 | |
| 268 | 273 | // There are 12 months per year - ensure that they all get listed. |
| 269 | - for ($month = 1; $month <= 12; $month++) |
|
| 270 | - echo ' |
|
| 274 | + for ($month = 1; $month <= 12; $month++) { |
|
| 275 | + echo ' |
|
| 271 | 276 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 277 | + } |
|
| 272 | 278 | |
| 273 | 279 | echo ' |
| 274 | 280 | </select> |
@@ -276,9 +282,10 @@ discard block |
||
| 276 | 282 | <select name="day" id="day">'; |
| 277 | 283 | |
| 278 | 284 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 279 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
| 280 | - echo ' |
|
| 285 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
| 286 | + echo ' |
|
| 281 | 287 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 288 | + } |
|
| 282 | 289 | |
| 283 | 290 | echo ' |
| 284 | 291 | </select> |
@@ -290,9 +297,10 @@ discard block |
||
| 290 | 297 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
| 291 | 298 | |
| 292 | 299 | // Show a list of all the years we allow... |
| 293 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 294 | - echo ' |
|
| 300 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 301 | + echo ' |
|
| 295 | 302 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 303 | + } |
|
| 296 | 304 | |
| 297 | 305 | echo ' |
| 298 | 306 | </select> |
@@ -300,9 +308,10 @@ discard block |
||
| 300 | 308 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
| 301 | 309 | |
| 302 | 310 | // There are 12 months per year - ensure that they all get listed. |
| 303 | - for ($month = 1; $month <= 12; $month++) |
|
| 304 | - echo ' |
|
| 311 | + for ($month = 1; $month <= 12; $month++) { |
|
| 312 | + echo ' |
|
| 305 | 313 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 314 | + } |
|
| 306 | 315 | |
| 307 | 316 | echo ' |
| 308 | 317 | </select> |
@@ -310,9 +319,10 @@ discard block |
||
| 310 | 319 | <select name="dayend" id="dayend">'; |
| 311 | 320 | |
| 312 | 321 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 313 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
| 314 | - echo ' |
|
| 322 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
| 323 | + echo ' |
|
| 315 | 324 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 325 | + } |
|
| 316 | 326 | |
| 317 | 327 | echo ' |
| 318 | 328 | </select> |
@@ -351,8 +361,8 @@ discard block |
||
| 351 | 361 | <div class="windowbg"> |
| 352 | 362 | <ul>'; |
| 353 | 363 | |
| 354 | - foreach ($context['pending_payments'] as $id => $payment) |
|
| 355 | - echo ' |
|
| 364 | + foreach ($context['pending_payments'] as $id => $payment) { |
|
| 365 | + echo ' |
|
| 356 | 366 | <li> |
| 357 | 367 | ', $payment['desc'], ' |
| 358 | 368 | <span class="floatleft"> |
@@ -362,6 +372,7 @@ discard block |
||
| 362 | 372 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;lid=', $context['log_id'], ';pending=', $id, ';remove">', $txt['pending_payments_remove'], '</a> |
| 363 | 373 | </span> |
| 364 | 374 | </li>'; |
| 375 | + } |
|
| 365 | 376 | |
| 366 | 377 | echo ' |
| 367 | 378 | </ul>'; |
@@ -385,12 +396,12 @@ discard block |
||
| 385 | 396 | <h3 class="catbg">', $txt['subscriptions'], '</h3> |
| 386 | 397 | </div>'; |
| 387 | 398 | |
| 388 | - if (empty($context['subscriptions'])) |
|
| 389 | - echo ' |
|
| 399 | + if (empty($context['subscriptions'])) { |
|
| 400 | + echo ' |
|
| 390 | 401 | <div class="information"> |
| 391 | 402 | ', $txt['paid_subs_none'], ' |
| 392 | 403 | </div>'; |
| 393 | - else |
|
| 404 | + } else |
|
| 394 | 405 | { |
| 395 | 406 | echo ' |
| 396 | 407 | <div class="information"> |
@@ -401,8 +412,9 @@ discard block |
||
| 401 | 412 | foreach ($context['subscriptions'] as $id => $subscription) |
| 402 | 413 | { |
| 403 | 414 | // Ignore the inactive ones... |
| 404 | - if (empty($subscription['active'])) |
|
| 405 | - continue; |
|
| 415 | + if (empty($subscription['active'])) { |
|
| 416 | + continue; |
|
| 417 | + } |
|
| 406 | 418 | |
| 407 | 419 | echo ' |
| 408 | 420 | <div class="cat_bar"> |
@@ -412,9 +424,10 @@ discard block |
||
| 412 | 424 | <p><strong>', $subscription['name'], '</strong></p> |
| 413 | 425 | <p class="smalltext">', $subscription['desc'], '</p>'; |
| 414 | 426 | |
| 415 | - if (!$subscription['flexible']) |
|
| 416 | - echo ' |
|
| 427 | + if (!$subscription['flexible']) { |
|
| 428 | + echo ' |
|
| 417 | 429 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
| 430 | + } |
|
| 418 | 431 | |
| 419 | 432 | if ($context['user']['is_owner']) |
| 420 | 433 | { |
@@ -427,24 +440,25 @@ discard block |
||
| 427 | 440 | <select name="cur[', $subscription['id'], ']">'; |
| 428 | 441 | |
| 429 | 442 | // Print out the costs for this one. |
| 430 | - foreach ($subscription['costs'] as $duration => $value) |
|
| 431 | - echo ' |
|
| 443 | + foreach ($subscription['costs'] as $duration => $value) { |
|
| 444 | + echo ' |
|
| 432 | 445 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
| 446 | + } |
|
| 433 | 447 | |
| 434 | 448 | echo ' |
| 435 | 449 | </select>'; |
| 436 | - } |
|
| 437 | - else |
|
| 438 | - echo ' |
|
| 450 | + } else { |
|
| 451 | + echo ' |
|
| 439 | 452 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
| 453 | + } |
|
| 440 | 454 | |
| 441 | 455 | echo ' |
| 442 | 456 | <hr> |
| 443 | 457 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button">'; |
| 444 | - } |
|
| 445 | - else |
|
| 446 | - echo ' |
|
| 458 | + } else { |
|
| 459 | + echo ' |
|
| 447 | 460 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>'; |
| 461 | + } |
|
| 448 | 462 | |
| 449 | 463 | echo ' |
| 450 | 464 | </div><!-- .windowbg -->'; |
@@ -471,18 +485,19 @@ discard block |
||
| 471 | 485 | </thead> |
| 472 | 486 | <tbody>'; |
| 473 | 487 | |
| 474 | - if (empty($context['current'])) |
|
| 475 | - echo ' |
|
| 488 | + if (empty($context['current'])) { |
|
| 489 | + echo ' |
|
| 476 | 490 | <tr class="windowbg"> |
| 477 | 491 | <td colspan="4"> |
| 478 | 492 | ', $txt['paid_none_yet'], ' |
| 479 | 493 | </td> |
| 480 | 494 | </tr>'; |
| 495 | + } |
|
| 481 | 496 | |
| 482 | 497 | foreach ($context['current'] as $sub) |
| 483 | 498 | { |
| 484 | - if (!$sub['hide']) |
|
| 485 | - echo ' |
|
| 499 | + if (!$sub['hide']) { |
|
| 500 | + echo ' |
|
| 486 | 501 | <tr class="windowbg"> |
| 487 | 502 | <td> |
| 488 | 503 | ', ($context['user']['is_admin'] ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -493,6 +508,7 @@ discard block |
||
| 493 | 508 | <td>', $sub['start'], '</td> |
| 494 | 509 | <td>', $sub['end'], '</td> |
| 495 | 510 | </tr>'; |
| 511 | + } |
|
| 496 | 512 | } |
| 497 | 513 | |
| 498 | 514 | echo ' |
@@ -544,15 +560,17 @@ discard block |
||
| 544 | 560 | ', $gateway['desc'], '<br> |
| 545 | 561 | <form action="', $gateway['form'], '" method="post">'; |
| 546 | 562 | |
| 547 | - if (!empty($gateway['javascript'])) |
|
| 548 | - echo ' |
|
| 563 | + if (!empty($gateway['javascript'])) { |
|
| 564 | + echo ' |
|
| 549 | 565 | <script> |
| 550 | 566 | ', $gateway['javascript'], ' |
| 551 | 567 | </script>'; |
| 568 | + } |
|
| 552 | 569 | |
| 553 | - foreach ($gateway['hidden'] as $name => $value) |
|
| 554 | - echo ' |
|
| 570 | + foreach ($gateway['hidden'] as $name => $value) { |
|
| 571 | + echo ' |
|
| 555 | 572 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
| 573 | + } |
|
| 556 | 574 | |
| 557 | 575 | echo ' |
| 558 | 576 | <br> |
@@ -61,9 +61,10 @@ discard block |
||
| 61 | 61 | ', implode(', ', $context['administrators']); |
| 62 | 62 | |
| 63 | 63 | // If we have lots of admins... don't show them all. |
| 64 | - if (!empty($context['more_admins_link'])) |
|
| 65 | - echo ' |
|
| 64 | + if (!empty($context['more_admins_link'])) { |
|
| 65 | + echo ' |
|
| 66 | 66 | (', $context['more_admins_link'], ')'; |
| 67 | + } |
|
| 67 | 68 | |
| 68 | 69 | echo ' |
| 69 | 70 | </div><!-- #version_details --> |
@@ -80,17 +81,19 @@ discard block |
||
| 80 | 81 | foreach ($area['areas'] as $item_id => $item) |
| 81 | 82 | { |
| 82 | 83 | // No point showing the 'home' page here, we're already on it! |
| 83 | - if ($area_id == 'forum' && $item_id == 'index') |
|
| 84 | - continue; |
|
| 84 | + if ($area_id == 'forum' && $item_id == 'index') { |
|
| 85 | + continue; |
|
| 86 | + } |
|
| 85 | 87 | |
| 86 | 88 | $url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : ''); |
| 87 | 89 | |
| 88 | - if (!empty($item['icon_file'])) |
|
| 89 | - echo ' |
|
| 90 | + if (!empty($item['icon_file'])) { |
|
| 91 | + echo ' |
|
| 90 | 92 | <a href="', $url, '" class="admin_group', !empty($item['inactive']) ? ' inactive' : '', '"><img class="large_admin_menu_icon_file" src="', $item['icon_file'], '" alt="">', $item['label'], '</a>'; |
| 91 | - else |
|
| 92 | - echo ' |
|
| 93 | + } else { |
|
| 94 | + echo ' |
|
| 93 | 95 | <a href="', $url, '"><span class="large_', $item['icon_class'], !empty($item['inactive']) ? ' inactive' : '', '"></span>', $item['label'], '</a>'; |
| 96 | + } |
|
| 94 | 97 | } |
| 95 | 98 | |
| 96 | 99 | echo ' |
@@ -98,10 +101,11 @@ discard block |
||
| 98 | 101 | } |
| 99 | 102 | |
| 100 | 103 | // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. |
| 101 | - if (empty($modSettings['disable_smf_js'])) |
|
| 102 | - echo ' |
|
| 104 | + if (empty($modSettings['disable_smf_js'])) { |
|
| 105 | + echo ' |
|
| 103 | 106 | <script src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script> |
| 104 | 107 | <script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>'; |
| 108 | + } |
|
| 105 | 109 | |
| 106 | 110 | // This sets the announcements and current versions themselves ;). |
| 107 | 111 | echo ' |
@@ -178,9 +182,10 @@ discard block |
||
| 178 | 182 | <em>', $version['version'], '</em>'; |
| 179 | 183 | |
| 180 | 184 | // more details for this item, show them a link |
| 181 | - if ($context['can_admin'] && isset($version['more'])) |
|
| 182 | - echo |
|
| 185 | + if ($context['can_admin'] && isset($version['more'])) { |
|
| 186 | + echo |
|
| 183 | 187 | ' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>'; |
| 188 | + } |
|
| 184 | 189 | echo ' |
| 185 | 190 | <br>'; |
| 186 | 191 | } |
@@ -211,21 +216,23 @@ discard block |
||
| 211 | 216 | |
| 212 | 217 | foreach ($context['credits'] as $section) |
| 213 | 218 | { |
| 214 | - if (isset($section['pretext'])) |
|
| 215 | - echo ' |
|
| 219 | + if (isset($section['pretext'])) { |
|
| 220 | + echo ' |
|
| 216 | 221 | <p>', $section['pretext'], '</p> |
| 217 | 222 | <hr>'; |
| 223 | + } |
|
| 218 | 224 | |
| 219 | 225 | echo ' |
| 220 | 226 | <dl>'; |
| 221 | 227 | |
| 222 | 228 | foreach ($section['groups'] as $group) |
| 223 | 229 | { |
| 224 | - if (isset($group['title'])) |
|
| 225 | - echo ' |
|
| 230 | + if (isset($group['title'])) { |
|
| 231 | + echo ' |
|
| 226 | 232 | <dt> |
| 227 | 233 | <strong>', $group['title'], ':</strong> |
| 228 | 234 | </dt>'; |
| 235 | + } |
|
| 229 | 236 | |
| 230 | 237 | echo ' |
| 231 | 238 | <dd>', implode(', ', $group['members']), '</dd>'; |
@@ -234,10 +241,11 @@ discard block |
||
| 234 | 241 | echo ' |
| 235 | 242 | </dl>'; |
| 236 | 243 | |
| 237 | - if (isset($section['posttext'])) |
|
| 238 | - echo ' |
|
| 244 | + if (isset($section['posttext'])) { |
|
| 245 | + echo ' |
|
| 239 | 246 | <hr> |
| 240 | 247 | <p>', $section['posttext'], '</p>'; |
| 248 | + } |
|
| 241 | 249 | } |
| 242 | 250 | |
| 243 | 251 | echo ' |
@@ -252,9 +260,10 @@ discard block |
||
| 252 | 260 | smfSupportVersions.forum = "', $context['forum_version'], '";'; |
| 253 | 261 | |
| 254 | 262 | // Don't worry, none of this is logged, it's just used to give information that might be of use. |
| 255 | - foreach ($context['current_versions'] as $variable => $version) |
|
| 256 | - echo ' |
|
| 263 | + foreach ($context['current_versions'] as $variable => $version) { |
|
| 264 | + echo ' |
|
| 257 | 265 | smfSupportVersions.', $variable, ' = "', $version['version'], '";'; |
| 266 | + } |
|
| 258 | 267 | |
| 259 | 268 | // Now we just have to include the script and wait ;). |
| 260 | 269 | echo ' |
@@ -350,8 +359,8 @@ discard block |
||
| 350 | 359 | <tbody>'; |
| 351 | 360 | |
| 352 | 361 | // Loop through every source file displaying its version - using javascript. |
| 353 | - foreach ($context['file_versions'] as $filename => $version) |
|
| 354 | - echo ' |
|
| 362 | + foreach ($context['file_versions'] as $filename => $version) { |
|
| 363 | + echo ' |
|
| 355 | 364 | <tr class="windowbg"> |
| 356 | 365 | <td class="half_table"> |
| 357 | 366 | ', $filename, ' |
@@ -363,6 +372,7 @@ discard block |
||
| 363 | 372 | <em id="currentSources', $filename, '">??</em> |
| 364 | 373 | </td> |
| 365 | 374 | </tr>'; |
| 375 | + } |
|
| 366 | 376 | |
| 367 | 377 | // Default template files. |
| 368 | 378 | echo ' |
@@ -388,8 +398,8 @@ discard block |
||
| 388 | 398 | <table id="Default" class="table_grid"> |
| 389 | 399 | <tbody>'; |
| 390 | 400 | |
| 391 | - foreach ($context['default_template_versions'] as $filename => $version) |
|
| 392 | - echo ' |
|
| 401 | + foreach ($context['default_template_versions'] as $filename => $version) { |
|
| 402 | + echo ' |
|
| 393 | 403 | <tr class="windowbg"> |
| 394 | 404 | <td class="half_table"> |
| 395 | 405 | ', $filename, ' |
@@ -401,6 +411,7 @@ discard block |
||
| 401 | 411 | <em id="currentDefault', $filename, '">??</em> |
| 402 | 412 | </td> |
| 403 | 413 | </tr>'; |
| 414 | + } |
|
| 404 | 415 | |
| 405 | 416 | // Now the language files... |
| 406 | 417 | echo ' |
@@ -428,8 +439,8 @@ discard block |
||
| 428 | 439 | |
| 429 | 440 | foreach ($context['default_language_versions'] as $language => $files) |
| 430 | 441 | { |
| 431 | - foreach ($files as $filename => $version) |
|
| 432 | - echo ' |
|
| 442 | + foreach ($files as $filename => $version) { |
|
| 443 | + echo ' |
|
| 433 | 444 | <tr class="windowbg"> |
| 434 | 445 | <td class="half_table"> |
| 435 | 446 | ', $filename, '.<em>', $language, '</em>.php |
@@ -441,6 +452,7 @@ discard block |
||
| 441 | 452 | <em id="current', $filename, '.', $language, '">??</em> |
| 442 | 453 | </td> |
| 443 | 454 | </tr>'; |
| 455 | + } |
|
| 444 | 456 | } |
| 445 | 457 | |
| 446 | 458 | echo ' |
@@ -470,8 +482,8 @@ discard block |
||
| 470 | 482 | <table id="Templates" class="table_grid"> |
| 471 | 483 | <tbody>'; |
| 472 | 484 | |
| 473 | - foreach ($context['template_versions'] as $filename => $version) |
|
| 474 | - echo ' |
|
| 485 | + foreach ($context['template_versions'] as $filename => $version) { |
|
| 486 | + echo ' |
|
| 475 | 487 | <tr class="windowbg"> |
| 476 | 488 | <td class="half_table"> |
| 477 | 489 | ', $filename, ' |
@@ -483,6 +495,7 @@ discard block |
||
| 483 | 495 | <em id="currentTemplates', $filename, '">??</em> |
| 484 | 496 | </td> |
| 485 | 497 | </tr>'; |
| 498 | + } |
|
| 486 | 499 | |
| 487 | 500 | echo ' |
| 488 | 501 | </tbody> |
@@ -512,8 +525,8 @@ discard block |
||
| 512 | 525 | <table id="Tasks" class="table_grid"> |
| 513 | 526 | <tbody>'; |
| 514 | 527 | |
| 515 | - foreach ($context['tasks_versions'] as $filename => $version) |
|
| 516 | - echo ' |
|
| 528 | + foreach ($context['tasks_versions'] as $filename => $version) { |
|
| 529 | + echo ' |
|
| 517 | 530 | <tr class="windowbg"> |
| 518 | 531 | <td class="half_table"> |
| 519 | 532 | ', $filename, ' |
@@ -525,6 +538,7 @@ discard block |
||
| 525 | 538 | <em id="currentTasks', $filename, '">??</em> |
| 526 | 539 | </td> |
| 527 | 540 | </tr>'; |
| 541 | + } |
|
| 528 | 542 | |
| 529 | 543 | echo ' |
| 530 | 544 | </tbody> |
@@ -565,9 +579,10 @@ discard block |
||
| 565 | 579 | { |
| 566 | 580 | global $context, $scripturl, $txt, $modSettings; |
| 567 | 581 | |
| 568 | - if (!empty($context['saved_successful'])) |
|
| 569 | - echo ' |
|
| 582 | + if (!empty($context['saved_successful'])) { |
|
| 583 | + echo ' |
|
| 570 | 584 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 585 | + } |
|
| 571 | 586 | |
| 572 | 587 | // First section is for adding/removing words from the censored list. |
| 573 | 588 | echo ' |
@@ -581,11 +596,12 @@ discard block |
||
| 581 | 596 | <p>', $txt['admin_censored_where'], '</p>'; |
| 582 | 597 | |
| 583 | 598 | // Show text boxes for censoring [bad ] => [good ]. |
| 584 | - foreach ($context['censored_words'] as $vulgar => $proper) |
|
| 585 | - echo ' |
|
| 599 | + foreach ($context['censored_words'] as $vulgar => $proper) { |
|
| 600 | + echo ' |
|
| 586 | 601 | <div class="block"> |
| 587 | 602 | <input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30"> => <input type="text" name="censor_proper[]" value="', $proper, '" size="30"> |
| 588 | 603 | </div>'; |
| 604 | + } |
|
| 589 | 605 | |
| 590 | 606 | // Now provide a way to censor more words. |
| 591 | 607 | echo ' |
@@ -658,27 +674,30 @@ discard block |
||
| 658 | 674 | <div class="windowbg"> |
| 659 | 675 | ', $txt['not_done_reason']; |
| 660 | 676 | |
| 661 | - if (!empty($context['continue_percent'])) |
|
| 662 | - echo ' |
|
| 677 | + if (!empty($context['continue_percent'])) { |
|
| 678 | + echo ' |
|
| 663 | 679 | <div class="progress_bar"> |
| 664 | 680 | <span>', $context['continue_percent'], '%</span> |
| 665 | 681 | <div class="bar" style="width: ', $context['continue_percent'], '%;"></div> |
| 666 | 682 | </div>'; |
| 683 | + } |
|
| 667 | 684 | |
| 668 | - if (!empty($context['substep_enabled'])) |
|
| 669 | - echo ' |
|
| 685 | + if (!empty($context['substep_enabled'])) { |
|
| 686 | + echo ' |
|
| 670 | 687 | <div class="progress_bar progress_blue"> |
| 671 | 688 | <span>', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</span> |
| 672 | 689 | <div class="bar" style="width: ', $context['substep_continue_percent'], '%;"></div> |
| 673 | 690 | </div>'; |
| 691 | + } |
|
| 674 | 692 | |
| 675 | 693 | echo ' |
| 676 | 694 | <form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit">'; |
| 677 | 695 | |
| 678 | 696 | // Do we have a token? |
| 679 | - if (isset($context['not_done_token']) && isset($context[$context['not_done_token'] . '_token'], $context[$context['not_done_token'] . '_token_var'])) |
|
| 680 | - echo ' |
|
| 697 | + if (isset($context['not_done_token']) && isset($context[$context['not_done_token'] . '_token'], $context[$context['not_done_token'] . '_token_var'])) { |
|
| 698 | + echo ' |
|
| 681 | 699 | <input type="hidden" name="', $context[$context['not_done_token'] . '_token_var'], '" value="', $context[$context['not_done_token'] . '_token'], '">'; |
| 700 | + } |
|
| 682 | 701 | |
| 683 | 702 | echo ' |
| 684 | 703 | <input type="submit" name="cont" value="', $txt['not_done_continue'], '" class="button"> |
@@ -711,34 +730,39 @@ discard block |
||
| 711 | 730 | { |
| 712 | 731 | global $context, $txt, $scripturl; |
| 713 | 732 | |
| 714 | - if (!empty($context['saved_successful'])) |
|
| 715 | - echo ' |
|
| 733 | + if (!empty($context['saved_successful'])) { |
|
| 734 | + echo ' |
|
| 716 | 735 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 717 | - elseif (!empty($context['saved_failed'])) |
|
| 718 | - echo ' |
|
| 736 | + } elseif (!empty($context['saved_failed'])) { |
|
| 737 | + echo ' |
|
| 719 | 738 | <div class="errorbox">', sprintf($txt['settings_not_saved'], $context['saved_failed']), '</div>'; |
| 739 | + } |
|
| 720 | 740 | |
| 721 | - if (!empty($context['settings_pre_javascript'])) |
|
| 722 | - echo ' |
|
| 741 | + if (!empty($context['settings_pre_javascript'])) { |
|
| 742 | + echo ' |
|
| 723 | 743 | <script>', $context['settings_pre_javascript'], '</script>'; |
| 744 | + } |
|
| 724 | 745 | |
| 725 | - if (!empty($context['settings_insert_above'])) |
|
| 726 | - echo $context['settings_insert_above']; |
|
| 746 | + if (!empty($context['settings_insert_above'])) { |
|
| 747 | + echo $context['settings_insert_above']; |
|
| 748 | + } |
|
| 727 | 749 | |
| 728 | 750 | echo ' |
| 729 | 751 | <form id="admin_form_wrapper" action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>'; |
| 730 | 752 | |
| 731 | 753 | // Is there a custom title? |
| 732 | - if (isset($context['settings_title'])) |
|
| 733 | - echo ' |
|
| 754 | + if (isset($context['settings_title'])) { |
|
| 755 | + echo ' |
|
| 734 | 756 | <div class="cat_bar"> |
| 735 | 757 | <h3 class="catbg">', $context['settings_title'], '</h3> |
| 736 | 758 | </div>'; |
| 759 | + } |
|
| 737 | 760 | |
| 738 | 761 | // Have we got a message to display? |
| 739 | - if (!empty($context['settings_message'])) |
|
| 740 | - echo ' |
|
| 762 | + if (!empty($context['settings_message'])) { |
|
| 763 | + echo ' |
|
| 741 | 764 | <div class="information">', $context['settings_message'], '</div>'; |
| 765 | + } |
|
| 742 | 766 | |
| 743 | 767 | // Now actually loop through all the variables. |
| 744 | 768 | $is_open = false; |
@@ -791,8 +815,9 @@ discard block |
||
| 791 | 815 | // Hang about? Are you pulling my leg - a callback?! |
| 792 | 816 | if (is_array($config_var) && $config_var['type'] == 'callback') |
| 793 | 817 | { |
| 794 | - if (function_exists('template_callback_' . $config_var['name'])) |
|
| 795 | - call_user_func('template_callback_' . $config_var['name']); |
|
| 818 | + if (function_exists('template_callback_' . $config_var['name'])) { |
|
| 819 | + call_user_func('template_callback_' . $config_var['name']); |
|
| 820 | + } |
|
| 796 | 821 | |
| 797 | 822 | continue; |
| 798 | 823 | } |
@@ -822,9 +847,10 @@ discard block |
||
| 822 | 847 | $text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time'); |
| 823 | 848 | |
| 824 | 849 | // Show the [?] button. |
| 825 | - if ($config_var['help']) |
|
| 826 | - echo ' |
|
| 850 | + if ($config_var['help']) { |
|
| 851 | + echo ' |
|
| 827 | 852 | <a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'], '"></span></a> '; |
| 853 | + } |
|
| 828 | 854 | |
| 829 | 855 | echo ' |
| 830 | 856 | <a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span> |
@@ -833,23 +859,26 @@ discard block |
||
| 833 | 859 | $config_var['preinput']; |
| 834 | 860 | |
| 835 | 861 | // Show a check box. |
| 836 | - if ($config_var['type'] == 'check') |
|
| 837 | - echo ' |
|
| 862 | + if ($config_var['type'] == 'check') { |
|
| 863 | + echo ' |
|
| 838 | 864 | <input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked' : ''), ' value="1">'; |
| 865 | + } |
|
| 839 | 866 | // Escape (via htmlspecialchars.) the text box. |
| 840 | - elseif ($config_var['type'] == 'password') |
|
| 841 | - echo ' |
|
| 867 | + elseif ($config_var['type'] == 'password') { |
|
| 868 | + echo ' |
|
| 842 | 869 | <input type="password"', $disabled, $javascript, ' name="', $config_var['name'], '[0]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' value="*#fakepass#*" onfocus="this.value = \'\'; this.form.', $config_var['name'], '.disabled = false;"><br> |
| 843 | 870 | <input type="password" disabled id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), '>'; |
| 871 | + } |
|
| 844 | 872 | // Show a selection box. |
| 845 | 873 | elseif ($config_var['type'] == 'select') |
| 846 | 874 | { |
| 847 | 875 | echo ' |
| 848 | 876 | <select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), (!empty($config_var['multiple']) && !empty($config_var['size']) ? ' size="' . $config_var['size'] . '"' : ''), '>'; |
| 849 | 877 | |
| 850 | - foreach ($config_var['data'] as $option) |
|
| 851 | - echo ' |
|
| 878 | + foreach ($config_var['data'] as $option) { |
|
| 879 | + echo ' |
|
| 852 | 880 | <option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected' : ''), '>', $option[1], '</option>'; |
| 881 | + } |
|
| 853 | 882 | echo ' |
| 854 | 883 | </select>'; |
| 855 | 884 | } |
@@ -866,16 +895,18 @@ discard block |
||
| 866 | 895 | |
| 867 | 896 | foreach ($context['board_list'] as $id_cat => $cat) |
| 868 | 897 | { |
| 869 | - if (!$first) |
|
| 870 | - echo ' |
|
| 898 | + if (!$first) { |
|
| 899 | + echo ' |
|
| 871 | 900 | <hr>'; |
| 901 | + } |
|
| 872 | 902 | echo ' |
| 873 | 903 | <strong>', $cat['name'], '</strong> |
| 874 | 904 | <ul>'; |
| 875 | 905 | |
| 876 | - foreach ($cat['boards'] as $id_board => $brd) |
|
| 877 | - echo ' |
|
| 906 | + foreach ($cat['boards'] as $id_board => $brd) { |
|
| 907 | + echo ' |
|
| 878 | 908 | <li><label><input type="checkbox" name="', $config_var['name'], '[', $brd['id'], ']" value="1"', in_array($brd['id'], $config_var['value']) ? ' checked' : '', '> ', $brd['child_level'] > 0 ? str_repeat(' ', $brd['child_level']) : '', $brd['name'], '</label></li>'; |
| 909 | + } |
|
| 879 | 910 | |
| 880 | 911 | echo ' |
| 881 | 912 | </ul>'; |
@@ -885,12 +916,14 @@ discard block |
||
| 885 | 916 | </fieldset>'; |
| 886 | 917 | } |
| 887 | 918 | // Text area? |
| 888 | - elseif ($config_var['type'] == 'large_text') |
|
| 889 | - echo ' |
|
| 919 | + elseif ($config_var['type'] == 'large_text') { |
|
| 920 | + echo ' |
|
| 890 | 921 | <textarea rows="', (!empty($config_var['size']) ? $config_var['size'] : (!empty($config_var['rows']) ? $config_var['rows'] : 4)), '" cols="', (!empty($config_var['cols']) ? $config_var['cols'] : 30), '" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>'; |
| 922 | + } |
|
| 891 | 923 | // Permission group? |
| 892 | - elseif ($config_var['type'] == 'permissions') |
|
| 893 | - theme_inline_permissions($config_var['name']); |
|
| 924 | + elseif ($config_var['type'] == 'permissions') { |
|
| 925 | + theme_inline_permissions($config_var['name']); |
|
| 926 | + } |
|
| 894 | 927 | |
| 895 | 928 | // BBC selection? |
| 896 | 929 | elseif ($config_var['type'] == 'bbc') |
@@ -902,22 +935,24 @@ discard block |
||
| 902 | 935 | |
| 903 | 936 | foreach ($context['bbc_columns'] as $bbcColumn) |
| 904 | 937 | { |
| 905 | - foreach ($bbcColumn as $bbcTag) |
|
| 906 | - echo ' |
|
| 938 | + foreach ($bbcColumn as $bbcTag) { |
|
| 939 | + echo ' |
|
| 907 | 940 | <li class="list_bbc floatleft"> |
| 908 | 941 | <input type="checkbox" name="', $config_var['name'], '_enabledTags[]" id="tag_', $config_var['name'], '_', $bbcTag['tag'], '" value="', $bbcTag['tag'], '"', !in_array($bbcTag['tag'], $context['bbc_sections'][$config_var['name']]['disabled']) ? ' checked' : '', '> <label for="tag_', $config_var['name'], '_', $bbcTag['tag'], '">', $bbcTag['tag'], '</label>', $bbcTag['show_help'] ? ' (<a href="' . $scripturl . '?action=helpadmin;help=tag_' . $bbcTag['tag'] . '" onclick="return reqOverlayDiv(this.href);">?</a>)' : '', ' |
| 909 | 942 | </li>'; |
| 943 | + } |
|
| 910 | 944 | } |
| 911 | 945 | echo ' </ul> |
| 912 | 946 | <input type="checkbox" id="bbc_', $config_var['name'], '_select_all" onclick="invertAll(this, this.form, \'', $config_var['name'], '_enabledTags\');"', $context['bbc_sections'][$config_var['name']]['all_selected'] ? ' checked' : '', '> <label for="bbc_', $config_var['name'], '_select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label> |
| 913 | 947 | </fieldset>'; |
| 914 | 948 | } |
| 915 | 949 | // A simple message? |
| 916 | - elseif ($config_var['type'] == 'var_message') |
|
| 917 | - echo ' |
|
| 950 | + elseif ($config_var['type'] == 'var_message') { |
|
| 951 | + echo ' |
|
| 918 | 952 | <div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '> |
| 919 | 953 | ', $config_var['var_message'], ' |
| 920 | 954 | </div>'; |
| 955 | + } |
|
| 921 | 956 | // Assume it must be a text box |
| 922 | 957 | else |
| 923 | 958 | { |
@@ -942,61 +977,69 @@ discard block |
||
| 942 | 977 | ' . $config_var['postinput'] : '',' |
| 943 | 978 | </dd>'; |
| 944 | 979 | } |
| 945 | - } |
|
| 946 | - else |
|
| 980 | + } else |
|
| 947 | 981 | { |
| 948 | 982 | // Just show a separator. |
| 949 | - if ($config_var == '') |
|
| 950 | - echo ' |
|
| 983 | + if ($config_var == '') { |
|
| 984 | + echo ' |
|
| 951 | 985 | </dl> |
| 952 | 986 | <hr> |
| 953 | 987 | <dl class="settings">'; |
| 954 | - else |
|
| 955 | - echo ' |
|
| 988 | + } else { |
|
| 989 | + echo ' |
|
| 956 | 990 | <dd> |
| 957 | 991 | <strong>' . $config_var . '</strong> |
| 958 | 992 | </dd>'; |
| 993 | + } |
|
| 959 | 994 | } |
| 960 | 995 | } |
| 961 | 996 | |
| 962 | - if ($is_open) |
|
| 963 | - echo ' |
|
| 997 | + if ($is_open) { |
|
| 998 | + echo ' |
|
| 964 | 999 | </dl>'; |
| 1000 | + } |
|
| 965 | 1001 | |
| 966 | - if (empty($context['settings_save_dont_show'])) |
|
| 967 | - echo ' |
|
| 1002 | + if (empty($context['settings_save_dont_show'])) { |
|
| 1003 | + echo ' |
|
| 968 | 1004 | <input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button">'; |
| 1005 | + } |
|
| 969 | 1006 | |
| 970 | - if ($is_open) |
|
| 971 | - echo ' |
|
| 1007 | + if ($is_open) { |
|
| 1008 | + echo ' |
|
| 972 | 1009 | </div><!-- .windowbg -->'; |
| 1010 | + } |
|
| 973 | 1011 | |
| 974 | 1012 | |
| 975 | 1013 | // At least one token has to be used! |
| 976 | - if (isset($context['admin-ssc_token'])) |
|
| 977 | - echo ' |
|
| 1014 | + if (isset($context['admin-ssc_token'])) { |
|
| 1015 | + echo ' |
|
| 978 | 1016 | <input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '">'; |
| 1017 | + } |
|
| 979 | 1018 | |
| 980 | - if (isset($context['admin-dbsc_token'])) |
|
| 981 | - echo ' |
|
| 1019 | + if (isset($context['admin-dbsc_token'])) { |
|
| 1020 | + echo ' |
|
| 982 | 1021 | <input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '">'; |
| 1022 | + } |
|
| 983 | 1023 | |
| 984 | - if (isset($context['admin-mp_token'])) |
|
| 985 | - echo ' |
|
| 1024 | + if (isset($context['admin-mp_token'])) { |
|
| 1025 | + echo ' |
|
| 986 | 1026 | <input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '">'; |
| 1027 | + } |
|
| 987 | 1028 | |
| 988 | 1029 | echo ' |
| 989 | 1030 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 990 | 1031 | </form>'; |
| 991 | 1032 | |
| 992 | - if (!empty($context['settings_post_javascript'])) |
|
| 993 | - echo ' |
|
| 1033 | + if (!empty($context['settings_post_javascript'])) { |
|
| 1034 | + echo ' |
|
| 994 | 1035 | <script> |
| 995 | 1036 | ', $context['settings_post_javascript'], ' |
| 996 | 1037 | </script>'; |
| 1038 | + } |
|
| 997 | 1039 | |
| 998 | - if (!empty($context['settings_insert_below'])) |
|
| 999 | - echo $context['settings_insert_below']; |
|
| 1040 | + if (!empty($context['settings_insert_below'])) { |
|
| 1041 | + echo $context['settings_insert_below']; |
|
| 1042 | + } |
|
| 1000 | 1043 | |
| 1001 | 1044 | // We may have added a board listing. If we did, we need to make it work. |
| 1002 | 1045 | addInlineJavascript(' |
@@ -1019,9 +1062,10 @@ discard block |
||
| 1019 | 1062 | { |
| 1020 | 1063 | global $context, $txt; |
| 1021 | 1064 | |
| 1022 | - if (!empty($context['saved_successful'])) |
|
| 1023 | - echo ' |
|
| 1065 | + if (!empty($context['saved_successful'])) { |
|
| 1066 | + echo ' |
|
| 1024 | 1067 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 1068 | + } |
|
| 1025 | 1069 | |
| 1026 | 1070 | // Standard fields. |
| 1027 | 1071 | template_show_list('standard_profile_fields'); |
@@ -1055,11 +1099,12 @@ discard block |
||
| 1055 | 1099 | { |
| 1056 | 1100 | loadLanguage('Errors'); |
| 1057 | 1101 | |
| 1058 | - if (isset($txt['custom_option_' . $_GET['msg']])) |
|
| 1059 | - echo ' |
|
| 1102 | + if (isset($txt['custom_option_' . $_GET['msg']])) { |
|
| 1103 | + echo ' |
|
| 1060 | 1104 | <div class="errorbox">', |
| 1061 | 1105 | $txt['custom_option_' . $_GET['msg']], ' |
| 1062 | 1106 | </div>'; |
| 1107 | + } |
|
| 1063 | 1108 | } |
| 1064 | 1109 | |
| 1065 | 1110 | echo ' |
@@ -1125,9 +1170,10 @@ discard block |
||
| 1125 | 1170 | <dd> |
| 1126 | 1171 | <select name="placement" id="placement">'; |
| 1127 | 1172 | |
| 1128 | - foreach ($context['cust_profile_fields_placement'] as $order => $name) |
|
| 1129 | - echo ' |
|
| 1173 | + foreach ($context['cust_profile_fields_placement'] as $order => $name) { |
|
| 1174 | + echo ' |
|
| 1130 | 1175 | <option value="', $order, '"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_' . $name], '</option>'; |
| 1176 | + } |
|
| 1131 | 1177 | |
| 1132 | 1178 | echo ' |
| 1133 | 1179 | </select> |
@@ -1151,9 +1197,10 @@ discard block |
||
| 1151 | 1197 | <dd> |
| 1152 | 1198 | <select name="field_type" id="field_type" onchange="updateInputBoxes();">'; |
| 1153 | 1199 | |
| 1154 | - foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) |
|
| 1155 | - echo ' |
|
| 1200 | + foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) { |
|
| 1201 | + echo ' |
|
| 1156 | 1202 | <option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>'; |
| 1203 | + } |
|
| 1157 | 1204 | |
| 1158 | 1205 | echo ' |
| 1159 | 1206 | </select> |
@@ -1185,9 +1232,10 @@ discard block |
||
| 1185 | 1232 | </dt> |
| 1186 | 1233 | <dd id="options_dd">'; |
| 1187 | 1234 | |
| 1188 | - foreach ($context['field']['options'] as $k => $option) |
|
| 1189 | - echo ' |
|
| 1235 | + foreach ($context['field']['options'] as $k => $option) { |
|
| 1236 | + echo ' |
|
| 1190 | 1237 | ', $k == 0 ? '' : '<br>', '<input type="radio" name="default_select" value="', $k, '"', $context['field']['default_select'] == $option ? ' checked' : '', '><input type="text" name="select_option[', $k, ']" value="', $option, '">'; |
| 1238 | + } |
|
| 1191 | 1239 | |
| 1192 | 1240 | echo ' |
| 1193 | 1241 | <span id="addopt"></span> |
@@ -1251,9 +1299,10 @@ discard block |
||
| 1251 | 1299 | </fieldset> |
| 1252 | 1300 | <input type="submit" name="save" value="', $txt['save'], '" class="button">'; |
| 1253 | 1301 | |
| 1254 | - if ($context['fid']) |
|
| 1255 | - echo ' |
|
| 1302 | + if ($context['fid']) { |
|
| 1303 | + echo ' |
|
| 1256 | 1304 | <input type="submit" name="delete" value="', $txt['delete'], '" data-confirm="', $txt['custom_edit_delete_sure'], '" class="button you_sure">'; |
| 1305 | + } |
|
| 1257 | 1306 | |
| 1258 | 1307 | echo ' |
| 1259 | 1308 | </div><!-- .windowbg --> |
@@ -1299,8 +1348,7 @@ discard block |
||
| 1299 | 1348 | <p class="centertext"> |
| 1300 | 1349 | <strong>', $txt['admin_search_results_none'], '</strong> |
| 1301 | 1350 | </p>'; |
| 1302 | - } |
|
| 1303 | - else |
|
| 1351 | + } else |
|
| 1304 | 1352 | { |
| 1305 | 1353 | echo ' |
| 1306 | 1354 | <ol class="search_results">'; |
@@ -1327,9 +1375,10 @@ discard block |
||
| 1327 | 1375 | <li> |
| 1328 | 1376 | <a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'], ']'; |
| 1329 | 1377 | |
| 1330 | - if ($result['help']) |
|
| 1331 | - echo ' |
|
| 1378 | + if ($result['help']) { |
|
| 1379 | + echo ' |
|
| 1332 | 1380 | <p class="double_height">', $result['help'], '</p>'; |
| 1381 | + } |
|
| 1333 | 1382 | |
| 1334 | 1383 | echo ' |
| 1335 | 1384 | </li>'; |
@@ -1369,10 +1418,11 @@ discard block |
||
| 1369 | 1418 | <strong>', $txt['setup_verification_answer'], '</strong> |
| 1370 | 1419 | </dd>'; |
| 1371 | 1420 | |
| 1372 | - if (!empty($context['qa_by_lang'][$lang_id])) |
|
| 1373 | - foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1421 | + if (!empty($context['qa_by_lang'][$lang_id])) { |
|
| 1422 | + foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1374 | 1423 | { |
| 1375 | 1424 | $question = $context['question_answers'][$q_id]; |
| 1425 | + } |
|
| 1376 | 1426 | |
| 1377 | 1427 | echo ' |
| 1378 | 1428 | <dt> |
@@ -1380,9 +1430,10 @@ discard block |
||
| 1380 | 1430 | </dt> |
| 1381 | 1431 | <dd>'; |
| 1382 | 1432 | |
| 1383 | - foreach ($question['answers'] as $answer) |
|
| 1384 | - echo ' |
|
| 1433 | + foreach ($question['answers'] as $answer) { |
|
| 1434 | + echo ' |
|
| 1385 | 1435 | <input type="text" name="answer[', $lang_id, '][', $q_id, '][]" value="', $answer, '" size="50" class="verification_answer">'; |
| 1436 | + } |
|
| 1386 | 1437 | |
| 1387 | 1438 | echo ' |
| 1388 | 1439 | <div class="qa_add_answer"><a href="javascript:void(0);">[ ', $txt['setup_verification_add_answer'], ' ]</a></div> |
@@ -1420,11 +1471,12 @@ discard block |
||
| 1420 | 1471 | ', $txt['errors_found'], ': |
| 1421 | 1472 | <ul>'; |
| 1422 | 1473 | |
| 1423 | - foreach ($context['repair_errors'] as $error) |
|
| 1424 | - echo ' |
|
| 1474 | + foreach ($context['repair_errors'] as $error) { |
|
| 1475 | + echo ' |
|
| 1425 | 1476 | <li> |
| 1426 | 1477 | ', $error, ' |
| 1427 | 1478 | </li>'; |
| 1479 | + } |
|
| 1428 | 1480 | |
| 1429 | 1481 | echo ' |
| 1430 | 1482 | </ul> |
@@ -1434,15 +1486,14 @@ discard block |
||
| 1434 | 1486 | <p class="padding"> |
| 1435 | 1487 | <strong><a href="', $scripturl, '?action=admin;area=repairboards;fixErrors;', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $scripturl, '?action=admin;area=maintain">', $txt['no'], '</a></strong> |
| 1436 | 1488 | </p>'; |
| 1437 | - } |
|
| 1438 | - else |
|
| 1439 | - echo ' |
|
| 1489 | + } else { |
|
| 1490 | + echo ' |
|
| 1440 | 1491 | <p>', $txt['maintain_no_errors'], '</p> |
| 1441 | 1492 | <p class="padding"> |
| 1442 | 1493 | <a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a> |
| 1443 | 1494 | </p>'; |
| 1444 | - } |
|
| 1445 | - else |
|
| 1495 | + } |
|
| 1496 | + } else |
|
| 1446 | 1497 | { |
| 1447 | 1498 | if (!empty($context['redirect_to_recount'])) |
| 1448 | 1499 | { |
@@ -1454,8 +1505,7 @@ discard block |
||
| 1454 | 1505 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 1455 | 1506 | <input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '"> |
| 1456 | 1507 | </form>'; |
| 1457 | - } |
|
| 1458 | - else |
|
| 1508 | + } else |
|
| 1459 | 1509 | { |
| 1460 | 1510 | echo ' |
| 1461 | 1511 | <p>', $txt['errors_fixed'], '</p> |
@@ -1545,9 +1595,10 @@ discard block |
||
| 1545 | 1595 | <tr class="windowbg"> |
| 1546 | 1596 | <td class="equal_table">', $key, '</td>'; |
| 1547 | 1597 | |
| 1548 | - foreach ($setting as $key_lm => $value) |
|
| 1549 | - echo ' |
|
| 1598 | + foreach ($setting as $key_lm => $value) { |
|
| 1599 | + echo ' |
|
| 1550 | 1600 | <td class="equal_table">', $value, '</td>'; |
| 1601 | + } |
|
| 1551 | 1602 | |
| 1552 | 1603 | echo ' |
| 1553 | 1604 | </tr>'; |
@@ -1607,8 +1658,8 @@ discard block |
||
| 1607 | 1658 | { |
| 1608 | 1659 | global $context, $txt; |
| 1609 | 1660 | |
| 1610 | - if ($context['user']['is_admin']) |
|
| 1611 | - echo ' |
|
| 1661 | + if ($context['user']['is_admin']) { |
|
| 1662 | + echo ' |
|
| 1612 | 1663 | <span class="floatright admin_search"> |
| 1613 | 1664 | <span class="generic_icons filter centericon"></span> |
| 1614 | 1665 | <input type="search" name="search_term" placeholder="', $txt['admin_search'], '"> |
@@ -1619,6 +1670,7 @@ discard block |
||
| 1619 | 1670 | </select> |
| 1620 | 1671 | <input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button"> |
| 1621 | 1672 | </span>'; |
| 1622 | -} |
|
| 1673 | + } |
|
| 1674 | + } |
|
| 1623 | 1675 | |
| 1624 | 1676 | ?> |
| 1625 | 1677 | \ No newline at end of file |
@@ -19,26 +19,28 @@ discard block |
||
| 19 | 19 | global $context, $settings, $scripturl, $txt, $modSettings; |
| 20 | 20 | |
| 21 | 21 | // Not allowed to edit? |
| 22 | - if (!$context['can_modify']) |
|
| 23 | - echo ' |
|
| 22 | + if (!$context['can_modify']) { |
|
| 23 | + echo ' |
|
| 24 | 24 | <div class="errorbox"> |
| 25 | 25 | ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' |
| 26 | 26 | </div>'; |
| 27 | + } |
|
| 27 | 28 | |
| 28 | 29 | echo ' |
| 29 | 30 | <div id="admin_form_wrapper"> |
| 30 | 31 | <form action="', $scripturl, '?action=admin;area=permissions;sa=quick" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" id="permissionForm">'; |
| 31 | 32 | |
| 32 | - if (!empty($context['profile'])) |
|
| 33 | - echo ' |
|
| 33 | + if (!empty($context['profile'])) { |
|
| 34 | + echo ' |
|
| 34 | 35 | <div class="cat_bar"> |
| 35 | 36 | <h3 class="catbg">', $txt['permissions_for_profile'], ': "', $context['profile']['name'], '"</h3> |
| 36 | 37 | </div>'; |
| 37 | - else |
|
| 38 | - echo ' |
|
| 38 | + } else { |
|
| 39 | + echo ' |
|
| 39 | 40 | <div class="cat_bar"> |
| 40 | 41 | <h3 class="catbg">', $txt['permissions_title'], '</h3> |
| 41 | 42 | </div>'; |
| 43 | + } |
|
| 42 | 44 | |
| 43 | 45 | echo ' |
| 44 | 46 | <table class="table_grid"> |
@@ -47,13 +49,14 @@ discard block |
||
| 47 | 49 | <th>', $txt['membergroups_name'], '</th> |
| 48 | 50 | <th class="small_table">', $txt['membergroups_members_top'], '</th>'; |
| 49 | 51 | |
| 50 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 51 | - echo ' |
|
| 52 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 53 | + echo ' |
|
| 52 | 54 | <th class="small_table">', $txt['membergroups_permissions'], '</th>'; |
| 53 | - else |
|
| 54 | - echo ' |
|
| 55 | + } else { |
|
| 56 | + echo ' |
|
| 55 | 57 | <th class="small_table">', $txt['permissions_allowed'], '</th> |
| 56 | 58 | <th class="small_table">', $txt['permissions_denied'], '</th>'; |
| 59 | + } |
|
| 57 | 60 | |
| 58 | 61 | echo ' |
| 59 | 62 | <th class="small_table">', $context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view'], '</th> |
@@ -71,26 +74,28 @@ discard block |
||
| 71 | 74 | <td> |
| 72 | 75 | ', !empty($group['help']) ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=' . $group['help'] . '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="' . $txt['help'] . '"></span></a> ' : '<img class="icon" src="' . $settings['images_url'] . '/blank.png" alt="' . $txt['help'] . '">', '<span>', $group['name'], '</span>'; |
| 73 | 76 | |
| 74 | - if (!empty($group['children'])) |
|
| 75 | - echo ' |
|
| 77 | + if (!empty($group['children'])) { |
|
| 78 | + echo ' |
|
| 76 | 79 | <br> |
| 77 | 80 | <span class="smalltext">', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"</span>'; |
| 81 | + } |
|
| 78 | 82 | |
| 79 | 83 | echo ' |
| 80 | 84 | </td> |
| 81 | 85 | <td>', $group['can_search'] ? $group['link'] : $group['num_members'], '</td>'; |
| 82 | 86 | |
| 83 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 84 | - echo ' |
|
| 87 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 88 | + echo ' |
|
| 85 | 89 | <td>', $group['num_permissions']['allowed'], '</td>'; |
| 86 | - else |
|
| 87 | - echo ' |
|
| 90 | + } else { |
|
| 91 | + echo ' |
|
| 88 | 92 | <td ', $group['id'] == 1 ? ' style="font-style: italic;"' : '', '> |
| 89 | 93 | ', $group['num_permissions']['allowed'], ' |
| 90 | 94 | </td> |
| 91 | 95 | <td ', $group['id'] == 1 || $group['id'] == -1 ? ' style="font-style: italic;"' : (!empty($group['num_permissions']['denied']) ? ' class="red"' : ''), '> |
| 92 | 96 | ', $group['num_permissions']['denied'], ' |
| 93 | 97 | </td>'; |
| 98 | + } |
|
| 94 | 99 | |
| 95 | 100 | echo ' |
| 96 | 101 | <td> |
@@ -141,10 +146,11 @@ discard block |
||
| 141 | 146 | <select name="copy_from"> |
| 142 | 147 | <option value="empty">(', $txt['permissions_select_membergroup'], ')</option>'; |
| 143 | 148 | |
| 144 | - foreach ($context['groups'] as $group) |
|
| 145 | - if ($group['id'] != 1) |
|
| 149 | + foreach ($context['groups'] as $group) { |
|
| 150 | + if ($group['id'] != 1) |
|
| 146 | 151 | echo ' |
| 147 | 152 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
| 153 | + } |
|
| 148 | 154 | |
| 149 | 155 | echo ' |
| 150 | 156 | </select> |
@@ -154,9 +160,10 @@ discard block |
||
| 154 | 160 | <option value="add">', $txt['permissions_add'], '...</option> |
| 155 | 161 | <option value="clear">', $txt['permissions_remove'], '...</option>'; |
| 156 | 162 | |
| 157 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 158 | - echo ' |
|
| 163 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 164 | + echo ' |
|
| 159 | 165 | <option value="deny">', $txt['permissions_deny'], '...</option>'; |
| 166 | + } |
|
| 160 | 167 | |
| 161 | 168 | echo ' |
| 162 | 169 | </select> |
@@ -167,31 +174,35 @@ discard block |
||
| 167 | 174 | |
| 168 | 175 | foreach ($context['permissions'] as $permissionType) |
| 169 | 176 | { |
| 170 | - if ($permissionType['id'] == 'membergroup' && !empty($context['profile'])) |
|
| 171 | - continue; |
|
| 177 | + if ($permissionType['id'] == 'membergroup' && !empty($context['profile'])) { |
|
| 178 | + continue; |
|
| 179 | + } |
|
| 172 | 180 | |
| 173 | 181 | foreach ($permissionType['columns'] as $column) |
| 174 | 182 | { |
| 175 | 183 | foreach ($column as $permissionGroup) |
| 176 | 184 | { |
| 177 | - if ($permissionGroup['hidden']) |
|
| 178 | - continue; |
|
| 185 | + if ($permissionGroup['hidden']) { |
|
| 186 | + continue; |
|
| 187 | + } |
|
| 179 | 188 | |
| 180 | 189 | echo ' |
| 181 | 190 | <option value="" disabled>[', $permissionGroup['name'], ']</option>'; |
| 182 | 191 | |
| 183 | 192 | foreach ($permissionGroup['permissions'] as $perm) |
| 184 | 193 | { |
| 185 | - if ($perm['hidden']) |
|
| 186 | - continue; |
|
| 194 | + if ($perm['hidden']) { |
|
| 195 | + continue; |
|
| 196 | + } |
|
| 187 | 197 | |
| 188 | - if ($perm['has_own_any']) |
|
| 189 | - echo ' |
|
| 198 | + if ($perm['has_own_any']) { |
|
| 199 | + echo ' |
|
| 190 | 200 | <option value="', $permissionType['id'], '/', $perm['own']['id'], '"> ', $perm['name'], ' (', $perm['own']['name'], ')</option> |
| 191 | 201 | <option value="', $permissionType['id'], '/', $perm['any']['id'], '"> ', $perm['name'], ' (', $perm['any']['name'], ')</option>'; |
| 192 | - else |
|
| 193 | - echo ' |
|
| 202 | + } else { |
|
| 203 | + echo ' |
|
| 194 | 204 | <option value="', $permissionType['id'], '/', $perm['id'], '"> ', $perm['name'], '</option>'; |
| 205 | + } |
|
| 195 | 206 | } |
| 196 | 207 | } |
| 197 | 208 | } |
@@ -256,9 +267,10 @@ discard block |
||
| 256 | 267 | } |
| 257 | 268 | </script>'; |
| 258 | 269 | |
| 259 | - if (!empty($context['profile'])) |
|
| 260 | - echo ' |
|
| 270 | + if (!empty($context['profile'])) { |
|
| 271 | + echo ' |
|
| 261 | 272 | <input type="hidden" name="pid" value="', $context['profile']['id'], '">'; |
| 273 | + } |
|
| 262 | 274 | |
| 263 | 275 | echo ' |
| 264 | 276 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -302,9 +314,10 @@ discard block |
||
| 302 | 314 | <h3 class="subbg">', $category['name'], '</h3> |
| 303 | 315 | </div>'; |
| 304 | 316 | |
| 305 | - if (!empty($category['boards'])) |
|
| 306 | - echo ' |
|
| 317 | + if (!empty($category['boards'])) { |
|
| 318 | + echo ' |
|
| 307 | 319 | <ul class="perm_boards flow_hidden">'; |
| 320 | + } |
|
| 308 | 321 | |
| 309 | 322 | foreach ($category['boards'] as $board) |
| 310 | 323 | { |
@@ -320,33 +333,36 @@ discard block |
||
| 320 | 333 | echo ' |
| 321 | 334 | <select name="boardprofile[', $board['id'], ']">'; |
| 322 | 335 | |
| 323 | - foreach ($context['profiles'] as $id => $profile) |
|
| 324 | - echo ' |
|
| 336 | + foreach ($context['profiles'] as $id => $profile) { |
|
| 337 | + echo ' |
|
| 325 | 338 | <option value="', $id, '"', $id == $board['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
| 339 | + } |
|
| 326 | 340 | |
| 327 | 341 | echo ' |
| 328 | 342 | </select>'; |
| 329 | - } |
|
| 330 | - else |
|
| 331 | - echo ' |
|
| 343 | + } else { |
|
| 344 | + echo ' |
|
| 332 | 345 | <a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $board['profile'], ';', $context['session_var'], '=', $context['session_id'], '">', $board['profile_name'], '</a>'; |
| 346 | + } |
|
| 333 | 347 | |
| 334 | 348 | echo ' |
| 335 | 349 | </span> |
| 336 | 350 | </li>'; |
| 337 | 351 | } |
| 338 | 352 | |
| 339 | - if (!empty($category['boards'])) |
|
| 340 | - echo ' |
|
| 353 | + if (!empty($category['boards'])) { |
|
| 354 | + echo ' |
|
| 341 | 355 | </ul>'; |
| 356 | + } |
|
| 342 | 357 | } |
| 343 | 358 | |
| 344 | - if ($context['edit_all']) |
|
| 345 | - echo ' |
|
| 359 | + if ($context['edit_all']) { |
|
| 360 | + echo ' |
|
| 346 | 361 | <input type="submit" name="save_changes" value="', $txt['save'], '" class="button">'; |
| 347 | - else |
|
| 348 | - echo ' |
|
| 362 | + } else { |
|
| 363 | + echo ' |
|
| 349 | 364 | <a class="button" href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">', $txt['permissions_board_all'], '</a>'; |
| 365 | + } |
|
| 350 | 366 | |
| 351 | 367 | echo ' |
| 352 | 368 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -385,12 +401,13 @@ discard block |
||
| 385 | 401 | <tr class="windowbg"> |
| 386 | 402 | <td>'; |
| 387 | 403 | |
| 388 | - if (!empty($context['show_rename_boxes']) && $profile['can_edit']) |
|
| 389 | - echo ' |
|
| 404 | + if (!empty($context['show_rename_boxes']) && $profile['can_edit']) { |
|
| 405 | + echo ' |
|
| 390 | 406 | <input type="text" name="rename_profile[', $profile['id'], ']" value="', $profile['name'], '">'; |
| 391 | - else |
|
| 392 | - echo ' |
|
| 407 | + } else { |
|
| 408 | + echo ' |
|
| 393 | 409 | <a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $profile['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $profile['name'], '</a>'; |
| 410 | + } |
|
| 394 | 411 | |
| 395 | 412 | echo ' |
| 396 | 413 | </td> |
@@ -410,9 +427,10 @@ discard block |
||
| 410 | 427 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 411 | 428 | <input type="hidden" name="', $context['admin-mpp_token_var'], '" value="', $context['admin-mpp_token'], '">'; |
| 412 | 429 | |
| 413 | - if ($context['can_edit_something']) |
|
| 414 | - echo ' |
|
| 430 | + if ($context['can_edit_something']) { |
|
| 431 | + echo ' |
|
| 415 | 432 | <input type="submit" name="rename" value="', empty($context['show_rename_boxes']) ? $txt['permissions_profile_rename'] : $txt['permissions_commit'], '" class="button">'; |
| 433 | + } |
|
| 416 | 434 | |
| 417 | 435 | echo ' |
| 418 | 436 | <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" class="button" ', !empty($context['show_rename_boxes']) ? ' style="display:none"' : '', '> |
@@ -437,9 +455,10 @@ discard block |
||
| 437 | 455 | <dd> |
| 438 | 456 | <select name="copy_from">'; |
| 439 | 457 | |
| 440 | - foreach ($context['profiles'] as $id => $profile) |
|
| 441 | - echo ' |
|
| 458 | + foreach ($context['profiles'] as $id => $profile) { |
|
| 459 | + echo ' |
|
| 442 | 460 | <option value="', $id, '">', $profile['name'], '</option>'; |
| 461 | + } |
|
| 443 | 462 | |
| 444 | 463 | echo ' |
| 445 | 464 | </select> |
@@ -461,13 +480,13 @@ discard block |
||
| 461 | 480 | global $context, $scripturl, $txt, $modSettings; |
| 462 | 481 | |
| 463 | 482 | // Cannot be edited? |
| 464 | - if (!$context['profile']['can_modify']) |
|
| 465 | - echo ' |
|
| 483 | + if (!$context['profile']['can_modify']) { |
|
| 484 | + echo ' |
|
| 466 | 485 | <div class="errorbox"> |
| 467 | 486 | ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' |
| 468 | 487 | </div>'; |
| 469 | - else |
|
| 470 | - echo ' |
|
| 488 | + } else { |
|
| 489 | + echo ' |
|
| 471 | 490 | <script> |
| 472 | 491 | window.smf_usedDeny = false; |
| 473 | 492 | |
@@ -479,26 +498,29 @@ discard block |
||
| 479 | 498 | return true; |
| 480 | 499 | } |
| 481 | 500 | </script>'; |
| 501 | + } |
|
| 482 | 502 | |
| 483 | 503 | echo ' |
| 484 | 504 | <form id="permissions" action="', $scripturl, '?action=admin;area=permissions;sa=modify2;group=', $context['group']['id'], ';pid=', $context['profile']['id'], '" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" onsubmit="return warnAboutDeny();">'; |
| 485 | 505 | |
| 486 | - if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) |
|
| 487 | - echo ' |
|
| 506 | + if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) { |
|
| 507 | + echo ' |
|
| 488 | 508 | <div class="information"> |
| 489 | 509 | ', $txt['permissions_option_desc'], ' |
| 490 | 510 | </div>'; |
| 511 | + } |
|
| 491 | 512 | |
| 492 | 513 | echo ' |
| 493 | 514 | <div class="cat_bar"> |
| 494 | 515 | <h3 class="catbg">'; |
| 495 | 516 | |
| 496 | - if ($context['permission_type'] == 'board') |
|
| 497 | - echo ' |
|
| 517 | + if ($context['permission_type'] == 'board') { |
|
| 518 | + echo ' |
|
| 498 | 519 | ', $txt['permissions_local_for'], ' "', $context['group']['name'], '" ', $txt['permissions_on'], ' "', $context['profile']['name'], '"'; |
| 499 | - else |
|
| 500 | - echo ' |
|
| 520 | + } else { |
|
| 521 | + echo ' |
|
| 501 | 522 | ', $context['permission_type'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'], ' - "', $context['group']['name'], '"'; |
| 523 | + } |
|
| 502 | 524 | echo ' |
| 503 | 525 | </h3> |
| 504 | 526 | </div>'; |
@@ -521,15 +543,17 @@ discard block |
||
| 521 | 543 | template_modify_group_display('board'); |
| 522 | 544 | } |
| 523 | 545 | |
| 524 | - if ($context['profile']['can_modify']) |
|
| 525 | - echo ' |
|
| 546 | + if ($context['profile']['can_modify']) { |
|
| 547 | + echo ' |
|
| 526 | 548 | <div class="padding"> |
| 527 | 549 | <input type="submit" value="', $txt['permissions_commit'], '" class="button"> |
| 528 | 550 | </div>'; |
| 551 | + } |
|
| 529 | 552 | |
| 530 | - foreach ($context['hidden_perms'] as $hidden_perm) |
|
| 531 | - echo ' |
|
| 553 | + foreach ($context['hidden_perms'] as $hidden_perm) { |
|
| 554 | + echo ' |
|
| 532 | 555 | <input type="hidden" name="perm[', $hidden_perm[0], '][', $hidden_perm[1], ']" value="', $hidden_perm[2], '">'; |
| 556 | + } |
|
| 533 | 557 | |
| 534 | 558 | echo ' |
| 535 | 559 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -556,17 +580,19 @@ discard block |
||
| 556 | 580 | |
| 557 | 581 | foreach ($column as $permissionGroup) |
| 558 | 582 | { |
| 559 | - if (empty($permissionGroup['permissions'])) |
|
| 560 | - continue; |
|
| 583 | + if (empty($permissionGroup['permissions'])) { |
|
| 584 | + continue; |
|
| 585 | + } |
|
| 561 | 586 | |
| 562 | 587 | // Are we likely to have something in this group to display or is it all hidden? |
| 563 | 588 | $has_display_content = false; |
| 564 | 589 | if (!$permissionGroup['hidden']) |
| 565 | 590 | { |
| 566 | 591 | // Before we go any further check we are going to have some data to print otherwise we just have a silly heading. |
| 567 | - foreach ($permissionGroup['permissions'] as $permission) |
|
| 568 | - if (!$permission['hidden']) |
|
| 592 | + foreach ($permissionGroup['permissions'] as $permission) { |
|
| 593 | + if (!$permission['hidden']) |
|
| 569 | 594 | $has_display_content = true; |
| 595 | + } |
|
| 570 | 596 | |
| 571 | 597 | if ($has_display_content) |
| 572 | 598 | { |
@@ -575,10 +601,11 @@ discard block |
||
| 575 | 601 | <th></th> |
| 576 | 602 | <th', $context['group']['id'] == -1 ? ' colspan="2"' : '', ' class="smalltext">', $permissionGroup['name'], '</th>'; |
| 577 | 603 | |
| 578 | - if ($context['group']['id'] != -1) |
|
| 579 | - echo ' |
|
| 604 | + if ($context['group']['id'] != -1) { |
|
| 605 | + echo ' |
|
| 580 | 606 | <th>', $txt['permissions_option_own'], '</th> |
| 581 | 607 | <th>', $txt['permissions_option_any'], '</th>'; |
| 608 | + } |
|
| 582 | 609 | |
| 583 | 610 | echo ' |
| 584 | 611 | </tr>'; |
@@ -601,17 +628,18 @@ discard block |
||
| 601 | 628 | // Guests can't do their own thing. |
| 602 | 629 | if ($context['group']['id'] != -1) |
| 603 | 630 | { |
| 604 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 605 | - echo ' |
|
| 631 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 632 | + echo ' |
|
| 606 | 633 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']"', $permission['own']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" id="', $permission['own']['id'], '_on" ', $disable_field, '>'; |
| 607 | - else |
|
| 634 | + } else |
|
| 608 | 635 | { |
| 609 | 636 | echo ' |
| 610 | 637 | <select name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']" ', $disable_field, '>'; |
| 611 | 638 | |
| 612 | - foreach (array('on', 'off', 'deny') as $c) |
|
| 613 | - echo ' |
|
| 639 | + foreach (array('on', 'off', 'deny') as $c) { |
|
| 640 | + echo ' |
|
| 614 | 641 | <option ', $permission['own']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
| 642 | + } |
|
| 615 | 643 | echo ' |
| 616 | 644 | </select>'; |
| 617 | 645 | } |
@@ -621,39 +649,41 @@ discard block |
||
| 621 | 649 | <td>'; |
| 622 | 650 | } |
| 623 | 651 | |
| 624 | - if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) |
|
| 625 | - echo ' |
|
| 652 | + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) { |
|
| 653 | + echo ' |
|
| 626 | 654 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']"', $permission['any']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" ', $disable_field, '>'; |
| 627 | - else |
|
| 655 | + } else |
|
| 628 | 656 | { |
| 629 | 657 | echo ' |
| 630 | 658 | <select name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']" ', $disable_field, '>'; |
| 631 | 659 | |
| 632 | - foreach (array('on', 'off', 'deny') as $c) |
|
| 633 | - echo ' |
|
| 660 | + foreach (array('on', 'off', 'deny') as $c) { |
|
| 661 | + echo ' |
|
| 634 | 662 | <option ', $permission['any']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
| 663 | + } |
|
| 635 | 664 | echo ' |
| 636 | 665 | </select>'; |
| 637 | 666 | } |
| 638 | - } |
|
| 639 | - else |
|
| 667 | + } else |
|
| 640 | 668 | { |
| 641 | - if ($context['group']['id'] != -1) |
|
| 642 | - echo ' |
|
| 669 | + if ($context['group']['id'] != -1) { |
|
| 670 | + echo ' |
|
| 643 | 671 | </td> |
| 644 | 672 | <td>'; |
| 673 | + } |
|
| 645 | 674 | |
| 646 | - if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) |
|
| 647 | - echo ' |
|
| 675 | + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) { |
|
| 676 | + echo ' |
|
| 648 | 677 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['id'], ']"', $permission['select'] == 'on' ? ' checked="checked"' : '', ' value="on" ', $disable_field, '>'; |
| 649 | - else |
|
| 678 | + } else |
|
| 650 | 679 | { |
| 651 | 680 | echo ' |
| 652 | 681 | <select name="perm[', $permission_type['id'], '][', $permission['id'], ']" ', $disable_field, '>'; |
| 653 | 682 | |
| 654 | - foreach (array('on', 'off', 'deny') as $c) |
|
| 655 | - echo ' |
|
| 683 | + foreach (array('on', 'off', 'deny') as $c) { |
|
| 684 | + echo ' |
|
| 656 | 685 | <option ', $permission['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
| 686 | + } |
|
| 657 | 687 | echo ' |
| 658 | 688 | </select>'; |
| 659 | 689 | } |
@@ -685,11 +715,11 @@ discard block |
||
| 685 | 715 | <fieldset id="', $context['current_permission'], '"> |
| 686 | 716 | <legend><a href="javascript:void(0);" onclick="document.getElementById(\'', $context['current_permission'], '\').style.display = \'none\';document.getElementById(\'', $context['current_permission'], '_groups_link\').style.display = \'block\'; return false;" class="toggle_up"> ', $txt['avatar_select_permission'], '</a></legend>'; |
| 687 | 717 | |
| 688 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 689 | - echo ' |
|
| 718 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 719 | + echo ' |
|
| 690 | 720 | <ul>'; |
| 691 | - else |
|
| 692 | - echo ' |
|
| 721 | + } else { |
|
| 722 | + echo ' |
|
| 693 | 723 | <div class="information">', $txt['permissions_option_desc'], '</div> |
| 694 | 724 | <dl class="settings"> |
| 695 | 725 | <dt> |
@@ -699,47 +729,52 @@ discard block |
||
| 699 | 729 | </dt> |
| 700 | 730 | <dd> |
| 701 | 731 | </dd>'; |
| 732 | + } |
|
| 702 | 733 | |
| 703 | 734 | foreach ($context['member_groups'] as $group) |
| 704 | 735 | { |
| 705 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 706 | - echo ' |
|
| 736 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 737 | + echo ' |
|
| 707 | 738 | <dt>'; |
| 708 | - else |
|
| 709 | - echo ' |
|
| 739 | + } else { |
|
| 740 | + echo ' |
|
| 710 | 741 | <li>'; |
| 742 | + } |
|
| 711 | 743 | |
| 712 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 713 | - echo ' |
|
| 744 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 745 | + echo ' |
|
| 714 | 746 | <input type="checkbox" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', '>'; |
| 715 | - else |
|
| 716 | - echo ' |
|
| 747 | + } else { |
|
| 748 | + echo ' |
|
| 717 | 749 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', '></span> |
| 718 | 750 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="off"', $group['status'] == 'off' ? ' checked' : '', '></span> |
| 719 | 751 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="deny"', $group['status'] == 'deny' ? ' checked' : '', '></span>'; |
| 752 | + } |
|
| 720 | 753 | |
| 721 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 722 | - echo ' |
|
| 754 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 755 | + echo ' |
|
| 723 | 756 | </dt> |
| 724 | 757 | <dd> |
| 725 | 758 | <span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span> |
| 726 | 759 | </dd>'; |
| 727 | - else |
|
| 728 | - echo ' |
|
| 760 | + } else { |
|
| 761 | + echo ' |
|
| 729 | 762 | <span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span> |
| 730 | 763 | </li>'; |
| 764 | + } |
|
| 731 | 765 | } |
| 732 | 766 | |
| 733 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 734 | - echo ' |
|
| 767 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 768 | + echo ' |
|
| 735 | 769 | <li> |
| 736 | 770 | <input type="checkbox" onclick="invertAll(this, this.form, \''. $context['current_permission'] . '[\');"> |
| 737 | 771 | <span>', $txt['check_all'], '</span> |
| 738 | 772 | </li> |
| 739 | 773 | </ul>'; |
| 740 | - else |
|
| 741 | - echo ' |
|
| 774 | + } else { |
|
| 775 | + echo ' |
|
| 742 | 776 | </dl>'; |
| 777 | + } |
|
| 743 | 778 | |
| 744 | 779 | echo ' |
| 745 | 780 | </fieldset> |
@@ -779,9 +814,10 @@ discard block |
||
| 779 | 814 | if (!empty($modSettings['postmod_active'])) |
| 780 | 815 | { |
| 781 | 816 | // Got advanced permissions - if so warn! |
| 782 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 783 | - echo ' |
|
| 817 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 818 | + echo ' |
|
| 784 | 819 | <div class="information">', $txt['permissions_post_moderation_deny_note'], '</div>'; |
| 820 | + } |
|
| 785 | 821 | |
| 786 | 822 | echo ' |
| 787 | 823 | <div class="padding"> |
@@ -796,10 +832,11 @@ discard block |
||
| 796 | 832 | ', $txt['permissions_post_moderation_select'], ': |
| 797 | 833 | <select name="pid" onchange="document.forms.postmodForm.submit();">'; |
| 798 | 834 | |
| 799 | - foreach ($context['profiles'] as $profile) |
|
| 800 | - if ($profile['can_modify']) |
|
| 835 | + foreach ($context['profiles'] as $profile) { |
|
| 836 | + if ($profile['can_modify']) |
|
| 801 | 837 | echo ' |
| 802 | 838 | <option value="', $profile['id'], '"', $profile['id'] == $context['current_profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
| 839 | + } |
|
| 803 | 840 | |
| 804 | 841 | echo ' |
| 805 | 842 | </select> |
@@ -820,11 +857,12 @@ discard block |
||
| 820 | 857 | ', $txt['permissions_post_moderation_replies_any'], ' |
| 821 | 858 | </th>'; |
| 822 | 859 | |
| 823 | - if ($modSettings['attachmentEnable'] == 1) |
|
| 824 | - echo ' |
|
| 860 | + if ($modSettings['attachmentEnable'] == 1) { |
|
| 861 | + echo ' |
|
| 825 | 862 | <th class="centercol" colspan="3"> |
| 826 | 863 | ', $txt['permissions_post_moderation_attachments'], ' |
| 827 | 864 | </th>'; |
| 865 | + } |
|
| 828 | 866 | |
| 829 | 867 | echo ' |
| 830 | 868 | </tr> |
@@ -842,11 +880,12 @@ discard block |
||
| 842 | 880 | <th><span class="generic_icons post_moderation_moderate"></span></th> |
| 843 | 881 | <th><span class="generic_icons post_moderation_deny"></span></th>'; |
| 844 | 882 | |
| 845 | - if ($modSettings['attachmentEnable'] == 1) |
|
| 846 | - echo ' |
|
| 883 | + if ($modSettings['attachmentEnable'] == 1) { |
|
| 884 | + echo ' |
|
| 847 | 885 | <th><span class="generic_icons post_moderation_allow"></span></th> |
| 848 | 886 | <th><span class="generic_icons post_moderation_moderate"></span></th> |
| 849 | 887 | <th><span class="generic_icons post_moderation_deny"></span></th>'; |
| 888 | + } |
|
| 850 | 889 | |
| 851 | 890 | echo ' |
| 852 | 891 | </tr> |
@@ -860,10 +899,11 @@ discard block |
||
| 860 | 899 | <td class="half_table"> |
| 861 | 900 | <span ', ($group['color'] ? 'style="color: ' . $group['color'] . '"' : ''), '>', $group['name'], '</span>'; |
| 862 | 901 | |
| 863 | - if (!empty($group['children'])) |
|
| 864 | - echo ' |
|
| 902 | + if (!empty($group['children'])) { |
|
| 903 | + echo ' |
|
| 865 | 904 | <br> |
| 866 | 905 | <span class="smalltext">', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"</span>'; |
| 906 | + } |
|
| 867 | 907 | |
| 868 | 908 | echo ' |
| 869 | 909 | </td> |
@@ -878,11 +918,11 @@ discard block |
||
| 878 | 918 | </td>'; |
| 879 | 919 | |
| 880 | 920 | // Guests can't have "own" permissions |
| 881 | - if ($group['id'] == '-1') |
|
| 882 | - echo ' |
|
| 921 | + if ($group['id'] == '-1') { |
|
| 922 | + echo ' |
|
| 883 | 923 | <td colspan="3"></td>'; |
| 884 | - else |
|
| 885 | - echo ' |
|
| 924 | + } else { |
|
| 925 | + echo ' |
|
| 886 | 926 | <td class="centercol"> |
| 887 | 927 | <input type="radio" name="replies_own[', $group['id'], ']" value="allow"', $group['replies_own'] == 'allow' ? ' checked' : '', '> |
| 888 | 928 | </td> |
@@ -892,6 +932,7 @@ discard block |
||
| 892 | 932 | <td class="centercol"> |
| 893 | 933 | <input type="radio" name="replies_own[', $group['id'], ']" value="disallow"', $group['replies_own'] == 'disallow' ? ' checked' : '', '> |
| 894 | 934 | </td>'; |
| 935 | + } |
|
| 895 | 936 | |
| 896 | 937 | echo ' |
| 897 | 938 | <td class="centercol"> |
@@ -904,8 +945,8 @@ discard block |
||
| 904 | 945 | <input type="radio" name="replies_any[', $group['id'], ']" value="disallow"', $group['replies_any'] == 'disallow' ? ' checked' : '', '> |
| 905 | 946 | </td>'; |
| 906 | 947 | |
| 907 | - if ($modSettings['attachmentEnable'] == 1) |
|
| 908 | - echo ' |
|
| 948 | + if ($modSettings['attachmentEnable'] == 1) { |
|
| 949 | + echo ' |
|
| 909 | 950 | <td class="centercol"> |
| 910 | 951 | <input type="radio" name="attachment[', $group['id'], ']" value="allow"', $group['attachment'] == 'allow' ? ' checked' : '', '> |
| 911 | 952 | </td> |
@@ -915,6 +956,7 @@ discard block |
||
| 915 | 956 | <td class="centercol"> |
| 916 | 957 | <input type="radio" name="attachment[', $group['id'], ']" value="disallow"', $group['attachment'] == 'disallow' ? ' checked' : '', '> |
| 917 | 958 | </td>'; |
| 959 | + } |
|
| 918 | 960 | |
| 919 | 961 | echo ' |
| 920 | 962 | </tr>'; |
@@ -18,9 +18,10 @@ discard block |
||
| 18 | 18 | global $context, $txt, $scripturl; |
| 19 | 19 | |
| 20 | 20 | // Are we done sending the newsletter? |
| 21 | - if (!empty($context['newsletter_sent'])) |
|
| 22 | - echo ' |
|
| 21 | + if (!empty($context['newsletter_sent'])) { |
|
| 22 | + echo ' |
|
| 23 | 23 | <div class="infobox">', $txt['admin_news_newsletter_' . $context['newsletter_sent']], '</div>'; |
| 24 | + } |
|
| 24 | 25 | |
| 25 | 26 | echo ' |
| 26 | 27 | <form action="', $scripturl, '?action=admin;area=news;sa=mailingcompose" method="post" id="admin_newsletters" class="flow_hidden" accept-charset="', $context['character_set'], '"> |
@@ -38,9 +39,10 @@ discard block |
||
| 38 | 39 | </dt> |
| 39 | 40 | <dd>'; |
| 40 | 41 | |
| 41 | - foreach ($context['groups'] as $group) |
|
| 42 | - echo ' |
|
| 42 | + foreach ($context['groups'] as $group) { |
|
| 43 | + echo ' |
|
| 43 | 44 | <label for="groups_', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups_', $group['id'], '" value="', $group['id'], '" checked> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
| 45 | + } |
|
| 44 | 46 | |
| 45 | 47 | echo ' |
| 46 | 48 | <br> |
@@ -79,9 +81,10 @@ discard block |
||
| 79 | 81 | </dt> |
| 80 | 82 | <dd>'; |
| 81 | 83 | |
| 82 | - foreach ($context['groups'] as $group) |
|
| 83 | - echo ' |
|
| 84 | + foreach ($context['groups'] as $group) { |
|
| 85 | + echo ' |
|
| 84 | 86 | <label for="exclude_groups_', $group['id'], '"><input type="checkbox" name="exclude_groups[', $group['id'], ']" id="exclude_groups_', $group['id'], '" value="', $group['id'], '"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
| 87 | + } |
|
| 85 | 88 | |
| 86 | 89 | echo ' |
| 87 | 90 | <br> |
@@ -225,9 +228,10 @@ discard block |
||
| 225 | 228 | <div id="bbcBox_message"></div>'; |
| 226 | 229 | |
| 227 | 230 | // What about smileys? |
| 228 | - if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) |
|
| 229 | - echo ' |
|
| 231 | + if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) { |
|
| 232 | + echo ' |
|
| 230 | 233 | <div id="smileyBox_message"></div>'; |
| 234 | + } |
|
| 231 | 235 | |
| 232 | 236 | // Show BBC buttons, smileys and textbox. |
| 233 | 237 | echo ' |
@@ -248,9 +252,10 @@ discard block |
||
| 248 | 252 | <input type="hidden" name="email_force" value="', $context['email_force'], '"> |
| 249 | 253 | <input type="hidden" name="total_emails" value="', $context['total_emails'], '">'; |
| 250 | 254 | |
| 251 | - foreach ($context['recipients'] as $key => $values) |
|
| 252 | - echo ' |
|
| 255 | + foreach ($context['recipients'] as $key => $values) { |
|
| 256 | + echo ' |
|
| 253 | 257 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
| 258 | + } |
|
| 254 | 259 | |
| 255 | 260 | echo ' |
| 256 | 261 | <script>'; |
@@ -404,9 +409,10 @@ discard block |
||
| 404 | 409 | <input type="hidden" name="parse_html" value="', $context['parse_html'], '">'; |
| 405 | 410 | |
| 406 | 411 | // All the things we must remember! |
| 407 | - foreach ($context['recipients'] as $key => $values) |
|
| 408 | - echo ' |
|
| 412 | + foreach ($context['recipients'] as $key => $values) { |
|
| 413 | + echo ' |
|
| 409 | 414 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
| 415 | + } |
|
| 410 | 416 | |
| 411 | 417 | echo ' |
| 412 | 418 | </div><!-- .windowbg --> |
@@ -438,9 +444,10 @@ discard block |
||
| 438 | 444 | { |
| 439 | 445 | global $context, $txt; |
| 440 | 446 | |
| 441 | - if (!empty($context['saved_successful'])) |
|
| 442 | - echo ' |
|
| 447 | + if (!empty($context['saved_successful'])) { |
|
| 448 | + echo ' |
|
| 443 | 449 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 450 | + } |
|
| 444 | 451 | |
| 445 | 452 | template_show_list('news_lists'); |
| 446 | 453 | } |
@@ -124,8 +124,8 @@ discard block |
||
| 124 | 124 | <div class="windowbg"> |
| 125 | 125 | <dl class="settings">'; |
| 126 | 126 | |
| 127 | - if (!empty($context['table_info'])) |
|
| 128 | - echo ' |
|
| 127 | + if (!empty($context['table_info'])) { |
|
| 128 | + echo ' |
|
| 129 | 129 | <dt> |
| 130 | 130 | <strong>', $txt['search_method_messages_table_space'], ':</strong> |
| 131 | 131 | </dt> |
@@ -138,6 +138,7 @@ discard block |
||
| 138 | 138 | <dd> |
| 139 | 139 | ', $context['table_info']['index_length'], ' |
| 140 | 140 | </dd>'; |
| 141 | + } |
|
| 141 | 142 | echo ' |
| 142 | 143 | </dl> |
| 143 | 144 | ', $context['double_index'] ? '<div class="noticebox"> |
@@ -160,17 +161,17 @@ discard block |
||
| 160 | 161 | <dd> |
| 161 | 162 | <span class="smalltext">'; |
| 162 | 163 | |
| 163 | - if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) |
|
| 164 | - echo ' |
|
| 164 | + if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) { |
|
| 165 | + echo ' |
|
| 165 | 166 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_create'], '</a>]'; |
| 166 | - |
|
| 167 | - elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) |
|
| 168 | - echo ' |
|
| 167 | + } elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) { |
|
| 168 | + echo ' |
|
| 169 | 169 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create']; |
| 170 | - else |
|
| 171 | - echo ' |
|
| 170 | + } else { |
|
| 171 | + echo ' |
|
| 172 | 172 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_remove'], '</a>]<br> |
| 173 | 173 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length']; |
| 174 | + } |
|
| 174 | 175 | echo ' |
| 175 | 176 | </span> |
| 176 | 177 | </dd>'; |
@@ -184,26 +185,27 @@ discard block |
||
| 184 | 185 | <dd> |
| 185 | 186 | <span class="smalltext">'; |
| 186 | 187 | |
| 187 | - if ($context['custom_index']) |
|
| 188 | - echo ' |
|
| 188 | + if ($context['custom_index']) { |
|
| 189 | + echo ' |
|
| 189 | 190 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>]<br> |
| 190 | 191 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
| 191 | - |
|
| 192 | - elseif ($context['partial_custom_index']) |
|
| 193 | - echo ' |
|
| 192 | + } elseif ($context['partial_custom_index']) { |
|
| 193 | + echo ' |
|
| 194 | 194 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_resume'], '</a>]<br> |
| 195 | 195 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
| 196 | - else |
|
| 197 | - echo ' |
|
| 196 | + } else { |
|
| 197 | + echo ' |
|
| 198 | 198 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>]'; |
| 199 | + } |
|
| 199 | 200 | echo ' |
| 200 | 201 | </span> |
| 201 | 202 | </dd>'; |
| 202 | 203 | |
| 203 | 204 | foreach ($context['search_apis'] as $api) |
| 204 | 205 | { |
| 205 | - if (empty($api['label']) || $api['has_template']) |
|
| 206 | - continue; |
|
| 206 | + if (empty($api['label']) || $api['has_template']) { |
|
| 207 | + continue; |
|
| 208 | + } |
|
| 207 | 209 | |
| 208 | 210 | echo ' |
| 209 | 211 | <dt> |
@@ -211,11 +213,12 @@ discard block |
||
| 211 | 213 | ', $api['label'], ' |
| 212 | 214 | </dt>'; |
| 213 | 215 | |
| 214 | - if ($api['desc']) |
|
| 215 | - echo ' |
|
| 216 | + if ($api['desc']) { |
|
| 217 | + echo ' |
|
| 216 | 218 | <dd> |
| 217 | 219 | <span class="smalltext">', $api['desc'], '</span> |
| 218 | 220 | </dd>'; |
| 221 | + } |
|
| 219 | 222 | } |
| 220 | 223 | |
| 221 | 224 | echo ' |
@@ -34,11 +34,12 @@ discard block |
||
| 34 | 34 | </div>'; |
| 35 | 35 | |
| 36 | 36 | // If this is an existing set, and there are still un-added smileys - offer an import opportunity. |
| 37 | - if (!empty($context['current_set']['can_import'])) |
|
| 38 | - echo ' |
|
| 37 | + if (!empty($context['current_set']['can_import'])) { |
|
| 38 | + echo ' |
|
| 39 | 39 | <div class="information noup"> |
| 40 | 40 | ', $context['current_set']['can_import'] == 1 ? sprintf($txt['smiley_set_import_single'], $context['current_set']['import_url']) : sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import'], $context['current_set']['import_url']), ' |
| 41 | 41 | </div>'; |
| 42 | + } |
|
| 42 | 43 | |
| 43 | 44 | echo ' |
| 44 | 45 | <div class="windowbg noup"> |
@@ -54,20 +55,20 @@ discard block |
||
| 54 | 55 | </dt> |
| 55 | 56 | <dd> |
| 56 | 57 | ', $modSettings['smileys_url'], '/'; |
| 57 | - if ($context['current_set']['id'] == 'default') |
|
| 58 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 59 | - |
|
| 60 | - elseif (empty($context['smiley_set_dirs'])) |
|
| 61 | - echo ' |
|
| 58 | + if ($context['current_set']['id'] == 'default') { |
|
| 59 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 60 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
| 61 | + echo ' |
|
| 62 | 62 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '"> '; |
| 63 | - else |
|
| 63 | + } else |
|
| 64 | 64 | { |
| 65 | 65 | echo ' |
| 66 | 66 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
| 67 | 67 | |
| 68 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
| 69 | - echo ' |
|
| 68 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
| 69 | + echo ' |
|
| 70 | 70 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
| 71 | + } |
|
| 71 | 72 | echo ' |
| 72 | 73 | </select> '; |
| 73 | 74 | } |
@@ -82,14 +83,15 @@ discard block |
||
| 82 | 83 | </dd>'; |
| 83 | 84 | |
| 84 | 85 | // If this is a new smiley set they have the option to import smileys already in the directory. |
| 85 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
| 86 | - echo ' |
|
| 86 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
| 87 | + echo ' |
|
| 87 | 88 | <dt> |
| 88 | 89 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
| 89 | 90 | </dt> |
| 90 | 91 | <dd> |
| 91 | 92 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1"> |
| 92 | 93 | </dd>'; |
| 94 | + } |
|
| 93 | 95 | |
| 94 | 96 | echo ' |
| 95 | 97 | </dl> |
@@ -121,9 +123,10 @@ discard block |
||
| 121 | 123 | <dd> |
| 122 | 124 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">'; |
| 123 | 125 | |
| 124 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 125 | - echo ' |
|
| 126 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 127 | + echo ' |
|
| 126 | 128 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 129 | + } |
|
| 127 | 130 | |
| 128 | 131 | echo ' |
| 129 | 132 | </select>) |
@@ -139,17 +142,18 @@ discard block |
||
| 139 | 142 | </dt> |
| 140 | 143 | <dd>'; |
| 141 | 144 | |
| 142 | - if (empty($context['filenames'])) |
|
| 143 | - echo ' |
|
| 145 | + if (empty($context['filenames'])) { |
|
| 146 | + echo ' |
|
| 144 | 147 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '">'; |
| 145 | - else |
|
| 148 | + } else |
|
| 146 | 149 | { |
| 147 | 150 | echo ' |
| 148 | 151 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
| 149 | 152 | |
| 150 | - foreach ($context['filenames'] as $filename) |
|
| 151 | - echo ' |
|
| 153 | + foreach ($context['filenames'] as $filename) { |
|
| 154 | + echo ' |
|
| 152 | 155 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 156 | + } |
|
| 153 | 157 | echo ' |
| 154 | 158 | </select>'; |
| 155 | 159 | } |
@@ -216,9 +220,10 @@ discard block |
||
| 216 | 220 | <dd> |
| 217 | 221 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 218 | 222 | |
| 219 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 220 | - echo ' |
|
| 223 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 224 | + echo ' |
|
| 221 | 225 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 226 | + } |
|
| 222 | 227 | |
| 223 | 228 | echo ' |
| 224 | 229 | </select> |
@@ -228,17 +233,18 @@ discard block |
||
| 228 | 233 | </dt> |
| 229 | 234 | <dd>'; |
| 230 | 235 | |
| 231 | - if (empty($context['filenames'])) |
|
| 232 | - echo ' |
|
| 236 | + if (empty($context['filenames'])) { |
|
| 237 | + echo ' |
|
| 233 | 238 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');">'; |
| 234 | - else |
|
| 239 | + } else |
|
| 235 | 240 | { |
| 236 | 241 | echo ' |
| 237 | 242 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 238 | 243 | |
| 239 | - foreach ($context['filenames'] as $filename) |
|
| 240 | - echo ' |
|
| 244 | + foreach ($context['filenames'] as $filename) { |
|
| 245 | + echo ' |
|
| 241 | 246 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 247 | + } |
|
| 242 | 248 | echo ' |
| 243 | 249 | </select>'; |
| 244 | 250 | } |
@@ -267,14 +273,15 @@ discard block |
||
| 267 | 273 | |
| 268 | 274 | <dl id="uploadMore" style="display: none;" class="settings">'; |
| 269 | 275 | |
| 270 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 271 | - echo ' |
|
| 276 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 277 | + echo ' |
|
| 272 | 278 | <dt> |
| 273 | 279 | ', sprintf($txt['smileys_add_upload_for'], '<strong>' . $smiley_set['name'] . '</strong>'), ': |
| 274 | 280 | </dt> |
| 275 | 281 | <dd> |
| 276 | 282 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');"> |
| 277 | 283 | </dd>'; |
| 284 | + } |
|
| 278 | 285 | |
| 279 | 286 | echo ' |
| 280 | 287 | </dl> |
@@ -341,27 +348,30 @@ discard block |
||
| 341 | 348 | |
| 342 | 349 | foreach ($location['rows'] as $row) |
| 343 | 350 | { |
| 344 | - if (!empty($context['move_smiley'])) |
|
| 345 | - echo ' |
|
| 351 | + if (!empty($context['move_smiley'])) { |
|
| 352 | + echo ' |
|
| 346 | 353 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 354 | + } |
|
| 347 | 355 | |
| 348 | 356 | foreach ($row as $smiley) |
| 349 | 357 | { |
| 350 | - if (empty($context['move_smiley'])) |
|
| 351 | - echo ' |
|
| 358 | + if (empty($context['move_smiley'])) { |
|
| 359 | + echo ' |
|
| 352 | 360 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '"></a>'; |
| 353 | - else |
|
| 354 | - echo ' |
|
| 361 | + } else { |
|
| 362 | + echo ' |
|
| 355 | 363 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '" ', $smiley['selected'] ? 'class="selected_item"' : '', '> |
| 356 | 364 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 365 | + } |
|
| 357 | 366 | } |
| 358 | 367 | |
| 359 | 368 | echo ' |
| 360 | 369 | <br>'; |
| 361 | 370 | } |
| 362 | - if (!empty($context['move_smiley'])) |
|
| 363 | - echo ' |
|
| 371 | + if (!empty($context['move_smiley'])) { |
|
| 372 | + echo ' |
|
| 364 | 373 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 374 | + } |
|
| 365 | 375 | echo ' |
| 366 | 376 | </div><!-- .windowbg --> |
| 367 | 377 | <input type="hidden" name="reorder" value="1"> |
@@ -394,14 +404,15 @@ discard block |
||
| 394 | 404 | <div class="windowbg"> |
| 395 | 405 | <dl class="settings">'; |
| 396 | 406 | |
| 397 | - if (!$context['new_icon']) |
|
| 398 | - echo ' |
|
| 407 | + if (!$context['new_icon']) { |
|
| 408 | + echo ' |
|
| 399 | 409 | <dt> |
| 400 | 410 | <strong>', $txt['smiley_preview'], ': </strong> |
| 401 | 411 | </dt> |
| 402 | 412 | <dd> |
| 403 | 413 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
| 404 | 414 | </dd>'; |
| 415 | + } |
|
| 405 | 416 | |
| 406 | 417 | echo ' |
| 407 | 418 | <dt> |
@@ -428,9 +439,10 @@ discard block |
||
| 428 | 439 | echo ' |
| 429 | 440 | <optgroup label="', $category['name'], '">'; |
| 430 | 441 | |
| 431 | - foreach ($category['boards'] as $board) |
|
| 432 | - echo ' |
|
| 442 | + foreach ($category['boards'] as $board) { |
|
| 443 | + echo ' |
|
| 433 | 444 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
| 445 | + } |
|
| 434 | 446 | |
| 435 | 447 | echo ' |
| 436 | 448 | </optgroup>'; |
@@ -447,19 +459,21 @@ discard block |
||
| 447 | 459 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
| 448 | 460 | |
| 449 | 461 | // Print the list of all the icons it can be put after... |
| 450 | - foreach ($context['icons'] as $id => $data) |
|
| 451 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 462 | + foreach ($context['icons'] as $id => $data) { |
|
| 463 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 452 | 464 | echo ' |
| 453 | 465 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
| 466 | + } |
|
| 454 | 467 | |
| 455 | 468 | echo ' |
| 456 | 469 | </select> |
| 457 | 470 | </dd> |
| 458 | 471 | </dl>'; |
| 459 | 472 | |
| 460 | - if (!$context['new_icon']) |
|
| 461 | - echo ' |
|
| 473 | + if (!$context['new_icon']) { |
|
| 474 | + echo ' |
|
| 462 | 475 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
| 476 | + } |
|
| 463 | 477 | |
| 464 | 478 | echo ' |
| 465 | 479 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button"> |