@@ -27,11 +27,13 @@ discard block |
||
27 | 27 | <div class="information">'; |
28 | 28 | |
29 | 29 | if ($context['is_installed']) |
30 | - echo ' |
|
30 | + { |
|
31 | + echo ' |
|
31 | 32 | <strong>', $txt['package_installed_warning1'], '</strong><br /> |
32 | 33 | <br /> |
33 | 34 | ', $txt['package_installed_warning2'], '<br /> |
34 | 35 | <br />'; |
36 | + } |
|
35 | 37 | |
36 | 38 | echo $txt['package_installed_warning3'], ' |
37 | 39 | </div>'; |
@@ -58,8 +60,10 @@ discard block |
||
58 | 60 | <select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = elk_prepareScriptUrl(elk_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value + \';license=\' + get_selected(\'license_language\'));">'; |
59 | 61 | |
60 | 62 | foreach ($context['readmes'] as $a => $b) |
61 | - echo ' |
|
63 | + { |
|
64 | + echo ' |
|
62 | 65 | <option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>'; |
66 | + } |
|
63 | 67 | |
64 | 68 | echo ' |
65 | 69 | </select> |
@@ -79,8 +83,10 @@ discard block |
||
79 | 83 | <select name="license_language" id="license_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = elk_prepareScriptUrl(elk_scripturl + \'', '?action=admin;area=packages;sa=install', ';package=', $context['filename'], ';license=\' + this.options[this.selectedIndex].value + \';readme=\' + get_selected(\'readme_language\'));">'; |
80 | 84 | |
81 | 85 | foreach ($context['licenses'] as $a => $b) |
82 | - echo ' |
|
86 | + { |
|
87 | + echo ' |
|
83 | 88 | <option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>'; |
89 | + } |
|
84 | 90 | |
85 | 91 | echo ' |
86 | 92 | </select> |
@@ -90,8 +96,10 @@ discard block |
||
90 | 96 | } |
91 | 97 | |
92 | 98 | if (!empty($context['post_url'])) |
93 | - echo ' |
|
99 | + { |
|
100 | + echo ' |
|
94 | 101 | <form action="', $context['post_url'], '" onsubmit="submitonce(this);" method="post" accept-charset="UTF-8">'; |
102 | + } |
|
95 | 103 | echo ' |
96 | 104 | <h2 class="category_header"> |
97 | 105 | ', $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package_install_actions'], ' "', $context['package_name'], '" |
@@ -108,8 +116,10 @@ discard block |
||
108 | 116 | <ul>'; |
109 | 117 | |
110 | 118 | foreach ($context['database_changes'] as $change) |
111 | - echo ' |
|
119 | + { |
|
120 | + echo ' |
|
112 | 121 | <li>', $change, '</li>'; |
122 | + } |
|
113 | 123 | |
114 | 124 | echo ' |
115 | 125 | </ul> |
@@ -121,12 +131,14 @@ discard block |
||
121 | 131 | <div class="information">'; |
122 | 132 | |
123 | 133 | if (empty($context['actions']) && empty($context['database_changes'])) |
124 | - echo ' |
|
134 | + { |
|
135 | + echo ' |
|
125 | 136 | <br /> |
126 | 137 | <div class="errorbox"> |
127 | 138 | ', $txt['corrupt_compatible'], ' |
128 | 139 | </div> |
129 | 140 | </div>'; |
141 | + } |
|
130 | 142 | else |
131 | 143 | { |
132 | 144 | echo ' |
@@ -234,8 +246,10 @@ discard block |
||
234 | 246 | <td class="centertext">'; |
235 | 247 | |
236 | 248 | if (!empty($context['themes_locked'])) |
237 | - echo ' |
|
249 | + { |
|
250 | + echo ' |
|
238 | 251 | <input type="hidden" name="custom_theme[]" value="', $id, '" />'; |
252 | + } |
|
239 | 253 | |
240 | 254 | echo ' |
241 | 255 | <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="disabled" checked="checked"' : '', '/> |
@@ -325,10 +339,12 @@ discard block |
||
325 | 339 | } |
326 | 340 | |
327 | 341 | if (!empty($context['post_url'])) |
328 | - echo ' |
|
342 | + { |
|
343 | + echo ' |
|
329 | 344 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />', (isset($context['form_sequence_number']) && !$context['ftp_needed']) ? ' |
330 | 345 | <input type="hidden" name="seqnum" value="' . $context['form_sequence_number'] . '" />' : '', ' |
331 | 346 | </form>'; |
347 | + } |
|
332 | 348 | echo ' |
333 | 349 | </div>'; |
334 | 350 | |
@@ -382,14 +398,16 @@ discard block |
||
382 | 398 | |
383 | 399 | // And a bit more for database changes. |
384 | 400 | if ($context['uninstalling'] && !empty($context['database_changes'])) |
385 | - echo ' |
|
401 | + { |
|
402 | + echo ' |
|
386 | 403 | <script> |
387 | 404 | var database_changes_area = document.getElementById(\'db_changes_div\'), |
388 | 405 | db_vis = false; |
389 | 406 | |
390 | 407 | database_changes_area.style.display = "none"; |
391 | 408 | </script>'; |
392 | -} |
|
409 | + } |
|
410 | + } |
|
393 | 411 | |
394 | 412 | /** |
395 | 413 | * Show after the package has been installed, redirects / permissions |
@@ -415,11 +433,14 @@ discard block |
||
415 | 433 | <div id="admincenter">'; |
416 | 434 | |
417 | 435 | if (empty($context['redirect_url'])) |
418 | - echo ' |
|
436 | + { |
|
437 | + echo ' |
|
419 | 438 | <h2 class="category_header">', ($context['uninstalling'] ? $txt['uninstall'] : $txt['extracting']), '</h2>', ($context['uninstalling'] ? '' : '<div class="information">' . $txt['package_installed_extract'] . '</div>'); |
420 | - else |
|
421 | - echo ' |
|
439 | + } |
|
440 | + else { |
|
441 | + echo ' |
|
422 | 442 | <h2 class="category_header">', $txt['package_installed_redirecting'], '</h2>'; |
443 | + } |
|
423 | 444 | |
424 | 445 | echo ' |
425 | 446 | <div class="generic_list_wrapper"> |
@@ -433,23 +454,31 @@ discard block |
||
433 | 454 | <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>'; |
434 | 455 | } |
435 | 456 | elseif ($context['uninstalling']) |
436 | - echo ' |
|
457 | + { |
|
458 | + echo ' |
|
437 | 459 | ', $txt['package_uninstall_done']; |
460 | + } |
|
438 | 461 | elseif ($context['install_finished']) |
439 | 462 | { |
440 | 463 | if ($context['extract_type'] == 'avatar') |
441 | - echo ' |
|
464 | + { |
|
465 | + echo ' |
|
442 | 466 | ', $txt['avatars_extracted']; |
467 | + } |
|
443 | 468 | elseif ($context['extract_type'] == 'language') |
444 | - echo ' |
|
469 | + { |
|
470 | + echo ' |
|
445 | 471 | ', $txt['language_extracted']; |
446 | - else |
|
447 | - echo ' |
|
472 | + } |
|
473 | + else { |
|
474 | + echo ' |
|
448 | 475 | ', $txt['package_installed_done']; |
476 | + } |
|
449 | 477 | } |
450 | - else |
|
451 | - echo ' |
|
478 | + else { |
|
479 | + echo ' |
|
452 | 480 | ', $txt['corrupt_compatible']; |
481 | + } |
|
453 | 482 | |
454 | 483 | echo ' |
455 | 484 | </div> |
@@ -481,8 +510,10 @@ discard block |
||
481 | 510 | <ol>'; |
482 | 511 | |
483 | 512 | foreach ($context['files'] as $fileinfo) |
484 | - echo ' |
|
513 | + { |
|
514 | + echo ' |
|
485 | 515 | <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>'; |
516 | + } |
|
486 | 517 | |
487 | 518 | echo ' |
488 | 519 | </ol> |
@@ -531,8 +562,10 @@ discard block |
||
531 | 562 | } |
532 | 563 | |
533 | 564 | if (!$adds_available) |
534 | - echo ' |
|
565 | + { |
|
566 | + echo ' |
|
535 | 567 | <div class="infobox">', $context['sub_action'] == 'browse' ? $txt['no_packages'] : $txt['no_adds_installed'], '</div>'; |
568 | + } |
|
536 | 569 | |
537 | 570 | echo ' |
538 | 571 | </div>'; |
@@ -601,7 +634,9 @@ discard block |
||
601 | 634 | |
602 | 635 | // Nothing to do? Brilliant! |
603 | 636 | if (empty($context['package_ftp'])) |
604 | - return false; |
|
637 | + { |
|
638 | + return false; |
|
639 | + } |
|
605 | 640 | |
606 | 641 | if (empty($context['package_ftp']['form_elements_only'])) |
607 | 642 | { |
@@ -612,9 +647,11 @@ discard block |
||
612 | 647 | <ul style="display: inline;">'; |
613 | 648 | |
614 | 649 | if (!empty($context['notwritable_files'])) |
615 | - foreach ($context['notwritable_files'] as $file) |
|
650 | + { |
|
651 | + foreach ($context['notwritable_files'] as $file) |
|
616 | 652 | echo ' |
617 | 653 | <li>', $file, '</li>'; |
654 | + } |
|
618 | 655 | |
619 | 656 | echo ' |
620 | 657 | </ul> |
@@ -627,8 +664,10 @@ discard block |
||
627 | 664 | </div>'; |
628 | 665 | |
629 | 666 | if (!empty($context['package_ftp']['destination'])) |
630 | - echo ' |
|
667 | + { |
|
668 | + echo ' |
|
631 | 669 | <form action="', $context['package_ftp']['destination'], '" method="post" accept-charset="UTF-8">'; |
670 | + } |
|
632 | 671 | |
633 | 672 | echo ' |
634 | 673 | <fieldset> |
@@ -662,23 +701,29 @@ discard block |
||
662 | 701 | </fieldset>'; |
663 | 702 | |
664 | 703 | if (empty($context['package_ftp']['form_elements_only'])) |
665 | - echo ' |
|
704 | + { |
|
705 | + echo ' |
|
666 | 706 | <div class="submitbutton"> |
667 | 707 | <span id="test_ftp_placeholder_full"></span> |
668 | 708 | <input type="submit" value="', $txt['package_proceed'], '" class="right_submit" /> |
669 | 709 | </div>'; |
710 | + } |
|
670 | 711 | |
671 | 712 | if (!empty($context['package_ftp']['destination'])) |
672 | - echo ' |
|
713 | + { |
|
714 | + echo ' |
|
673 | 715 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
674 | 716 | </form>'; |
717 | + } |
|
675 | 718 | |
676 | 719 | // Hide the details of the list. |
677 | 720 | if (empty($context['package_ftp']['form_elements_only'])) |
678 | - echo ' |
|
721 | + { |
|
722 | + echo ' |
|
679 | 723 | <script> |
680 | 724 | document.getElementById(\'need_writable_list\').style.display = \'none\'; |
681 | 725 | </script>'; |
726 | + } |
|
682 | 727 | |
683 | 728 | // Set up to generate the FTP test button. |
684 | 729 | echo ' |
@@ -987,8 +1032,10 @@ discard block |
||
987 | 1032 | <td class="grid30"><strong>'; |
988 | 1033 | |
989 | 1034 | if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) |
990 | - echo ' |
|
1035 | + { |
|
1036 | + echo ' |
|
991 | 1037 | <img src="', $settings['default_images_url'], '/board.png" alt="*" />'; |
1038 | + } |
|
992 | 1039 | |
993 | 1040 | echo ' |
994 | 1041 | ', $name, '</strong> |
@@ -1006,7 +1053,9 @@ discard block |
||
1006 | 1053 | '; |
1007 | 1054 | |
1008 | 1055 | if (!empty($dir['contents'])) |
1009 | - template_permission_show_contents($name, $dir['contents'], 1); |
|
1056 | + { |
|
1057 | + template_permission_show_contents($name, $dir['contents'], 1); |
|
1058 | + } |
|
1010 | 1059 | } |
1011 | 1060 | |
1012 | 1061 | echo ' |
@@ -1041,12 +1090,14 @@ discard block |
||
1041 | 1090 | |
1042 | 1091 | // Likely to need FTP? |
1043 | 1092 | if (empty($context['ftp_connected'])) |
1044 | - echo ' |
|
1093 | + { |
|
1094 | + echo ' |
|
1045 | 1095 | <p> |
1046 | 1096 | ', $txt['package_file_perms_ftp_details'], ': |
1047 | 1097 | </p> |
1048 | 1098 | ', template_control_chmod(), ' |
1049 | 1099 | <div class="information">', $txt['package_file_perms_ftp_retain'], '</div>'; |
1100 | + } |
|
1050 | 1101 | |
1051 | 1102 | echo ' |
1052 | 1103 | <div class="submitbutton"> |
@@ -1058,8 +1109,10 @@ discard block |
||
1058 | 1109 | |
1059 | 1110 | // Any looks fors we've already done? |
1060 | 1111 | foreach ($context['look_for'] as $path) |
1061 | - echo ' |
|
1112 | + { |
|
1113 | + echo ' |
|
1062 | 1114 | <input type="hidden" name="back_look[]" value="', $path, '" />'; |
1115 | + } |
|
1063 | 1116 | echo ' |
1064 | 1117 | </form>'; |
1065 | 1118 | } |
@@ -1102,8 +1155,10 @@ discard block |
||
1102 | 1155 | ', (!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, "'\\") . '\');">' : ''; |
1103 | 1156 | |
1104 | 1157 | if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) |
1105 | - echo ' |
|
1158 | + { |
|
1159 | + echo ' |
|
1106 | 1160 | <img src="', $settings['default_images_url'], '/board.png" alt="*" />'; |
1161 | + } |
|
1107 | 1162 | |
1108 | 1163 | echo ' |
1109 | 1164 | ', $name, ' |
@@ -1124,19 +1179,23 @@ discard block |
||
1124 | 1179 | </tr>'; |
1125 | 1180 | |
1126 | 1181 | if (!empty($dir['contents'])) |
1127 | - template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); |
|
1182 | + { |
|
1183 | + template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); |
|
1184 | + } |
|
1128 | 1185 | } |
1129 | 1186 | } |
1130 | 1187 | |
1131 | 1188 | // We have more files to show? |
1132 | 1189 | if ($has_more) |
1133 | - echo ' |
|
1190 | + { |
|
1191 | + echo ' |
|
1134 | 1192 | <tr id="content_', $js_ident, '_more"> |
1135 | 1193 | <td class="smalltext" style="width: 40%;">', str_repeat(' ', $level * 5), ' |
1136 | 1194 | « <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> » |
1137 | 1195 | </td> |
1138 | 1196 | <td colspan="6"></td> |
1139 | 1197 | </tr>'; |
1198 | + } |
|
1140 | 1199 | |
1141 | 1200 | if ($drawn_div) |
1142 | 1201 | { |
@@ -1145,11 +1204,14 @@ discard block |
||
1145 | 1204 | foreach ($context['look_for'] as $tree) |
1146 | 1205 | { |
1147 | 1206 | if (substr($tree, 0, strlen($ident)) == $ident) |
1148 | - $isFound = true; |
|
1207 | + { |
|
1208 | + $isFound = true; |
|
1209 | + } |
|
1149 | 1210 | } |
1150 | 1211 | |
1151 | 1212 | if ($level > 1 && !$isFound) |
1152 | - echo ' |
|
1213 | + { |
|
1214 | + echo ' |
|
1153 | 1215 | </tbody> |
1154 | 1216 | </table><script> |
1155 | 1217 | expandFolder(\'', $js_ident, '\', \'\'); |
@@ -1159,6 +1221,7 @@ discard block |
||
1159 | 1221 | <tr class="hide"> |
1160 | 1222 | <td colspan="7"></td> |
1161 | 1223 | </tr>'; |
1224 | + } |
|
1162 | 1225 | } |
1163 | 1226 | } |
1164 | 1227 | |
@@ -1177,10 +1240,12 @@ discard block |
||
1177 | 1240 | <h2 class="category_header">', $txt['package_file_perms_applying'], '</h2>'; |
1178 | 1241 | |
1179 | 1242 | if (!empty($context['skip_ftp'])) |
1180 | - echo ' |
|
1243 | + { |
|
1244 | + echo ' |
|
1181 | 1245 | <div class="errorbox"> |
1182 | 1246 | ', $txt['package_file_perms_skipping_ftp'], ' |
1183 | 1247 | </div>'; |
1248 | + } |
|
1184 | 1249 | |
1185 | 1250 | // First progress bar for the number of directories we are working |
1186 | 1251 | echo ' |
@@ -1213,27 +1278,34 @@ discard block |
||
1213 | 1278 | |
1214 | 1279 | // Put out the right hidden data. |
1215 | 1280 | if ($context['method'] === 'individual') |
1216 | - echo ' |
|
1281 | + { |
|
1282 | + echo ' |
|
1217 | 1283 | <input type="hidden" name="custom_value" value="', $context['custom_value'], '" /> |
1218 | 1284 | <input type="hidden" name="totalItems" value="', $context['total_items'], '" /> |
1219 | 1285 | <input type="hidden" name="toProcess" value="', base64_encode(serialize($context['to_process'])), '" />'; |
1220 | - else |
|
1221 | - echo ' |
|
1286 | + } |
|
1287 | + else { |
|
1288 | + echo ' |
|
1222 | 1289 | <input type="hidden" name="predefined" value="', $context['predefined_type'], '" /> |
1223 | 1290 | <input type="hidden" name="fileOffset" value="', $context['file_offset'], '" /> |
1224 | 1291 | <input type="hidden" name="totalItems" value="', $context['total_items'], '" /> |
1225 | 1292 | <input type="hidden" name="dirList" value="', base64_encode(serialize($context['directory_list'])), '" /> |
1226 | 1293 | <input type="hidden" name="specialFiles" value="', base64_encode(serialize($context['special_files'])), '" />'; |
1294 | + } |
|
1227 | 1295 | |
1228 | 1296 | // Are we not using FTP for whatever reason. |
1229 | 1297 | if (!empty($context['skip_ftp'])) |
1230 | - echo ' |
|
1298 | + { |
|
1299 | + echo ' |
|
1231 | 1300 | <input type="hidden" name="skip_ftp" value="1" />'; |
1301 | + } |
|
1232 | 1302 | |
1233 | 1303 | // Retain state. |
1234 | 1304 | foreach ($context['back_look_data'] as $path) |
1235 | - echo ' |
|
1305 | + { |
|
1306 | + echo ' |
|
1236 | 1307 | <input type="hidden" name="back_look[]" value="', $path, '" />'; |
1308 | + } |
|
1237 | 1309 | |
1238 | 1310 | // Standard fields |
1239 | 1311 | echo ' |
@@ -258,8 +258,10 @@ |
||
258 | 258 | <input type="submit" name="save" value="', $txt['save'], '" />'; |
259 | 259 | |
260 | 260 | if ($context['fid']) |
261 | - echo ' |
|
261 | + { |
|
262 | + echo ' |
|
262 | 263 | <input type="submit" name="delete" value="', $txt['delete'], '" onclick="return confirm(\'', $txt['custom_edit_delete_sure'], '\');" />'; |
264 | + } |
|
263 | 265 | |
264 | 266 | echo ' |
265 | 267 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
@@ -21,17 +21,21 @@ discard block |
||
21 | 21 | global $context, $txt, $scripturl; |
22 | 22 | |
23 | 23 | if (!empty($context['package_ftp']['error'])) |
24 | - echo ' |
|
24 | + { |
|
25 | + echo ' |
|
25 | 26 | <div class="errorbox"> |
26 | 27 | <span class="tt">', $context['package_ftp']['error'], '</span> |
27 | 28 | </div>'; |
29 | + } |
|
28 | 30 | |
29 | 31 | echo ' |
30 | 32 | <div id="admin_form_wrapper"> |
31 | 33 | <h2 class="category_header">', $txt['package_servers'], '</h2>'; |
32 | 34 | |
33 | 35 | if ($context['package_download_broken']) |
34 | - template_ftp_form_required(); |
|
36 | + { |
|
37 | + template_ftp_form_required(); |
|
38 | + } |
|
35 | 39 | |
36 | 40 | echo ' |
37 | 41 | <div class="content"> |
@@ -40,7 +44,8 @@ discard block |
||
40 | 44 | <ul class="package_servers">'; |
41 | 45 | |
42 | 46 | foreach ($context['servers'] as $server) |
43 | - echo ' |
|
47 | + { |
|
48 | + echo ' |
|
44 | 49 | <li class="flow_auto"> |
45 | 50 | <strong>' . $server['name'] . '</strong> |
46 | 51 | <span class="package_server floatright"> |
@@ -48,6 +53,7 @@ discard block |
||
48 | 53 | <a class="linkbutton" href="' . $scripturl . '?action=admin;area=packageservers;sa=remove;server=' . $server['id'] . ';', $context['session_var'], '=', $context['session_id'], '">' . $txt['delete'] . '</a> |
49 | 54 | </span> |
50 | 55 | </li>'; |
56 | + } |
|
51 | 57 | |
52 | 58 | echo ' |
53 | 59 | </ul> |
@@ -136,10 +142,12 @@ discard block |
||
136 | 142 | |
137 | 143 | // No packages, as yet. |
138 | 144 | if (empty($context['package_list'])) |
139 | - echo ' |
|
145 | + { |
|
146 | + echo ' |
|
140 | 147 | <ul> |
141 | 148 | <li>', $txt['no_packages'], '</li> |
142 | 149 | </ul>'; |
150 | + } |
|
143 | 151 | // List out the packages... |
144 | 152 | else |
145 | 153 | { |
@@ -156,8 +164,10 @@ discard block |
||
156 | 164 | </p>'; |
157 | 165 | |
158 | 166 | if (!empty($packageSection['text'])) |
159 | - echo ' |
|
167 | + { |
|
168 | + echo ' |
|
160 | 169 | <div class="content">', $packageSection['text'], '</div>'; |
170 | + } |
|
161 | 171 | |
162 | 172 | // List of addons available in this section |
163 | 173 | echo ' |
@@ -210,28 +220,38 @@ discard block |
||
210 | 220 | |
211 | 221 | // Show the addon type? |
212 | 222 | if ($package['type'] != '') |
213 | - echo ' |
|
223 | + { |
|
224 | + echo ' |
|
214 | 225 | <li>', $txt['package_type'], ': ', Util::ucwords(Util::strtolower($package['type'])), '</li>'; |
226 | + } |
|
215 | 227 | |
216 | 228 | // Show the version number? |
217 | 229 | if ($package['version'] != '') |
218 | - echo ' |
|
230 | + { |
|
231 | + echo ' |
|
219 | 232 | <li>', $txt['mod_version'], ': ', $package['version'], '</li>'; |
233 | + } |
|
220 | 234 | |
221 | 235 | // Show the last date? |
222 | 236 | if ($package['date'] != '') |
223 | - echo ' |
|
237 | + { |
|
238 | + echo ' |
|
224 | 239 | <li>', $txt['mod_date'], ': ', $package['date'], '</li>'; |
240 | + } |
|
225 | 241 | |
226 | 242 | // How 'bout the author? |
227 | 243 | if (!empty($package['author'])) |
228 | - echo ' |
|
244 | + { |
|
245 | + echo ' |
|
229 | 246 | <li>', $txt['mod_author'], ': ', $package['author'], '</li>'; |
247 | + } |
|
230 | 248 | |
231 | 249 | // Nothing but hooks ? |
232 | 250 | if ($package['hooks'] != '' && in_array($package['hooks'], array('yes', 'true'))) |
233 | - echo ' |
|
251 | + { |
|
252 | + echo ' |
|
234 | 253 | <li>', $txt['mod_hooks'], ' <i class="icon i-check"></i></li>'; |
254 | + } |
|
235 | 255 | |
236 | 256 | // Location of file: http://someplace/. |
237 | 257 | echo ' |
@@ -241,13 +261,17 @@ discard block |
||
241 | 261 | |
242 | 262 | // Location of issues? |
243 | 263 | if (!empty($package['server']['bugs'])) |
244 | - echo ' |
|
264 | + { |
|
265 | + echo ' |
|
245 | 266 | <li><i class="icon i-bug"></i> ', $txt['bug_location'], ': <a href="', $package['server']['bugs'], '">', $package['server']['bugs'], '</a></li>'; |
267 | + } |
|
246 | 268 | |
247 | 269 | // Location of support? |
248 | 270 | if (!empty($package['server']['support'])) |
249 | - echo ' |
|
271 | + { |
|
272 | + echo ' |
|
250 | 273 | <li><i class="icon i-support"></i> ', $txt['support_location'], ': <a href="', $package['server']['support'], '">', $package['server']['support'], '</a></li>'; |
274 | + } |
|
251 | 275 | |
252 | 276 | // Description: bleh bleh! |
253 | 277 | echo ' |
@@ -380,10 +404,12 @@ discard block |
||
380 | 404 | global $context, $txt, $scripturl; |
381 | 405 | |
382 | 406 | if (!empty($context['package_ftp']['error'])) |
383 | - echo ' |
|
407 | + { |
|
408 | + echo ' |
|
384 | 409 | <div class="errorbox"> |
385 | 410 | ', $context['package_ftp']['error'], ' |
386 | 411 | </div>'; |
412 | + } |
|
387 | 413 | |
388 | 414 | echo ' |
389 | 415 | <div id="admin_form_wrapper"> |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -98,8 +98,10 @@ discard block |
||
98 | 98 | |
99 | 99 | // Any results to show |
100 | 100 | if (!empty($context['results'])) |
101 | - echo ' |
|
101 | + { |
|
102 | + echo ' |
|
102 | 103 | <div class="successbox">', $context['results'], '</div>'; |
104 | + } |
|
103 | 105 | |
104 | 106 | // Lots-o-options |
105 | 107 | echo ' |
@@ -115,8 +117,10 @@ discard block |
||
115 | 117 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
116 | 118 | |
117 | 119 | foreach ($context['attach_dirs'] as $id => $dir) |
118 | - echo ' |
|
120 | + { |
|
121 | + echo ' |
|
119 | 122 | <option value="', $id, '">', $dir, '</option>'; |
123 | + } |
|
120 | 124 | |
121 | 125 | echo ' |
122 | 126 | </select> |
@@ -130,12 +134,15 @@ discard block |
||
130 | 134 | <option value="-1">', $txt['attachment_transfer_forum_root'], '</option>'; |
131 | 135 | |
132 | 136 | if (!empty($context['base_dirs'])) |
133 | - foreach ($context['base_dirs'] as $id => $dir) |
|
137 | + { |
|
138 | + foreach ($context['base_dirs'] as $id => $dir) |
|
134 | 139 | echo ' |
135 | 140 | <option value="', $id, '">', $dir, '</option>'; |
136 | - else |
|
137 | - echo ' |
|
141 | + } |
|
142 | + else { |
|
143 | + echo ' |
|
138 | 144 | <option value="0" disabled="disabled">', $txt['attachment_transfer_no_base'], '</option>'; |
145 | + } |
|
139 | 146 | |
140 | 147 | echo ' |
141 | 148 | </select> |
@@ -148,8 +155,10 @@ discard block |
||
148 | 155 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
149 | 156 | |
150 | 157 | foreach ($context['attach_dirs'] as $id => $dir) |
151 | - echo ' |
|
158 | + { |
|
159 | + echo ' |
|
152 | 160 | <option value="', $id, '">', $dir, '</option>'; |
161 | + } |
|
153 | 162 | |
154 | 163 | echo ' |
155 | 164 | </select> |
@@ -157,13 +166,15 @@ discard block |
||
157 | 166 | |
158 | 167 | // If there are directory limits to impose, give the option to enforce it |
159 | 168 | if (!empty($modSettings['attachmentDirFileLimit'])) |
160 | - echo ' |
|
169 | + { |
|
170 | + echo ' |
|
161 | 171 | <dt> |
162 | 172 | <a href="' . $scripturl . '?action=quickhelp;help=attachment_transfer_empty" onclick="return reqOverlayDiv(this.href);" class="helpicon i-help"><s>' . $txt['help'] . '</s></a>', $txt['attachment_transfer_empty'], ' |
163 | 173 | </dt> |
164 | 174 | <dd> |
165 | 175 | <input type="checkbox" name="empty_it"', $context['checked'] ? ' checked="checked"' : '', ' /> |
166 | 176 | </dd>'; |
177 | + } |
|
167 | 178 | |
168 | 179 | echo ' |
169 | 180 | </dl> |
@@ -235,10 +246,12 @@ discard block |
||
235 | 246 | foreach ($context['repair_errors'] as $error => $number) |
236 | 247 | { |
237 | 248 | if (!empty($number)) |
238 | - echo ' |
|
249 | + { |
|
250 | + echo ' |
|
239 | 251 | <input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '" /> |
240 | 252 | <label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label> |
241 | 253 | <br />'; |
254 | + } |
|
242 | 255 | } |
243 | 256 | |
244 | 257 | echo ' |
@@ -259,7 +272,9 @@ discard block |
||
259 | 272 | global $modSettings; |
260 | 273 | |
261 | 274 | if (!empty($modSettings['attachment_basedirectories'])) |
262 | - template_show_list('base_paths'); |
|
275 | + { |
|
276 | + template_show_list('base_paths'); |
|
277 | + } |
|
263 | 278 | |
264 | 279 | template_show_list('attach_paths'); |
265 | 280 | } |
@@ -29,10 +29,12 @@ discard block |
||
29 | 29 | |
30 | 30 | // If maintenance has finished tell the user. |
31 | 31 | if (!empty($context['maintenance_finished'])) |
32 | - echo ' |
|
32 | + { |
|
33 | + echo ' |
|
33 | 34 | <div class="successbox"> |
34 | 35 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
35 | 36 | </div>'; |
37 | + } |
|
36 | 38 | |
37 | 39 | echo ' |
38 | 40 | <div id="manage_maintenance"> |
@@ -55,10 +57,12 @@ discard block |
||
55 | 57 | <p>', $txt['maintain_backup_info'], '</p>'; |
56 | 58 | |
57 | 59 | if ($context['safe_mode_enable']) |
58 | - echo ' |
|
60 | + { |
|
61 | + echo ' |
|
59 | 62 | <div class="errorbox">', $txt['safe_mode_enabled'], '</div>'; |
60 | - else |
|
61 | - echo ' |
|
63 | + } |
|
64 | + else { |
|
65 | + echo ' |
|
62 | 66 | <div class="', $context['suggested_method'] == 'use_external_tool' || $context['use_maintenance'] != 0 ? 'errorbox' : 'infobox', '"> |
63 | 67 | ', $txt[$context['suggested_method']], $context['use_maintenance'] != 0 ? ' |
64 | 68 | <br /> |
@@ -69,6 +73,7 @@ discard block |
||
69 | 73 | <label for="data"><input type="checkbox" name="data" id="data" onclick="document.getElementById(\'submitDump\').disabled = !document.getElementById(\'struct\').checked && !document.getElementById(\'data\').checked;" checked="checked" /> ', $txt['maintain_backup_data'], '</label><br /> |
70 | 74 | <label for="compress"><input type="checkbox" name="compress" id="compress" value="gzip"', $context['suggested_method'] == 'zipped_file' ? ' checked="checked"' : '', ' /> ', $txt['maintain_backup_gz'], '</label> |
71 | 75 | </p>'; |
76 | + } |
|
72 | 77 | |
73 | 78 | if (empty($context['skip_security'])) |
74 | 79 | { |
@@ -90,7 +95,8 @@ discard block |
||
90 | 95 | |
91 | 96 | // Show an option to convert the body column of the post table to MEDIUMTEXT or TEXT |
92 | 97 | if (isset($context['convert_to'])) |
93 | - echo ' |
|
98 | + { |
|
99 | + echo ' |
|
94 | 100 | <h2 class="category_header">', $txt[$context['convert_to'] . '_title'], '</h2> |
95 | 101 | <div class="content"> |
96 | 102 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="UTF-8"> |
@@ -103,6 +109,7 @@ discard block |
||
103 | 109 | </div> |
104 | 110 | </form> |
105 | 111 | </div>'; |
112 | + } |
|
106 | 113 | |
107 | 114 | echo ' |
108 | 115 | </div>'; |
@@ -121,10 +128,12 @@ discard block |
||
121 | 128 | |
122 | 129 | // If maintenance has finished tell the user. |
123 | 130 | if (!empty($context['maintenance_finished'])) |
124 | - echo ' |
|
131 | + { |
|
132 | + echo ' |
|
125 | 133 | <div class="successbox"> |
126 | 134 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
127 | 135 | </div>'; |
136 | + } |
|
128 | 137 | |
129 | 138 | foreach ($context['routine_actions'] as $action) |
130 | 139 | { |
@@ -137,9 +146,11 @@ discard block |
||
137 | 146 | <input type="submit" value="', $action['submit'], '" />'; |
138 | 147 | |
139 | 148 | if (!empty($action['hidden'])) |
140 | - foreach ($action['hidden'] as $name => $val) |
|
149 | + { |
|
150 | + foreach ($action['hidden'] as $name => $val) |
|
141 | 151 | echo ' |
142 | 152 | <input type="hidden" name="', $context[$name], '" value="', $context[$val], '" />'; |
153 | + } |
|
143 | 154 | |
144 | 155 | echo ' |
145 | 156 | </div> |
@@ -233,8 +244,10 @@ discard block |
||
233 | 244 | <legend data-collapsed="true">', $txt['maintain_members_all'], '</legend>'; |
234 | 245 | |
235 | 246 | foreach ($context['membergroups'] as $group) |
236 | - echo ' |
|
247 | + { |
|
248 | + echo ' |
|
237 | 249 | <label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked="checked" /> ', $group['name'], '</label><br />'; |
250 | + } |
|
238 | 251 | |
239 | 252 | echo ' |
240 | 253 | </fieldset> |
@@ -300,9 +313,11 @@ discard block |
||
300 | 313 | <input type="submit" value="', $maintenace['submit'], '" ', !empty($maintenace['confirm']) ? 'onclick="return confirm(\'' . $maintenace['confirm'] . '\');"' : '', ' />'; |
301 | 314 | |
302 | 315 | if (!empty($maintenace['hidden'])) |
303 | - foreach ($maintenace['hidden'] as $name => $val) |
|
316 | + { |
|
317 | + foreach ($maintenace['hidden'] as $name => $val) |
|
304 | 318 | echo ' |
305 | 319 | <input type="hidden" name="', $context[$name], '" value="', $context[$val], '" />'; |
320 | + } |
|
306 | 321 | |
307 | 322 | echo ' |
308 | 323 | </div> |
@@ -378,8 +393,10 @@ discard block |
||
378 | 393 | |
379 | 394 | // List each table being optimized... |
380 | 395 | foreach ($context['optimized_tables'] as $table) |
381 | - echo ' |
|
396 | + { |
|
397 | + echo ' |
|
382 | 398 | ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br />'; |
399 | + } |
|
383 | 400 | |
384 | 401 | // How did we go? |
385 | 402 | echo ' |
@@ -418,12 +435,15 @@ discard block |
||
418 | 435 | </ul>'; |
419 | 436 | |
420 | 437 | if (!empty($context['exceeding_messages_morethan'])) |
421 | - echo ' |
|
438 | + { |
|
439 | + echo ' |
|
422 | 440 | <p>', $context['exceeding_messages_morethan'], '</p>'; |
441 | + } |
|
423 | 442 | } |
424 | - else |
|
425 | - echo ' |
|
443 | + else { |
|
444 | + echo ' |
|
426 | 445 | <p class="successbox">', $txt['convert_to_text'], '</p>'; |
446 | + } |
|
427 | 447 | |
428 | 448 | echo ' |
429 | 449 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="UTF-8"> |
@@ -59,9 +59,11 @@ discard block |
||
59 | 59 | <label for="group_type_private">', $txt['membergroups_group_type_private'], '</label><br />'; |
60 | 60 | |
61 | 61 | if ($context['allow_protected']) |
62 | - echo ' |
|
62 | + { |
|
63 | + echo ' |
|
63 | 64 | <input type="radio" name="group_type" id="group_type_protected" value="1" onclick="swapPostGroup(0);" /> |
64 | 65 | <label for="group_type_protected">', $txt['membergroups_group_type_protected'], '</label><br />'; |
66 | + } |
|
65 | 67 | |
66 | 68 | echo ' |
67 | 69 | <input type="radio" name="group_type" id="group_type_request" value="2" onclick="swapPostGroup(0);" /> |
@@ -77,13 +79,15 @@ discard block |
||
77 | 79 | } |
78 | 80 | |
79 | 81 | if ($context['post_group'] || $context['undefined_group']) |
80 | - echo ' |
|
82 | + { |
|
83 | + echo ' |
|
81 | 84 | <dt id="min_posts_text"> |
82 | 85 | <label for="min_posts_input">', $txt['membergroups_min_posts'], ':</label> |
83 | 86 | </dt> |
84 | 87 | <dd> |
85 | 88 | <input type="text" name="min_posts" id="min_posts_input" size="5" class="input_text" /> |
86 | 89 | </dd>'; |
90 | + } |
|
87 | 91 | |
88 | 92 | if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups'])) |
89 | 93 | { |
@@ -102,8 +106,10 @@ discard block |
||
102 | 106 | <option value="0" selected="selected">', $txt['membergroups_members'], '</option>'; |
103 | 107 | |
104 | 108 | foreach ($context['groups'] as $group) |
105 | - echo ' |
|
109 | + { |
|
110 | + echo ' |
|
106 | 111 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
112 | + } |
|
107 | 113 | |
108 | 114 | echo ' |
109 | 115 | </select> |
@@ -115,8 +121,10 @@ discard block |
||
115 | 121 | <option value="0" selected="selected">', $txt['membergroups_members'], '</option>'; |
116 | 122 | |
117 | 123 | foreach ($context['groups'] as $group) |
118 | - echo ' |
|
124 | + { |
|
125 | + echo ' |
|
119 | 126 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
127 | + } |
|
120 | 128 | |
121 | 129 | echo ' |
122 | 130 | </select> |
@@ -195,13 +203,15 @@ discard block |
||
195 | 203 | </dd>'; |
196 | 204 | |
197 | 205 | if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
198 | - echo ' |
|
206 | + { |
|
207 | + echo ' |
|
199 | 208 | <dt id="group_desc_text"> |
200 | 209 | <label for="group_desc_input">', $txt['membergroups_edit_desc'], ':</label> |
201 | 210 | </dt> |
202 | 211 | <dd> |
203 | 212 | <textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea> |
204 | 213 | </dd>'; |
214 | + } |
|
205 | 215 | |
206 | 216 | // Group type... |
207 | 217 | if ($context['group']['allow_post_group']) |
@@ -218,9 +228,11 @@ discard block |
||
218 | 228 | <label for="group_type_private">', $txt['membergroups_group_type_private'], '</label><br />'; |
219 | 229 | |
220 | 230 | if ($context['group']['allow_protected']) |
221 | - echo ' |
|
231 | + { |
|
232 | + echo ' |
|
222 | 233 | <input type="radio" name="group_type" id="group_type_protected" value="1" ', $context['group']['type'] == 1 ? 'checked="checked"' : '', ' onclick="swapPostGroup(0);" /> |
223 | 234 | <label for="group_type_protected">', $txt['membergroups_group_type_protected'], '</label><br />'; |
235 | + } |
|
224 | 236 | |
225 | 237 | |
226 | 238 | echo ' |
@@ -235,7 +247,8 @@ discard block |
||
235 | 247 | } |
236 | 248 | |
237 | 249 | if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
238 | - echo ' |
|
250 | + { |
|
251 | + echo ' |
|
239 | 252 | <dt id="group_moderators_text"> |
240 | 253 | <label for="group_moderators">', $txt['moderators'], ':</label> |
241 | 254 | </dt> |
@@ -253,6 +266,7 @@ discard block |
||
253 | 266 | <option value="2" ', $context['group']['hidden'] == 2 ? 'selected="selected"' : '', '>', $txt['membergroups_edit_hidden_all'], '</option> |
254 | 267 | </select> |
255 | 268 | </dd>'; |
269 | + } |
|
256 | 270 | |
257 | 271 | // Can they inherit permissions? |
258 | 272 | if ($context['group']['id'] > 1 && $context['group']['id'] != 3) |
@@ -270,8 +284,10 @@ discard block |
||
270 | 284 | |
271 | 285 | // For all the inheritable groups show an option. |
272 | 286 | foreach ($context['inheritable_groups'] as $id => $group) |
273 | - echo ' |
|
287 | + { |
|
288 | + echo ' |
|
274 | 289 | <option value="', $id, '" ', $context['group']['inherited_from'] == $id ? 'selected="selected"' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>'; |
290 | + } |
|
275 | 291 | |
276 | 292 | echo ' |
277 | 293 | </select> |
@@ -280,23 +296,27 @@ discard block |
||
280 | 296 | } |
281 | 297 | |
282 | 298 | if ($context['group']['allow_post_group']) |
283 | - echo ' |
|
299 | + { |
|
300 | + echo ' |
|
284 | 301 | <dt id="min_posts_text"> |
285 | 302 | <label for="min_posts_input">', $txt['membergroups_min_posts'], ':</label> |
286 | 303 | </dt> |
287 | 304 | <dd> |
288 | 305 | <input type="text" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6" class="input_text" /> |
289 | 306 | </dd>'; |
307 | + } |
|
290 | 308 | |
291 | 309 | // Hide the online color for our local moderators group. |
292 | 310 | if ($context['group']['id'] != 3) |
293 | - echo ' |
|
311 | + { |
|
312 | + echo ' |
|
294 | 313 | <dt> |
295 | 314 | <label for="online_color_input">', $txt['membergroups_online_color'], ':</label> |
296 | 315 | </dt> |
297 | 316 | <dd> |
298 | 317 | <input type="text" name="online_color" id="online_color_input" value="', $context['group']['color'], '" size="20" class="input_text" /> |
299 | 318 | </dd>'; |
319 | + } |
|
300 | 320 | echo ' |
301 | 321 | <dt> |
302 | 322 | <label for="icon_count_input">', $txt['membergroups_icon_count'], ':</label> |
@@ -391,11 +411,13 @@ discard block |
||
391 | 411 | aListItems: ['; |
392 | 412 | |
393 | 413 | foreach ($context['group']['moderators'] as $id_member => $member_name) |
394 | - $js .= ' |
|
414 | + { |
|
415 | + $js .= ' |
|
395 | 416 | { |
396 | 417 | sItemId: ' . JavaScriptEscape($id_member) . ', |
397 | 418 | sItemName: ' . JavaScriptEscape($member_name) . ' |
398 | 419 | }' . $id_member == $context['group']['last_moderator_id'] ? '' : ','; |
420 | + } |
|
399 | 421 | |
400 | 422 | $js .= ' |
401 | 423 | ] |
@@ -406,8 +428,10 @@ discard block |
||
406 | 428 | |
407 | 429 | // If post based is selected, disable moderation selection, visability, group description and enable post count, |
408 | 430 | if ($context['group']['allow_post_group']) |
409 | - addInlineJavascript('swapPostGroup(' . ($context['group']['is_post_group'] ? 'true' : 'false') . ');', true); |
|
410 | -} |
|
431 | + { |
|
432 | + addInlineJavascript('swapPostGroup(' . ($context['group']['is_post_group'] ? 'true' : 'false') . ');', true); |
|
433 | + } |
|
434 | + } |
|
411 | 435 | |
412 | 436 | /** |
413 | 437 | * Template to edit the boards and groups access to them |
@@ -431,18 +455,22 @@ discard block |
||
431 | 455 | foreach ($context['categories'] as $category) |
432 | 456 | { |
433 | 457 | if (empty($deny)) |
434 | - echo ' |
|
458 | + { |
|
459 | + echo ' |
|
435 | 460 | <li class="category"> |
436 | 461 | <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'', $form_id, '\', \'boardaccess\'); return false;"><strong>', $category['name'], '</strong></a> |
437 | 462 | <ul>'; |
438 | - else |
|
439 | - echo ' |
|
463 | + } |
|
464 | + else { |
|
465 | + echo ' |
|
440 | 466 | <li class="category"> |
441 | 467 | <strong>', $category['name'], '</strong> |
442 | 468 | <ul id="boards_list_', $category['id'], '">'; |
469 | + } |
|
443 | 470 | |
444 | 471 | if (!empty($deny)) |
445 | - echo ' |
|
472 | + { |
|
473 | + echo ' |
|
446 | 474 | <li class="board select_category"> |
447 | 475 | ', $txt['all_boards_in_cat'], ': |
448 | 476 | <span class="floatright"> |
@@ -457,17 +485,20 @@ discard block |
||
457 | 485 | </label> |
458 | 486 | </span> |
459 | 487 | </li>'; |
488 | + } |
|
460 | 489 | |
461 | 490 | foreach ($category['boards'] as $board) |
462 | 491 | { |
463 | 492 | if (empty($deny)) |
464 | - echo ' |
|
493 | + { |
|
494 | + echo ' |
|
465 | 495 | <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"> |
466 | 496 | <input id="brd', $board['id'], '" name="boardaccess[', $board['id'], ']" type="checkbox" value="allow" ', $board['allow'] ? ' checked="checked"' : '', ' /> |
467 | 497 | <label for="brd', $board['id'], '">', $board['name'], '</label> |
468 | 498 | </li>'; |
469 | - else |
|
470 | - echo ' |
|
499 | + } |
|
500 | + else { |
|
501 | + echo ' |
|
471 | 502 | <li class="board"> |
472 | 503 | <span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span> |
473 | 504 | <span class="floatright"> |
@@ -482,6 +513,7 @@ discard block |
||
482 | 513 | </label> |
483 | 514 | </span> |
484 | 515 | </li>'; |
516 | + } |
|
485 | 517 | } |
486 | 518 | |
487 | 519 | echo ' |
@@ -493,14 +525,16 @@ discard block |
||
493 | 525 | </ul>'; |
494 | 526 | |
495 | 527 | if (empty($deny)) |
496 | - echo ' |
|
528 | + { |
|
529 | + echo ' |
|
497 | 530 | <br /> |
498 | 531 | <div class="select_all_box"> |
499 | 532 | <input id="checkall_check" type="checkbox" onclick="invertAll(this, this.form, \'boardaccess\');" /> |
500 | 533 | <label for="checkall_check"><em>', $txt['check_all'], '</em></label> |
501 | 534 | </div>'; |
502 | - else |
|
503 | - echo ' |
|
535 | + } |
|
536 | + else { |
|
537 | + echo ' |
|
504 | 538 | <div class="select_all_box"> |
505 | 539 | ', $txt['all'], ': |
506 | 540 | <span class="floatright"> |
@@ -515,6 +549,7 @@ discard block |
||
515 | 549 | </label> |
516 | 550 | </span> |
517 | 551 | </div>'; |
552 | + } |
|
518 | 553 | |
519 | 554 | // select_all_box is hidden and it's made available only if js is enabled |
520 | 555 | echo ' |
@@ -550,13 +585,15 @@ discard block |
||
550 | 585 | |
551 | 586 | // Any description to show? |
552 | 587 | if (!empty($context['group']['description'])) |
553 | - echo ' |
|
588 | + { |
|
589 | + echo ' |
|
554 | 590 | <dt> |
555 | 591 | <label>' . $txt['membergroups_members_description'] . ':</label> |
556 | 592 | </dt> |
557 | 593 | <dd> |
558 | 594 | ', $context['group']['description'], ' |
559 | 595 | </dd>'; |
596 | + } |
|
560 | 597 | |
561 | 598 | echo ' |
562 | 599 | <dt> |
@@ -571,7 +608,9 @@ discard block |
||
571 | 608 | { |
572 | 609 | $moderators = array(); |
573 | 610 | foreach ($context['group']['moderators'] as $moderator) |
574 | - $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
611 | + { |
|
612 | + $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
613 | + } |
|
575 | 614 | |
576 | 615 | echo ' |
577 | 616 | <dt> |
@@ -593,8 +632,10 @@ discard block |
||
593 | 632 | <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' ? ' <i class="icon icon-small i-sort-alpha-' . $context['sort_direction'] . '"></i>' : '', '</a></th>'; |
594 | 633 | |
595 | 634 | if ($context['can_send_email']) |
596 | - echo ' |
|
635 | + { |
|
636 | + echo ' |
|
597 | 637 | <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' ? ' <i class="icon icon-small i-sort-alpha-' . $context['sort_direction'] . '"></i>' : '', '</a></th>'; |
638 | + } |
|
598 | 639 | |
599 | 640 | echo ' |
600 | 641 | <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' ? '<i class="icon icon-small i-sort-numeric-' . $context['sort_direction'] . '"></i>' : '', '</a></th> |
@@ -602,8 +643,10 @@ discard block |
||
602 | 643 | <th ', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><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' ? ' <i class="icon icon-small i-sort-numeric-' . $context['sort_direction'] . '"></i>' : '', '</a></th>'; |
603 | 644 | |
604 | 645 | if (!empty($context['group']['assignable'])) |
605 | - echo ' |
|
646 | + { |
|
647 | + echo ' |
|
606 | 648 | <th style="width: 4%;"><input type="checkbox" onclick="invertAll(this, this.form);" /></th>'; |
649 | + } |
|
607 | 650 | |
608 | 651 | echo ' |
609 | 652 | </tr> |
@@ -611,10 +654,12 @@ discard block |
||
611 | 654 | <tbody>'; |
612 | 655 | |
613 | 656 | if (empty($context['members'])) |
614 | - echo ' |
|
657 | + { |
|
658 | + echo ' |
|
615 | 659 | <tr> |
616 | 660 | <td colspan="6" class="centertext">', $txt['membergroups_members_no_members'], '</td> |
617 | 661 | </tr>'; |
662 | + } |
|
618 | 663 | |
619 | 664 | foreach ($context['members'] as $member) |
620 | 665 | { |
@@ -634,10 +679,12 @@ discard block |
||
634 | 679 | <td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>'; |
635 | 680 | |
636 | 681 | if (!empty($context['group']['assignable'])) |
637 | - echo ' |
|
682 | + { |
|
683 | + echo ' |
|
638 | 684 | <td class="centertext" style="width: 4%;"> |
639 | 685 | <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'] . '\')" ' : ''), '/> |
640 | 686 | </td>'; |
687 | + } |
|
641 | 688 | |
642 | 689 | echo ' |
643 | 690 | </tr>'; |
@@ -678,7 +725,8 @@ discard block |
||
678 | 725 | </div>'; |
679 | 726 | |
680 | 727 | if (!empty($context['group']['assignable'])) |
681 | - addInlineJavascript(' |
|
728 | + { |
|
729 | + addInlineJavascript(' |
|
682 | 730 | var oAddMemberSuggest = new smc_AutoSuggest({ |
683 | 731 | sSelf: \'oAddMemberSuggest\', |
684 | 732 | sSessionId: elk_session_id, |
@@ -692,7 +740,8 @@ discard block |
||
692 | 740 | bItemList: true, |
693 | 741 | sItemListContainerId: \'toAddItemContainer\' |
694 | 742 | });', true); |
695 | -} |
|
743 | + } |
|
744 | + } |
|
696 | 745 | |
697 | 746 | /** |
698 | 747 | * Allow the moderator to enter a reason to each user being rejected. |
@@ -711,7 +760,8 @@ discard block |
||
711 | 760 | |
712 | 761 | // Loop through and print out a reason box for each... |
713 | 762 | foreach ($context['group_requests'] as $request) |
714 | - echo ' |
|
763 | + { |
|
764 | + echo ' |
|
715 | 765 | <dt> |
716 | 766 | <label for="groupreason">', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</label> |
717 | 767 | </dt> |
@@ -719,6 +769,7 @@ discard block |
||
719 | 769 | <input type="hidden" name="groupr[]" value="', $request['id'], '" /> |
720 | 770 | <textarea id="groupreason" name="groupreason[', $request['id'], ']" rows="3" cols="40" style="min-width: 80%; max-width: 99%;"></textarea> |
721 | 771 | </dd>'; |
772 | + } |
|
722 | 773 | |
723 | 774 | echo ' |
724 | 775 | </dl> |
@@ -30,18 +30,22 @@ discard block |
||
30 | 30 | |
31 | 31 | // Prevent browssers from auto completing fields when viewing/editing other members profiles |
32 | 32 | if (!$context['user']['is_owner']) |
33 | - addInlineJavascript('disableAutoComplete();', true); |
|
33 | + { |
|
34 | + addInlineJavascript('disableAutoComplete();', true); |
|
35 | + } |
|
34 | 36 | |
35 | 37 | // If an error occurred while trying to save previously, give the user a clue! |
36 | 38 | template_error_message(); |
37 | 39 | |
38 | 40 | // If the profile was update successfully, let the user know this. |
39 | 41 | if (!empty($context['profile_updated'])) |
40 | - echo ' |
|
42 | + { |
|
43 | + echo ' |
|
41 | 44 | <div class="successbox"> |
42 | 45 | ', $context['profile_updated'], ' |
43 | 46 | </div>'; |
44 | -} |
|
47 | + } |
|
48 | + } |
|
45 | 49 | |
46 | 50 | /** |
47 | 51 | * Template for showing all the drafts of the user. |
@@ -51,7 +55,9 @@ discard block |
||
51 | 55 | global $context, $settings, $txt, $scripturl; |
52 | 56 | |
53 | 57 | if (!empty($context['drafts'])) |
54 | - template_pagesection(); |
|
58 | + { |
|
59 | + template_pagesection(); |
|
60 | + } |
|
55 | 61 | |
56 | 62 | echo ' |
57 | 63 | <div id="recentposts" class="profile_center"> |
@@ -65,10 +71,12 @@ discard block |
||
65 | 71 | |
66 | 72 | // No drafts? Just show an informative message. |
67 | 73 | if (empty($context['drafts'])) |
68 | - echo ' |
|
74 | + { |
|
75 | + echo ' |
|
69 | 76 | <div class="information centertext"> |
70 | 77 | ', $txt['draft_none'], ' |
71 | 78 | </div>'; |
79 | + } |
|
72 | 80 | else |
73 | 81 | { |
74 | 82 | // For every draft to be displayed show the important details. |
@@ -77,10 +85,14 @@ discard block |
||
77 | 85 | $draft['title'] = '<strong>' . $draft['board']['link'] . ' / ' . $draft['topic']['link'] . '</strong> '; |
78 | 86 | |
79 | 87 | if (!empty($draft['sticky'])) |
80 | - $draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="' . $txt['sticky_topic'] . '" title="' . $txt['sticky_topic'] . '" />'; |
|
88 | + { |
|
89 | + $draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="' . $txt['sticky_topic'] . '" title="' . $txt['sticky_topic'] . '" />'; |
|
90 | + } |
|
81 | 91 | |
82 | 92 | if (!empty($draft['locked'])) |
83 | - $draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_lock.png" alt="' . $txt['locked_topic'] . '" title="' . $txt['locked_topic'] . '" />'; |
|
93 | + { |
|
94 | + $draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_lock.png" alt="' . $txt['locked_topic'] . '" title="' . $txt['locked_topic'] . '" />'; |
|
95 | + } |
|
84 | 96 | |
85 | 97 | $draft['date'] = '« <strong>' . $txt['draft_saved_on'] . ':</strong> ' . ($draft['age'] > 0 ? sprintf($txt['draft_days_ago'], $draft['age']) : $draft['time']) . (!empty($draft['remaining']) ? ', ' . sprintf($txt['draft_retain'], $draft['remaining']) : '') . ' »'; |
86 | 98 | $draft['class'] = 'content'; |
@@ -114,7 +126,8 @@ discard block |
||
114 | 126 | |
115 | 127 | // Only show the password box if it's actually needed. |
116 | 128 | if ($context['require_password']) |
117 | - echo ' |
|
129 | + { |
|
130 | + echo ' |
|
118 | 131 | <dl class="clear"> |
119 | 132 | <dt> |
120 | 133 | <span', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '><label for="oldpasswrd">', $txt['current_password'], '</label>: </span><br /> |
@@ -124,21 +137,27 @@ discard block |
||
124 | 137 | <input type="password" id="oldpasswrd" name="oldpasswrd" size="20" class="input_password" placeholder="', $txt['current_password'], '" /> |
125 | 138 | </dd> |
126 | 139 | </dl>'; |
140 | + } |
|
127 | 141 | |
128 | 142 | echo ' |
129 | 143 | <div class="submitbutton">'; |
130 | 144 | |
131 | 145 | if (!empty($context['token_check'])) |
132 | - echo ' |
|
146 | + { |
|
147 | + echo ' |
|
133 | 148 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />'; |
149 | + } |
|
134 | 150 | |
135 | 151 | // The button shouldn't say "Change profile" unless we're changing the profile... |
136 | 152 | if (!empty($context['submit_button_text'])) |
137 | - echo ' |
|
153 | + { |
|
154 | + echo ' |
|
138 | 155 | <input type="submit" name="save" value="', $context['submit_button_text'], '" />'; |
139 | - else |
|
140 | - echo ' |
|
156 | + } |
|
157 | + else { |
|
158 | + echo ' |
|
141 | 159 | <input type="submit" name="save" value="', $txt['change_profile'], '" />'; |
160 | + } |
|
142 | 161 | |
143 | 162 | echo ' |
144 | 163 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
@@ -165,8 +184,10 @@ discard block |
||
165 | 184 | |
166 | 185 | // Cycle through each error and display an error message. |
167 | 186 | foreach ($context['post_errors'] as $error) |
168 | - echo ' |
|
187 | + { |
|
188 | + echo ' |
|
169 | 189 | <li>', isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : $error, '</li>'; |
190 | + } |
|
170 | 191 | |
171 | 192 | echo ' |
172 | 193 | </ul>'; |
@@ -196,6 +217,8 @@ discard block |
||
196 | 217 | // Work out the starting color. |
197 | 218 | $context['current_color'] = $context['colors'][0]; |
198 | 219 | foreach ($context['colors'] as $limit => $color) |
199 | - if ($context['member']['warning'] >= $limit) |
|
220 | + { |
|
221 | + if ($context['member']['warning'] >= $limit) |
|
200 | 222 | $context['current_color'] = $color; |
201 | -} |
|
223 | + } |
|
224 | + } |