@@ -25,18 +25,20 @@ discard block |
||
| 25 | 25 | </div> |
| 26 | 26 | <div class="windowbg2">'; |
| 27 | 27 | |
| 28 | - if (!empty($context['move_board'])) |
|
| 29 | - echo ' |
|
| 28 | + if (!empty($context['move_board'])) { |
|
| 29 | + echo ' |
|
| 30 | 30 | <div class="noticebox"> |
| 31 | 31 | ', $context['move_title'], ' [<a href="', $scripturl, '?action=admin;area=manageboards">', $txt['mboards_cancel_moving'], '</a>]', ' |
| 32 | 32 | </div>'; |
| 33 | + } |
|
| 33 | 34 | |
| 34 | 35 | // No categories so show a label. |
| 35 | - if (empty($context['categories'])) |
|
| 36 | - echo ' |
|
| 36 | + if (empty($context['categories'])) { |
|
| 37 | + echo ' |
|
| 37 | 38 | <div class="windowbg centertext"> |
| 38 | 39 | ', $txt['mboards_no_cats'], ' |
| 39 | 40 | </div>'; |
| 41 | + } |
|
| 40 | 42 | |
| 41 | 43 | // Loop through every category, listing the boards in each as we go. |
| 42 | 44 | foreach ($context['categories'] as $category) |
@@ -54,9 +56,10 @@ discard block |
||
| 54 | 56 | <form action="', $scripturl, '?action=admin;area=manageboards;sa=newboard;cat=', $category['id'], '" method="post" accept-charset="', $context['character_set'], '"> |
| 55 | 57 | <ul id="category_', $category['id'], '" class="nolist">'; |
| 56 | 58 | |
| 57 | - if (!empty($category['move_link'])) |
|
| 58 | - echo ' |
|
| 59 | + if (!empty($category['move_link'])) { |
|
| 60 | + echo ' |
|
| 59 | 61 | <li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><span class="generic_icons select_above"></span></a></li>'; |
| 62 | + } |
|
| 60 | 63 | |
| 61 | 64 | $recycle_board = '<a href="' . $scripturl . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.png" alt="' . $txt['recycle_board'] . '" title="' . $txt['recycle_board'] . '"></a>'; |
| 62 | 65 | $redirect_board = '<img src="' . $settings['images_url'] . '/new_redirect.png" alt="' . $txt['redirect_board_desc'] . '" title="' . $txt['redirect_board_desc'] . '">'; |
@@ -81,9 +84,10 @@ discard block |
||
| 81 | 84 | echo ' |
| 82 | 85 | <li class="windowbg" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">'; |
| 83 | 86 | |
| 84 | - foreach ($board['move_links'] as $link) |
|
| 85 | - echo ' |
|
| 87 | + foreach ($board['move_links'] as $link) { |
|
| 88 | + echo ' |
|
| 86 | 89 | <a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="generic_icons select_', $link['class'], '" title="', $link['label'], '"></span></a>'; |
| 90 | + } |
|
| 87 | 91 | |
| 88 | 92 | echo ' |
| 89 | 93 | </li>'; |
@@ -132,9 +136,10 @@ discard block |
||
| 132 | 136 | <select name="cat_order">'; |
| 133 | 137 | |
| 134 | 138 | // Print every existing category into a select box. |
| 135 | - foreach ($context['category_order'] as $order) |
|
| 136 | - echo ' |
|
| 139 | + foreach ($context['category_order'] as $order) { |
|
| 140 | + echo ' |
|
| 137 | 141 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
| 142 | + } |
|
| 138 | 143 | echo ' |
| 139 | 144 | </select> |
| 140 | 145 | </dd>'; |
@@ -168,21 +173,23 @@ discard block |
||
| 168 | 173 | echo ' |
| 169 | 174 | </dl>'; |
| 170 | 175 | |
| 171 | - if (isset($context['category']['is_new'])) |
|
| 172 | - echo ' |
|
| 176 | + if (isset($context['category']['is_new'])) { |
|
| 177 | + echo ' |
|
| 173 | 178 | <input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit">'; |
| 174 | - else |
|
| 175 | - echo ' |
|
| 179 | + } else { |
|
| 180 | + echo ' |
|
| 176 | 181 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit"> |
| 177 | 182 | <input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button_submit you_sure">'; |
| 183 | + } |
|
| 178 | 184 | echo ' |
| 179 | 185 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 180 | 186 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
| 181 | 187 | |
| 182 | 188 | // If this category is empty we don't bother with the next confirmation screen. |
| 183 | - if ($context['category']['is_empty']) |
|
| 184 | - echo ' |
|
| 189 | + if ($context['category']['is_empty']) { |
|
| 190 | + echo ' |
|
| 185 | 191 | <input type="hidden" name="empty" value="1">'; |
| 192 | + } |
|
| 186 | 193 | |
| 187 | 194 | echo ' |
| 188 | 195 | </div> |
@@ -209,9 +216,10 @@ discard block |
||
| 209 | 216 | <p>', $txt['mboards_delete_cat_contains'], ':</p> |
| 210 | 217 | <ul>'; |
| 211 | 218 | |
| 212 | - foreach ($context['category']['children'] as $child) |
|
| 213 | - echo ' |
|
| 219 | + foreach ($context['category']['children'] as $child) { |
|
| 220 | + echo ' |
|
| 214 | 221 | <li>', $child, '</li>'; |
| 222 | + } |
|
| 215 | 223 | |
| 216 | 224 | echo ' |
| 217 | 225 | </ul> |
@@ -225,10 +233,11 @@ discard block |
||
| 225 | 233 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', count($context['category_order']) == 1 ? ' disabled' : '', '>', $txt['mboards_delete_option2'], '</label>: |
| 226 | 234 | <select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>'; |
| 227 | 235 | |
| 228 | - foreach ($context['category_order'] as $cat) |
|
| 229 | - if ($cat['id'] != 0) |
|
| 236 | + foreach ($context['category_order'] as $cat) { |
|
| 237 | + if ($cat['id'] != 0) |
|
| 230 | 238 | echo ' |
| 231 | 239 | <option value="', $cat['id'], '">', $cat['true_name'], '</option>'; |
| 240 | + } |
|
| 232 | 241 | |
| 233 | 242 | echo ' |
| 234 | 243 | </select> |
@@ -272,9 +281,10 @@ discard block |
||
| 272 | 281 | </dt> |
| 273 | 282 | <dd> |
| 274 | 283 | <select name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">'; |
| 275 | - foreach ($context['categories'] as $category) |
|
| 276 | - echo ' |
|
| 284 | + foreach ($context['categories'] as $category) { |
|
| 285 | + echo ' |
|
| 277 | 286 | <option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>'; |
| 287 | + } |
|
| 278 | 288 | echo ' |
| 279 | 289 | </select> |
| 280 | 290 | </dd>'; |
@@ -301,9 +311,10 @@ discard block |
||
| 301 | 311 | echo ' |
| 302 | 312 | <select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '> |
| 303 | 313 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : ''; |
| 304 | - foreach ($context['board_order'] as $order) |
|
| 305 | - echo ' |
|
| 314 | + foreach ($context['board_order'] as $order) { |
|
| 315 | + echo ' |
|
| 306 | 316 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
| 317 | + } |
|
| 307 | 318 | echo ' |
| 308 | 319 | </select> |
| 309 | 320 | </dd>'; |
@@ -332,13 +343,15 @@ discard block |
||
| 332 | 343 | <dd> |
| 333 | 344 | <select name="profile">'; |
| 334 | 345 | |
| 335 | - if (isset($context['board']['is_new'])) |
|
| 336 | - echo ' |
|
| 346 | + if (isset($context['board']['is_new'])) { |
|
| 347 | + echo ' |
|
| 337 | 348 | <option value="-1">[', $txt['permission_profile_inherit'], ']</option>'; |
| 349 | + } |
|
| 338 | 350 | |
| 339 | - foreach ($context['profiles'] as $id => $profile) |
|
| 340 | - echo ' |
|
| 351 | + foreach ($context['profiles'] as $id => $profile) { |
|
| 352 | + echo ' |
|
| 341 | 353 | <option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
| 354 | + } |
|
| 342 | 355 | |
| 343 | 356 | echo ' |
| 344 | 357 | </select> |
@@ -351,8 +364,8 @@ discard block |
||
| 351 | 364 | </dt> |
| 352 | 365 | <dd>'; |
| 353 | 366 | |
| 354 | - if (!empty($modSettings['deny_boards_access'])) |
|
| 355 | - echo ' |
|
| 367 | + if (!empty($modSettings['deny_boards_access'])) { |
|
| 368 | + echo ' |
|
| 356 | 369 | <table> |
| 357 | 370 | <tr> |
| 358 | 371 | <td></td> |
@@ -360,10 +373,11 @@ discard block |
||
| 360 | 373 | <th>', $txt['permissions_option_off'], '</th> |
| 361 | 374 | <th>', $txt['permissions_option_deny'], '</th> |
| 362 | 375 | </tr>'; |
| 376 | + } |
|
| 363 | 377 | |
| 364 | 378 | // List all the membergroups so the user can choose who may access this board. |
| 365 | - foreach ($context['groups'] as $group) |
|
| 366 | - if (empty($modSettings['deny_boards_access'])) |
|
| 379 | + foreach ($context['groups'] as $group) { |
|
| 380 | + if (empty($modSettings['deny_boards_access'])) |
|
| 367 | 381 | echo ' |
| 368 | 382 | <label for="groups_', $group['id'], '"> |
| 369 | 383 | <input type="checkbox" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), ' class="input_check"> |
@@ -371,8 +385,9 @@ discard block |
||
| 371 | 385 | ', $group['name'], ' |
| 372 | 386 | </span> |
| 373 | 387 | </label><br>'; |
| 374 | - else |
|
| 375 | - echo ' |
|
| 388 | + } |
|
| 389 | + else { |
|
| 390 | + echo ' |
|
| 376 | 391 | <tr> |
| 377 | 392 | <td> |
| 378 | 393 | <label for="groups_', $group['id'], '_a"> |
@@ -392,16 +407,17 @@ discard block |
||
| 392 | 407 | </td> |
| 393 | 408 | <td></td> |
| 394 | 409 | </tr>'; |
| 410 | + } |
|
| 395 | 411 | |
| 396 | - if (empty($modSettings['deny_boards_access'])) |
|
| 397 | - echo ' |
|
| 412 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 413 | + echo ' |
|
| 398 | 414 | <span class="select_all_box"> |
| 399 | 415 | <em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[\');"> |
| 400 | 416 | </span> |
| 401 | 417 | <br><br> |
| 402 | 418 | </dd>'; |
| 403 | - else |
|
| 404 | - echo ' |
|
| 419 | + } else { |
|
| 420 | + echo ' |
|
| 405 | 421 | <tr class="select_all_box"> |
| 406 | 422 | <td> |
| 407 | 423 | </td> |
@@ -420,6 +436,7 @@ discard block |
||
| 420 | 436 | </tr> |
| 421 | 437 | </table> |
| 422 | 438 | </dd>'; |
| 439 | + } |
|
| 423 | 440 | |
| 424 | 441 | // Options to choose moderators, specify as announcement board and choose whether to count posts here. |
| 425 | 442 | echo ' |
@@ -474,8 +491,8 @@ discard block |
||
| 474 | 491 | </dl> |
| 475 | 492 | </div>'; |
| 476 | 493 | |
| 477 | - if ($context['board']['redirect']) |
|
| 478 | - echo ' |
|
| 494 | + if ($context['board']['redirect']) { |
|
| 495 | + echo ' |
|
| 479 | 496 | <div id="reset_redirect_div"> |
| 480 | 497 | <dl class="settings"> |
| 481 | 498 | <dt> |
@@ -488,6 +505,7 @@ discard block |
||
| 488 | 505 | </dd> |
| 489 | 506 | </dl> |
| 490 | 507 | </div>'; |
| 508 | + } |
|
| 491 | 509 | } |
| 492 | 510 | |
| 493 | 511 | echo ' |
@@ -515,9 +533,10 @@ discard block |
||
| 515 | 533 | <select name="boardtheme" id="boardtheme" onchange="refreshOptions();"> |
| 516 | 534 | <option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>'; |
| 517 | 535 | |
| 518 | - foreach ($context['themes'] as $theme) |
|
| 519 | - echo ' |
|
| 536 | + foreach ($context['themes'] as $theme) { |
|
| 537 | + echo ' |
|
| 520 | 538 | <option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
| 539 | + } |
|
| 521 | 540 | |
| 522 | 541 | echo ' |
| 523 | 542 | </select> |
@@ -536,9 +555,10 @@ discard block |
||
| 536 | 555 | </dl> |
| 537 | 556 | </div>'; |
| 538 | 557 | |
| 539 | - if (!empty($context['board']['is_recycle'])) |
|
| 540 | - echo ' |
|
| 558 | + if (!empty($context['board']['is_recycle'])) { |
|
| 559 | + echo ' |
|
| 541 | 560 | <div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>'; |
| 561 | + } |
|
| 542 | 562 | |
| 543 | 563 | echo ' |
| 544 | 564 | <input type="hidden" name="rid" value="', $context['redirect_location'], '"> |
@@ -546,21 +566,24 @@ discard block |
||
| 546 | 566 | <input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">'; |
| 547 | 567 | |
| 548 | 568 | // If this board has no children don't bother with the next confirmation screen. |
| 549 | - if ($context['board']['no_children']) |
|
| 550 | - echo ' |
|
| 569 | + if ($context['board']['no_children']) { |
|
| 570 | + echo ' |
|
| 551 | 571 | <input type="hidden" name="no_children" value="1">'; |
| 572 | + } |
|
| 552 | 573 | |
| 553 | - if (isset($context['board']['is_new'])) |
|
| 554 | - echo ' |
|
| 574 | + if (isset($context['board']['is_new'])) { |
|
| 575 | + echo ' |
|
| 555 | 576 | <input type="hidden" name="cur_cat" value="', $context['board']['category'], '"> |
| 556 | 577 | <input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">'; |
| 557 | - else |
|
| 558 | - echo ' |
|
| 578 | + } else { |
|
| 579 | + echo ' |
|
| 559 | 580 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">'; |
| 581 | + } |
|
| 560 | 582 | |
| 561 | - if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) |
|
| 562 | - echo ' |
|
| 583 | + if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) { |
|
| 584 | + echo ' |
|
| 563 | 585 | <input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button_submit you_sure">'; |
| 586 | + } |
|
| 564 | 587 | echo ' |
| 565 | 588 | </div> |
| 566 | 589 | </form> |
@@ -581,12 +604,13 @@ discard block |
||
| 581 | 604 | sItemListContainerId: \'moderator_container\', |
| 582 | 605 | aListItems: ['; |
| 583 | 606 | |
| 584 | - foreach ($context['board']['moderators'] as $id_member => $member_name) |
|
| 585 | - echo ' |
|
| 607 | + foreach ($context['board']['moderators'] as $id_member => $member_name) { |
|
| 608 | + echo ' |
|
| 586 | 609 | { |
| 587 | 610 | sItemId: ', JavaScriptEscape($id_member), ', |
| 588 | 611 | sItemName: ', JavaScriptEscape($member_name), ' |
| 589 | 612 | }', $id_member == $context['board']['last_moderator_id'] ? '' : ','; |
| 613 | + } |
|
| 590 | 614 | |
| 591 | 615 | echo ' |
| 592 | 616 | ] |
@@ -606,12 +630,13 @@ discard block |
||
| 606 | 630 | sItemListContainerId: \'moderator_group_container\', |
| 607 | 631 | aListItems: ['; |
| 608 | 632 | |
| 609 | - foreach ($context['board']['moderator_groups'] as $id_group => $group_name) |
|
| 610 | - echo ' |
|
| 633 | + foreach ($context['board']['moderator_groups'] as $id_group => $group_name) { |
|
| 634 | + echo ' |
|
| 611 | 635 | { |
| 612 | 636 | sItemId: ', JavaScriptEscape($id_group), ', |
| 613 | 637 | sItemName: ', JavaScriptEscape($group_name), ' |
| 614 | 638 | }', $id_group == $context['board']['last_moderator_group_id'] ? '' : ','; |
| 639 | + } |
|
| 615 | 640 | |
| 616 | 641 | echo ' |
| 617 | 642 | ] |
@@ -637,9 +662,10 @@ discard block |
||
| 637 | 662 | echo ' |
| 638 | 663 | document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";'; |
| 639 | 664 | |
| 640 | - if ($context['board']['redirect']) |
|
| 641 | - echo ' |
|
| 665 | + if ($context['board']['redirect']) { |
|
| 666 | + echo ' |
|
| 642 | 667 | document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";'; |
| 668 | + } |
|
| 643 | 669 | } |
| 644 | 670 | |
| 645 | 671 | echo ' |
@@ -668,9 +694,10 @@ discard block |
||
| 668 | 694 | <p>', $txt['mboards_delete_board_contains'], '</p> |
| 669 | 695 | <ul>'; |
| 670 | 696 | |
| 671 | - foreach ($context['children'] as $child) |
|
| 672 | - echo ' |
|
| 697 | + foreach ($context['children'] as $child) { |
|
| 698 | + echo ' |
|
| 673 | 699 | <li>', $child['node']['name'], '</li>'; |
| 700 | + } |
|
| 674 | 701 | |
| 675 | 702 | echo ' |
| 676 | 703 | </ul> |
@@ -684,10 +711,11 @@ discard block |
||
| 684 | 711 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', empty($context['can_move_children']) ? ' disabled' : '', '>', $txt['mboards_delete_board_option2'], '</label>: |
| 685 | 712 | <select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>'; |
| 686 | 713 | |
| 687 | - foreach ($context['board_order'] as $board) |
|
| 688 | - if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
| 714 | + foreach ($context['board_order'] as $board) { |
|
| 715 | + if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
| 689 | 716 | echo ' |
| 690 | 717 | <option value="', $board['id'], '">', $board['name'], '</option>'; |
| 718 | + } |
|
| 691 | 719 | |
| 692 | 720 | echo ' |
| 693 | 721 | </select> |
@@ -55,18 +55,20 @@ discard block |
||
| 55 | 55 | <div class="modbox"> |
| 56 | 56 | <ul>'; |
| 57 | 57 | |
| 58 | - foreach ($context['group_requests'] as $request) |
|
| 59 | - echo ' |
|
| 58 | + foreach ($context['group_requests'] as $request) { |
|
| 59 | + echo ' |
|
| 60 | 60 | <li class="smalltext"> |
| 61 | 61 | <a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], ' |
| 62 | 62 | </li>'; |
| 63 | + } |
|
| 63 | 64 | |
| 64 | 65 | // Don't have any watched users right now? |
| 65 | - if (empty($context['group_requests'])) |
|
| 66 | - echo ' |
|
| 66 | + if (empty($context['group_requests'])) { |
|
| 67 | + echo ' |
|
| 67 | 68 | <li> |
| 68 | 69 | <strong class="smalltext">', $txt['mc_group_requests_none'], '</strong> |
| 69 | 70 | </li>'; |
| 71 | + } |
|
| 70 | 72 | |
| 71 | 73 | echo ' |
| 72 | 74 | </ul> |
@@ -124,18 +126,20 @@ discard block |
||
| 124 | 126 | <div class="modbox"> |
| 125 | 127 | <ul>'; |
| 126 | 128 | |
| 127 | - foreach ($context['watched_users'] as $user) |
|
| 128 | - echo ' |
|
| 129 | + foreach ($context['watched_users'] as $user) { |
|
| 130 | + echo ' |
|
| 129 | 131 | <li> |
| 130 | 132 | <span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span> |
| 131 | 133 | </li>'; |
| 134 | + } |
|
| 132 | 135 | |
| 133 | 136 | // Don't have any watched users right now? |
| 134 | - if (empty($context['watched_users'])) |
|
| 135 | - echo ' |
|
| 137 | + if (empty($context['watched_users'])) { |
|
| 138 | + echo ' |
|
| 136 | 139 | <li> |
| 137 | 140 | <strong class="smalltext">', $txt['mc_watched_users_none'], '</strong> |
| 138 | 141 | </li>'; |
| 142 | + } |
|
| 139 | 143 | |
| 140 | 144 | echo ' |
| 141 | 145 | </ul> |
@@ -193,18 +197,20 @@ discard block |
||
| 193 | 197 | <div class="modbox"> |
| 194 | 198 | <ul>'; |
| 195 | 199 | |
| 196 | - foreach ($context['reported_posts'] as $post) |
|
| 197 | - echo ' |
|
| 200 | + foreach ($context['reported_posts'] as $post) { |
|
| 201 | + echo ' |
|
| 198 | 202 | <li> |
| 199 | 203 | <span class="smalltext">', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), '</span> |
| 200 | 204 | </li>'; |
| 205 | + } |
|
| 201 | 206 | |
| 202 | 207 | // Don't have any watched users right now? |
| 203 | - if (empty($context['reported_posts'])) |
|
| 204 | - echo ' |
|
| 208 | + if (empty($context['reported_posts'])) { |
|
| 209 | + echo ' |
|
| 205 | 210 | <li> |
| 206 | 211 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
| 207 | 212 | </li>'; |
| 213 | + } |
|
| 208 | 214 | |
| 209 | 215 | echo ' |
| 210 | 216 | </ul> |
@@ -262,18 +268,20 @@ discard block |
||
| 262 | 268 | <div class="modbox"> |
| 263 | 269 | <ul>'; |
| 264 | 270 | |
| 265 | - foreach ($context['reported_users'] as $user) |
|
| 266 | - echo ' |
|
| 271 | + foreach ($context['reported_users'] as $user) { |
|
| 272 | + echo ' |
|
| 267 | 273 | <li> |
| 268 | 274 | <span class="smalltext">', $user['user']['link'], '</span> |
| 269 | 275 | </li>'; |
| 276 | + } |
|
| 270 | 277 | |
| 271 | 278 | // Don't have any watched users right now? |
| 272 | - if (empty($context['reported_users'])) |
|
| 273 | - echo ' |
|
| 279 | + if (empty($context['reported_users'])) { |
|
| 280 | + echo ' |
|
| 274 | 281 | <li> |
| 275 | 282 | <strong class="smalltext">', $txt['mc_reported_users_none'], '</strong> |
| 276 | 283 | </li>'; |
| 284 | + } |
|
| 277 | 285 | |
| 278 | 286 | echo ' |
| 279 | 287 | </ul> |
@@ -344,9 +352,10 @@ discard block |
||
| 344 | 352 | <ul class="moderation_notes">'; |
| 345 | 353 | |
| 346 | 354 | // Cycle through the notes. |
| 347 | - foreach ($context['notes'] as $note) |
|
| 348 | - echo ' |
|
| 355 | + foreach ($context['notes'] as $note) { |
|
| 356 | + echo ' |
|
| 349 | 357 | <li class="smalltext">', ($note['can_delete'] ? '<a href="'. $note['delete_href'] .';'. $context['mod-modnote-del_token_var'] .'='. $context['mod-modnote-del_token'] .'" data-confirm="'. $txt['mc_reportedp_delete_confirm'] .'" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'] ,' <strong>', $note['author']['link'], ':</strong> ', $note['text'], '</li>'; |
| 358 | + } |
|
| 350 | 359 | |
| 351 | 360 | echo ' |
| 352 | 361 | </ul> |
@@ -388,16 +397,17 @@ discard block |
||
| 388 | 397 | $remove_button = create_button('delete', 'remove_message', 'remove'); |
| 389 | 398 | |
| 390 | 399 | // No posts? |
| 391 | - if (empty($context['unapproved_items'])) |
|
| 392 | - echo ' |
|
| 400 | + if (empty($context['unapproved_items'])) { |
|
| 401 | + echo ' |
|
| 393 | 402 | <div class="windowbg2"> |
| 394 | 403 | <p class="centertext">', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], '</p> |
| 395 | 404 | </div>'; |
| 396 | - else |
|
| 397 | - echo ' |
|
| 405 | + } else { |
|
| 406 | + echo ' |
|
| 398 | 407 | <div class="pagesection floatleft"> |
| 399 | 408 | ', $context['page_index'], ' |
| 400 | 409 | </div>'; |
| 410 | + } |
|
| 401 | 411 | |
| 402 | 412 | foreach ($context['unapproved_items'] as $item) |
| 403 | 413 | { |
@@ -414,14 +424,16 @@ discard block |
||
| 414 | 424 | <span class="floatright"> |
| 415 | 425 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';approve=', $item['id'], '">', $approve_button, '</a>'; |
| 416 | 426 | |
| 417 | - if ($item['can_delete']) |
|
| 418 | - echo ' |
|
| 427 | + if ($item['can_delete']) { |
|
| 428 | + echo ' |
|
| 419 | 429 | ', $context['menu_separator'], ' |
| 420 | 430 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';delete=', $item['id'], '">', $remove_button, '</a>'; |
| 431 | + } |
|
| 421 | 432 | |
| 422 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 423 | - echo ' |
|
| 433 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 434 | + echo ' |
|
| 424 | 435 | <input type="checkbox" name="item[]" value="', $item['id'], '" checked class="input_check"> '; |
| 436 | + } |
|
| 425 | 437 | |
| 426 | 438 | echo ' |
| 427 | 439 | </span> |
@@ -431,8 +443,8 @@ discard block |
||
| 431 | 443 | echo ' |
| 432 | 444 | <div class="pagesection">'; |
| 433 | 445 | |
| 434 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 435 | - echo ' |
|
| 446 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 447 | + echo ' |
|
| 436 | 448 | <div class="floatright"> |
| 437 | 449 | <select name="do" onchange="if (this.value != 0 && confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();"> |
| 438 | 450 | <option value="0">', $txt['with_selected'], ':</option> |
@@ -442,12 +454,14 @@ discard block |
||
| 442 | 454 | </select> |
| 443 | 455 | <noscript><input type="submit" name="mc_go" value="', $txt['go'], '" class="button_submit"></noscript> |
| 444 | 456 | </div>'; |
| 457 | + } |
|
| 445 | 458 | |
| 446 | - if (!empty($context['unapproved_items'])) |
|
| 447 | - echo ' |
|
| 459 | + if (!empty($context['unapproved_items'])) { |
|
| 460 | + echo ' |
|
| 448 | 461 | <div class="floatleft"> |
| 449 | 462 | <div class="pagelinks">', $context['page_index'], '</div> |
| 450 | 463 | </div>'; |
| 464 | + } |
|
| 451 | 465 | |
| 452 | 466 | echo ' |
| 453 | 467 | </div> |
@@ -467,8 +481,9 @@ discard block |
||
| 467 | 481 | global $scripturl, $context, $txt, $delete_button; |
| 468 | 482 | |
| 469 | 483 | // We'll have a delete please bob. |
| 470 | - if (empty($delete_button)) |
|
| 471 | - $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
| 484 | + if (empty($delete_button)) { |
|
| 485 | + $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
| 486 | + } |
|
| 472 | 487 | |
| 473 | 488 | $output_html = ' |
| 474 | 489 | <div> |
@@ -477,10 +492,11 @@ discard block |
||
| 477 | 492 | </div> |
| 478 | 493 | <div class="floatright">'; |
| 479 | 494 | |
| 480 | - if ($post['can_delete']) |
|
| 481 | - $output_html .= ' |
|
| 495 | + if ($post['can_delete']) { |
|
| 496 | + $output_html .= ' |
|
| 482 | 497 | <a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="'. $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a> |
| 483 | 498 | <input type="checkbox" name="delete[]" value="' . $post['id'] . '" class="input_check">'; |
| 499 | + } |
|
| 484 | 500 | |
| 485 | 501 | $output_html .= ' |
| 486 | 502 | </div> |
@@ -522,12 +538,12 @@ discard block |
||
| 522 | 538 | <input type="submit" name="save" value="', $txt['save'], '" class="button_submit"> |
| 523 | 539 | </div> |
| 524 | 540 | </form>'; |
| 525 | - } |
|
| 526 | - else |
|
| 527 | - echo ' |
|
| 541 | + } else { |
|
| 542 | + echo ' |
|
| 528 | 543 | <div class="windowbg"> |
| 529 | 544 | <div class="centertext">', $txt['mc_no_settings'], '</div> |
| 530 | 545 | </div>'; |
| 546 | + } |
|
| 531 | 547 | |
| 532 | 548 | echo ' |
| 533 | 549 | </div>'; |
@@ -623,8 +639,8 @@ discard block |
||
| 623 | 639 | </dd> |
| 624 | 640 | </dl>'; |
| 625 | 641 | |
| 626 | - if ($context['template_data']['can_edit_personal']) |
|
| 627 | - echo ' |
|
| 642 | + if ($context['template_data']['can_edit_personal']) { |
|
| 643 | + echo ' |
|
| 628 | 644 | <input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', ' class="input_check"> |
| 629 | 645 | <label for="make_personal"> |
| 630 | 646 | <strong>', $txt['mc_warning_template_personal'], '</strong> |
@@ -632,6 +648,7 @@ discard block |
||
| 632 | 648 | <br> |
| 633 | 649 | <span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span> |
| 634 | 650 | <br>'; |
| 651 | + } |
|
| 635 | 652 | |
| 636 | 653 | echo ' |
| 637 | 654 | <hr> |
@@ -44,10 +44,11 @@ discard block |
||
| 44 | 44 | <dt>', $txt['users_online_today'], ':</dt> |
| 45 | 45 | <dd>', $context['online_today'], '</dd>'; |
| 46 | 46 | |
| 47 | - if (!empty($modSettings['hitStats'])) |
|
| 48 | - echo ' |
|
| 47 | + if (!empty($modSettings['hitStats'])) { |
|
| 48 | + echo ' |
|
| 49 | 49 | <dt>', $txt['num_hits'], ':</dt> |
| 50 | 50 | <dd>', $context['num_hits'], '</dd>'; |
| 51 | + } |
|
| 51 | 52 | |
| 52 | 53 | echo ' |
| 53 | 54 | </dl> |
@@ -71,17 +72,19 @@ discard block |
||
| 71 | 72 | <dt>', $txt['gender_stats'], ':</dt> |
| 72 | 73 | <dd>'; |
| 73 | 74 | |
| 74 | - foreach ($context['gender'] as $g => $n) |
|
| 75 | - echo $g, ': ', $n, '<br>'; |
|
| 75 | + foreach ($context['gender'] as $g => $n) { |
|
| 76 | + echo $g, ': ', $n, '<br>'; |
|
| 77 | + } |
|
| 76 | 78 | |
| 77 | 79 | echo ' |
| 78 | 80 | </dd>'; |
| 79 | 81 | } |
| 80 | 82 | |
| 81 | - if (!empty($modSettings['hitStats'])) |
|
| 82 | - echo ' |
|
| 83 | + if (!empty($modSettings['hitStats'])) { |
|
| 84 | + echo ' |
|
| 83 | 85 | <dt>', $txt['average_hits'], ':</dt> |
| 84 | 86 | <dd>', $context['average_hits'], '</dd>'; |
| 87 | + } |
|
| 85 | 88 | |
| 86 | 89 | echo ' |
| 87 | 90 | </dl>'; |
@@ -105,14 +108,15 @@ discard block |
||
| 105 | 108 | </dt> |
| 106 | 109 | <dd class="statsbar">'; |
| 107 | 110 | |
| 108 | - if (!empty($item['percent'])) |
|
| 109 | - echo ' |
|
| 111 | + if (!empty($item['percent'])) { |
|
| 112 | + echo ' |
|
| 110 | 113 | <div class="bar" style="width: ', $item['percent'], '%;"> |
| 111 | 114 | <span class="righttext">', $item['num'], '</span> |
| 112 | 115 | </div>'; |
| 113 | - else |
|
| 114 | - echo ' |
|
| 116 | + } else { |
|
| 117 | + echo ' |
|
| 115 | 118 | <div class="bar empty"><span class="righttext">', $item['num'], '</span></div>'; |
| 119 | + } |
|
| 116 | 120 | |
| 117 | 121 | echo ' |
| 118 | 122 | </dd>'; |
@@ -144,9 +148,10 @@ discard block |
||
| 144 | 148 | <th>', $txt['stats_new_members'], '</th> |
| 145 | 149 | <th>', $txt['most_online'], '</th>'; |
| 146 | 150 | |
| 147 | - if (!empty($modSettings['hitStats'])) |
|
| 148 | - echo ' |
|
| 151 | + if (!empty($modSettings['hitStats'])) { |
|
| 152 | + echo ' |
|
| 149 | 153 | <th>', $txt['page_views'], '</th>'; |
| 154 | + } |
|
| 150 | 155 | |
| 151 | 156 | echo ' |
| 152 | 157 | </tr> |
@@ -165,9 +170,10 @@ discard block |
||
| 165 | 170 | <th>', $year['new_members'], '</th> |
| 166 | 171 | <th>', $year['most_members_online'], '</th>'; |
| 167 | 172 | |
| 168 | - if (!empty($modSettings['hitStats'])) |
|
| 169 | - echo ' |
|
| 173 | + if (!empty($modSettings['hitStats'])) { |
|
| 174 | + echo ' |
|
| 170 | 175 | <th>', $year['hits'], '</th>'; |
| 176 | + } |
|
| 171 | 177 | |
| 172 | 178 | echo ' |
| 173 | 179 | </tr>'; |
@@ -184,9 +190,10 @@ discard block |
||
| 184 | 190 | <th>', $month['new_members'], '</th> |
| 185 | 191 | <th>', $month['most_members_online'], '</th>'; |
| 186 | 192 | |
| 187 | - if (!empty($modSettings['hitStats'])) |
|
| 188 | - echo ' |
|
| 193 | + if (!empty($modSettings['hitStats'])) { |
|
| 194 | + echo ' |
|
| 189 | 195 | <th>', $month['hits'], '</th>'; |
| 196 | + } |
|
| 190 | 197 | |
| 191 | 198 | echo ' |
| 192 | 199 | </tr>'; |
@@ -203,9 +210,10 @@ discard block |
||
| 203 | 210 | <td>', $day['new_members'], '</td> |
| 204 | 211 | <td>', $day['most_members_online'], '</td>'; |
| 205 | 212 | |
| 206 | - if (!empty($modSettings['hitStats'])) |
|
| 207 | - echo ' |
|
| 213 | + if (!empty($modSettings['hitStats'])) { |
|
| 214 | + echo ' |
|
| 208 | 215 | <td>', $day['hits'], '</td>'; |
| 216 | + } |
|
| 209 | 217 | |
| 210 | 218 | echo ' |
| 211 | 219 | </tr>'; |
@@ -54,9 +54,10 @@ discard block |
||
| 54 | 54 | <dd> |
| 55 | 55 | <div id="known_themes_list">'; |
| 56 | 56 | |
| 57 | - foreach ($context['themes'] as $theme) |
|
| 58 | - echo ' |
|
| 57 | + foreach ($context['themes'] as $theme) { |
|
| 58 | + echo ' |
|
| 59 | 59 | <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' : '', ' class="input_check"> ', $theme['name'], '</label><br>'; |
| 60 | + } |
|
| 60 | 61 | |
| 61 | 62 | echo ' |
| 62 | 63 | </div> |
@@ -73,9 +74,10 @@ discard block |
||
| 73 | 74 | <select name="options[theme_guests]" id="theme_guests">'; |
| 74 | 75 | |
| 75 | 76 | // Put an option for each theme in the select box. |
| 76 | - foreach ($context['themes'] as $theme) |
|
| 77 | - echo ' |
|
| 77 | + foreach ($context['themes'] as $theme) { |
|
| 78 | + echo ' |
|
| 78 | 79 | <option value="', $theme['id'], '"', $modSettings['theme_guests'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
| 80 | + } |
|
| 79 | 81 | |
| 80 | 82 | echo ' |
| 81 | 83 | </select> |
@@ -90,9 +92,10 @@ discard block |
||
| 90 | 92 | <option value="0">', $txt['theme_forum_default'], '</option>'; |
| 91 | 93 | |
| 92 | 94 | // Same thing, this time for changing the theme of everyone. |
| 93 | - foreach ($context['themes'] as $theme) |
|
| 94 | - echo ' |
|
| 95 | + foreach ($context['themes'] as $theme) { |
|
| 96 | + echo ' |
|
| 95 | 97 | <option value="', $theme['id'], '">', $theme['name'], '</option>'; |
| 98 | + } |
|
| 96 | 99 | |
| 97 | 100 | echo ' |
| 98 | 101 | </select> |
@@ -197,11 +200,12 @@ discard block |
||
| 197 | 200 | global $context, $scripturl, $txt; |
| 198 | 201 | |
| 199 | 202 | // Show a nice confirmation message. |
| 200 | - if (isset($_GET['done'])) |
|
| 201 | - echo ' |
|
| 203 | + if (isset($_GET['done'])) { |
|
| 204 | + echo ' |
|
| 202 | 205 | <div class="infobox"> |
| 203 | 206 | ', $txt['theme_confirmed_'. $_GET['done']] ,' |
| 204 | 207 | </div>'; |
| 208 | + } |
|
| 205 | 209 | |
| 206 | 210 | echo ' |
| 207 | 211 | <div id="admincenter">'; |
@@ -361,22 +365,24 @@ discard block |
||
| 361 | 365 | <dt ', $context['theme_options_reset'] ? 'style="width:50%"' : '', '>'; |
| 362 | 366 | |
| 363 | 367 | // Show the change option box ? |
| 364 | - if ($context['theme_options_reset']) |
|
| 365 | - echo ' |
|
| 368 | + if ($context['theme_options_reset']) { |
|
| 369 | + echo ' |
|
| 366 | 370 | <span class="floatleft"><select name="', !empty($setting['default']) ? 'default_' : '', 'options_master[', $setting['id'], ']" onchange="this.form.options_', $setting['id'], '.disabled = this.selectedIndex != 1;"> |
| 367 | 371 | <option value="0" selected>', $txt['themeadmin_reset_options_none'], '</option> |
| 368 | 372 | <option value="1">', $txt['themeadmin_reset_options_change'], '</option> |
| 369 | 373 | <option value="2">', $txt['themeadmin_reset_options_default'], '</option> |
| 370 | 374 | </select> </span>'; |
| 375 | + } |
|
| 371 | 376 | |
| 372 | 377 | // display checkbox options |
| 373 | 378 | if ($setting['type'] == 'checkbox') |
| 374 | 379 | { |
| 375 | 380 | echo ' |
| 376 | 381 | <label for="options_', $setting['id'], '">', $setting['label'], '</label>'; |
| 377 | - if (isset($setting['description'])) |
|
| 378 | - echo ' |
|
| 382 | + if (isset($setting['description'])) { |
|
| 383 | + echo ' |
|
| 379 | 384 | <br><span class="smalltext">', $setting['description'], '</span>'; |
| 385 | + } |
|
| 380 | 386 | echo ' |
| 381 | 387 | </dt> |
| 382 | 388 | <dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '> |
@@ -388,9 +394,10 @@ discard block |
||
| 388 | 394 | { |
| 389 | 395 | echo ' |
| 390 | 396 | <label for="options_', $setting['id'], '">', $setting['label'], '</label>'; |
| 391 | - if (isset($setting['description'])) |
|
| 392 | - echo ' |
|
| 397 | + if (isset($setting['description'])) { |
|
| 398 | + echo ' |
|
| 393 | 399 | <br><span class="smalltext">', $setting['description'], '</span>'; |
| 400 | + } |
|
| 394 | 401 | echo ' |
| 395 | 402 | </dt> |
| 396 | 403 | <dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '> |
@@ -410,9 +417,10 @@ discard block |
||
| 410 | 417 | { |
| 411 | 418 | echo ' |
| 412 | 419 | <label for="options_', $setting['id'], '">', $setting['label'], '</label>'; |
| 413 | - if (isset($setting['description'])) |
|
| 414 | - echo ' |
|
| 420 | + if (isset($setting['description'])) { |
|
| 421 | + echo ' |
|
| 415 | 422 | <br><span class="smalltext">', $setting['description'], '</span>'; |
| 423 | + } |
|
| 416 | 424 | echo ' |
| 417 | 425 | </dt> |
| 418 | 426 | <dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>'; |
@@ -425,8 +433,7 @@ discard block |
||
| 425 | 433 | |
| 426 | 434 | echo ' |
| 427 | 435 | <input type="number"', $min . $max . $step; |
| 428 | - } |
|
| 429 | - else |
|
| 436 | + } else |
|
| 430 | 437 | { |
| 431 | 438 | echo ' |
| 432 | 439 | <input type="text"'; |
@@ -470,8 +477,8 @@ discard block |
||
| 470 | 477 | <br>'; |
| 471 | 478 | |
| 472 | 479 | // @todo Why can't I edit the default theme popup. |
| 473 | - if ($context['theme_settings']['theme_id'] != 1) |
|
| 474 | - echo ' |
|
| 480 | + if ($context['theme_settings']['theme_id'] != 1) { |
|
| 481 | + echo ' |
|
| 475 | 482 | <div class="cat_bar"> |
| 476 | 483 | <h3 class="catbg config_hd"> |
| 477 | 484 | ', $txt['theme_edit'], ' |
@@ -487,6 +494,7 @@ discard block |
||
| 487 | 494 | </li> |
| 488 | 495 | </ul> |
| 489 | 496 | </div>'; |
| 497 | + } |
|
| 490 | 498 | |
| 491 | 499 | echo ' |
| 492 | 500 | <div class="cat_bar"> |
@@ -540,9 +548,10 @@ discard block |
||
| 540 | 548 | <dd> |
| 541 | 549 | <select id="variant" name="options[default_variant]" onchange="changeVariant(this.value)">'; |
| 542 | 550 | |
| 543 | - foreach ($context['theme_variants'] as $key => $variant) |
|
| 544 | - echo ' |
|
| 551 | + foreach ($context['theme_variants'] as $key => $variant) { |
|
| 552 | + echo ' |
|
| 545 | 553 | <option value="', $key, '"', $context['default_variant'] == $key ? ' selected' : '', '>', $variant['label'], '</option>'; |
| 554 | + } |
|
| 546 | 555 | |
| 547 | 556 | echo ' |
| 548 | 557 | </select> |
@@ -585,9 +594,10 @@ discard block |
||
| 585 | 594 | <dt> |
| 586 | 595 | <label for="', $setting['id'], '">', $setting['label'], '</label>:'; |
| 587 | 596 | |
| 588 | - if (isset($setting['description'])) |
|
| 589 | - echo '<br> |
|
| 597 | + if (isset($setting['description'])) { |
|
| 598 | + echo '<br> |
|
| 590 | 599 | <span class="smalltext">', $setting['description'], '</span>'; |
| 600 | + } |
|
| 591 | 601 | |
| 592 | 602 | echo ' |
| 593 | 603 | </dt> |
@@ -603,18 +613,20 @@ discard block |
||
| 603 | 613 | <dt> |
| 604 | 614 | <label for="', $setting['id'], '">', $setting['label'], '</label>:'; |
| 605 | 615 | |
| 606 | - if (isset($setting['description'])) |
|
| 607 | - echo '<br> |
|
| 616 | + if (isset($setting['description'])) { |
|
| 617 | + echo '<br> |
|
| 608 | 618 | <span class="smalltext">', $setting['description'], '</span>'; |
| 619 | + } |
|
| 609 | 620 | |
| 610 | 621 | echo ' |
| 611 | 622 | </dt> |
| 612 | 623 | <dd> |
| 613 | 624 | <select name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '">'; |
| 614 | 625 | |
| 615 | - foreach ($setting['options'] as $value => $label) |
|
| 616 | - echo ' |
|
| 626 | + foreach ($setting['options'] as $value => $label) { |
|
| 627 | + echo ' |
|
| 617 | 628 | <option value="', $value, '"', $value == $setting['value'] ? ' selected' : '', '>', $label, '</option>'; |
| 629 | + } |
|
| 618 | 630 | |
| 619 | 631 | echo ' |
| 620 | 632 | </select> |
@@ -627,9 +639,10 @@ discard block |
||
| 627 | 639 | <dt> |
| 628 | 640 | <label for="', $setting['id'], '">', $setting['label'], '</label>:'; |
| 629 | 641 | |
| 630 | - if (isset($setting['description'])) |
|
| 631 | - echo '<br> |
|
| 642 | + if (isset($setting['description'])) { |
|
| 643 | + echo '<br> |
|
| 632 | 644 | <span class="smalltext">', $setting['description'], '</span>'; |
| 645 | + } |
|
| 633 | 646 | echo ' |
| 634 | 647 | </dt> |
| 635 | 648 | <dd> |
@@ -644,9 +657,10 @@ discard block |
||
| 644 | 657 | <dt> |
| 645 | 658 | <label for="', $setting['id'], '">', $setting['label'], '</label>:'; |
| 646 | 659 | |
| 647 | - if (isset($setting['description'])) |
|
| 648 | - echo '<br> |
|
| 660 | + if (isset($setting['description'])) { |
|
| 661 | + echo '<br> |
|
| 649 | 662 | <span class="smalltext">', $setting['description'], '</span>'; |
| 663 | + } |
|
| 650 | 664 | |
| 651 | 665 | echo ' |
| 652 | 666 | </dt> |
@@ -660,8 +674,7 @@ discard block |
||
| 660 | 674 | |
| 661 | 675 | echo ' |
| 662 | 676 | <input type="number"', $min . $max . $step; |
| 663 | - } |
|
| 664 | - else |
|
| 677 | + } else |
|
| 665 | 678 | { |
| 666 | 679 | echo ' |
| 667 | 680 | <input type="text"'; |
@@ -814,21 +827,23 @@ discard block |
||
| 814 | 827 | <div class="windowbg">'; |
| 815 | 828 | |
| 816 | 829 | // Oops! there was an error :( |
| 817 | - if (!empty($context['error_message'])) |
|
| 818 | - echo ' |
|
| 830 | + if (!empty($context['error_message'])) { |
|
| 831 | + echo ' |
|
| 819 | 832 | <p> |
| 820 | 833 | ', $context['error_message'] ,' |
| 821 | 834 | </p>'; |
| 835 | + } |
|
| 822 | 836 | |
| 823 | 837 | // Not much to show except a link back... |
| 824 | - else |
|
| 825 | - echo ' |
|
| 838 | + else { |
|
| 839 | + echo ' |
|
| 826 | 840 | <p> |
| 827 | 841 | <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'], ' |
| 828 | 842 | </p> |
| 829 | 843 | <p> |
| 830 | 844 | <a href="', $scripturl, '?action=admin;area=theme;sa=admin;', $context['session_var'], '=', $context['session_id'], '">', $txt['back'], '</a> |
| 831 | 845 | </p>'; |
| 846 | + } |
|
| 832 | 847 | |
| 833 | 848 | echo ' |
| 834 | 849 | </div> |
@@ -896,10 +911,11 @@ discard block |
||
| 896 | 911 | <span class="floatleft">', $template['filename'], $template['already_exists'] ? ' <span class="error">(' . $txt['themeadmin_edit_exists'] . ')</span>' : '', '</span> |
| 897 | 912 | <span class="floatright">'; |
| 898 | 913 | |
| 899 | - if ($template['can_copy']) |
|
| 900 | - echo '<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>'; |
|
| 901 | - else |
|
| 902 | - echo $txt['themeadmin_edit_no_copy']; |
|
| 914 | + if ($template['can_copy']) { |
|
| 915 | + echo '<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>'; |
|
| 916 | + } else { |
|
| 917 | + echo $txt['themeadmin_edit_no_copy']; |
|
| 918 | + } |
|
| 903 | 919 | |
| 904 | 920 | echo ' |
| 905 | 921 | </span> |
@@ -922,11 +938,12 @@ discard block |
||
| 922 | 938 | echo ' |
| 923 | 939 | <div id="admincenter">'; |
| 924 | 940 | |
| 925 | - if (!empty($context['browse_title'])) |
|
| 926 | - echo ' |
|
| 941 | + if (!empty($context['browse_title'])) { |
|
| 942 | + echo ' |
|
| 927 | 943 | <div class="cat_bar"> |
| 928 | 944 | <h3 class="catbg">', $context['browse_title'], '</h3> |
| 929 | 945 | </div>'; |
| 946 | + } |
|
| 930 | 947 | |
| 931 | 948 | echo ' |
| 932 | 949 | <table class="table_grid tborder"> |
@@ -946,14 +963,13 @@ discard block |
||
| 946 | 963 | <tr class="windowbg"> |
| 947 | 964 | <td>'; |
| 948 | 965 | |
| 949 | - if ($file['is_editable']) |
|
| 950 | - echo '<a href="', $file['href'], '"', $file['is_template'] ? ' style="font-weight: bold;"' : '', '>', $file['filename'], '</a>'; |
|
| 951 | - |
|
| 952 | - elseif ($file['is_directory']) |
|
| 953 | - echo '<a href="', $file['href'], '" class="is_directory"><span class="generic_icons folder"></span>', $file['filename'], '</a>'; |
|
| 954 | - |
|
| 955 | - else |
|
| 956 | - echo $file['filename']; |
|
| 966 | + if ($file['is_editable']) { |
|
| 967 | + echo '<a href="', $file['href'], '"', $file['is_template'] ? ' style="font-weight: bold;"' : '', '>', $file['filename'], '</a>'; |
|
| 968 | + } elseif ($file['is_directory']) { |
|
| 969 | + echo '<a href="', $file['href'], '" class="is_directory"><span class="generic_icons folder"></span>', $file['filename'], '</a>'; |
|
| 970 | + } else { |
|
| 971 | + echo $file['filename']; |
|
| 972 | + } |
|
| 957 | 973 | |
| 958 | 974 | echo ' |
| 959 | 975 | </td> |
@@ -975,11 +991,12 @@ discard block |
||
| 975 | 991 | { |
| 976 | 992 | global $context, $settings, $scripturl, $txt; |
| 977 | 993 | |
| 978 | - if ($context['session_error']) |
|
| 979 | - echo ' |
|
| 994 | + if ($context['session_error']) { |
|
| 995 | + echo ' |
|
| 980 | 996 | <div class="errorbox"> |
| 981 | 997 | ', $txt['error_session_timeout'], ' |
| 982 | 998 | </div>'; |
| 999 | + } |
|
| 983 | 1000 | |
| 984 | 1001 | // From now on no one can complain that editing css is difficult. If you disagree, go to www.w3schools.com. |
| 985 | 1002 | echo ' |
@@ -1042,17 +1059,18 @@ discard block |
||
| 1042 | 1059 | try |
| 1043 | 1060 | { |
| 1044 | 1061 | '; |
| 1045 | - if (isBrowser('is_ie')) |
|
| 1046 | - echo ' |
|
| 1062 | + if (isBrowser('is_ie')) { |
|
| 1063 | + echo ' |
|
| 1047 | 1064 | var sheets = frames["css_preview_box"].document.styleSheets; |
| 1048 | 1065 | for (var j = 0; j < sheets.length; j++) |
| 1049 | 1066 | { |
| 1050 | 1067 | if (sheets[j].id == "css_preview_box") |
| 1051 | 1068 | sheets[j].cssText = document.forms.stylesheetForm.entire_file.value; |
| 1052 | 1069 | }'; |
| 1053 | - else |
|
| 1054 | - echo ' |
|
| 1070 | + } else { |
|
| 1071 | + echo ' |
|
| 1055 | 1072 | setInnerHTML(frames["css_preview_box"].document.getElementById("css_preview_sheet"), document.forms.stylesheetForm.entire_file.value);'; |
| 1073 | + } |
|
| 1056 | 1074 | echo ' |
| 1057 | 1075 | } |
| 1058 | 1076 | catch (e) |
@@ -1104,9 +1122,10 @@ discard block |
||
| 1104 | 1122 | </div> |
| 1105 | 1123 | <div class="windowbg">'; |
| 1106 | 1124 | |
| 1107 | - if (!$context['allow_save']) |
|
| 1108 | - echo ' |
|
| 1125 | + if (!$context['allow_save']) { |
|
| 1126 | + echo ' |
|
| 1109 | 1127 | ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br>'; |
| 1128 | + } |
|
| 1110 | 1129 | |
| 1111 | 1130 | echo ' |
| 1112 | 1131 | <textarea name="entire_file" cols="80" rows="20" style="width: 96%; font-family: monospace; margin-top: 1ex; white-space: pre;" onkeyup="setPreviewTimeout();" onchange="refreshPreview(true);">', $context['entire_file'], '</textarea><br> |
@@ -1119,9 +1138,10 @@ discard block |
||
| 1119 | 1138 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
| 1120 | 1139 | |
| 1121 | 1140 | // Hopefully it exists. |
| 1122 | - if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) |
|
| 1123 | - echo ' |
|
| 1141 | + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) { |
|
| 1142 | + echo ' |
|
| 1124 | 1143 | <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'], '">'; |
| 1144 | + } |
|
| 1125 | 1145 | |
| 1126 | 1146 | echo ' |
| 1127 | 1147 | </form> |
@@ -1135,18 +1155,20 @@ discard block |
||
| 1135 | 1155 | { |
| 1136 | 1156 | global $context, $scripturl, $txt; |
| 1137 | 1157 | |
| 1138 | - if ($context['session_error']) |
|
| 1139 | - echo ' |
|
| 1158 | + if ($context['session_error']) { |
|
| 1159 | + echo ' |
|
| 1140 | 1160 | <div class="errorbox"> |
| 1141 | 1161 | ', $txt['error_session_timeout'], ' |
| 1142 | 1162 | </div>'; |
| 1163 | + } |
|
| 1143 | 1164 | |
| 1144 | - if (isset($context['parse_error'])) |
|
| 1145 | - echo ' |
|
| 1165 | + if (isset($context['parse_error'])) { |
|
| 1166 | + echo ' |
|
| 1146 | 1167 | <div class="errorbox"> |
| 1147 | 1168 | ', $txt['themeadmin_edit_error'], ' |
| 1148 | 1169 | <div><pre>', $context['parse_error'], '</pre></div> |
| 1149 | 1170 | </div>'; |
| 1171 | + } |
|
| 1150 | 1172 | |
| 1151 | 1173 | // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) |
| 1152 | 1174 | echo ' |
@@ -1157,16 +1179,18 @@ discard block |
||
| 1157 | 1179 | </div> |
| 1158 | 1180 | <div class="windowbg">'; |
| 1159 | 1181 | |
| 1160 | - if (!$context['allow_save']) |
|
| 1161 | - echo ' |
|
| 1182 | + if (!$context['allow_save']) { |
|
| 1183 | + echo ' |
|
| 1162 | 1184 | ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br>'; |
| 1185 | + } |
|
| 1163 | 1186 | |
| 1164 | - foreach ($context['file_parts'] as $part) |
|
| 1165 | - echo ' |
|
| 1187 | + foreach ($context['file_parts'] as $part) { |
|
| 1188 | + echo ' |
|
| 1166 | 1189 | <label for="on_line', $part['line'], '">', $txt['themeadmin_edit_on_line'], ' ', $part['line'], '</label>:<br> |
| 1167 | 1190 | <div class="centertext"> |
| 1168 | 1191 | <textarea id="on_line', $part['line'] ,'" name="entire_file[]" cols="80" rows="', $part['lines'] > 14 ? '14' : $part['lines'], '" class="edit_file">', $part['data'], '</textarea> |
| 1169 | 1192 | </div>'; |
| 1193 | + } |
|
| 1170 | 1194 | |
| 1171 | 1195 | echo ' |
| 1172 | 1196 | <div class="padding righttext"> |
@@ -1175,9 +1199,10 @@ discard block |
||
| 1175 | 1199 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
| 1176 | 1200 | |
| 1177 | 1201 | // Hopefully it exists. |
| 1178 | - if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) |
|
| 1179 | - echo ' |
|
| 1202 | + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) { |
|
| 1203 | + echo ' |
|
| 1180 | 1204 | <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'], '">'; |
| 1205 | + } |
|
| 1181 | 1206 | |
| 1182 | 1207 | echo ' |
| 1183 | 1208 | </div> |
@@ -1193,18 +1218,20 @@ discard block |
||
| 1193 | 1218 | { |
| 1194 | 1219 | global $context, $scripturl, $txt; |
| 1195 | 1220 | |
| 1196 | - if ($context['session_error']) |
|
| 1197 | - echo ' |
|
| 1221 | + if ($context['session_error']) { |
|
| 1222 | + echo ' |
|
| 1198 | 1223 | <div class="errorbox"> |
| 1199 | 1224 | ', $txt['error_session_timeout'], ' |
| 1200 | 1225 | </div>'; |
| 1226 | + } |
|
| 1201 | 1227 | |
| 1202 | 1228 | //Is this file writeable? |
| 1203 | - if (!$context['allow_save']) |
|
| 1204 | - echo ' |
|
| 1229 | + if (!$context['allow_save']) { |
|
| 1230 | + echo ' |
|
| 1205 | 1231 | <div class="errorbox"> |
| 1206 | 1232 | ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], ' |
| 1207 | 1233 | </div>'; |
| 1234 | + } |
|
| 1208 | 1235 | |
| 1209 | 1236 | // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) |
| 1210 | 1237 | echo ' |
@@ -1220,9 +1247,10 @@ discard block |
||
| 1220 | 1247 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
| 1221 | 1248 | |
| 1222 | 1249 | // Hopefully it exists. |
| 1223 | - if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) |
|
| 1224 | - echo ' |
|
| 1250 | + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) { |
|
| 1251 | + echo ' |
|
| 1225 | 1252 | <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'], '">'; |
| 1253 | + } |
|
| 1226 | 1254 | |
| 1227 | 1255 | echo ' |
| 1228 | 1256 | </div> |
@@ -37,9 +37,10 @@ discard block |
||
| 37 | 37 | echo ' |
| 38 | 38 | <optgroup label="', $category['name'], '">'; |
| 39 | 39 | |
| 40 | - foreach ($category['boards'] as $board) |
|
| 41 | - echo ' |
|
| 40 | + foreach ($category['boards'] as $board) { |
|
| 41 | + echo ' |
|
| 42 | 42 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=> ' : '', $board['name'], '</option>'; |
| 43 | + } |
|
| 43 | 44 | echo ' |
| 44 | 45 | </optgroup>'; |
| 45 | 46 | } |
@@ -68,9 +69,10 @@ discard block |
||
| 68 | 69 | </div> |
| 69 | 70 | </div>'; |
| 70 | 71 | |
| 71 | - if ($context['back_to_topic']) |
|
| 72 | - echo ' |
|
| 72 | + if ($context['back_to_topic']) { |
|
| 73 | + echo ' |
|
| 73 | 74 | <input type="hidden" name="goback" value="1">'; |
| 75 | + } |
|
| 74 | 76 | |
| 75 | 77 | echo ' |
| 76 | 78 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -120,8 +122,7 @@ discard block |
||
| 120 | 122 | <option value="86400">', $txt['two_months'], '</option> |
| 121 | 123 | </select> |
| 122 | 124 | </dd>'; |
| 123 | - } |
|
| 124 | - else |
|
| 125 | + } else |
|
| 125 | 126 | { |
| 126 | 127 | echo ' |
| 127 | 128 | <input type="hidden" name="redirect_expires" value="0">'; |
@@ -217,9 +218,9 @@ discard block |
||
| 217 | 218 | <input type="submit" value="', $txt['go'], '" class="button_submit"> |
| 218 | 219 | </form>'; |
| 219 | 220 | |
| 221 | + } else { |
|
| 222 | + echo $txt['target_below']; |
|
| 220 | 223 | } |
| 221 | - else |
|
| 222 | - echo $txt['target_below']; |
|
| 223 | 224 | |
| 224 | 225 | echo ' </h4> |
| 225 | 226 | </div>'; |
@@ -237,12 +238,13 @@ discard block |
||
| 237 | 238 | |
| 238 | 239 | $merge_button = create_button('merge', 'merge', ''); |
| 239 | 240 | |
| 240 | - foreach ($context['topics'] as $topic) |
|
| 241 | - echo ' |
|
| 241 | + foreach ($context['topics'] as $topic) { |
|
| 242 | + echo ' |
|
| 242 | 243 | <li> |
| 243 | 244 | <a href="', $scripturl, '?action=mergetopics;sa=options;board=', $context['current_board'], '.0;from=', $context['origin_topic'], ';to=', $topic['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $merge_button, '</a> |
| 244 | 245 | <a href="', $scripturl, '?topic=', $topic['id'], '.0" target="_blank" class="new_win">', $topic['subject'], '</a> ', $txt['started_by'], ' ', $topic['poster']['link'], ' |
| 245 | 246 | </li>'; |
| 247 | + } |
|
| 246 | 248 | |
| 247 | 249 | echo ' |
| 248 | 250 | </ul> |
@@ -251,8 +253,7 @@ discard block |
||
| 251 | 253 | <div class="pagesection"> |
| 252 | 254 | ', $context['page_index'], ' |
| 253 | 255 | </div>'; |
| 254 | - } |
|
| 255 | - else |
|
| 256 | + } else |
|
| 256 | 257 | { |
| 257 | 258 | // Just a nice "There aren't any topics" message |
| 258 | 259 | echo ' |
@@ -306,8 +307,8 @@ discard block |
||
| 306 | 307 | </tr> |
| 307 | 308 | </thead> |
| 308 | 309 | <tbody>'; |
| 309 | - foreach ($context['topics'] as $topic) |
|
| 310 | - echo ' |
|
| 310 | + foreach ($context['topics'] as $topic) { |
|
| 311 | + echo ' |
|
| 311 | 312 | <tr class="windowbg"> |
| 312 | 313 | <td> |
| 313 | 314 | <input type="checkbox" class="input_check" name="topics[]" value="' . $topic['id'] . '" checked> |
@@ -327,6 +328,7 @@ discard block |
||
| 327 | 328 | <input type="checkbox" class="input_check" name="notifications[]" value="' . $topic['id'] . '" checked> |
| 328 | 329 | </td> |
| 329 | 330 | </tr>'; |
| 331 | + } |
|
| 330 | 332 | echo ' |
| 331 | 333 | </tbody> |
| 332 | 334 | </table> |
@@ -337,9 +339,10 @@ discard block |
||
| 337 | 339 | <fieldset id="merge_subject" class="merge_options"> |
| 338 | 340 | <legend>', $txt['merge_select_subject'], '</legend> |
| 339 | 341 | <select name="subject" onchange="this.form.custom_subject.style.display = (this.options[this.selectedIndex].value != 0) ? \'none\': \'\' ;">'; |
| 340 | - foreach ($context['topics'] as $topic) |
|
| 341 | - echo ' |
|
| 342 | + foreach ($context['topics'] as $topic) { |
|
| 343 | + echo ' |
|
| 342 | 344 | <option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected' : '') . '>', $topic['subject'], '</option>'; |
| 345 | + } |
|
| 343 | 346 | echo ' |
| 344 | 347 | <option value="0">', $txt['merge_custom_subject'], ':</option> |
| 345 | 348 | </select> |
@@ -357,11 +360,12 @@ discard block |
||
| 357 | 360 | <fieldset id="merge_board" class="merge_options"> |
| 358 | 361 | <legend>', $txt['merge_select_target_board'], '</legend> |
| 359 | 362 | <ul>'; |
| 360 | - foreach ($context['boards'] as $board) |
|
| 361 | - echo ' |
|
| 363 | + foreach ($context['boards'] as $board) { |
|
| 364 | + echo ' |
|
| 362 | 365 | <li> |
| 363 | 366 | <input type="radio" name="board" value="' . $board['id'] . '"' . ($board['selected'] ? ' checked' : '') . ' class="input_radio"> ' . $board['name'] . ' |
| 364 | 367 | </li>'; |
| 368 | + } |
|
| 365 | 369 | echo ' |
| 366 | 370 | </ul> |
| 367 | 371 | </fieldset>'; |
@@ -372,11 +376,12 @@ discard block |
||
| 372 | 376 | <fieldset id="merge_poll" class="merge_options"> |
| 373 | 377 | <legend>' . $txt['merge_select_poll'] . '</legend> |
| 374 | 378 | <ul>'; |
| 375 | - foreach ($context['polls'] as $poll) |
|
| 376 | - echo ' |
|
| 379 | + foreach ($context['polls'] as $poll) { |
|
| 380 | + echo ' |
|
| 377 | 381 | <li> |
| 378 | 382 | <input type="radio" name="poll" value="' . $poll['id'] . '"' . ($poll['selected'] ? ' checked' : '') . ' class="input_radio"> ' . $poll['question'] . ' (' . $txt['topic'] . ': <a href="' . $scripturl . '?topic=' . $poll['topic']['id'] . '.0" target="_blank" class="new_win">' . $poll['topic']['subject'] . '</a>) |
| 379 | 383 | </li>'; |
| 384 | + } |
|
| 380 | 385 | echo ' |
| 381 | 386 | <li> |
| 382 | 387 | <input type="radio" name="poll" value="-1" class="input_radio"> (' . $txt['merge_no_poll'] . ') |
@@ -18,11 +18,12 @@ discard block |
||
| 18 | 18 | global $context, $txt, $scripturl, $modSettings; |
| 19 | 19 | |
| 20 | 20 | // If maintenance has finished tell the user. |
| 21 | - if (!empty($context['maintenance_finished'])) |
|
| 22 | - echo ' |
|
| 21 | + if (!empty($context['maintenance_finished'])) { |
|
| 22 | + echo ' |
|
| 23 | 23 | <div class="infobox"> |
| 24 | 24 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 25 | 25 | </div>'; |
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | echo ' |
| 28 | 29 | <div id="manage_maintenance"> |
@@ -107,11 +108,12 @@ discard block |
||
| 107 | 108 | <div id="manage_maintenance">'; |
| 108 | 109 | |
| 109 | 110 | // If maintenance has finished tell the user. |
| 110 | - if (!empty($context['maintenance_finished'])) |
|
| 111 | - echo ' |
|
| 111 | + if (!empty($context['maintenance_finished'])) { |
|
| 112 | + echo ' |
|
| 112 | 113 | <div class="infobox"> |
| 113 | 114 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 114 | 115 | </div>'; |
| 116 | + } |
|
| 115 | 117 | |
| 116 | 118 | echo ' |
| 117 | 119 | <div class="cat_bar"> |
@@ -238,11 +240,12 @@ discard block |
||
| 238 | 240 | <div id="manage_maintenance">'; |
| 239 | 241 | |
| 240 | 242 | // If maintenance has finished tell the user. |
| 241 | - if (!empty($context['maintenance_finished'])) |
|
| 242 | - echo ' |
|
| 243 | + if (!empty($context['maintenance_finished'])) { |
|
| 244 | + echo ' |
|
| 243 | 245 | <div class="infobox"> |
| 244 | 246 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 245 | 247 | </div>'; |
| 248 | + } |
|
| 246 | 249 | |
| 247 | 250 | echo ' |
| 248 | 251 | <div class="cat_bar"> |
@@ -300,9 +303,10 @@ discard block |
||
| 300 | 303 | <p><a href="#membersLink" onclick="swapMembers();"><img src="', $settings['images_url'], '/selected.png" alt="+" id="membersIcon"></a> <a href="#membersLink" onclick="swapMembers();" id="membersText" style="font-weight: bold;">', $txt['maintain_members_all'], '</a></p> |
| 301 | 304 | <div style="display: none; padding: 3px" id="membersPanel">'; |
| 302 | 305 | |
| 303 | - foreach ($context['membergroups'] as $group) |
|
| 304 | - echo ' |
|
| 306 | + foreach ($context['membergroups'] as $group) { |
|
| 307 | + echo ' |
|
| 305 | 308 | <label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked class="input_check"> ', $group['name'], '</label><br>'; |
| 309 | + } |
|
| 306 | 310 | |
| 307 | 311 | echo ' |
| 308 | 312 | </div> |
@@ -346,11 +350,12 @@ discard block |
||
| 346 | 350 | global $scripturl, $txt, $context, $settings, $modSettings; |
| 347 | 351 | |
| 348 | 352 | // If maintenance has finished tell the user. |
| 349 | - if (!empty($context['maintenance_finished'])) |
|
| 350 | - echo ' |
|
| 353 | + if (!empty($context['maintenance_finished'])) { |
|
| 354 | + echo ' |
|
| 351 | 355 | <div class="infobox"> |
| 352 | 356 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 353 | 357 | </div>'; |
| 358 | + } |
|
| 354 | 359 | |
| 355 | 360 | // Bit of javascript for showing which boards to prune in an otherwise hidden list. |
| 356 | 361 | echo ' |
@@ -418,19 +423,21 @@ discard block |
||
| 418 | 423 | <ul>'; |
| 419 | 424 | |
| 420 | 425 | // Display a checkbox with every board. |
| 421 | - foreach ($category['boards'] as $board) |
|
| 422 | - echo ' |
|
| 426 | + foreach ($category['boards'] as $board) { |
|
| 427 | + echo ' |
|
| 423 | 428 | <li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"><label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked class="input_check">', $board['name'], '</label></li>'; |
| 429 | + } |
|
| 424 | 430 | |
| 425 | 431 | echo ' |
| 426 | 432 | </ul> |
| 427 | 433 | </fieldset>'; |
| 428 | 434 | |
| 429 | 435 | // Increase $i, and check if we're at the middle yet. |
| 430 | - if (++$i == $middle) |
|
| 431 | - echo ' |
|
| 436 | + if (++$i == $middle) { |
|
| 437 | + echo ' |
|
| 432 | 438 | </div> |
| 433 | 439 | <div class="floatright" style="width: 49%;">'; |
| 440 | + } |
|
| 434 | 441 | } |
| 435 | 442 | |
| 436 | 443 | echo ' |
@@ -469,9 +476,10 @@ discard block |
||
| 469 | 476 | echo ' |
| 470 | 477 | <optgroup label="', $category['name'], '">'; |
| 471 | 478 | |
| 472 | - foreach ($category['boards'] as $board) |
|
| 473 | - echo ' |
|
| 479 | + foreach ($category['boards'] as $board) { |
|
| 480 | + echo ' |
|
| 474 | 481 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
| 482 | + } |
|
| 475 | 483 | |
| 476 | 484 | echo ' |
| 477 | 485 | </optgroup>'; |
@@ -489,9 +497,10 @@ discard block |
||
| 489 | 497 | echo ' |
| 490 | 498 | <optgroup label="', $category['name'], '">'; |
| 491 | 499 | |
| 492 | - foreach ($category['boards'] as $board) |
|
| 493 | - echo ' |
|
| 500 | + foreach ($category['boards'] as $board) { |
|
| 501 | + echo ' |
|
| 494 | 502 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
| 503 | + } |
|
| 495 | 504 | |
| 496 | 505 | echo ' |
| 497 | 506 | </optgroup>'; |
@@ -531,9 +540,10 @@ discard block |
||
| 531 | 540 | ', $txt['database_optimize_attempt'], '<br>'; |
| 532 | 541 | |
| 533 | 542 | // List each table being optimized... |
| 534 | - foreach ($context['optimized_tables'] as $table) |
|
| 535 | - echo ' |
|
| 543 | + foreach ($context['optimized_tables'] as $table) { |
|
| 544 | + echo ' |
|
| 536 | 545 | ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>'; |
| 546 | + } |
|
| 537 | 547 | |
| 538 | 548 | // How did we go? |
| 539 | 549 | echo ' |
@@ -590,13 +600,14 @@ discard block |
||
| 590 | 600 | ', implode('</li><li>', $context['exceeding_messages']), ' |
| 591 | 601 | </li> |
| 592 | 602 | </ul>'; |
| 593 | - if (!empty($context['exceeding_messages_morethan'])) |
|
| 594 | - echo ' |
|
| 603 | + if (!empty($context['exceeding_messages_morethan'])) { |
|
| 604 | + echo ' |
|
| 595 | 605 | <p>', $context['exceeding_messages_morethan'], '</p>'; |
| 596 | - } |
|
| 597 | - else |
|
| 598 | - echo ' |
|
| 606 | + } |
|
| 607 | + } else { |
|
| 608 | + echo ' |
|
| 599 | 609 | <p class="infobox">', $txt['convert_to_text'], '</p>'; |
| 610 | + } |
|
| 600 | 611 | |
| 601 | 612 | echo ' |
| 602 | 613 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '"> |
@@ -24,11 +24,12 @@ discard block |
||
| 24 | 24 | <h3 class="catbg">', $txt['paid_' . $context['action_type'] . '_subscription'], '</h3> |
| 25 | 25 | </div>'; |
| 26 | 26 | |
| 27 | - if (!empty($context['disable_groups'])) |
|
| 28 | - echo ' |
|
| 27 | + if (!empty($context['disable_groups'])) { |
|
| 28 | + echo ' |
|
| 29 | 29 | <div class="information"> |
| 30 | 30 | <span class="alert">', $txt['paid_mod_edit_note'], '</span> |
| 31 | 31 | </div>'; |
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | echo ' |
| 34 | 35 | <div class="windowbg2"> |
@@ -68,9 +69,10 @@ discard block |
||
| 68 | 69 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
| 69 | 70 | |
| 70 | 71 | // Put each group into the box. |
| 71 | - foreach ($context['groups'] as $id => $name) |
|
| 72 | - echo ' |
|
| 72 | + foreach ($context['groups'] as $id => $name) { |
|
| 73 | + echo ' |
|
| 73 | 74 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
| 75 | + } |
|
| 74 | 76 | |
| 75 | 77 | echo ' |
| 76 | 78 | </select> |
@@ -81,9 +83,10 @@ discard block |
||
| 81 | 83 | <dd>'; |
| 82 | 84 | |
| 83 | 85 | // Put a checkbox in for each group |
| 84 | - foreach ($context['groups'] as $id => $name) |
|
| 85 | - echo ' |
|
| 86 | + foreach ($context['groups'] as $id => $name) { |
|
| 87 | + echo ' |
|
| 86 | 88 | <label for="addgroup_', $id, '"><input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', ' class="input_check"> <span class="smalltext">', $name, '</span></label><br>'; |
| 89 | + } |
|
| 87 | 90 | |
| 88 | 91 | echo ' |
| 89 | 92 | </dd> |
@@ -135,8 +138,8 @@ discard block |
||
| 135 | 138 | <fieldset>'; |
| 136 | 139 | |
| 137 | 140 | //!! Removed until implemented |
| 138 | - if (!empty($sdflsdhglsdjgs)) |
|
| 139 | - echo ' |
|
| 141 | + if (!empty($sdflsdhglsdjgs)) { |
|
| 142 | + echo ' |
|
| 140 | 143 | <dl class="settings"> |
| 141 | 144 | <dt> |
| 142 | 145 | <label for="allow_partial_check">', $txt['paid_mod_allow_partial'], '</label>:<br><span class="smalltext">', $txt['paid_mod_allow_partial_desc'], '</span> |
@@ -145,6 +148,7 @@ discard block |
||
| 145 | 148 | <input type="checkbox" name="allow_partial" id="allow_partial_check"', empty($context['sub']['allow_partial']) ? '' : ' checked', ' class="input_check"> |
| 146 | 149 | </dd> |
| 147 | 150 | </dl>'; |
| 151 | + } |
|
| 148 | 152 | |
| 149 | 153 | echo ' |
| 150 | 154 | <div class="information"> |
@@ -245,8 +249,8 @@ discard block |
||
| 245 | 249 | <dl class="settings">'; |
| 246 | 250 | |
| 247 | 251 | // Do we need a username? |
| 248 | - if ($context['action_type'] == 'add') |
|
| 249 | - echo ' |
|
| 252 | + if ($context['action_type'] == 'add') { |
|
| 253 | + echo ' |
|
| 250 | 254 | |
| 251 | 255 | <dt> |
| 252 | 256 | <strong>', $txt['paid_username'], ':</strong><br> |
@@ -255,6 +259,7 @@ discard block |
||
| 255 | 259 | <dd> |
| 256 | 260 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30" class="input_text"> |
| 257 | 261 | </dd>'; |
| 262 | + } |
|
| 258 | 263 | |
| 259 | 264 | echo ' |
| 260 | 265 | <dt> |
@@ -272,9 +277,10 @@ discard block |
||
| 272 | 277 | <select name="year" id="year" onchange="generateDays();">'; |
| 273 | 278 | |
| 274 | 279 | // Show a list of all the years we allow... |
| 275 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 276 | - echo ' |
|
| 280 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 281 | + echo ' |
|
| 277 | 282 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 283 | + } |
|
| 278 | 284 | |
| 279 | 285 | echo ' |
| 280 | 286 | </select> |
@@ -282,9 +288,10 @@ discard block |
||
| 282 | 288 | <select name="month" id="month" onchange="generateDays();">'; |
| 283 | 289 | |
| 284 | 290 | // There are 12 months per year - ensure that they all get listed. |
| 285 | - for ($month = 1; $month <= 12; $month++) |
|
| 286 | - echo ' |
|
| 291 | + for ($month = 1; $month <= 12; $month++) { |
|
| 292 | + echo ' |
|
| 287 | 293 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 294 | + } |
|
| 288 | 295 | |
| 289 | 296 | echo ' |
| 290 | 297 | </select> |
@@ -292,9 +299,10 @@ discard block |
||
| 292 | 299 | <select name="day" id="day">'; |
| 293 | 300 | |
| 294 | 301 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 295 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
| 296 | - echo ' |
|
| 302 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
| 303 | + echo ' |
|
| 297 | 304 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 305 | + } |
|
| 298 | 306 | |
| 299 | 307 | echo ' |
| 300 | 308 | </select> |
@@ -306,9 +314,10 @@ discard block |
||
| 306 | 314 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
| 307 | 315 | |
| 308 | 316 | // Show a list of all the years we allow... |
| 309 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 310 | - echo ' |
|
| 317 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 318 | + echo ' |
|
| 311 | 319 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 320 | + } |
|
| 312 | 321 | |
| 313 | 322 | echo ' |
| 314 | 323 | </select> |
@@ -316,9 +325,10 @@ discard block |
||
| 316 | 325 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
| 317 | 326 | |
| 318 | 327 | // There are 12 months per year - ensure that they all get listed. |
| 319 | - for ($month = 1; $month <= 12; $month++) |
|
| 320 | - echo ' |
|
| 328 | + for ($month = 1; $month <= 12; $month++) { |
|
| 329 | + echo ' |
|
| 321 | 330 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 331 | + } |
|
| 322 | 332 | |
| 323 | 333 | echo ' |
| 324 | 334 | </select> |
@@ -326,9 +336,10 @@ discard block |
||
| 326 | 336 | <select name="dayend" id="dayend">'; |
| 327 | 337 | |
| 328 | 338 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 329 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
| 330 | - echo ' |
|
| 339 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
| 340 | + echo ' |
|
| 331 | 341 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 342 | + } |
|
| 332 | 343 | |
| 333 | 344 | echo ' |
| 334 | 345 | </select> |
@@ -410,8 +421,7 @@ discard block |
||
| 410 | 421 | <div class="information"> |
| 411 | 422 | ', $txt['paid_subs_none'], ' |
| 412 | 423 | </div>'; |
| 413 | - } |
|
| 414 | - else |
|
| 424 | + } else |
|
| 415 | 425 | { |
| 416 | 426 | echo ' |
| 417 | 427 | <div class="information"> |
@@ -423,8 +433,9 @@ discard block |
||
| 423 | 433 | { |
| 424 | 434 | |
| 425 | 435 | // Ignore the inactive ones... |
| 426 | - if (empty($subscription['active'])) |
|
| 427 | - continue; |
|
| 436 | + if (empty($subscription['active'])) { |
|
| 437 | + continue; |
|
| 438 | + } |
|
| 428 | 439 | |
| 429 | 440 | echo ' |
| 430 | 441 | <div class="cat_bar"> |
@@ -434,9 +445,10 @@ discard block |
||
| 434 | 445 | <p><strong>', $subscription['name'], '</strong></p> |
| 435 | 446 | <p class="smalltext">', $subscription['desc'], '</p>'; |
| 436 | 447 | |
| 437 | - if (!$subscription['flexible']) |
|
| 438 | - echo ' |
|
| 448 | + if (!$subscription['flexible']) { |
|
| 449 | + echo ' |
|
| 439 | 450 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
| 451 | + } |
|
| 440 | 452 | |
| 441 | 453 | if ($context['user']['is_owner']) |
| 442 | 454 | { |
@@ -449,24 +461,25 @@ discard block |
||
| 449 | 461 | <select name="cur[', $subscription['id'], ']">'; |
| 450 | 462 | |
| 451 | 463 | // Print out the costs for this one. |
| 452 | - foreach ($subscription['costs'] as $duration => $value) |
|
| 453 | - echo ' |
|
| 464 | + foreach ($subscription['costs'] as $duration => $value) { |
|
| 465 | + echo ' |
|
| 454 | 466 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
| 467 | + } |
|
| 455 | 468 | |
| 456 | 469 | echo ' |
| 457 | 470 | </select>'; |
| 458 | - } |
|
| 459 | - else |
|
| 460 | - echo ' |
|
| 471 | + } else { |
|
| 472 | + echo ' |
|
| 461 | 473 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
| 474 | + } |
|
| 462 | 475 | |
| 463 | 476 | echo ' |
| 464 | 477 | <hr> |
| 465 | 478 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button_submit">'; |
| 466 | - } |
|
| 467 | - else |
|
| 468 | - echo ' |
|
| 479 | + } else { |
|
| 480 | + echo ' |
|
| 469 | 481 | <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>'; |
| 482 | + } |
|
| 470 | 483 | |
| 471 | 484 | echo ' |
| 472 | 485 | </div>'; |
@@ -493,19 +506,20 @@ discard block |
||
| 493 | 506 | </thead> |
| 494 | 507 | <tbody>'; |
| 495 | 508 | |
| 496 | - if (empty($context['current'])) |
|
| 497 | - echo ' |
|
| 509 | + if (empty($context['current'])) { |
|
| 510 | + echo ' |
|
| 498 | 511 | <tr class="windowbg"> |
| 499 | 512 | <td colspan="4"> |
| 500 | 513 | ', $txt['paid_none_yet'], ' |
| 501 | 514 | </td> |
| 502 | 515 | </tr>'; |
| 516 | + } |
|
| 503 | 517 | |
| 504 | 518 | foreach ($context['current'] as $sub) |
| 505 | 519 | { |
| 506 | 520 | |
| 507 | - if (!$sub['hide']) |
|
| 508 | - echo ' |
|
| 521 | + if (!$sub['hide']) { |
|
| 522 | + echo ' |
|
| 509 | 523 | <tr class="windowbg"> |
| 510 | 524 | <td> |
| 511 | 525 | ', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -517,6 +531,7 @@ discard block |
||
| 517 | 531 | ', $sub['end'], ' |
| 518 | 532 | </td> |
| 519 | 533 | </tr>'; |
| 534 | + } |
|
| 520 | 535 | } |
| 521 | 536 | echo ' |
| 522 | 537 | </tbody> |
@@ -567,15 +582,17 @@ discard block |
||
| 567 | 582 | ', $gateway['desc'], '<br> |
| 568 | 583 | <form action="', $gateway['form'], '" method="post">'; |
| 569 | 584 | |
| 570 | - if (!empty($gateway['javascript'])) |
|
| 571 | - echo ' |
|
| 585 | + if (!empty($gateway['javascript'])) { |
|
| 586 | + echo ' |
|
| 572 | 587 | <script> |
| 573 | 588 | ', $gateway['javascript'], ' |
| 574 | 589 | </script>'; |
| 590 | + } |
|
| 575 | 591 | |
| 576 | - foreach ($gateway['hidden'] as $name => $value) |
|
| 577 | - echo ' |
|
| 592 | + foreach ($gateway['hidden'] as $name => $value) { |
|
| 593 | + echo ' |
|
| 578 | 594 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
| 595 | + } |
|
| 579 | 596 | |
| 580 | 597 | echo ' |
| 581 | 598 | <br><input type="submit" value="', $gateway['submit'], '" class="button_submit"> |
@@ -31,9 +31,10 @@ discard block |
||
| 31 | 31 | <div class="selectbox floatright" id="upper_show">', $txt['who_show1'], ' |
| 32 | 32 | <select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
| 33 | 33 | |
| 34 | - foreach ($context['show_methods'] as $value => $label) |
|
| 35 | - echo ' |
|
| 34 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 35 | + echo ' |
|
| 36 | 36 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 37 | + } |
|
| 37 | 38 | echo ' |
| 38 | 39 | </select> |
| 39 | 40 | <noscript> |
@@ -71,9 +72,10 @@ discard block |
||
| 71 | 72 | ', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', ' |
| 72 | 73 | </span>'; |
| 73 | 74 | |
| 74 | - if (!empty($member['ip'])) |
|
| 75 | - echo ' |
|
| 75 | + if (!empty($member['ip'])) { |
|
| 76 | + echo ' |
|
| 76 | 77 | (<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)'; |
| 78 | + } |
|
| 77 | 79 | |
| 78 | 80 | echo ' |
| 79 | 81 | </td> |
@@ -103,9 +105,10 @@ discard block |
||
| 103 | 105 | <div class="selectbox floatright">', $txt['who_show1'], ' |
| 104 | 106 | <select name="show" onchange="document.forms.whoFilter.submit();">'; |
| 105 | 107 | |
| 106 | - foreach ($context['show_methods'] as $value => $label) |
|
| 107 | - echo ' |
|
| 108 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 109 | + echo ' |
|
| 108 | 110 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 111 | + } |
|
| 109 | 112 | echo ' |
| 110 | 113 | </select> |
| 111 | 114 | <noscript> |
@@ -134,17 +137,19 @@ discard block |
||
| 134 | 137 | |
| 135 | 138 | foreach ($context['credits'] as $section) |
| 136 | 139 | { |
| 137 | - if (isset($section['pretext'])) |
|
| 138 | - echo ' |
|
| 140 | + if (isset($section['pretext'])) { |
|
| 141 | + echo ' |
|
| 139 | 142 | <div class="windowbg"> |
| 140 | 143 | <p>', $section['pretext'], '</p> |
| 141 | 144 | </div>'; |
| 145 | + } |
|
| 142 | 146 | |
| 143 | - if (isset($section['title'])) |
|
| 144 | - echo ' |
|
| 147 | + if (isset($section['title'])) { |
|
| 148 | + echo ' |
|
| 145 | 149 | <div class="cat_bar"> |
| 146 | 150 | <h3 class="catbg">', $section['title'], '</h3> |
| 147 | 151 | </div>'; |
| 152 | + } |
|
| 148 | 153 | |
| 149 | 154 | echo ' |
| 150 | 155 | <div class="windowbg2"> |
@@ -152,17 +157,18 @@ discard block |
||
| 152 | 157 | |
| 153 | 158 | foreach ($section['groups'] as $group) |
| 154 | 159 | { |
| 155 | - if (isset($group['title'])) |
|
| 156 | - echo ' |
|
| 160 | + if (isset($group['title'])) { |
|
| 161 | + echo ' |
|
| 157 | 162 | <dt> |
| 158 | 163 | <strong>', $group['title'], '</strong> |
| 159 | 164 | </dt> |
| 160 | 165 | <dd>'; |
| 166 | + } |
|
| 161 | 167 | |
| 162 | 168 | // Try to make this read nicely. |
| 163 | - if (count($group['members']) <= 2) |
|
| 164 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 165 | - else |
|
| 169 | + if (count($group['members']) <= 2) { |
|
| 170 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 171 | + } else |
|
| 166 | 172 | { |
| 167 | 173 | $last_peep = array_pop($group['members']); |
| 168 | 174 | echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep; |
@@ -175,9 +181,10 @@ discard block |
||
| 175 | 181 | echo ' |
| 176 | 182 | </dl>'; |
| 177 | 183 | |
| 178 | - if (isset($section['posttext'])) |
|
| 179 | - echo ' |
|
| 184 | + if (isset($section['posttext'])) { |
|
| 185 | + echo ' |
|
| 180 | 186 | <p class="posttext">', $section['posttext'], '</p>'; |
| 187 | + } |
|
| 181 | 188 | |
| 182 | 189 | echo ' |
| 183 | 190 | </div>'; |
@@ -192,26 +199,29 @@ discard block |
||
| 192 | 199 | </div> |
| 193 | 200 | <div class="windowbg">'; |
| 194 | 201 | |
| 195 | - if (!empty($context['credits_software_graphics']['graphics'])) |
|
| 196 | - echo ' |
|
| 202 | + if (!empty($context['credits_software_graphics']['graphics'])) { |
|
| 203 | + echo ' |
|
| 197 | 204 | <dl> |
| 198 | 205 | <dt><strong>', $txt['credits_graphics'], '</strong></dt> |
| 199 | 206 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd> |
| 200 | 207 | </dl>'; |
| 208 | + } |
|
| 201 | 209 | |
| 202 | - if (!empty($context['credits_software_graphics']['software'])) |
|
| 203 | - echo ' |
|
| 210 | + if (!empty($context['credits_software_graphics']['software'])) { |
|
| 211 | + echo ' |
|
| 204 | 212 | <dl> |
| 205 | 213 | <dt><strong>', $txt['credits_software'], '</strong></dt> |
| 206 | 214 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd> |
| 207 | 215 | </dl>'; |
| 216 | + } |
|
| 208 | 217 | |
| 209 | - if (!empty($context['credits_software_graphics']['fonts'])) |
|
| 210 | - echo ' |
|
| 218 | + if (!empty($context['credits_software_graphics']['fonts'])) { |
|
| 219 | + echo ' |
|
| 211 | 220 | <dl> |
| 212 | 221 | <dt><strong>', $txt['credits_fonts'], '</strong></dt> |
| 213 | 222 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd> |
| 214 | 223 | </dl>'; |
| 224 | + } |
|
| 215 | 225 | echo ' |
| 216 | 226 | </div>'; |
| 217 | 227 | } |
@@ -226,16 +236,18 @@ discard block |
||
| 226 | 236 | <div class="windowbg">'; |
| 227 | 237 | |
| 228 | 238 | // Display the credits. |
| 229 | - if (!empty($context['credits_modifications'])) |
|
| 230 | - echo ' |
|
| 239 | + if (!empty($context['credits_modifications'])) { |
|
| 240 | + echo ' |
|
| 231 | 241 | ', implode(' |
| 232 | 242 | <br>', $context['credits_modifications']); |
| 243 | + } |
|
| 233 | 244 | |
| 234 | 245 | // Legacy. |
| 235 | - if (!empty($context['copyrights']['mods'])) |
|
| 236 | - echo (empty($context['credits_modifications']) ? '<br>' : ''), |
|
| 246 | + if (!empty($context['copyrights']['mods'])) { |
|
| 247 | + echo (empty($context['credits_modifications']) ? '<br>' : ''), |
|
| 237 | 248 | implode(' |
| 238 | 249 | <br>', $context['copyrights']['mods']); |
| 250 | + } |
|
| 239 | 251 | |
| 240 | 252 | echo ' |
| 241 | 253 | </div>'; |
@@ -26,9 +26,10 @@ discard block |
||
| 26 | 26 | </h3> |
| 27 | 27 | </div>'; |
| 28 | 28 | |
| 29 | - if ($context['ban']['is_new']) |
|
| 30 | - echo ' |
|
| 29 | + if ($context['ban']['is_new']) { |
|
| 30 | + echo ' |
|
| 31 | 31 | <div class="information winfo">', $txt['ban_add_notes'], '</div>'; |
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | // If there were errors creating the ban, show them. |
| 34 | 35 | if (!empty($context['error_messages'])) |
@@ -38,9 +39,10 @@ discard block |
||
| 38 | 39 | <strong>', $txt['ban_errors_detected'], '</strong> |
| 39 | 40 | <ul>'; |
| 40 | 41 | |
| 41 | - foreach ($context['error_messages'] as $error) |
|
| 42 | - echo ' |
|
| 42 | + foreach ($context['error_messages'] as $error) { |
|
| 43 | + echo ' |
|
| 43 | 44 | <li class="error">', $error, '</li>'; |
| 45 | + } |
|
| 44 | 46 | |
| 45 | 47 | echo ' |
| 46 | 48 | </ul> |
@@ -57,8 +59,8 @@ discard block |
||
| 57 | 59 | <input type="text" id="ban_name" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60" class="input_text"> |
| 58 | 60 | </dd>'; |
| 59 | 61 | |
| 60 | - if (isset($context['ban']['reason'])) |
|
| 61 | - echo ' |
|
| 62 | + if (isset($context['ban']['reason'])) { |
|
| 63 | + echo ' |
|
| 62 | 64 | <dt> |
| 63 | 65 | <strong><label for="reason">', $txt['ban_reason'], ':</label></strong><br> |
| 64 | 66 | <span class="smalltext">', $txt['ban_reason_desc'], '</span> |
@@ -66,9 +68,10 @@ discard block |
||
| 66 | 68 | <dd> |
| 67 | 69 | <textarea name="reason" id="reason" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['reason'], '</textarea> |
| 68 | 70 | </dd>'; |
| 71 | + } |
|
| 69 | 72 | |
| 70 | - if (isset($context['ban']['notes'])) |
|
| 71 | - echo ' |
|
| 73 | + if (isset($context['ban']['notes'])) { |
|
| 74 | + echo ' |
|
| 72 | 75 | <dt> |
| 73 | 76 | <strong><label for="ban_notes">', $txt['ban_notes'], ':</label></strong><br> |
| 74 | 77 | <span class="smalltext">', $txt['ban_notes_desc'], '</span> |
@@ -76,6 +79,7 @@ discard block |
||
| 76 | 79 | <dd> |
| 77 | 80 | <textarea name="notes" id="ban_notes" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['notes'], '</textarea> |
| 78 | 81 | </dd>'; |
| 82 | + } |
|
| 79 | 83 | |
| 80 | 84 | echo ' |
| 81 | 85 | </dl> |
@@ -115,8 +119,8 @@ discard block |
||
| 115 | 119 | <input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;" class="input_text"> |
| 116 | 120 | </dd>'; |
| 117 | 121 | |
| 118 | - if (empty($modSettings['disableHostnameLookup'])) |
|
| 119 | - echo ' |
|
| 122 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
| 123 | + echo ' |
|
| 120 | 124 | <dt> |
| 121 | 125 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" class="input_check"', !empty($context['ban_suggestions']['hostname']) ? ' checked' : '', '> |
| 122 | 126 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -124,6 +128,7 @@ discard block |
||
| 124 | 128 | <dd> |
| 125 | 129 | <input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text"> |
| 126 | 130 | </dd>'; |
| 131 | + } |
|
| 127 | 132 | |
| 128 | 133 | echo ' |
| 129 | 134 | <dt> |
@@ -153,14 +158,15 @@ discard block |
||
| 153 | 158 | <dl class="settings">'; |
| 154 | 159 | |
| 155 | 160 | $count = 0; |
| 156 | - foreach ($ban_ips as $ip) |
|
| 157 | - echo ' |
|
| 161 | + foreach ($ban_ips as $ip) { |
|
| 162 | + echo ' |
|
| 158 | 163 | <dt> |
| 159 | 164 | <input type="checkbox" id="suggestions_', $key ,'_', $count, '" name="ban_suggestions[', $key ,'][]"', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? ' checked' : '', ' value="', $ip, '" class="input_check"> |
| 160 | 165 | </dt> |
| 161 | 166 | <dd> |
| 162 | 167 | <label for="suggestions_', $key ,'_', $count++, '">', $ip, '</label> |
| 163 | 168 | </dd>'; |
| 169 | + } |
|
| 164 | 170 | |
| 165 | 171 | echo ' |
| 166 | 172 | </dl>'; |
@@ -202,8 +208,8 @@ discard block |
||
| 202 | 208 | addLoadEvent(fUpdateStatus);'; |
| 203 | 209 | |
| 204 | 210 | // Auto suggest only needed for adding new bans, not editing |
| 205 | - if ($context['ban']['is_new'] && empty($_REQUEST['u'])) |
|
| 206 | - echo ' |
|
| 211 | + if ($context['ban']['is_new'] && empty($_REQUEST['u'])) { |
|
| 212 | + echo ' |
|
| 207 | 213 | var oAddMemberSuggest = new smc_AutoSuggest({ |
| 208 | 214 | sSelf: \'oAddMemberSuggest\', |
| 209 | 215 | sSessionId: smf_session_id, |
@@ -221,6 +227,7 @@ discard block |
||
| 221 | 227 | return true; |
| 222 | 228 | } |
| 223 | 229 | oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\');'; |
| 230 | + } |
|
| 224 | 231 | |
| 225 | 232 | echo ' |
| 226 | 233 | function confirmBan(aForm) |
@@ -268,8 +275,8 @@ discard block |
||
| 268 | 275 | <input type="text" name="main_ip" value="', $context['ban_trigger']['ip']['value'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;" class="input_text"> |
| 269 | 276 | </dd>'; |
| 270 | 277 | |
| 271 | - if (empty($modSettings['disableHostnameLookup'])) |
|
| 272 | - echo ' |
|
| 278 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
| 279 | + echo ' |
|
| 273 | 280 | <dt> |
| 274 | 281 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" class="input_check"', $context['ban_trigger']['hostname']['selected'] ? ' checked' : '', '> |
| 275 | 282 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -277,6 +284,7 @@ discard block |
||
| 277 | 284 | <dd> |
| 278 | 285 | <input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text"> |
| 279 | 286 | </dd>'; |
| 287 | + } |
|
| 280 | 288 | |
| 281 | 289 | echo ' |
| 282 | 290 | <dt> |