@@ -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="windowbg"> |
@@ -69,9 +70,10 @@ discard block |
||
| 69 | 70 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
| 70 | 71 | |
| 71 | 72 | // Put each group into the box. |
| 72 | - foreach ($context['groups'] as $id => $name) |
|
| 73 | - echo ' |
|
| 73 | + foreach ($context['groups'] as $id => $name) { |
|
| 74 | + echo ' |
|
| 74 | 75 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
| 76 | + } |
|
| 75 | 77 | |
| 76 | 78 | echo ' |
| 77 | 79 | </select> |
@@ -83,12 +85,13 @@ discard block |
||
| 83 | 85 | <dd>'; |
| 84 | 86 | |
| 85 | 87 | // Put a checkbox in for each group |
| 86 | - foreach ($context['groups'] as $id => $name) |
|
| 87 | - echo ' |
|
| 88 | + foreach ($context['groups'] as $id => $name) { |
|
| 89 | + echo ' |
|
| 88 | 90 | <label for="addgroup_', $id, '"> |
| 89 | 91 | <input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', '> |
| 90 | 92 | <span class="smalltext">', $name, '</span> |
| 91 | 93 | </label><br>'; |
| 94 | + } |
|
| 92 | 95 | |
| 93 | 96 | echo ' |
| 94 | 97 | </dd> |
@@ -238,8 +241,8 @@ discard block |
||
| 238 | 241 | <dl class="settings">'; |
| 239 | 242 | |
| 240 | 243 | // Do we need a username? |
| 241 | - if ($context['action_type'] == 'add') |
|
| 242 | - echo ' |
|
| 244 | + if ($context['action_type'] == 'add') { |
|
| 245 | + echo ' |
|
| 243 | 246 | <dt> |
| 244 | 247 | <strong>', $txt['paid_username'], ':</strong><br> |
| 245 | 248 | <span class="smalltext">', $txt['one_username'], '</span> |
@@ -247,6 +250,7 @@ discard block |
||
| 247 | 250 | <dd> |
| 248 | 251 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30"> |
| 249 | 252 | </dd>'; |
| 253 | + } |
|
| 250 | 254 | |
| 251 | 255 | echo ' |
| 252 | 256 | <dt> |
@@ -264,9 +268,10 @@ discard block |
||
| 264 | 268 | <select name="year" id="year" onchange="generateDays();">'; |
| 265 | 269 | |
| 266 | 270 | // Show a list of all the years we allow... |
| 267 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 268 | - echo ' |
|
| 271 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 272 | + echo ' |
|
| 269 | 273 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 274 | + } |
|
| 270 | 275 | |
| 271 | 276 | echo ' |
| 272 | 277 | </select> |
@@ -274,9 +279,10 @@ discard block |
||
| 274 | 279 | <select name="month" id="month" onchange="generateDays();">'; |
| 275 | 280 | |
| 276 | 281 | // There are 12 months per year - ensure that they all get listed. |
| 277 | - for ($month = 1; $month <= 12; $month++) |
|
| 278 | - echo ' |
|
| 282 | + for ($month = 1; $month <= 12; $month++) { |
|
| 283 | + echo ' |
|
| 279 | 284 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 285 | + } |
|
| 280 | 286 | |
| 281 | 287 | echo ' |
| 282 | 288 | </select> |
@@ -284,9 +290,10 @@ discard block |
||
| 284 | 290 | <select name="day" id="day">'; |
| 285 | 291 | |
| 286 | 292 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 287 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
| 288 | - echo ' |
|
| 293 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
| 294 | + echo ' |
|
| 289 | 295 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 296 | + } |
|
| 290 | 297 | |
| 291 | 298 | echo ' |
| 292 | 299 | </select> |
@@ -298,9 +305,10 @@ discard block |
||
| 298 | 305 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
| 299 | 306 | |
| 300 | 307 | // Show a list of all the years we allow... |
| 301 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 302 | - echo ' |
|
| 308 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 309 | + echo ' |
|
| 303 | 310 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 311 | + } |
|
| 304 | 312 | |
| 305 | 313 | echo ' |
| 306 | 314 | </select> |
@@ -308,9 +316,10 @@ discard block |
||
| 308 | 316 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
| 309 | 317 | |
| 310 | 318 | // There are 12 months per year - ensure that they all get listed. |
| 311 | - for ($month = 1; $month <= 12; $month++) |
|
| 312 | - echo ' |
|
| 319 | + for ($month = 1; $month <= 12; $month++) { |
|
| 320 | + echo ' |
|
| 313 | 321 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 322 | + } |
|
| 314 | 323 | |
| 315 | 324 | echo ' |
| 316 | 325 | </select> |
@@ -318,9 +327,10 @@ discard block |
||
| 318 | 327 | <select name="dayend" id="dayend">'; |
| 319 | 328 | |
| 320 | 329 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 321 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
| 322 | - echo ' |
|
| 330 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
| 331 | + echo ' |
|
| 323 | 332 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 333 | + } |
|
| 324 | 334 | |
| 325 | 335 | echo ' |
| 326 | 336 | </select> |
@@ -359,8 +369,8 @@ discard block |
||
| 359 | 369 | <div class="windowbg"> |
| 360 | 370 | <ul>'; |
| 361 | 371 | |
| 362 | - foreach ($context['pending_payments'] as $id => $payment) |
|
| 363 | - echo ' |
|
| 372 | + foreach ($context['pending_payments'] as $id => $payment) { |
|
| 373 | + echo ' |
|
| 364 | 374 | <li> |
| 365 | 375 | ', $payment['desc'], ' |
| 366 | 376 | <span class="floatleft"> |
@@ -370,6 +380,7 @@ discard block |
||
| 370 | 380 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;lid=', $context['log_id'], ';pending=', $id, ';remove">', $txt['pending_payments_remove'], '</a> |
| 371 | 381 | </span> |
| 372 | 382 | </li>'; |
| 383 | + } |
|
| 373 | 384 | |
| 374 | 385 | echo ' |
| 375 | 386 | </ul> |
@@ -394,12 +405,12 @@ discard block |
||
| 394 | 405 | <h3 class="catbg">', $txt['subscriptions'], '</h3> |
| 395 | 406 | </div>'; |
| 396 | 407 | |
| 397 | - if (empty($context['subscriptions'])) |
|
| 398 | - echo ' |
|
| 408 | + if (empty($context['subscriptions'])) { |
|
| 409 | + echo ' |
|
| 399 | 410 | <div class="information"> |
| 400 | 411 | ', $txt['paid_subs_none'], ' |
| 401 | 412 | </div>'; |
| 402 | - else |
|
| 413 | + } else |
|
| 403 | 414 | { |
| 404 | 415 | echo ' |
| 405 | 416 | <div class="information"> |
@@ -410,8 +421,9 @@ discard block |
||
| 410 | 421 | foreach ($context['subscriptions'] as $id => $subscription) |
| 411 | 422 | { |
| 412 | 423 | // Ignore the inactive ones... |
| 413 | - if (empty($subscription['active'])) |
|
| 414 | - continue; |
|
| 424 | + if (empty($subscription['active'])) { |
|
| 425 | + continue; |
|
| 426 | + } |
|
| 415 | 427 | |
| 416 | 428 | echo ' |
| 417 | 429 | <div class="cat_bar"> |
@@ -421,9 +433,10 @@ discard block |
||
| 421 | 433 | <p><strong>', $subscription['name'], '</strong></p> |
| 422 | 434 | <p class="smalltext">', $subscription['desc'], '</p>'; |
| 423 | 435 | |
| 424 | - if (!$subscription['flexible']) |
|
| 425 | - echo ' |
|
| 436 | + if (!$subscription['flexible']) { |
|
| 437 | + echo ' |
|
| 426 | 438 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
| 439 | + } |
|
| 427 | 440 | |
| 428 | 441 | if ($context['user']['is_owner']) |
| 429 | 442 | { |
@@ -436,24 +449,25 @@ discard block |
||
| 436 | 449 | <select name="cur[', $subscription['id'], ']">'; |
| 437 | 450 | |
| 438 | 451 | // Print out the costs for this one. |
| 439 | - foreach ($subscription['costs'] as $duration => $value) |
|
| 440 | - echo ' |
|
| 452 | + foreach ($subscription['costs'] as $duration => $value) { |
|
| 453 | + echo ' |
|
| 441 | 454 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
| 455 | + } |
|
| 442 | 456 | |
| 443 | 457 | echo ' |
| 444 | 458 | </select>'; |
| 445 | - } |
|
| 446 | - else |
|
| 447 | - echo ' |
|
| 459 | + } else { |
|
| 460 | + echo ' |
|
| 448 | 461 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
| 462 | + } |
|
| 449 | 463 | |
| 450 | 464 | echo ' |
| 451 | 465 | <hr> |
| 452 | 466 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button">'; |
| 453 | - } |
|
| 454 | - else |
|
| 455 | - echo ' |
|
| 467 | + } else { |
|
| 468 | + echo ' |
|
| 456 | 469 | <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>'; |
| 470 | + } |
|
| 457 | 471 | |
| 458 | 472 | echo ' |
| 459 | 473 | </div><!-- .windowbg -->'; |
@@ -480,18 +494,19 @@ discard block |
||
| 480 | 494 | </thead> |
| 481 | 495 | <tbody>'; |
| 482 | 496 | |
| 483 | - if (empty($context['current'])) |
|
| 484 | - echo ' |
|
| 497 | + if (empty($context['current'])) { |
|
| 498 | + echo ' |
|
| 485 | 499 | <tr class="windowbg"> |
| 486 | 500 | <td colspan="4"> |
| 487 | 501 | ', $txt['paid_none_yet'], ' |
| 488 | 502 | </td> |
| 489 | 503 | </tr>'; |
| 504 | + } |
|
| 490 | 505 | |
| 491 | 506 | foreach ($context['current'] as $sub) |
| 492 | 507 | { |
| 493 | - if (!$sub['hide']) |
|
| 494 | - echo ' |
|
| 508 | + if (!$sub['hide']) { |
|
| 509 | + echo ' |
|
| 495 | 510 | <tr class="windowbg"> |
| 496 | 511 | <td> |
| 497 | 512 | ', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -502,6 +517,7 @@ discard block |
||
| 502 | 517 | <td>', $sub['start'], '</td> |
| 503 | 518 | <td>', $sub['end'], '</td> |
| 504 | 519 | </tr>'; |
| 520 | + } |
|
| 505 | 521 | } |
| 506 | 522 | |
| 507 | 523 | echo ' |
@@ -553,15 +569,17 @@ discard block |
||
| 553 | 569 | ', $gateway['desc'], '<br> |
| 554 | 570 | <form action="', $gateway['form'], '" method="post">'; |
| 555 | 571 | |
| 556 | - if (!empty($gateway['javascript'])) |
|
| 557 | - echo ' |
|
| 572 | + if (!empty($gateway['javascript'])) { |
|
| 573 | + echo ' |
|
| 558 | 574 | <script> |
| 559 | 575 | ', $gateway['javascript'], ' |
| 560 | 576 | </script>'; |
| 577 | + } |
|
| 561 | 578 | |
| 562 | - foreach ($gateway['hidden'] as $name => $value) |
|
| 563 | - echo ' |
|
| 579 | + foreach ($gateway['hidden'] as $name => $value) { |
|
| 580 | + echo ' |
|
| 564 | 581 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
| 582 | + } |
|
| 565 | 583 | |
| 566 | 584 | echo ' |
| 567 | 585 | <br> |
@@ -41,11 +41,12 @@ discard block |
||
| 41 | 41 | </div>'; |
| 42 | 42 | |
| 43 | 43 | // If this is an existing set, and there are still un-added smileys - offer an import opportunity. |
| 44 | - if (!empty($context['current_set']['can_import'])) |
|
| 45 | - echo ' |
|
| 44 | + if (!empty($context['current_set']['can_import'])) { |
|
| 45 | + echo ' |
|
| 46 | 46 | <div class="information noup"> |
| 47 | 47 | ', $context['current_set']['can_import'] == 1 ? sprintf($txt['smiley_set_import_single'], $context['current_set']['import_url']) : sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import'], $context['current_set']['import_url']), ' |
| 48 | 48 | </div>'; |
| 49 | + } |
|
| 49 | 50 | |
| 50 | 51 | echo ' |
| 51 | 52 | <div class="windowbg noup"> |
@@ -62,20 +63,20 @@ discard block |
||
| 62 | 63 | <dd> |
| 63 | 64 | ', $modSettings['smileys_url'], '/'; |
| 64 | 65 | |
| 65 | - if ($context['current_set']['id'] == 'default') |
|
| 66 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 67 | - |
|
| 68 | - elseif (empty($context['smiley_set_dirs'])) |
|
| 69 | - echo ' |
|
| 66 | + if ($context['current_set']['id'] == 'default') { |
|
| 67 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 68 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
| 69 | + echo ' |
|
| 70 | 70 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '"> '; |
| 71 | - else |
|
| 71 | + } else |
|
| 72 | 72 | { |
| 73 | 73 | echo ' |
| 74 | 74 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
| 75 | 75 | |
| 76 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
| 77 | - echo ' |
|
| 76 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
| 77 | + echo ' |
|
| 78 | 78 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
| 79 | + } |
|
| 79 | 80 | echo ' |
| 80 | 81 | </select> '; |
| 81 | 82 | } |
@@ -90,14 +91,15 @@ discard block |
||
| 90 | 91 | </dd>'; |
| 91 | 92 | |
| 92 | 93 | // If this is a new smiley set they have the option to import smileys already in the directory. |
| 93 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
| 94 | - echo ' |
|
| 94 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
| 95 | + echo ' |
|
| 95 | 96 | <dt> |
| 96 | 97 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
| 97 | 98 | </dt> |
| 98 | 99 | <dd> |
| 99 | 100 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1"> |
| 100 | 101 | </dd>'; |
| 102 | + } |
|
| 101 | 103 | |
| 102 | 104 | echo ' |
| 103 | 105 | </dl> |
@@ -131,9 +133,10 @@ discard block |
||
| 131 | 133 | <dd> |
| 132 | 134 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">'; |
| 133 | 135 | |
| 134 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 135 | - echo ' |
|
| 136 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 137 | + echo ' |
|
| 136 | 138 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 139 | + } |
|
| 137 | 140 | |
| 138 | 141 | echo ' |
| 139 | 142 | </select>) |
@@ -149,17 +152,18 @@ discard block |
||
| 149 | 152 | </dt> |
| 150 | 153 | <dd>'; |
| 151 | 154 | |
| 152 | - if (empty($context['filenames'])) |
|
| 153 | - echo ' |
|
| 155 | + if (empty($context['filenames'])) { |
|
| 156 | + echo ' |
|
| 154 | 157 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '">'; |
| 155 | - else |
|
| 158 | + } else |
|
| 156 | 159 | { |
| 157 | 160 | echo ' |
| 158 | 161 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
| 159 | 162 | |
| 160 | - foreach ($context['filenames'] as $filename) |
|
| 161 | - echo ' |
|
| 163 | + foreach ($context['filenames'] as $filename) { |
|
| 164 | + echo ' |
|
| 162 | 165 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 166 | + } |
|
| 163 | 167 | echo ' |
| 164 | 168 | </select>'; |
| 165 | 169 | } |
@@ -228,9 +232,10 @@ discard block |
||
| 228 | 232 | <dd> |
| 229 | 233 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 230 | 234 | |
| 231 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 232 | - echo ' |
|
| 235 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 236 | + echo ' |
|
| 233 | 237 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 238 | + } |
|
| 234 | 239 | |
| 235 | 240 | echo ' |
| 236 | 241 | </select> |
@@ -240,17 +245,18 @@ discard block |
||
| 240 | 245 | </dt> |
| 241 | 246 | <dd>'; |
| 242 | 247 | |
| 243 | - if (empty($context['filenames'])) |
|
| 244 | - echo ' |
|
| 248 | + if (empty($context['filenames'])) { |
|
| 249 | + echo ' |
|
| 245 | 250 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');">'; |
| 246 | - else |
|
| 251 | + } else |
|
| 247 | 252 | { |
| 248 | 253 | echo ' |
| 249 | 254 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 250 | 255 | |
| 251 | - foreach ($context['filenames'] as $filename) |
|
| 252 | - echo ' |
|
| 256 | + foreach ($context['filenames'] as $filename) { |
|
| 257 | + echo ' |
|
| 253 | 258 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 259 | + } |
|
| 254 | 260 | echo ' |
| 255 | 261 | </select>'; |
| 256 | 262 | } |
@@ -279,14 +285,15 @@ discard block |
||
| 279 | 285 | |
| 280 | 286 | <dl id="uploadMore" style="display: none;" class="settings">'; |
| 281 | 287 | |
| 282 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 283 | - echo ' |
|
| 288 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 289 | + echo ' |
|
| 284 | 290 | <dt> |
| 285 | 291 | ', sprintf($txt['smileys_add_upload_for'], '<strong>' . $smiley_set['name'] . '</strong>'), ': |
| 286 | 292 | </dt> |
| 287 | 293 | <dd> |
| 288 | 294 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');"> |
| 289 | 295 | </dd>'; |
| 296 | + } |
|
| 290 | 297 | |
| 291 | 298 | echo ' |
| 292 | 299 | </dl> |
@@ -357,27 +364,30 @@ discard block |
||
| 357 | 364 | |
| 358 | 365 | foreach ($location['rows'] as $row) |
| 359 | 366 | { |
| 360 | - if (!empty($context['move_smiley'])) |
|
| 361 | - echo ' |
|
| 367 | + if (!empty($context['move_smiley'])) { |
|
| 368 | + echo ' |
|
| 362 | 369 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 370 | + } |
|
| 363 | 371 | |
| 364 | 372 | foreach ($row as $smiley) |
| 365 | 373 | { |
| 366 | - if (empty($context['move_smiley'])) |
|
| 367 | - echo ' |
|
| 374 | + if (empty($context['move_smiley'])) { |
|
| 375 | + echo ' |
|
| 368 | 376 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '"></a>'; |
| 369 | - else |
|
| 370 | - echo ' |
|
| 377 | + } else { |
|
| 378 | + echo ' |
|
| 371 | 379 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '" ', $smiley['selected'] ? 'class="selected_item"' : '', '> |
| 372 | 380 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 381 | + } |
|
| 373 | 382 | } |
| 374 | 383 | |
| 375 | 384 | echo ' |
| 376 | 385 | <br>'; |
| 377 | 386 | } |
| 378 | - if (!empty($context['move_smiley'])) |
|
| 379 | - echo ' |
|
| 387 | + if (!empty($context['move_smiley'])) { |
|
| 388 | + echo ' |
|
| 380 | 389 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 390 | + } |
|
| 381 | 391 | echo ' |
| 382 | 392 | </div><!-- .windowbg --> |
| 383 | 393 | <input type="hidden" name="reorder" value="1"> |
@@ -414,14 +424,15 @@ discard block |
||
| 414 | 424 | <div class="windowbg"> |
| 415 | 425 | <dl class="settings">'; |
| 416 | 426 | |
| 417 | - if (!$context['new_icon']) |
|
| 418 | - echo ' |
|
| 427 | + if (!$context['new_icon']) { |
|
| 428 | + echo ' |
|
| 419 | 429 | <dt> |
| 420 | 430 | <strong>', $txt['smiley_preview'], ': </strong> |
| 421 | 431 | </dt> |
| 422 | 432 | <dd> |
| 423 | 433 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
| 424 | 434 | </dd>'; |
| 435 | + } |
|
| 425 | 436 | |
| 426 | 437 | echo ' |
| 427 | 438 | <dt> |
@@ -448,9 +459,10 @@ discard block |
||
| 448 | 459 | echo ' |
| 449 | 460 | <optgroup label="', $category['name'], '">'; |
| 450 | 461 | |
| 451 | - foreach ($category['boards'] as $board) |
|
| 452 | - echo ' |
|
| 462 | + foreach ($category['boards'] as $board) { |
|
| 463 | + echo ' |
|
| 453 | 464 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
| 465 | + } |
|
| 454 | 466 | |
| 455 | 467 | echo ' |
| 456 | 468 | </optgroup>'; |
@@ -467,19 +479,21 @@ discard block |
||
| 467 | 479 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
| 468 | 480 | |
| 469 | 481 | // Print the list of all the icons it can be put after... |
| 470 | - foreach ($context['icons'] as $id => $data) |
|
| 471 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 482 | + foreach ($context['icons'] as $id => $data) { |
|
| 483 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 472 | 484 | echo ' |
| 473 | 485 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
| 486 | + } |
|
| 474 | 487 | |
| 475 | 488 | echo ' |
| 476 | 489 | </select> |
| 477 | 490 | </dd> |
| 478 | 491 | </dl>'; |
| 479 | 492 | |
| 480 | - if (!$context['new_icon']) |
|
| 481 | - echo ' |
|
| 493 | + if (!$context['new_icon']) { |
|
| 494 | + echo ' |
|
| 482 | 495 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
| 496 | + } |
|
| 483 | 497 | |
| 484 | 498 | echo ' |
| 485 | 499 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button"> |
@@ -65,9 +65,10 @@ discard block |
||
| 65 | 65 | ', implode(', ', $context['administrators']); |
| 66 | 66 | |
| 67 | 67 | // If we have lots of admins... don't show them all. |
| 68 | - if (!empty($context['more_admins_link'])) |
|
| 69 | - echo ' |
|
| 68 | + if (!empty($context['more_admins_link'])) { |
|
| 69 | + echo ' |
|
| 70 | 70 | (', $context['more_admins_link'], ')'; |
| 71 | + } |
|
| 71 | 72 | |
| 72 | 73 | echo ' |
| 73 | 74 | </div><!-- #version_details --> |
@@ -84,17 +85,19 @@ discard block |
||
| 84 | 85 | foreach ($area['areas'] as $item_id => $item) |
| 85 | 86 | { |
| 86 | 87 | // No point showing the 'home' page here, we're already on it! |
| 87 | - if ($area_id == 'forum' && $item_id == 'index') |
|
| 88 | - continue; |
|
| 88 | + if ($area_id == 'forum' && $item_id == 'index') { |
|
| 89 | + continue; |
|
| 90 | + } |
|
| 89 | 91 | |
| 90 | 92 | $url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : ''); |
| 91 | 93 | |
| 92 | - if (!empty($item['icon_file'])) |
|
| 93 | - echo ' |
|
| 94 | + if (!empty($item['icon_file'])) { |
|
| 95 | + echo ' |
|
| 94 | 96 | <a href="', $url, '" class="admin_group', !empty($item['inactive']) ? ' inactive' : '', '"><img class="large_admin_menu_icon_file" src="', $item['icon_file'], '" alt="">', $item['label'], '</a>'; |
| 95 | - else |
|
| 96 | - echo ' |
|
| 97 | + } else { |
|
| 98 | + echo ' |
|
| 97 | 99 | <a href="', $url, '"><span class="large_', $item['icon_class'], !empty($item['inactive']) ? ' inactive' : '', '"></span>', $item['label'], '</a>'; |
| 100 | + } |
|
| 98 | 101 | } |
| 99 | 102 | |
| 100 | 103 | echo ' |
@@ -105,10 +108,11 @@ discard block |
||
| 105 | 108 | </div><!-- #admincenter -->'; |
| 106 | 109 | |
| 107 | 110 | // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. |
| 108 | - if (empty($modSettings['disable_smf_js'])) |
|
| 109 | - echo ' |
|
| 111 | + if (empty($modSettings['disable_smf_js'])) { |
|
| 112 | + echo ' |
|
| 110 | 113 | <script src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script> |
| 111 | 114 | <script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>'; |
| 115 | + } |
|
| 112 | 116 | |
| 113 | 117 | // This sets the announcements and current versions themselves ;). |
| 114 | 118 | echo ' |
@@ -186,9 +190,10 @@ discard block |
||
| 186 | 190 | <em>', $version['version'], '</em>'; |
| 187 | 191 | |
| 188 | 192 | // more details for this item, show them a link |
| 189 | - if ($context['can_admin'] && isset($version['more'])) |
|
| 190 | - echo |
|
| 193 | + if ($context['can_admin'] && isset($version['more'])) { |
|
| 194 | + echo |
|
| 191 | 195 | ' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>'; |
| 196 | + } |
|
| 192 | 197 | echo ' |
| 193 | 198 | <br>'; |
| 194 | 199 | } |
@@ -219,21 +224,23 @@ discard block |
||
| 219 | 224 | |
| 220 | 225 | foreach ($context['credits'] as $section) |
| 221 | 226 | { |
| 222 | - if (isset($section['pretext'])) |
|
| 223 | - echo ' |
|
| 227 | + if (isset($section['pretext'])) { |
|
| 228 | + echo ' |
|
| 224 | 229 | <p>', $section['pretext'], '</p> |
| 225 | 230 | <hr>'; |
| 231 | + } |
|
| 226 | 232 | |
| 227 | 233 | echo ' |
| 228 | 234 | <dl>'; |
| 229 | 235 | |
| 230 | 236 | foreach ($section['groups'] as $group) |
| 231 | 237 | { |
| 232 | - if (isset($group['title'])) |
|
| 233 | - echo ' |
|
| 238 | + if (isset($group['title'])) { |
|
| 239 | + echo ' |
|
| 234 | 240 | <dt> |
| 235 | 241 | <strong>', $group['title'], ':</strong> |
| 236 | 242 | </dt>'; |
| 243 | + } |
|
| 237 | 244 | |
| 238 | 245 | echo ' |
| 239 | 246 | <dd>', implode(', ', $group['members']), '</dd>'; |
@@ -242,10 +249,11 @@ discard block |
||
| 242 | 249 | echo ' |
| 243 | 250 | </dl>'; |
| 244 | 251 | |
| 245 | - if (isset($section['posttext'])) |
|
| 246 | - echo ' |
|
| 252 | + if (isset($section['posttext'])) { |
|
| 253 | + echo ' |
|
| 247 | 254 | <hr> |
| 248 | 255 | <p>', $section['posttext'], '</p>'; |
| 256 | + } |
|
| 249 | 257 | } |
| 250 | 258 | |
| 251 | 259 | echo ' |
@@ -261,9 +269,10 @@ discard block |
||
| 261 | 269 | smfSupportVersions.forum = "', $context['forum_version'], '";'; |
| 262 | 270 | |
| 263 | 271 | // Don't worry, none of this is logged, it's just used to give information that might be of use. |
| 264 | - foreach ($context['current_versions'] as $variable => $version) |
|
| 265 | - echo ' |
|
| 272 | + foreach ($context['current_versions'] as $variable => $version) { |
|
| 273 | + echo ' |
|
| 266 | 274 | smfSupportVersions.', $variable, ' = "', $version['version'], '";'; |
| 275 | + } |
|
| 267 | 276 | |
| 268 | 277 | // Now we just have to include the script and wait ;). |
| 269 | 278 | echo ' |
@@ -360,8 +369,8 @@ discard block |
||
| 360 | 369 | <tbody>'; |
| 361 | 370 | |
| 362 | 371 | // Loop through every source file displaying its version - using javascript. |
| 363 | - foreach ($context['file_versions'] as $filename => $version) |
|
| 364 | - echo ' |
|
| 372 | + foreach ($context['file_versions'] as $filename => $version) { |
|
| 373 | + echo ' |
|
| 365 | 374 | <tr class="windowbg"> |
| 366 | 375 | <td class="half_table"> |
| 367 | 376 | ', $filename, ' |
@@ -373,6 +382,7 @@ discard block |
||
| 373 | 382 | <em id="currentSources', $filename, '">??</em> |
| 374 | 383 | </td> |
| 375 | 384 | </tr>'; |
| 385 | + } |
|
| 376 | 386 | |
| 377 | 387 | // Default template files. |
| 378 | 388 | echo ' |
@@ -398,8 +408,8 @@ discard block |
||
| 398 | 408 | <table id="Default" class="table_grid"> |
| 399 | 409 | <tbody>'; |
| 400 | 410 | |
| 401 | - foreach ($context['default_template_versions'] as $filename => $version) |
|
| 402 | - echo ' |
|
| 411 | + foreach ($context['default_template_versions'] as $filename => $version) { |
|
| 412 | + echo ' |
|
| 403 | 413 | <tr class="windowbg"> |
| 404 | 414 | <td class="half_table"> |
| 405 | 415 | ', $filename, ' |
@@ -411,6 +421,7 @@ discard block |
||
| 411 | 421 | <em id="currentDefault', $filename, '">??</em> |
| 412 | 422 | </td> |
| 413 | 423 | </tr>'; |
| 424 | + } |
|
| 414 | 425 | |
| 415 | 426 | // Now the language files... |
| 416 | 427 | echo ' |
@@ -438,8 +449,8 @@ discard block |
||
| 438 | 449 | |
| 439 | 450 | foreach ($context['default_language_versions'] as $language => $files) |
| 440 | 451 | { |
| 441 | - foreach ($files as $filename => $version) |
|
| 442 | - echo ' |
|
| 452 | + foreach ($files as $filename => $version) { |
|
| 453 | + echo ' |
|
| 443 | 454 | <tr class="windowbg"> |
| 444 | 455 | <td class="half_table"> |
| 445 | 456 | ', $filename, '.<em>', $language, '</em>.php |
@@ -451,6 +462,7 @@ discard block |
||
| 451 | 462 | <em id="current', $filename, '.', $language, '">??</em> |
| 452 | 463 | </td> |
| 453 | 464 | </tr>'; |
| 465 | + } |
|
| 454 | 466 | } |
| 455 | 467 | |
| 456 | 468 | echo ' |
@@ -480,8 +492,8 @@ discard block |
||
| 480 | 492 | <table id="Templates" class="table_grid"> |
| 481 | 493 | <tbody>'; |
| 482 | 494 | |
| 483 | - foreach ($context['template_versions'] as $filename => $version) |
|
| 484 | - echo ' |
|
| 495 | + foreach ($context['template_versions'] as $filename => $version) { |
|
| 496 | + echo ' |
|
| 485 | 497 | <tr class="windowbg"> |
| 486 | 498 | <td class="half_table"> |
| 487 | 499 | ', $filename, ' |
@@ -493,6 +505,7 @@ discard block |
||
| 493 | 505 | <em id="currentTemplates', $filename, '">??</em> |
| 494 | 506 | </td> |
| 495 | 507 | </tr>'; |
| 508 | + } |
|
| 496 | 509 | |
| 497 | 510 | echo ' |
| 498 | 511 | </tbody> |
@@ -522,8 +535,8 @@ discard block |
||
| 522 | 535 | <table id="Tasks" class="table_grid"> |
| 523 | 536 | <tbody>'; |
| 524 | 537 | |
| 525 | - foreach ($context['tasks_versions'] as $filename => $version) |
|
| 526 | - echo ' |
|
| 538 | + foreach ($context['tasks_versions'] as $filename => $version) { |
|
| 539 | + echo ' |
|
| 527 | 540 | <tr class="windowbg"> |
| 528 | 541 | <td class="half_table"> |
| 529 | 542 | ', $filename, ' |
@@ -535,6 +548,7 @@ discard block |
||
| 535 | 548 | <em id="currentTasks', $filename, '">??</em> |
| 536 | 549 | </td> |
| 537 | 550 | </tr>'; |
| 551 | + } |
|
| 538 | 552 | |
| 539 | 553 | echo ' |
| 540 | 554 | </tbody> |
@@ -576,9 +590,10 @@ discard block |
||
| 576 | 590 | { |
| 577 | 591 | global $context, $scripturl, $txt, $modSettings; |
| 578 | 592 | |
| 579 | - if (!empty($context['saved_successful'])) |
|
| 580 | - echo ' |
|
| 593 | + if (!empty($context['saved_successful'])) { |
|
| 594 | + echo ' |
|
| 581 | 595 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 596 | + } |
|
| 582 | 597 | |
| 583 | 598 | // First section is for adding/removing words from the censored list. |
| 584 | 599 | echo ' |
@@ -593,11 +608,12 @@ discard block |
||
| 593 | 608 | <p>', $txt['admin_censored_where'], '</p>'; |
| 594 | 609 | |
| 595 | 610 | // Show text boxes for censoring [bad ] => [good ]. |
| 596 | - foreach ($context['censored_words'] as $vulgar => $proper) |
|
| 597 | - echo ' |
|
| 611 | + foreach ($context['censored_words'] as $vulgar => $proper) { |
|
| 612 | + echo ' |
|
| 598 | 613 | <div class="block"> |
| 599 | 614 | <input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30"> => <input type="text" name="censor_proper[]" value="', $proper, '" size="30"> |
| 600 | 615 | </div>'; |
| 616 | + } |
|
| 601 | 617 | |
| 602 | 618 | // Now provide a way to censor more words. |
| 603 | 619 | echo ' |
@@ -672,19 +688,21 @@ discard block |
||
| 672 | 688 | <div class="windowbg"> |
| 673 | 689 | ', $txt['not_done_reason']; |
| 674 | 690 | |
| 675 | - if (!empty($context['continue_percent'])) |
|
| 676 | - echo ' |
|
| 691 | + if (!empty($context['continue_percent'])) { |
|
| 692 | + echo ' |
|
| 677 | 693 | <div class="progress_bar"> |
| 678 | 694 | <span>', $context['continue_percent'], '%</span> |
| 679 | 695 | <div class="bar" style="width: ', $context['continue_percent'], '%;"></div> |
| 680 | 696 | </div>'; |
| 697 | + } |
|
| 681 | 698 | |
| 682 | - if (!empty($context['substep_enabled'])) |
|
| 683 | - echo ' |
|
| 699 | + if (!empty($context['substep_enabled'])) { |
|
| 700 | + echo ' |
|
| 684 | 701 | <div class="progress_bar progress_blue"> |
| 685 | 702 | <span>', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</span> |
| 686 | 703 | <div class="bar" style="width: ', $context['substep_continue_percent'], '%;"></div> |
| 687 | 704 | </div>'; |
| 705 | + } |
|
| 688 | 706 | |
| 689 | 707 | echo ' |
| 690 | 708 | <form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit"> |
@@ -719,35 +737,40 @@ discard block |
||
| 719 | 737 | { |
| 720 | 738 | global $context, $txt, $scripturl; |
| 721 | 739 | |
| 722 | - if (!empty($context['saved_successful'])) |
|
| 723 | - echo ' |
|
| 740 | + if (!empty($context['saved_successful'])) { |
|
| 741 | + echo ' |
|
| 724 | 742 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 725 | - elseif (!empty($context['saved_failed'])) |
|
| 726 | - echo ' |
|
| 743 | + } elseif (!empty($context['saved_failed'])) { |
|
| 744 | + echo ' |
|
| 727 | 745 | <div class="errorbox">', sprintf($txt['settings_not_saved'], $context['saved_failed']), '</div>'; |
| 746 | + } |
|
| 728 | 747 | |
| 729 | - if (!empty($context['settings_pre_javascript'])) |
|
| 730 | - echo ' |
|
| 748 | + if (!empty($context['settings_pre_javascript'])) { |
|
| 749 | + echo ' |
|
| 731 | 750 | <script>', $context['settings_pre_javascript'], '</script>'; |
| 751 | + } |
|
| 732 | 752 | |
| 733 | - if (!empty($context['settings_insert_above'])) |
|
| 734 | - echo $context['settings_insert_above']; |
|
| 753 | + if (!empty($context['settings_insert_above'])) { |
|
| 754 | + echo $context['settings_insert_above']; |
|
| 755 | + } |
|
| 735 | 756 | |
| 736 | 757 | echo ' |
| 737 | 758 | <div id="admincenter"> |
| 738 | 759 | <form id="admin_form_wrapper" action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>'; |
| 739 | 760 | |
| 740 | 761 | // Is there a custom title? |
| 741 | - if (isset($context['settings_title'])) |
|
| 742 | - echo ' |
|
| 762 | + if (isset($context['settings_title'])) { |
|
| 763 | + echo ' |
|
| 743 | 764 | <div class="cat_bar"> |
| 744 | 765 | <h3 class="catbg">', $context['settings_title'], '</h3> |
| 745 | 766 | </div>'; |
| 767 | + } |
|
| 746 | 768 | |
| 747 | 769 | // Have we got a message to display? |
| 748 | - if (!empty($context['settings_message'])) |
|
| 749 | - echo ' |
|
| 770 | + if (!empty($context['settings_message'])) { |
|
| 771 | + echo ' |
|
| 750 | 772 | <div class="information">', $context['settings_message'], '</div>'; |
| 773 | + } |
|
| 751 | 774 | |
| 752 | 775 | // Now actually loop through all the variables. |
| 753 | 776 | $is_open = false; |
@@ -800,8 +823,9 @@ discard block |
||
| 800 | 823 | // Hang about? Are you pulling my leg - a callback?! |
| 801 | 824 | if (is_array($config_var) && $config_var['type'] == 'callback') |
| 802 | 825 | { |
| 803 | - if (function_exists('template_callback_' . $config_var['name'])) |
|
| 804 | - call_user_func('template_callback_' . $config_var['name']); |
|
| 826 | + if (function_exists('template_callback_' . $config_var['name'])) { |
|
| 827 | + call_user_func('template_callback_' . $config_var['name']); |
|
| 828 | + } |
|
| 805 | 829 | |
| 806 | 830 | continue; |
| 807 | 831 | } |
@@ -831,9 +855,10 @@ discard block |
||
| 831 | 855 | $text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time'); |
| 832 | 856 | |
| 833 | 857 | // Show the [?] button. |
| 834 | - if ($config_var['help']) |
|
| 835 | - echo ' |
|
| 858 | + if ($config_var['help']) { |
|
| 859 | + echo ' |
|
| 836 | 860 | <a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'], '"></span></a> '; |
| 861 | + } |
|
| 837 | 862 | |
| 838 | 863 | echo ' |
| 839 | 864 | <a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span> |
@@ -842,23 +867,26 @@ discard block |
||
| 842 | 867 | $config_var['preinput']; |
| 843 | 868 | |
| 844 | 869 | // Show a check box. |
| 845 | - if ($config_var['type'] == 'check') |
|
| 846 | - echo ' |
|
| 870 | + if ($config_var['type'] == 'check') { |
|
| 871 | + echo ' |
|
| 847 | 872 | <input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked' : ''), ' value="1">'; |
| 873 | + } |
|
| 848 | 874 | // Escape (via htmlspecialchars.) the text box. |
| 849 | - elseif ($config_var['type'] == 'password') |
|
| 850 | - echo ' |
|
| 875 | + elseif ($config_var['type'] == 'password') { |
|
| 876 | + echo ' |
|
| 851 | 877 | <input type="password"', $disabled, $javascript, ' name="', $config_var['name'], '[0]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' value="*#fakepass#*" onfocus="this.value = \'\'; this.form.', $config_var['name'], '.disabled = false;"><br> |
| 852 | 878 | <input type="password" disabled id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), '>'; |
| 879 | + } |
|
| 853 | 880 | // Show a selection box. |
| 854 | 881 | elseif ($config_var['type'] == 'select') |
| 855 | 882 | { |
| 856 | 883 | echo ' |
| 857 | 884 | <select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), (!empty($config_var['multiple']) && !empty($config_var['size']) ? ' size="' . $config_var['size'] . '"' : ''), '>'; |
| 858 | 885 | |
| 859 | - foreach ($config_var['data'] as $option) |
|
| 860 | - echo ' |
|
| 886 | + foreach ($config_var['data'] as $option) { |
|
| 887 | + echo ' |
|
| 861 | 888 | <option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected' : ''), '>', $option[1], '</option>'; |
| 889 | + } |
|
| 862 | 890 | echo ' |
| 863 | 891 | </select>'; |
| 864 | 892 | } |
@@ -875,16 +903,18 @@ discard block |
||
| 875 | 903 | |
| 876 | 904 | foreach ($context['board_list'] as $id_cat => $cat) |
| 877 | 905 | { |
| 878 | - if (!$first) |
|
| 879 | - echo ' |
|
| 906 | + if (!$first) { |
|
| 907 | + echo ' |
|
| 880 | 908 | <hr>'; |
| 909 | + } |
|
| 881 | 910 | echo ' |
| 882 | 911 | <strong>', $cat['name'], '</strong> |
| 883 | 912 | <ul>'; |
| 884 | 913 | |
| 885 | - foreach ($cat['boards'] as $id_board => $brd) |
|
| 886 | - echo ' |
|
| 914 | + foreach ($cat['boards'] as $id_board => $brd) { |
|
| 915 | + echo ' |
|
| 887 | 916 | <li><label><input type="checkbox" name="', $config_var['name'], '[', $brd['id'], ']" value="1"', in_array($brd['id'], $config_var['value']) ? ' checked' : '', '> ', $brd['child_level'] > 0 ? str_repeat(' ', $brd['child_level']) : '', $brd['name'], '</label></li>'; |
| 917 | + } |
|
| 888 | 918 | |
| 889 | 919 | echo ' |
| 890 | 920 | </ul>'; |
@@ -894,12 +924,14 @@ discard block |
||
| 894 | 924 | </fieldset>'; |
| 895 | 925 | } |
| 896 | 926 | // Text area? |
| 897 | - elseif ($config_var['type'] == 'large_text') |
|
| 898 | - echo ' |
|
| 927 | + elseif ($config_var['type'] == 'large_text') { |
|
| 928 | + echo ' |
|
| 899 | 929 | <textarea rows="', (!empty($config_var['size']) ? $config_var['size'] : (!empty($config_var['rows']) ? $config_var['rows'] : 4)), '" cols="', (!empty($config_var['cols']) ? $config_var['cols'] : 30), '" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>'; |
| 930 | + } |
|
| 900 | 931 | // Permission group? |
| 901 | - elseif ($config_var['type'] == 'permissions') |
|
| 902 | - theme_inline_permissions($config_var['name']); |
|
| 932 | + elseif ($config_var['type'] == 'permissions') { |
|
| 933 | + theme_inline_permissions($config_var['name']); |
|
| 934 | + } |
|
| 903 | 935 | |
| 904 | 936 | // BBC selection? |
| 905 | 937 | elseif ($config_var['type'] == 'bbc') |
@@ -911,22 +943,24 @@ discard block |
||
| 911 | 943 | |
| 912 | 944 | foreach ($context['bbc_columns'] as $bbcColumn) |
| 913 | 945 | { |
| 914 | - foreach ($bbcColumn as $bbcTag) |
|
| 915 | - echo ' |
|
| 946 | + foreach ($bbcColumn as $bbcTag) { |
|
| 947 | + echo ' |
|
| 916 | 948 | <li class="list_bbc floatleft"> |
| 917 | 949 | <input type="checkbox" name="', $config_var['name'], '_enabledTags[]" id="tag_', $config_var['name'], '_', $bbcTag['tag'], '" value="', $bbcTag['tag'], '"', !in_array($bbcTag['tag'], $context['bbc_sections'][$config_var['name']]['disabled']) ? ' checked' : '', '> <label for="tag_', $config_var['name'], '_', $bbcTag['tag'], '">', $bbcTag['tag'], '</label>', $bbcTag['show_help'] ? ' (<a href="' . $scripturl . '?action=helpadmin;help=tag_' . $bbcTag['tag'] . '" onclick="return reqOverlayDiv(this.href);">?</a>)' : '', ' |
| 918 | 950 | </li>'; |
| 951 | + } |
|
| 919 | 952 | } |
| 920 | 953 | echo ' </ul> |
| 921 | 954 | <input type="checkbox" id="bbc_', $config_var['name'], '_select_all" onclick="invertAll(this, this.form, \'', $config_var['name'], '_enabledTags\');"', $context['bbc_sections'][$config_var['name']]['all_selected'] ? ' checked' : '', '> <label for="bbc_', $config_var['name'], '_select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label> |
| 922 | 955 | </fieldset>'; |
| 923 | 956 | } |
| 924 | 957 | // A simple message? |
| 925 | - elseif ($config_var['type'] == 'var_message') |
|
| 926 | - echo ' |
|
| 958 | + elseif ($config_var['type'] == 'var_message') { |
|
| 959 | + echo ' |
|
| 927 | 960 | <div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '> |
| 928 | 961 | ', $config_var['var_message'], ' |
| 929 | 962 | </div>'; |
| 963 | + } |
|
| 930 | 964 | // Assume it must be a text box |
| 931 | 965 | else |
| 932 | 966 | { |
@@ -951,62 +985,70 @@ discard block |
||
| 951 | 985 | ' . $config_var['postinput'] : '',' |
| 952 | 986 | </dd>'; |
| 953 | 987 | } |
| 954 | - } |
|
| 955 | - else |
|
| 988 | + } else |
|
| 956 | 989 | { |
| 957 | 990 | // Just show a separator. |
| 958 | - if ($config_var == '') |
|
| 959 | - echo ' |
|
| 991 | + if ($config_var == '') { |
|
| 992 | + echo ' |
|
| 960 | 993 | </dl> |
| 961 | 994 | <hr> |
| 962 | 995 | <dl class="settings">'; |
| 963 | - else |
|
| 964 | - echo ' |
|
| 996 | + } else { |
|
| 997 | + echo ' |
|
| 965 | 998 | <dd> |
| 966 | 999 | <strong>' . $config_var . '</strong> |
| 967 | 1000 | </dd>'; |
| 1001 | + } |
|
| 968 | 1002 | } |
| 969 | 1003 | } |
| 970 | 1004 | |
| 971 | - if ($is_open) |
|
| 972 | - echo ' |
|
| 1005 | + if ($is_open) { |
|
| 1006 | + echo ' |
|
| 973 | 1007 | </dl>'; |
| 1008 | + } |
|
| 974 | 1009 | |
| 975 | - if (empty($context['settings_save_dont_show'])) |
|
| 976 | - echo ' |
|
| 1010 | + if (empty($context['settings_save_dont_show'])) { |
|
| 1011 | + echo ' |
|
| 977 | 1012 | <input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button">'; |
| 1013 | + } |
|
| 978 | 1014 | |
| 979 | - if ($is_open) |
|
| 980 | - echo ' |
|
| 1015 | + if ($is_open) { |
|
| 1016 | + echo ' |
|
| 981 | 1017 | </div><!-- .windowbg -->'; |
| 1018 | + } |
|
| 982 | 1019 | |
| 983 | 1020 | |
| 984 | 1021 | // At least one token has to be used! |
| 985 | - if (isset($context['admin-ssc_token'])) |
|
| 986 | - echo ' |
|
| 1022 | + if (isset($context['admin-ssc_token'])) { |
|
| 1023 | + echo ' |
|
| 987 | 1024 | <input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '">'; |
| 1025 | + } |
|
| 988 | 1026 | |
| 989 | - if (isset($context['admin-dbsc_token'])) |
|
| 990 | - echo ' |
|
| 1027 | + if (isset($context['admin-dbsc_token'])) { |
|
| 1028 | + echo ' |
|
| 991 | 1029 | <input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '">'; |
| 1030 | + } |
|
| 992 | 1031 | |
| 993 | - if (isset($context['admin-mp_token'])) |
|
| 994 | - echo ' |
|
| 1032 | + if (isset($context['admin-mp_token'])) { |
|
| 1033 | + echo ' |
|
| 995 | 1034 | <input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '">'; |
| 1035 | + } |
|
| 996 | 1036 | |
| 997 | 1037 | echo ' |
| 998 | 1038 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 999 | 1039 | </form> |
| 1000 | 1040 | </div><!-- #admincenter -->'; |
| 1001 | 1041 | |
| 1002 | - if (!empty($context['settings_post_javascript'])) |
|
| 1003 | - echo ' |
|
| 1042 | + if (!empty($context['settings_post_javascript'])) { |
|
| 1043 | + echo ' |
|
| 1004 | 1044 | <script> |
| 1005 | 1045 | ', $context['settings_post_javascript'], ' |
| 1006 | 1046 | </script>'; |
| 1047 | + } |
|
| 1007 | 1048 | |
| 1008 | - if (!empty($context['settings_insert_below'])) |
|
| 1009 | - echo $context['settings_insert_below']; |
|
| 1049 | + if (!empty($context['settings_insert_below'])) { |
|
| 1050 | + echo $context['settings_insert_below']; |
|
| 1051 | + } |
|
| 1010 | 1052 | |
| 1011 | 1053 | // We may have added a board listing. If we did, we need to make it work. |
| 1012 | 1054 | addInlineJavascript(' |
@@ -1029,9 +1071,10 @@ discard block |
||
| 1029 | 1071 | { |
| 1030 | 1072 | global $context, $txt; |
| 1031 | 1073 | |
| 1032 | - if (!empty($context['saved_successful'])) |
|
| 1033 | - echo ' |
|
| 1074 | + if (!empty($context['saved_successful'])) { |
|
| 1075 | + echo ' |
|
| 1034 | 1076 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 1077 | + } |
|
| 1035 | 1078 | |
| 1036 | 1079 | // Standard fields. |
| 1037 | 1080 | template_show_list('standard_profile_fields'); |
@@ -1065,11 +1108,12 @@ discard block |
||
| 1065 | 1108 | { |
| 1066 | 1109 | loadLanguage('Errors'); |
| 1067 | 1110 | |
| 1068 | - if (isset($txt['custom_option_' . $_GET['msg']])) |
|
| 1069 | - echo ' |
|
| 1111 | + if (isset($txt['custom_option_' . $_GET['msg']])) { |
|
| 1112 | + echo ' |
|
| 1070 | 1113 | <div class="errorbox">', |
| 1071 | 1114 | $txt['custom_option_' . $_GET['msg']], ' |
| 1072 | 1115 | </div>'; |
| 1116 | + } |
|
| 1073 | 1117 | } |
| 1074 | 1118 | |
| 1075 | 1119 | echo ' |
@@ -1136,9 +1180,10 @@ discard block |
||
| 1136 | 1180 | <dd> |
| 1137 | 1181 | <select name="placement" id="placement">'; |
| 1138 | 1182 | |
| 1139 | - foreach ($context['cust_profile_fields_placement'] as $order => $name) |
|
| 1140 | - echo ' |
|
| 1183 | + foreach ($context['cust_profile_fields_placement'] as $order => $name) { |
|
| 1184 | + echo ' |
|
| 1141 | 1185 | <option value="', $order, '"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_' . $name], '</option>'; |
| 1186 | + } |
|
| 1142 | 1187 | |
| 1143 | 1188 | echo ' |
| 1144 | 1189 | </select> |
@@ -1162,9 +1207,10 @@ discard block |
||
| 1162 | 1207 | <dd> |
| 1163 | 1208 | <select name="field_type" id="field_type" onchange="updateInputBoxes();">'; |
| 1164 | 1209 | |
| 1165 | - foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) |
|
| 1166 | - echo ' |
|
| 1210 | + foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) { |
|
| 1211 | + echo ' |
|
| 1167 | 1212 | <option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>'; |
| 1213 | + } |
|
| 1168 | 1214 | |
| 1169 | 1215 | echo ' |
| 1170 | 1216 | </select> |
@@ -1196,9 +1242,10 @@ discard block |
||
| 1196 | 1242 | </dt> |
| 1197 | 1243 | <dd id="options_dd">'; |
| 1198 | 1244 | |
| 1199 | - foreach ($context['field']['options'] as $k => $option) |
|
| 1200 | - echo ' |
|
| 1245 | + foreach ($context['field']['options'] as $k => $option) { |
|
| 1246 | + echo ' |
|
| 1201 | 1247 | ', $k == 0 ? '' : '<br>', '<input type="radio" name="default_select" value="', $k, '"', $context['field']['default_select'] == $option ? ' checked' : '', '><input type="text" name="select_option[', $k, ']" value="', $option, '">'; |
| 1248 | + } |
|
| 1202 | 1249 | |
| 1203 | 1250 | echo ' |
| 1204 | 1251 | <span id="addopt"></span> |
@@ -1262,9 +1309,10 @@ discard block |
||
| 1262 | 1309 | </fieldset> |
| 1263 | 1310 | <input type="submit" name="save" value="', $txt['save'], '" class="button">'; |
| 1264 | 1311 | |
| 1265 | - if ($context['fid']) |
|
| 1266 | - echo ' |
|
| 1312 | + if ($context['fid']) { |
|
| 1313 | + echo ' |
|
| 1267 | 1314 | <input type="submit" name="delete" value="', $txt['delete'], '" data-confirm="', $txt['custom_edit_delete_sure'], '" class="button you_sure">'; |
| 1315 | + } |
|
| 1268 | 1316 | |
| 1269 | 1317 | echo ' |
| 1270 | 1318 | </div><!-- .windowbg --> |
@@ -1311,8 +1359,7 @@ discard block |
||
| 1311 | 1359 | <p class="centertext"> |
| 1312 | 1360 | <strong>', $txt['admin_search_results_none'], '</strong> |
| 1313 | 1361 | </p>'; |
| 1314 | - } |
|
| 1315 | - else |
|
| 1362 | + } else |
|
| 1316 | 1363 | { |
| 1317 | 1364 | echo ' |
| 1318 | 1365 | <ol class="search_results">'; |
@@ -1339,9 +1386,10 @@ discard block |
||
| 1339 | 1386 | <li> |
| 1340 | 1387 | <a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'], ']'; |
| 1341 | 1388 | |
| 1342 | - if ($result['help']) |
|
| 1343 | - echo ' |
|
| 1389 | + if ($result['help']) { |
|
| 1390 | + echo ' |
|
| 1344 | 1391 | <p class="double_height">', $result['help'], '</p>'; |
| 1392 | + } |
|
| 1345 | 1393 | |
| 1346 | 1394 | echo ' |
| 1347 | 1395 | </li>'; |
@@ -1381,10 +1429,11 @@ discard block |
||
| 1381 | 1429 | <strong>', $txt['setup_verification_answer'], '</strong> |
| 1382 | 1430 | </dd>'; |
| 1383 | 1431 | |
| 1384 | - if (!empty($context['qa_by_lang'][$lang_id])) |
|
| 1385 | - foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1432 | + if (!empty($context['qa_by_lang'][$lang_id])) { |
|
| 1433 | + foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1386 | 1434 | { |
| 1387 | 1435 | $question = $context['question_answers'][$q_id]; |
| 1436 | + } |
|
| 1388 | 1437 | |
| 1389 | 1438 | echo ' |
| 1390 | 1439 | <dt> |
@@ -1392,9 +1441,10 @@ discard block |
||
| 1392 | 1441 | </dt> |
| 1393 | 1442 | <dd>'; |
| 1394 | 1443 | |
| 1395 | - foreach ($question['answers'] as $answer) |
|
| 1396 | - echo ' |
|
| 1444 | + foreach ($question['answers'] as $answer) { |
|
| 1445 | + echo ' |
|
| 1397 | 1446 | <input type="text" name="answer[', $lang_id, '][', $q_id, '][]" value="', $answer, '" size="50" class="verification_answer">'; |
| 1447 | + } |
|
| 1398 | 1448 | |
| 1399 | 1449 | echo ' |
| 1400 | 1450 | <div class="qa_add_answer"><a href="javascript:void(0);">[ ', $txt['setup_verification_add_answer'], ' ]</a></div> |
@@ -1433,11 +1483,12 @@ discard block |
||
| 1433 | 1483 | ', $txt['errors_found'], ': |
| 1434 | 1484 | <ul>'; |
| 1435 | 1485 | |
| 1436 | - foreach ($context['repair_errors'] as $error) |
|
| 1437 | - echo ' |
|
| 1486 | + foreach ($context['repair_errors'] as $error) { |
|
| 1487 | + echo ' |
|
| 1438 | 1488 | <li> |
| 1439 | 1489 | ', $error, ' |
| 1440 | 1490 | </li>'; |
| 1491 | + } |
|
| 1441 | 1492 | |
| 1442 | 1493 | echo ' |
| 1443 | 1494 | </ul> |
@@ -1447,15 +1498,14 @@ discard block |
||
| 1447 | 1498 | <p class="padding"> |
| 1448 | 1499 | <strong><a href="', $scripturl, '?action=admin;area=repairboards;fixErrors;', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $scripturl, '?action=admin;area=maintain">', $txt['no'], '</a></strong> |
| 1449 | 1500 | </p>'; |
| 1450 | - } |
|
| 1451 | - else |
|
| 1452 | - echo ' |
|
| 1501 | + } else { |
|
| 1502 | + echo ' |
|
| 1453 | 1503 | <p>', $txt['maintain_no_errors'], '</p> |
| 1454 | 1504 | <p class="padding"> |
| 1455 | 1505 | <a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a> |
| 1456 | 1506 | </p>'; |
| 1457 | - } |
|
| 1458 | - else |
|
| 1507 | + } |
|
| 1508 | + } else |
|
| 1459 | 1509 | { |
| 1460 | 1510 | if (!empty($context['redirect_to_recount'])) |
| 1461 | 1511 | { |
@@ -1467,8 +1517,7 @@ discard block |
||
| 1467 | 1517 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 1468 | 1518 | <input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '"> |
| 1469 | 1519 | </form>'; |
| 1470 | - } |
|
| 1471 | - else |
|
| 1520 | + } else |
|
| 1472 | 1521 | { |
| 1473 | 1522 | echo ' |
| 1474 | 1523 | <p>', $txt['errors_fixed'], '</p> |
@@ -1559,9 +1608,10 @@ discard block |
||
| 1559 | 1608 | <tr class="windowbg"> |
| 1560 | 1609 | <td class="equal_table">', $key, '</td>'; |
| 1561 | 1610 | |
| 1562 | - foreach ($setting as $key_lm => $value) |
|
| 1563 | - echo ' |
|
| 1611 | + foreach ($setting as $key_lm => $value) { |
|
| 1612 | + echo ' |
|
| 1564 | 1613 | <td class="equal_table">', $value, '</td>'; |
| 1614 | + } |
|
| 1565 | 1615 | |
| 1566 | 1616 | echo ' |
| 1567 | 1617 | </tr>'; |
@@ -1621,8 +1671,8 @@ discard block |
||
| 1621 | 1671 | { |
| 1622 | 1672 | global $context, $txt; |
| 1623 | 1673 | |
| 1624 | - if ($context['user']['is_admin']) |
|
| 1625 | - echo ' |
|
| 1674 | + if ($context['user']['is_admin']) { |
|
| 1675 | + echo ' |
|
| 1626 | 1676 | <span class="floatright admin_search"> |
| 1627 | 1677 | <span class="generic_icons filter centericon"></span> |
| 1628 | 1678 | <input type="search" name="search_term" placeholder="', $txt['admin_search'], '"> |
@@ -1633,6 +1683,7 @@ discard block |
||
| 1633 | 1683 | </select> |
| 1634 | 1684 | <input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button"> |
| 1635 | 1685 | </span>'; |
| 1636 | -} |
|
| 1686 | + } |
|
| 1687 | + } |
|
| 1637 | 1688 | |
| 1638 | 1689 | ?> |
| 1639 | 1690 | \ No newline at end of file |
@@ -25,18 +25,20 @@ discard block |
||
| 25 | 25 | </div> |
| 26 | 26 | <div class="windowbg">'; |
| 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'] . '">'; |
@@ -79,9 +82,10 @@ discard block |
||
| 79 | 82 | echo ' |
| 80 | 83 | <li class="windowbg" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">'; |
| 81 | 84 | |
| 82 | - foreach ($board['move_links'] as $link) |
|
| 83 | - echo ' |
|
| 85 | + foreach ($board['move_links'] as $link) { |
|
| 86 | + echo ' |
|
| 84 | 87 | <a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="generic_icons select_', $link['class'], '" title="', $link['label'], '"></span></a>'; |
| 88 | + } |
|
| 85 | 89 | |
| 86 | 90 | echo ' |
| 87 | 91 | </li>'; |
@@ -130,9 +134,10 @@ discard block |
||
| 130 | 134 | <select name="cat_order">'; |
| 131 | 135 | |
| 132 | 136 | // Print every existing category into a select box. |
| 133 | - foreach ($context['category_order'] as $order) |
|
| 134 | - echo ' |
|
| 137 | + foreach ($context['category_order'] as $order) { |
|
| 138 | + echo ' |
|
| 135 | 139 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
| 140 | + } |
|
| 136 | 141 | echo ' |
| 137 | 142 | </select> |
| 138 | 143 | </dd>'; |
@@ -167,14 +172,15 @@ discard block |
||
| 167 | 172 | { |
| 168 | 173 | foreach ($context['custom_category_settings'] as $catset_id => $catset) |
| 169 | 174 | { |
| 170 | - if (!empty($catset['dt']) && !empty($catset['dd'])) |
|
| 171 | - echo ' |
|
| 175 | + if (!empty($catset['dt']) && !empty($catset['dd'])) { |
|
| 176 | + echo ' |
|
| 172 | 177 | <dt class="clear', !is_numeric($catset_id) ? ' catset_' . $catset_id : '', '"> |
| 173 | 178 | ', $catset['dt'], ' |
| 174 | 179 | </dt> |
| 175 | 180 | <dd', !is_numeric($catset_id) ? ' class="catset_' . $catset_id . '"' : '', '> |
| 176 | 181 | ', $catset['dd'], ' |
| 177 | 182 | </dd>'; |
| 183 | + } |
|
| 178 | 184 | } |
| 179 | 185 | } |
| 180 | 186 | |
@@ -182,21 +188,23 @@ discard block |
||
| 182 | 188 | echo ' |
| 183 | 189 | </dl>'; |
| 184 | 190 | |
| 185 | - if (isset($context['category']['is_new'])) |
|
| 186 | - echo ' |
|
| 191 | + if (isset($context['category']['is_new'])) { |
|
| 192 | + echo ' |
|
| 187 | 193 | <input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button">'; |
| 188 | - else |
|
| 189 | - echo ' |
|
| 194 | + } else { |
|
| 195 | + echo ' |
|
| 190 | 196 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button"> |
| 191 | 197 | <input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button you_sure">'; |
| 198 | + } |
|
| 192 | 199 | echo ' |
| 193 | 200 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 194 | 201 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
| 195 | 202 | |
| 196 | 203 | // If this category is empty we don't bother with the next confirmation screen. |
| 197 | - if ($context['category']['is_empty']) |
|
| 198 | - echo ' |
|
| 204 | + if ($context['category']['is_empty']) { |
|
| 205 | + echo ' |
|
| 199 | 206 | <input type="hidden" name="empty" value="1">'; |
| 207 | + } |
|
| 200 | 208 | |
| 201 | 209 | echo ' |
| 202 | 210 | </div><!-- .windowbg --> |
@@ -223,9 +231,10 @@ discard block |
||
| 223 | 231 | <p>', $txt['mboards_delete_cat_contains'], ':</p> |
| 224 | 232 | <ul>'; |
| 225 | 233 | |
| 226 | - foreach ($context['category']['children'] as $child) |
|
| 227 | - echo ' |
|
| 234 | + foreach ($context['category']['children'] as $child) { |
|
| 235 | + echo ' |
|
| 228 | 236 | <li>', $child, '</li>'; |
| 237 | + } |
|
| 229 | 238 | |
| 230 | 239 | echo ' |
| 231 | 240 | </ul> |
@@ -239,10 +248,11 @@ discard block |
||
| 239 | 248 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1"', count($context['category_order']) == 1 ? ' disabled' : '', '>', $txt['mboards_delete_option2'], '</label>: |
| 240 | 249 | <select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>'; |
| 241 | 250 | |
| 242 | - foreach ($context['category_order'] as $cat) |
|
| 243 | - if ($cat['id'] != 0) |
|
| 251 | + foreach ($context['category_order'] as $cat) { |
|
| 252 | + if ($cat['id'] != 0) |
|
| 244 | 253 | echo ' |
| 245 | 254 | <option value="', $cat['id'], '">', $cat['true_name'], '</option>'; |
| 255 | + } |
|
| 246 | 256 | |
| 247 | 257 | echo ' |
| 248 | 258 | </select> |
@@ -285,9 +295,10 @@ discard block |
||
| 285 | 295 | <dd> |
| 286 | 296 | <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 == \'\';}">'; |
| 287 | 297 | |
| 288 | - foreach ($context['categories'] as $category) |
|
| 289 | - echo ' |
|
| 298 | + foreach ($context['categories'] as $category) { |
|
| 299 | + echo ' |
|
| 290 | 300 | <option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>'; |
| 301 | + } |
|
| 291 | 302 | echo ' |
| 292 | 303 | </select> |
| 293 | 304 | </dd>'; |
@@ -315,9 +326,10 @@ discard block |
||
| 315 | 326 | <select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '> |
| 316 | 327 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : ''; |
| 317 | 328 | |
| 318 | - foreach ($context['board_order'] as $order) |
|
| 319 | - echo ' |
|
| 329 | + foreach ($context['board_order'] as $order) { |
|
| 330 | + echo ' |
|
| 320 | 331 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
| 332 | + } |
|
| 321 | 333 | echo ' |
| 322 | 334 | </select> |
| 323 | 335 | </dd>'; |
@@ -346,13 +358,15 @@ discard block |
||
| 346 | 358 | <dd> |
| 347 | 359 | <select name="profile">'; |
| 348 | 360 | |
| 349 | - if (isset($context['board']['is_new'])) |
|
| 350 | - echo ' |
|
| 361 | + if (isset($context['board']['is_new'])) { |
|
| 362 | + echo ' |
|
| 351 | 363 | <option value="-1">[', $txt['permission_profile_inherit'], ']</option>'; |
| 364 | + } |
|
| 352 | 365 | |
| 353 | - foreach ($context['profiles'] as $id => $profile) |
|
| 354 | - echo ' |
|
| 366 | + foreach ($context['profiles'] as $id => $profile) { |
|
| 367 | + echo ' |
|
| 355 | 368 | <option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
| 369 | + } |
|
| 356 | 370 | |
| 357 | 371 | echo ' |
| 358 | 372 | </select> |
@@ -365,8 +379,8 @@ discard block |
||
| 365 | 379 | </dt> |
| 366 | 380 | <dd>'; |
| 367 | 381 | |
| 368 | - if (!empty($modSettings['deny_boards_access'])) |
|
| 369 | - echo ' |
|
| 382 | + if (!empty($modSettings['deny_boards_access'])) { |
|
| 383 | + echo ' |
|
| 370 | 384 | <table> |
| 371 | 385 | <tr> |
| 372 | 386 | <td></td> |
@@ -374,10 +388,11 @@ discard block |
||
| 374 | 388 | <th>', $txt['permissions_option_off'], '</th> |
| 375 | 389 | <th>', $txt['permissions_option_deny'], '</th> |
| 376 | 390 | </tr>'; |
| 391 | + } |
|
| 377 | 392 | |
| 378 | 393 | // List all the membergroups so the user can choose who may access this board. |
| 379 | - foreach ($context['groups'] as $group) |
|
| 380 | - if (empty($modSettings['deny_boards_access'])) |
|
| 394 | + foreach ($context['groups'] as $group) { |
|
| 395 | + if (empty($modSettings['deny_boards_access'])) |
|
| 381 | 396 | echo ' |
| 382 | 397 | <label for="groups_', $group['id'], '"> |
| 383 | 398 | <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' : ''), '> |
@@ -385,8 +400,9 @@ discard block |
||
| 385 | 400 | ', $group['name'], ' |
| 386 | 401 | </span> |
| 387 | 402 | </label><br>'; |
| 388 | - else |
|
| 389 | - echo ' |
|
| 403 | + } |
|
| 404 | + else { |
|
| 405 | + echo ' |
|
| 390 | 406 | <tr> |
| 391 | 407 | <td> |
| 392 | 408 | <label for="groups_', $group['id'], '_a"> |
@@ -406,16 +422,17 @@ discard block |
||
| 406 | 422 | </td> |
| 407 | 423 | <td></td> |
| 408 | 424 | </tr>'; |
| 425 | + } |
|
| 409 | 426 | |
| 410 | - if (empty($modSettings['deny_boards_access'])) |
|
| 411 | - echo ' |
|
| 427 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 428 | + echo ' |
|
| 412 | 429 | <span class="select_all_box"> |
| 413 | 430 | <em>', $txt['check_all'], '</em> <input type="checkbox" onclick="invertAll(this, this.form, \'groups[\');"> |
| 414 | 431 | </span> |
| 415 | 432 | <br><br> |
| 416 | 433 | </dd>'; |
| 417 | - else |
|
| 418 | - echo ' |
|
| 434 | + } else { |
|
| 435 | + echo ' |
|
| 419 | 436 | <tr class="select_all_box"> |
| 420 | 437 | <td> |
| 421 | 438 | </td> |
@@ -434,6 +451,7 @@ discard block |
||
| 434 | 451 | </tr> |
| 435 | 452 | </table> |
| 436 | 453 | </dd>'; |
| 454 | + } |
|
| 437 | 455 | |
| 438 | 456 | // Options to choose moderators, specify as announcement board and choose whether to count posts here. |
| 439 | 457 | echo ' |
@@ -488,8 +506,8 @@ discard block |
||
| 488 | 506 | </dl> |
| 489 | 507 | </div>'; |
| 490 | 508 | |
| 491 | - if ($context['board']['redirect']) |
|
| 492 | - echo ' |
|
| 509 | + if ($context['board']['redirect']) { |
|
| 510 | + echo ' |
|
| 493 | 511 | <div id="reset_redirect_div"> |
| 494 | 512 | <dl class="settings"> |
| 495 | 513 | <dt> |
@@ -502,6 +520,7 @@ discard block |
||
| 502 | 520 | </dd> |
| 503 | 521 | </dl> |
| 504 | 522 | </div>'; |
| 523 | + } |
|
| 505 | 524 | } |
| 506 | 525 | |
| 507 | 526 | echo ' |
@@ -529,9 +548,10 @@ discard block |
||
| 529 | 548 | <select name="boardtheme" id="boardtheme" onchange="refreshOptions();"> |
| 530 | 549 | <option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>'; |
| 531 | 550 | |
| 532 | - foreach ($context['themes'] as $theme) |
|
| 533 | - echo ' |
|
| 551 | + foreach ($context['themes'] as $theme) { |
|
| 552 | + echo ' |
|
| 534 | 553 | <option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
| 554 | + } |
|
| 535 | 555 | |
| 536 | 556 | echo ' |
| 537 | 557 | </select> |
@@ -560,14 +580,15 @@ discard block |
||
| 560 | 580 | |
| 561 | 581 | foreach ($context['custom_board_settings'] as $cbs_id => $cbs) |
| 562 | 582 | { |
| 563 | - if (!empty($cbs['dt']) && !empty($cbs['dd'])) |
|
| 564 | - echo ' |
|
| 583 | + if (!empty($cbs['dt']) && !empty($cbs['dd'])) { |
|
| 584 | + echo ' |
|
| 565 | 585 | <dt class="clear', !is_numeric($cbs_id) ? ' cbs_' . $cbs_id : '', '"> |
| 566 | 586 | ', $cbs['dt'], ' |
| 567 | 587 | </dt> |
| 568 | 588 | <dd', !is_numeric($cbs_id) ? ' class="cbs_' . $cbs_id . '"' : '', '> |
| 569 | 589 | ', $cbs['dd'], ' |
| 570 | 590 | </dd>'; |
| 591 | + } |
|
| 571 | 592 | } |
| 572 | 593 | |
| 573 | 594 | echo ' |
@@ -575,9 +596,10 @@ discard block |
||
| 575 | 596 | </div>'; |
| 576 | 597 | } |
| 577 | 598 | |
| 578 | - if (!empty($context['board']['is_recycle'])) |
|
| 579 | - echo ' |
|
| 599 | + if (!empty($context['board']['is_recycle'])) { |
|
| 600 | + echo ' |
|
| 580 | 601 | <div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>'; |
| 602 | + } |
|
| 581 | 603 | |
| 582 | 604 | echo ' |
| 583 | 605 | <input type="hidden" name="rid" value="', $context['redirect_location'], '"> |
@@ -585,21 +607,24 @@ discard block |
||
| 585 | 607 | <input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">'; |
| 586 | 608 | |
| 587 | 609 | // If this board has no children don't bother with the next confirmation screen. |
| 588 | - if ($context['board']['no_children']) |
|
| 589 | - echo ' |
|
| 610 | + if ($context['board']['no_children']) { |
|
| 611 | + echo ' |
|
| 590 | 612 | <input type="hidden" name="no_children" value="1">'; |
| 613 | + } |
|
| 591 | 614 | |
| 592 | - if (isset($context['board']['is_new'])) |
|
| 593 | - echo ' |
|
| 615 | + if (isset($context['board']['is_new'])) { |
|
| 616 | + echo ' |
|
| 594 | 617 | <input type="hidden" name="cur_cat" value="', $context['board']['category'], '"> |
| 595 | 618 | <input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
| 596 | - else |
|
| 597 | - echo ' |
|
| 619 | + } else { |
|
| 620 | + echo ' |
|
| 598 | 621 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
| 622 | + } |
|
| 599 | 623 | |
| 600 | - if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) |
|
| 601 | - echo ' |
|
| 624 | + if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) { |
|
| 625 | + echo ' |
|
| 602 | 626 | <input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button you_sure">'; |
| 627 | + } |
|
| 603 | 628 | echo ' |
| 604 | 629 | </div><!-- .windowbg --> |
| 605 | 630 | </form> |
@@ -620,12 +645,13 @@ discard block |
||
| 620 | 645 | sItemListContainerId: \'moderator_container\', |
| 621 | 646 | aListItems: ['; |
| 622 | 647 | |
| 623 | - foreach ($context['board']['moderators'] as $id_member => $member_name) |
|
| 624 | - echo ' |
|
| 648 | + foreach ($context['board']['moderators'] as $id_member => $member_name) { |
|
| 649 | + echo ' |
|
| 625 | 650 | { |
| 626 | 651 | sItemId: ', JavaScriptEscape($id_member), ', |
| 627 | 652 | sItemName: ', JavaScriptEscape($member_name), ' |
| 628 | 653 | }', $id_member == $context['board']['last_moderator_id'] ? '' : ','; |
| 654 | + } |
|
| 629 | 655 | |
| 630 | 656 | echo ' |
| 631 | 657 | ] |
@@ -645,12 +671,13 @@ discard block |
||
| 645 | 671 | sItemListContainerId: \'moderator_group_container\', |
| 646 | 672 | aListItems: ['; |
| 647 | 673 | |
| 648 | - foreach ($context['board']['moderator_groups'] as $id_group => $group_name) |
|
| 649 | - echo ' |
|
| 674 | + foreach ($context['board']['moderator_groups'] as $id_group => $group_name) { |
|
| 675 | + echo ' |
|
| 650 | 676 | { |
| 651 | 677 | sItemId: ', JavaScriptEscape($id_group), ', |
| 652 | 678 | sItemName: ', JavaScriptEscape($group_name), ' |
| 653 | 679 | }', $id_group == $context['board']['last_moderator_group_id'] ? '' : ','; |
| 680 | + } |
|
| 654 | 681 | |
| 655 | 682 | echo ' |
| 656 | 683 | ] |
@@ -676,17 +703,19 @@ discard block |
||
| 676 | 703 | echo ' |
| 677 | 704 | document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";'; |
| 678 | 705 | |
| 679 | - if ($context['board']['redirect']) |
|
| 680 | - echo ' |
|
| 706 | + if ($context['board']['redirect']) { |
|
| 707 | + echo ' |
|
| 681 | 708 | document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";'; |
| 709 | + } |
|
| 682 | 710 | } |
| 683 | 711 | |
| 684 | 712 | // Include any JavaScript added by mods using the 'integrate_edit_board' hook. |
| 685 | 713 | if (!empty($context['custom_refreshOptions']) && is_array($context['custom_refreshOptions'])) |
| 686 | 714 | { |
| 687 | - foreach ($context['custom_refreshOptions'] as $refreshOption) |
|
| 688 | - echo ' |
|
| 715 | + foreach ($context['custom_refreshOptions'] as $refreshOption) { |
|
| 716 | + echo ' |
|
| 689 | 717 | ', $refreshOption; |
| 718 | + } |
|
| 690 | 719 | } |
| 691 | 720 | |
| 692 | 721 | echo ' |
@@ -715,9 +744,10 @@ discard block |
||
| 715 | 744 | <p>', $txt['mboards_delete_board_contains'], '</p> |
| 716 | 745 | <ul>'; |
| 717 | 746 | |
| 718 | - foreach ($context['children'] as $child) |
|
| 719 | - echo ' |
|
| 747 | + foreach ($context['children'] as $child) { |
|
| 748 | + echo ' |
|
| 720 | 749 | <li>', $child['node']['name'], '</li>'; |
| 750 | + } |
|
| 721 | 751 | |
| 722 | 752 | echo ' |
| 723 | 753 | </ul> |
@@ -731,10 +761,11 @@ discard block |
||
| 731 | 761 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1"', empty($context['can_move_children']) ? ' disabled' : '', '>', $txt['mboards_delete_board_option2'], '</label>: |
| 732 | 762 | <select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>'; |
| 733 | 763 | |
| 734 | - foreach ($context['board_order'] as $board) |
|
| 735 | - if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
| 764 | + foreach ($context['board_order'] as $board) { |
|
| 765 | + if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
| 736 | 766 | echo ' |
| 737 | 767 | <option value="', $board['id'], '">', $board['name'], '</option>'; |
| 768 | + } |
|
| 738 | 769 | |
| 739 | 770 | echo ' |
| 740 | 771 | </select> |
@@ -28,14 +28,15 @@ discard block |
||
| 28 | 28 | <div id="confirm_buttons">'; |
| 29 | 29 | |
| 30 | 30 | // Age restriction in effect? |
| 31 | - if ($context['show_coppa']) |
|
| 32 | - echo ' |
|
| 31 | + if ($context['show_coppa']) { |
|
| 32 | + echo ' |
|
| 33 | 33 | <input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button"><br> |
| 34 | 34 | <br> |
| 35 | 35 | <input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button">'; |
| 36 | - else |
|
| 37 | - echo ' |
|
| 36 | + } else { |
|
| 37 | + echo ' |
|
| 38 | 38 | <input type="submit" name="accept_agreement" value="', $txt['agreement_agree'], '" class="button">'; |
| 39 | + } |
|
| 39 | 40 | |
| 40 | 41 | echo ' |
| 41 | 42 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -78,9 +79,10 @@ discard block |
||
| 78 | 79 | <ul>'; |
| 79 | 80 | |
| 80 | 81 | // Cycle through each error and display an error message. |
| 81 | - foreach ($context['registration_errors'] as $error) |
|
| 82 | - echo ' |
|
| 82 | + foreach ($context['registration_errors'] as $error) { |
|
| 83 | + echo ' |
|
| 83 | 84 | <li>', $error, '</li>'; |
| 85 | + } |
|
| 84 | 86 | |
| 85 | 87 | echo ' |
| 86 | 88 | </ul> |
@@ -149,14 +151,15 @@ discard block |
||
| 149 | 151 | echo ' |
| 150 | 152 | <dl class="register_form">'; |
| 151 | 153 | |
| 152 | - foreach ($context['custom_fields'] as $field) |
|
| 153 | - if ($field['show_reg'] > 1) |
|
| 154 | + foreach ($context['custom_fields'] as $field) { |
|
| 155 | + if ($field['show_reg'] > 1) |
|
| 154 | 156 | echo ' |
| 155 | 157 | <dt> |
| 156 | 158 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong> |
| 157 | 159 | <span class="smalltext">', $field['desc'], '</span> |
| 158 | 160 | </dt> |
| 159 | 161 | <dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>'; |
| 162 | + } |
|
| 160 | 163 | |
| 161 | 164 | echo ' |
| 162 | 165 | </dl>'; |
@@ -167,14 +170,15 @@ discard block |
||
| 167 | 170 | </div><!-- .roundframe -->'; |
| 168 | 171 | |
| 169 | 172 | // If we have either of these, show the extra group. |
| 170 | - if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) |
|
| 171 | - echo ' |
|
| 173 | + if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) { |
|
| 174 | + echo ' |
|
| 172 | 175 | <div class="title_bar"> |
| 173 | 176 | <h3 class="titlebg">', $txt['additional_information'], '</h3> |
| 174 | 177 | </div> |
| 175 | 178 | <div class="roundframe noup"> |
| 176 | 179 | <fieldset> |
| 177 | 180 | <dl class="register_form" id="custom_group">'; |
| 181 | + } |
|
| 178 | 182 | |
| 179 | 183 | if (!empty($context['profile_fields'])) |
| 180 | 184 | { |
@@ -188,41 +192,45 @@ discard block |
||
| 188 | 192 | $callback_func = 'template_profile_' . $field['callback_func']; |
| 189 | 193 | $callback_func(); |
| 190 | 194 | } |
| 191 | - } |
|
| 192 | - else |
|
| 195 | + } else |
|
| 193 | 196 | { |
| 194 | 197 | echo ' |
| 195 | 198 | <dt> |
| 196 | 199 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['label'], ':</strong>'; |
| 197 | 200 | |
| 198 | 201 | // Does it have any subtext to show? |
| 199 | - if (!empty($field['subtext'])) |
|
| 200 | - echo ' |
|
| 202 | + if (!empty($field['subtext'])) { |
|
| 203 | + echo ' |
|
| 201 | 204 | <span class="smalltext">', $field['subtext'], '</span>'; |
| 205 | + } |
|
| 202 | 206 | |
| 203 | 207 | echo ' |
| 204 | 208 | </dt> |
| 205 | 209 | <dd>'; |
| 206 | 210 | |
| 207 | 211 | // Want to put something infront of the box? |
| 208 | - if (!empty($field['preinput'])) |
|
| 209 | - echo ' |
|
| 212 | + if (!empty($field['preinput'])) { |
|
| 213 | + echo ' |
|
| 210 | 214 | ', $field['preinput']; |
| 215 | + } |
|
| 211 | 216 | |
| 212 | 217 | // What type of data are we showing? |
| 213 | - if ($field['type'] == 'label') |
|
| 214 | - echo ' |
|
| 218 | + if ($field['type'] == 'label') { |
|
| 219 | + echo ' |
|
| 215 | 220 | ', $field['value']; |
| 221 | + } |
|
| 216 | 222 | |
| 217 | 223 | // Maybe it's a text box - very likely! |
| 218 | - elseif (in_array($field['type'], array('int', 'float', 'text', 'password', 'url'))) |
|
| 219 | - echo ' |
|
| 224 | + elseif (in_array($field['type'], array('int', 'float', 'text', 'password', 'url'))) { |
|
| 225 | + echo ' |
|
| 220 | 226 | <input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>'; |
| 227 | + } |
|
| 221 | 228 | |
| 222 | 229 | // You "checking" me out? ;) |
| 223 | - elseif ($field['type'] == 'check') |
|
| 224 | - echo ' |
|
| 230 | + elseif ($field['type'] == 'check') { |
|
| 231 | + echo ' |
|
| 225 | 232 | <input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>'; |
| 233 | + } |
|
| 226 | 234 | |
| 227 | 235 | // Always fun - select boxes! |
| 228 | 236 | elseif ($field['type'] == 'select') |
@@ -233,14 +241,16 @@ discard block |
||
| 233 | 241 | if (isset($field['options'])) |
| 234 | 242 | { |
| 235 | 243 | // Is this some code to generate the options? |
| 236 | - if (!is_array($field['options'])) |
|
| 237 | - $field['options'] = eval($field['options']); |
|
| 244 | + if (!is_array($field['options'])) { |
|
| 245 | + $field['options'] = eval($field['options']); |
|
| 246 | + } |
|
| 238 | 247 | |
| 239 | 248 | // Assuming we now have some! |
| 240 | - if (is_array($field['options'])) |
|
| 241 | - foreach ($field['options'] as $value => $name) |
|
| 249 | + if (is_array($field['options'])) { |
|
| 250 | + foreach ($field['options'] as $value => $name) |
|
| 242 | 251 | echo ' |
| 243 | 252 | <option', is_numeric($value) ? ' value="" disabled' : ' value="' . $value . '"', $value === $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
| 253 | + } |
|
| 244 | 254 | } |
| 245 | 255 | |
| 246 | 256 | echo ' |
@@ -248,9 +258,10 @@ discard block |
||
| 248 | 258 | } |
| 249 | 259 | |
| 250 | 260 | // Something to end with? |
| 251 | - if (!empty($field['postinput'])) |
|
| 252 | - echo ' |
|
| 261 | + if (!empty($field['postinput'])) { |
|
| 262 | + echo ' |
|
| 253 | 263 | ', $field['postinput']; |
| 264 | + } |
|
| 254 | 265 | |
| 255 | 266 | echo ' |
| 256 | 267 | </dd>'; |
@@ -261,25 +272,27 @@ discard block |
||
| 261 | 272 | // Are there any custom fields? |
| 262 | 273 | if (!empty($context['custom_fields'])) |
| 263 | 274 | { |
| 264 | - foreach ($context['custom_fields'] as $field) |
|
| 265 | - if ($field['show_reg'] < 2) |
|
| 275 | + foreach ($context['custom_fields'] as $field) { |
|
| 276 | + if ($field['show_reg'] < 2) |
|
| 266 | 277 | echo ' |
| 267 | 278 | <dt> |
| 268 | 279 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong> |
| 269 | 280 | <span class="smalltext">', $field['desc'], '</span> |
| 270 | 281 | </dt> |
| 271 | 282 | <dd>', $field['input_html'], '</dd>'; |
| 283 | + } |
|
| 272 | 284 | } |
| 273 | 285 | |
| 274 | 286 | // If we have either of these, close the list like a proper gent. |
| 275 | - if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) |
|
| 276 | - echo ' |
|
| 287 | + if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) { |
|
| 288 | + echo ' |
|
| 277 | 289 | </dl> |
| 278 | 290 | </fieldset> |
| 279 | 291 | </div><!-- .roundframe -->'; |
| 292 | + } |
|
| 280 | 293 | |
| 281 | - if ($context['visual_verification']) |
|
| 282 | - echo ' |
|
| 294 | + if ($context['visual_verification']) { |
|
| 295 | + echo ' |
|
| 283 | 296 | <div class="title_bar"> |
| 284 | 297 | <h3 class="titlebg">', $txt['verification'], '</h3> |
| 285 | 298 | </div> |
@@ -288,19 +301,21 @@ discard block |
||
| 288 | 301 | ', template_control_verification($context['visual_verification_id'], 'all'), ' |
| 289 | 302 | </fieldset> |
| 290 | 303 | </div>'; |
| 304 | + } |
|
| 291 | 305 | |
| 292 | 306 | echo ' |
| 293 | 307 | <div id="confirm_buttons" class="flow_auto">'; |
| 294 | 308 | |
| 295 | 309 | // Age restriction in effect? |
| 296 | - if (!$context['require_agreement'] && $context['show_coppa']) |
|
| 297 | - echo ' |
|
| 310 | + if (!$context['require_agreement'] && $context['show_coppa']) { |
|
| 311 | + echo ' |
|
| 298 | 312 | <input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button"><br> |
| 299 | 313 | <br> |
| 300 | 314 | <input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button">'; |
| 301 | - else |
|
| 302 | - echo ' |
|
| 315 | + } else { |
|
| 316 | + echo ' |
|
| 303 | 317 | <input type="submit" name="regSubmit" value="', $txt['register'], '" tabindex="', $context['tabindex']++, '" class="button">'; |
| 318 | + } |
|
| 304 | 319 | |
| 305 | 320 | echo ' |
| 306 | 321 | </div> |
@@ -362,25 +377,28 @@ discard block |
||
| 362 | 377 | <p>', $context['coppa']['many_options'] ? $txt['coppa_send_to_two_options'] : $txt['coppa_send_to_one_option'], '</p>'; |
| 363 | 378 | |
| 364 | 379 | // Can they send by post? |
| 365 | - if (!empty($context['coppa']['post'])) |
|
| 366 | - echo ' |
|
| 380 | + if (!empty($context['coppa']['post'])) { |
|
| 381 | + echo ' |
|
| 367 | 382 | <h4>1) ', $txt['coppa_send_by_post'], '</h4> |
| 368 | 383 | <div class="coppa_contact"> |
| 369 | 384 | ', $context['coppa']['post'], ' |
| 370 | 385 | </div>'; |
| 386 | + } |
|
| 371 | 387 | |
| 372 | 388 | // Can they send by fax?? |
| 373 | - if (!empty($context['coppa']['fax'])) |
|
| 374 | - echo ' |
|
| 389 | + if (!empty($context['coppa']['fax'])) { |
|
| 390 | + echo ' |
|
| 375 | 391 | <h4>', !empty($context['coppa']['post']) ? '2' : '1', ') ', $txt['coppa_send_by_fax'], '</h4> |
| 376 | 392 | <div class="coppa_contact"> |
| 377 | 393 | ', $context['coppa']['fax'], ' |
| 378 | 394 | </div>'; |
| 395 | + } |
|
| 379 | 396 | |
| 380 | 397 | // Offer an alternative Phone Number? |
| 381 | - if ($context['coppa']['phone']) |
|
| 382 | - echo ' |
|
| 398 | + if ($context['coppa']['phone']) { |
|
| 399 | + echo ' |
|
| 383 | 400 | <p>', $context['coppa']['phone'], '</p>'; |
| 401 | + } |
|
| 384 | 402 | |
| 385 | 403 | echo ' |
| 386 | 404 | </div><!-- #coppa -->'; |
@@ -445,19 +463,20 @@ discard block |
||
| 445 | 463 | <body style="margin: 1ex;"> |
| 446 | 464 | <div class="windowbg description" style="text-align: center;">'; |
| 447 | 465 | |
| 448 | - if (isBrowser('is_ie') || isBrowser('is_ie11')) |
|
| 449 | - echo ' |
|
| 466 | + if (isBrowser('is_ie') || isBrowser('is_ie11')) { |
|
| 467 | + echo ' |
|
| 450 | 468 | <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="audio/x-wav"> |
| 451 | 469 | <param name="AutoStart" value="1"> |
| 452 | 470 | <param name="FileName" value="', $context['verification_sound_href'], '"> |
| 453 | 471 | </object>'; |
| 454 | - else |
|
| 455 | - echo ' |
|
| 472 | + } else { |
|
| 473 | + echo ' |
|
| 456 | 474 | <audio src="', $context['verification_sound_href'], '" controls> |
| 457 | 475 | <object type="audio/x-wav" data="', $context['verification_sound_href'], '"> |
| 458 | 476 | <a href="', $context['verification_sound_href'], '" rel="nofollow">', $context['verification_sound_href'], '</a> |
| 459 | 477 | </object> |
| 460 | 478 | </audio>'; |
| 479 | + } |
|
| 461 | 480 | |
| 462 | 481 | echo ' |
| 463 | 482 | <br> |
@@ -485,11 +504,12 @@ discard block |
||
| 485 | 504 | </div> |
| 486 | 505 | <div id="register_screen" class="windowbg">'; |
| 487 | 506 | |
| 488 | - if (!empty($context['registration_done'])) |
|
| 489 | - echo ' |
|
| 507 | + if (!empty($context['registration_done'])) { |
|
| 508 | + echo ' |
|
| 490 | 509 | <div class="infobox"> |
| 491 | 510 | ', $context['registration_done'], ' |
| 492 | 511 | </div>'; |
| 512 | + } |
|
| 493 | 513 | |
| 494 | 514 | echo ' |
| 495 | 515 | <dl class="register_form" id="admin_register_form"> |
@@ -525,9 +545,10 @@ discard block |
||
| 525 | 545 | <dd> |
| 526 | 546 | <select name="group" id="group_select" tabindex="', $context['tabindex']++, '">'; |
| 527 | 547 | |
| 528 | - foreach ($context['member_groups'] as $id => $name) |
|
| 529 | - echo ' |
|
| 548 | + foreach ($context['member_groups'] as $id => $name) { |
|
| 549 | + echo ' |
|
| 530 | 550 | <option value="', $id, '">', $name, '</option>'; |
| 551 | + } |
|
| 531 | 552 | |
| 532 | 553 | echo ' |
| 533 | 554 | </select> |
@@ -535,8 +556,8 @@ discard block |
||
| 535 | 556 | } |
| 536 | 557 | |
| 537 | 558 | // If there is any field marked as required, show it here! |
| 538 | - if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) |
|
| 539 | - foreach ($context['custom_fields'] as $field) |
|
| 559 | + if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) { |
|
| 560 | + foreach ($context['custom_fields'] as $field) |
|
| 540 | 561 | if ($field['show_reg'] > 1) |
| 541 | 562 | echo ' |
| 542 | 563 | <dt> |
@@ -546,6 +567,7 @@ discard block |
||
| 546 | 567 | <dd> |
| 547 | 568 | ', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), ' |
| 548 | 569 | </dd>'; |
| 570 | + } |
|
| 549 | 571 | |
| 550 | 572 | echo ' |
| 551 | 573 | <dt> |
@@ -582,18 +604,19 @@ discard block |
||
| 582 | 604 | { |
| 583 | 605 | global $context, $scripturl, $txt; |
| 584 | 606 | |
| 585 | - if (!empty($context['saved_successful'])) |
|
| 586 | - echo ' |
|
| 607 | + if (!empty($context['saved_successful'])) { |
|
| 608 | + echo ' |
|
| 587 | 609 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 588 | - |
|
| 589 | - elseif (!empty($context['could_not_save'])) |
|
| 590 | - echo ' |
|
| 610 | + } elseif (!empty($context['could_not_save'])) { |
|
| 611 | + echo ' |
|
| 591 | 612 | <div class="errorbox">', $txt['admin_agreement_not_saved'], '</div>'; |
| 613 | + } |
|
| 592 | 614 | |
| 593 | 615 | // Warning for if the file isn't writable. |
| 594 | - if (!empty($context['warning'])) |
|
| 595 | - echo ' |
|
| 616 | + if (!empty($context['warning'])) { |
|
| 617 | + echo ' |
|
| 596 | 618 | <div class="errorbox">', $context['warning'], '</div>'; |
| 619 | + } |
|
| 597 | 620 | |
| 598 | 621 | // Just a big box to edit the text file ;) |
| 599 | 622 | echo ' |
@@ -615,9 +638,10 @@ discard block |
||
| 615 | 638 | <strong>', $txt['admin_agreement_select_language'], ':</strong> |
| 616 | 639 | <select name="agree_lang" onchange="document.getElementById(\'change_reg\').submit();" tabindex="', $context['tabindex']++, '">'; |
| 617 | 640 | |
| 618 | - foreach ($context['editable_agreements'] as $file => $name) |
|
| 619 | - echo ' |
|
| 641 | + foreach ($context['editable_agreements'] as $file => $name) { |
|
| 642 | + echo ' |
|
| 620 | 643 | <option value="', $file, '"', $context['current_agreement'] == $file ? ' selected' : '', '>', $name, '</option>'; |
| 644 | + } |
|
| 621 | 645 | |
| 622 | 646 | echo ' |
| 623 | 647 | </select> |
@@ -657,9 +681,10 @@ discard block |
||
| 657 | 681 | { |
| 658 | 682 | global $context, $scripturl, $txt; |
| 659 | 683 | |
| 660 | - if (!empty($context['saved_successful'])) |
|
| 661 | - echo ' |
|
| 684 | + if (!empty($context['saved_successful'])) { |
|
| 685 | + echo ' |
|
| 662 | 686 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 687 | + } |
|
| 663 | 688 | |
| 664 | 689 | echo ' |
| 665 | 690 | <form id="admin_form_wrapper" action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '"> |
@@ -29,9 +29,10 @@ discard block |
||
| 29 | 29 | <strong>', $txt['ban_errors_detected'], '</strong> |
| 30 | 30 | <ul>'; |
| 31 | 31 | |
| 32 | - foreach ($context['error_messages'] as $error) |
|
| 33 | - echo ' |
|
| 32 | + foreach ($context['error_messages'] as $error) { |
|
| 33 | + echo ' |
|
| 34 | 34 | <li class="error">', $error, '</li>'; |
| 35 | + } |
|
| 35 | 36 | |
| 36 | 37 | echo ' |
| 37 | 38 | </ul> |
@@ -45,9 +46,10 @@ discard block |
||
| 45 | 46 | </h3> |
| 46 | 47 | </div>'; |
| 47 | 48 | |
| 48 | - if ($context['ban']['is_new']) |
|
| 49 | - echo ' |
|
| 49 | + if ($context['ban']['is_new']) { |
|
| 50 | + echo ' |
|
| 50 | 51 | <div class="information noup">', $txt['ban_add_notes'], '</div>'; |
| 52 | + } |
|
| 51 | 53 | |
| 52 | 54 | echo ' |
| 53 | 55 | <div class="windowbg noup"> |
@@ -59,8 +61,8 @@ discard block |
||
| 59 | 61 | <input type="text" id="ban_name" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60"> |
| 60 | 62 | </dd>'; |
| 61 | 63 | |
| 62 | - if (isset($context['ban']['reason'])) |
|
| 63 | - echo ' |
|
| 64 | + if (isset($context['ban']['reason'])) { |
|
| 65 | + echo ' |
|
| 64 | 66 | <dt> |
| 65 | 67 | <strong><label for="reason">', $txt['ban_reason'], ':</label></strong><br> |
| 66 | 68 | <span class="smalltext">', $txt['ban_reason_desc'], '</span> |
@@ -68,9 +70,10 @@ discard block |
||
| 68 | 70 | <dd> |
| 69 | 71 | <textarea name="reason" id="reason" cols="40" rows="3">', $context['ban']['reason'], '</textarea> |
| 70 | 72 | </dd>'; |
| 73 | + } |
|
| 71 | 74 | |
| 72 | - if (isset($context['ban']['notes'])) |
|
| 73 | - echo ' |
|
| 75 | + if (isset($context['ban']['notes'])) { |
|
| 76 | + echo ' |
|
| 74 | 77 | <dt> |
| 75 | 78 | <strong><label for="ban_notes">', $txt['ban_notes'], ':</label></strong><br> |
| 76 | 79 | <span class="smalltext">', $txt['ban_notes_desc'], '</span> |
@@ -78,6 +81,7 @@ discard block |
||
| 78 | 81 | <dd> |
| 79 | 82 | <textarea name="notes" id="ban_notes" cols="40" rows="3">', $context['ban']['notes'], '</textarea> |
| 80 | 83 | </dd>'; |
| 84 | + } |
|
| 81 | 85 | |
| 82 | 86 | echo ' |
| 83 | 87 | </dl> |
@@ -117,8 +121,8 @@ discard block |
||
| 117 | 121 | <input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
| 118 | 122 | </dd>'; |
| 119 | 123 | |
| 120 | - if (empty($modSettings['disableHostnameLookup'])) |
|
| 121 | - echo ' |
|
| 124 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
| 125 | + echo ' |
|
| 122 | 126 | <dt> |
| 123 | 127 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', !empty($context['ban_suggestions']['hostname']) ? ' checked' : '', '> |
| 124 | 128 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -126,6 +130,7 @@ discard block |
||
| 126 | 130 | <dd> |
| 127 | 131 | <input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
| 128 | 132 | </dd>'; |
| 133 | + } |
|
| 129 | 134 | |
| 130 | 135 | echo ' |
| 131 | 136 | <dt> |
@@ -155,14 +160,15 @@ discard block |
||
| 155 | 160 | <dl class="settings">'; |
| 156 | 161 | |
| 157 | 162 | $count = 0; |
| 158 | - foreach ($ban_ips as $ip) |
|
| 159 | - echo ' |
|
| 163 | + foreach ($ban_ips as $ip) { |
|
| 164 | + echo ' |
|
| 160 | 165 | <dt> |
| 161 | 166 | <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, '"> |
| 162 | 167 | </dt> |
| 163 | 168 | <dd> |
| 164 | 169 | <label for="suggestions_', $key, '_', $count++, '">', $ip, '</label> |
| 165 | 170 | </dd>'; |
| 171 | + } |
|
| 166 | 172 | |
| 167 | 173 | echo ' |
| 168 | 174 | </dl>'; |
@@ -204,8 +210,8 @@ discard block |
||
| 204 | 210 | addLoadEvent(fUpdateStatus);'; |
| 205 | 211 | |
| 206 | 212 | // Auto suggest only needed for adding new bans, not editing |
| 207 | - if ($context['ban']['is_new'] && empty($_REQUEST['u'])) |
|
| 208 | - echo ' |
|
| 213 | + if ($context['ban']['is_new'] && empty($_REQUEST['u'])) { |
|
| 214 | + echo ' |
|
| 209 | 215 | var oAddMemberSuggest = new smc_AutoSuggest({ |
| 210 | 216 | sSelf: \'oAddMemberSuggest\', |
| 211 | 217 | sSessionId: smf_session_id, |
@@ -223,6 +229,7 @@ discard block |
||
| 223 | 229 | return true; |
| 224 | 230 | } |
| 225 | 231 | oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\');'; |
| 232 | + } |
|
| 226 | 233 | |
| 227 | 234 | echo ' |
| 228 | 235 | function confirmBan(aForm) |
@@ -271,8 +278,8 @@ discard block |
||
| 271 | 278 | <input type="text" name="main_ip" value="', $context['ban_trigger']['ip']['value'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
| 272 | 279 | </dd>'; |
| 273 | 280 | |
| 274 | - if (empty($modSettings['disableHostnameLookup'])) |
|
| 275 | - echo ' |
|
| 281 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
| 282 | + echo ' |
|
| 276 | 283 | <dt> |
| 277 | 284 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', $context['ban_trigger']['hostname']['selected'] ? ' checked' : '', '> |
| 278 | 285 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -280,6 +287,7 @@ discard block |
||
| 280 | 287 | <dd> |
| 281 | 288 | <input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
| 282 | 289 | </dd>'; |
| 290 | + } |
|
| 283 | 291 | |
| 284 | 292 | echo ' |
| 285 | 293 | <dt> |
@@ -28,15 +28,17 @@ discard block |
||
| 28 | 28 | <form class="login" action="', $context['login_url'], '" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '">'; |
| 29 | 29 | |
| 30 | 30 | // Did they make a mistake last time? |
| 31 | - if (!empty($context['login_errors'])) |
|
| 32 | - echo ' |
|
| 31 | + if (!empty($context['login_errors'])) { |
|
| 32 | + echo ' |
|
| 33 | 33 | <div class="errorbox">', implode('<br>', $context['login_errors']), '</div> |
| 34 | 34 | <br>'; |
| 35 | + } |
|
| 35 | 36 | |
| 36 | 37 | // Or perhaps there's some special description for this time? |
| 37 | - if (isset($context['description'])) |
|
| 38 | - echo ' |
|
| 38 | + if (isset($context['description'])) { |
|
| 39 | + echo ' |
|
| 39 | 40 | <div class="information">', $context['description'], '</div>'; |
| 41 | + } |
|
| 40 | 42 | |
| 41 | 43 | // Now just get the basic information - username, password, etc. |
| 42 | 44 | echo ' |
@@ -61,10 +63,11 @@ discard block |
||
| 61 | 63 | </dd>'; |
| 62 | 64 | |
| 63 | 65 | // If they have deleted their account, give them a chance to change their mind. |
| 64 | - if (isset($context['login_show_undelete'])) |
|
| 65 | - echo ' |
|
| 66 | + if (isset($context['login_show_undelete'])) { |
|
| 67 | + echo ' |
|
| 66 | 68 | <dt class="alert">', $txt['undelete_account'], ':</dt> |
| 67 | 69 | <dd><input type="checkbox" name="undelete"></dd>'; |
| 70 | + } |
|
| 68 | 71 | |
| 69 | 72 | echo ' |
| 70 | 73 | </dl> |
@@ -82,8 +85,8 @@ discard block |
||
| 82 | 85 | document.getElementById("', !empty($context['from_ajax']) ? 'ajax_' : '', isset($context['default_username']) && $context['default_username'] != '' ? 'loginpass' : 'loginuser', '").focus(); |
| 83 | 86 | }, 150);'; |
| 84 | 87 | |
| 85 | - if (!empty($context['from_ajax'])) |
|
| 86 | - echo ' |
|
| 88 | + if (!empty($context['from_ajax'])) { |
|
| 89 | + echo ' |
|
| 87 | 90 | form = $("#frmLogin"); |
| 88 | 91 | form.submit(function(e) { |
| 89 | 92 | e.preventDefault(); |
@@ -116,16 +119,18 @@ discard block |
||
| 116 | 119 | |
| 117 | 120 | return false; |
| 118 | 121 | });'; |
| 122 | + } |
|
| 119 | 123 | |
| 120 | 124 | echo ' |
| 121 | 125 | </script> |
| 122 | 126 | </form>'; |
| 123 | 127 | |
| 124 | 128 | // It is a long story as to why we have this when we're clearly not going to use it. |
| 125 | - if (!empty($context['from_ajax'])) |
|
| 126 | - echo ' |
|
| 129 | + if (!empty($context['from_ajax'])) { |
|
| 130 | + echo ' |
|
| 127 | 131 | <br> |
| 128 | 132 | <a href="javascript:self.close();"></a>'; |
| 133 | + } |
|
| 129 | 134 | |
| 130 | 135 | echo ' |
| 131 | 136 | </div><!-- .roundframe --> |
@@ -148,11 +153,12 @@ discard block |
||
| 148 | 153 | </div> |
| 149 | 154 | <div class="roundframe">'; |
| 150 | 155 | |
| 151 | - if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) |
|
| 152 | - echo ' |
|
| 156 | + if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) { |
|
| 157 | + echo ' |
|
| 153 | 158 | <div class="error"> |
| 154 | 159 | ', $txt['tfa_' . (!empty($context['tfa_error']) ? 'code_' : 'backup_') . 'invalid'], ' |
| 155 | 160 | </div>'; |
| 161 | + } |
|
| 156 | 162 | |
| 157 | 163 | echo ' |
| 158 | 164 | <form action="', $context['tfa_url'], '" method="post" id="frmTfa"> |
@@ -180,8 +186,8 @@ discard block |
||
| 180 | 186 | <script> |
| 181 | 187 | form = $("#frmTfa");'; |
| 182 | 188 | |
| 183 | - if (!empty($context['from_ajax'])) |
|
| 184 | - echo ' |
|
| 189 | + if (!empty($context['from_ajax'])) { |
|
| 190 | + echo ' |
|
| 185 | 191 | form.submit(function(e) { |
| 186 | 192 | // If we are submitting backup code, let normal workflow follow since it redirects a couple times into a different page |
| 187 | 193 | if (form.find("input[name=tfa_backup]:first").val().length > 0) |
@@ -200,6 +206,7 @@ discard block |
||
| 200 | 206 | |
| 201 | 207 | return false; |
| 202 | 208 | });'; |
| 209 | + } |
|
| 203 | 210 | |
| 204 | 211 | echo ' |
| 205 | 212 | form.find("input[name=backup]").click(function(e) { |
@@ -231,10 +238,11 @@ discard block |
||
| 231 | 238 | <p class="information centertext"> |
| 232 | 239 | ', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br>'; |
| 233 | 240 | |
| 234 | - if ($context['can_register']) |
|
| 235 | - echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
| 236 | - else |
|
| 237 | - echo $txt['login_below']; |
|
| 241 | + if ($context['can_register']) { |
|
| 242 | + echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
| 243 | + } else { |
|
| 244 | + echo $txt['login_below']; |
|
| 245 | + } |
|
| 238 | 246 | |
| 239 | 247 | // And now the login information. |
| 240 | 248 | echo ' |
@@ -334,9 +342,10 @@ discard block |
||
| 334 | 342 | </div> |
| 335 | 343 | <div class="roundframe centertext">'; |
| 336 | 344 | |
| 337 | - if (!empty($context['incorrect_password'])) |
|
| 338 | - echo ' |
|
| 345 | + if (!empty($context['incorrect_password'])) { |
|
| 346 | + echo ' |
|
| 339 | 347 | <div class="error">', $txt['admin_incorrect_password'], '</div>'; |
| 348 | + } |
|
| 340 | 349 | |
| 341 | 350 | echo ' |
| 342 | 351 | <strong>', $txt['password'], ':</strong> |
@@ -377,10 +386,11 @@ discard block |
||
| 377 | 386 | <dl>'; |
| 378 | 387 | |
| 379 | 388 | // You didn't even have an ID? |
| 380 | - if (empty($context['member_id'])) |
|
| 381 | - echo ' |
|
| 389 | + if (empty($context['member_id'])) { |
|
| 390 | + echo ' |
|
| 382 | 391 | <dt>', $txt['invalid_activation_username'], ':</dt> |
| 383 | 392 | <dd><input type="text" name="user" size="30"></dd>'; |
| 393 | + } |
|
| 384 | 394 | |
| 385 | 395 | echo ' |
| 386 | 396 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
@@ -417,13 +427,14 @@ discard block |
||
| 417 | 427 | <dd><input type="password" name="passwd" size="30"></dd> |
| 418 | 428 | </dl>'; |
| 419 | 429 | |
| 420 | - if ($context['can_activate']) |
|
| 421 | - echo ' |
|
| 430 | + if ($context['can_activate']) { |
|
| 431 | + echo ' |
|
| 422 | 432 | <p>', $txt['invalid_activation_known'], '</p> |
| 423 | 433 | <dl> |
| 424 | 434 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
| 425 | 435 | <dd><input type="text" name="code" size="30"></dd> |
| 426 | 436 | </dl>'; |
| 437 | + } |
|
| 427 | 438 | |
| 428 | 439 | echo ' |
| 429 | 440 | <p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button"></p> |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | <div class="windowbg"> |
| 128 | 128 | <dl class="settings">'; |
| 129 | 129 | |
| 130 | - if (!empty($context['table_info'])) |
|
| 131 | - echo ' |
|
| 130 | + if (!empty($context['table_info'])) { |
|
| 131 | + echo ' |
|
| 132 | 132 | <dt> |
| 133 | 133 | <strong>', $txt['search_method_messages_table_space'], ':</strong> |
| 134 | 134 | </dt> |
@@ -141,6 +141,7 @@ discard block |
||
| 141 | 141 | <dd> |
| 142 | 142 | ', $context['table_info']['index_length'], ' |
| 143 | 143 | </dd>'; |
| 144 | + } |
|
| 144 | 145 | echo ' |
| 145 | 146 | </dl> |
| 146 | 147 | ', $context['double_index'] ? '<div class="noticebox"> |
@@ -163,17 +164,17 @@ discard block |
||
| 163 | 164 | <dd> |
| 164 | 165 | <span class="smalltext">'; |
| 165 | 166 | |
| 166 | - if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) |
|
| 167 | - echo ' |
|
| 167 | + if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) { |
|
| 168 | + echo ' |
|
| 168 | 169 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_create'], '</a>]'; |
| 169 | - |
|
| 170 | - elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) |
|
| 171 | - echo ' |
|
| 170 | + } elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) { |
|
| 171 | + echo ' |
|
| 172 | 172 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create']; |
| 173 | - else |
|
| 174 | - echo ' |
|
| 173 | + } else { |
|
| 174 | + echo ' |
|
| 175 | 175 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_remove'], '</a>]<br> |
| 176 | 176 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length']; |
| 177 | + } |
|
| 177 | 178 | echo ' |
| 178 | 179 | </span> |
| 179 | 180 | </dd>'; |
@@ -187,26 +188,27 @@ discard block |
||
| 187 | 188 | <dd> |
| 188 | 189 | <span class="smalltext">'; |
| 189 | 190 | |
| 190 | - if ($context['custom_index']) |
|
| 191 | - echo ' |
|
| 191 | + if ($context['custom_index']) { |
|
| 192 | + echo ' |
|
| 192 | 193 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>]<br> |
| 193 | 194 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
| 194 | - |
|
| 195 | - elseif ($context['partial_custom_index']) |
|
| 196 | - echo ' |
|
| 195 | + } elseif ($context['partial_custom_index']) { |
|
| 196 | + echo ' |
|
| 197 | 197 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_resume'], '</a>]<br> |
| 198 | 198 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
| 199 | - else |
|
| 200 | - echo ' |
|
| 199 | + } else { |
|
| 200 | + echo ' |
|
| 201 | 201 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>]'; |
| 202 | + } |
|
| 202 | 203 | echo ' |
| 203 | 204 | </span> |
| 204 | 205 | </dd>'; |
| 205 | 206 | |
| 206 | 207 | foreach ($context['search_apis'] as $api) |
| 207 | 208 | { |
| 208 | - if (empty($api['label']) || $api['has_template']) |
|
| 209 | - continue; |
|
| 209 | + if (empty($api['label']) || $api['has_template']) { |
|
| 210 | + continue; |
|
| 211 | + } |
|
| 210 | 212 | |
| 211 | 213 | echo ' |
| 212 | 214 | <dt> |
@@ -214,11 +216,12 @@ discard block |
||
| 214 | 216 | ', $api['label'], ' |
| 215 | 217 | </dt>'; |
| 216 | 218 | |
| 217 | - if ($api['desc']) |
|
| 218 | - echo ' |
|
| 219 | + if ($api['desc']) { |
|
| 220 | + echo ' |
|
| 219 | 221 | <dd> |
| 220 | 222 | <span class="smalltext">', $api['desc'], '</span> |
| 221 | 223 | </dd>'; |
| 224 | + } |
|
| 222 | 225 | } |
| 223 | 226 | |
| 224 | 227 | echo ' |
@@ -23,15 +23,15 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | global $context, $txt; |
| 25 | 25 | |
| 26 | - if (!empty($context['simple_action'])) |
|
| 27 | - echo ' |
|
| 26 | + if (!empty($context['simple_action'])) { |
|
| 27 | + echo ' |
|
| 28 | 28 | <strong> |
| 29 | 29 | ', $context['error_title'], ' |
| 30 | 30 | </strong><br> |
| 31 | 31 | <div ', $context['error_code'], 'class="padding"> |
| 32 | 32 | ', $context['error_message'], ' |
| 33 | 33 | </div>'; |
| 34 | - else |
|
| 34 | + } else |
|
| 35 | 35 | { |
| 36 | 36 | echo ' |
| 37 | 37 | <div id="fatal_error"> |
@@ -85,21 +85,23 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $error_types = array(); |
| 87 | 87 | |
| 88 | - foreach ($context['error_types'] as $type => $details) |
|
| 89 | - $error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>'; |
|
| 88 | + foreach ($context['error_types'] as $type => $details) { |
|
| 89 | + $error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>'; |
|
| 90 | + } |
|
| 90 | 91 | |
| 91 | 92 | echo ' |
| 92 | 93 | ', implode(' | ', $error_types), ' |
| 93 | 94 | </td> |
| 94 | 95 | </tr>'; |
| 95 | 96 | |
| 96 | - if ($context['has_filter']) |
|
| 97 | - echo ' |
|
| 97 | + if ($context['has_filter']) { |
|
| 98 | + echo ' |
|
| 98 | 99 | <tr> |
| 99 | 100 | <td colspan="3" class="windowbg"> |
| 100 | 101 | <strong>', $txt['applying_filter'], ':</strong> ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' [<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', '">', $txt['clear_filter'], '</a>] |
| 101 | 102 | </td> |
| 102 | 103 | </tr>'; |
| 104 | + } |
|
| 103 | 105 | |
| 104 | 106 | echo ' |
| 105 | 107 | <tr> |
@@ -110,11 +112,12 @@ discard block |
||
| 110 | 112 | </tr>'; |
| 111 | 113 | |
| 112 | 114 | // No errors, then show a message |
| 113 | - if (count($context['errors']) == 0) |
|
| 114 | - echo ' |
|
| 115 | + if (count($context['errors']) == 0) { |
|
| 116 | + echo ' |
|
| 115 | 117 | <tr class="windowbg"> |
| 116 | 118 | <td class="centertext" colspan="2">', $txt['errlog_no_entries'], '</td> |
| 117 | 119 | </tr>'; |
| 120 | + } |
|
| 118 | 121 | |
| 119 | 122 | // We have some errors, must be some mods installed :P |
| 120 | 123 | foreach ($context['errors'] as $error) |
@@ -128,16 +131,18 @@ discard block |
||
| 128 | 131 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? '' : ';desc', $context['has_filter'] ? $context['filter']['href'] : '', '" title="', $txt['reverse_direction'], '"><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></a> |
| 129 | 132 | ', $error['time'], '<br>'; |
| 130 | 133 | |
| 131 | - if (!empty($error['member']['ip'])) |
|
| 132 | - echo ' |
|
| 134 | + if (!empty($error['member']['ip'])) { |
|
| 135 | + echo ' |
|
| 133 | 136 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=ip;value=', $error['member']['ip'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_ip'], '"><span class="generic_icons filter centericon"></span></a> |
| 134 | 137 | <strong><a href="', $scripturl, '?action=trackip;searchip=', $error['member']['ip'], '">', $error['member']['ip'], '</a></strong>'; |
| 138 | + } |
|
| 135 | 139 | |
| 136 | - if ($error['member']['session'] != '') |
|
| 137 | - echo ' |
|
| 140 | + if ($error['member']['session'] != '') { |
|
| 141 | + echo ' |
|
| 138 | 142 | <br> |
| 139 | 143 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=session;value=', $error['member']['session'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_session'], '"><span class="generic_icons filter centericon"></span></a> |
| 140 | 144 | ', $error['member']['session'], '<br>'; |
| 145 | + } |
|
| 141 | 146 | |
| 142 | 147 | echo ' |
| 143 | 148 | </div> |
@@ -152,12 +157,13 @@ discard block |
||
| 152 | 157 | <a href="', $error['url']['html'], '">', $error['url']['html'], '</a> |
| 153 | 158 | '; |
| 154 | 159 | |
| 155 | - if (!empty($error['file'])) |
|
| 156 | - echo ' |
|
| 160 | + if (!empty($error['file'])) { |
|
| 161 | + echo ' |
|
| 157 | 162 | <div> |
| 158 | 163 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=file;value=', $error['file']['search'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_file'], '">' |
| 159 | 164 | . ' <span class="generic_icons filter"></span></a> ', $error['file']['link'], ' (', $txt['line'], ' ', $error['file']['line'], ') |
| 160 | 165 | </div>'; |
| 166 | + } |
|
| 161 | 167 | |
| 162 | 168 | echo ' |
| 163 | 169 | </div> |
@@ -186,9 +192,10 @@ discard block |
||
| 186 | 192 | </div> |
| 187 | 193 | </div>'; |
| 188 | 194 | |
| 189 | - if ($context['sort_direction'] == 'down') |
|
| 190 | - echo ' |
|
| 195 | + if ($context['sort_direction'] == 'down') { |
|
| 196 | + echo ' |
|
| 191 | 197 | <input type="hidden" name="desc" value="1">'; |
| 198 | + } |
|
| 192 | 199 | |
| 193 | 200 | echo ' |
| 194 | 201 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -249,9 +256,10 @@ discard block |
||
| 249 | 256 | $context['error_message'], ' |
| 250 | 257 | </div>'; |
| 251 | 258 | |
| 252 | - if (!empty($context['back_link'])) |
|
| 253 | - echo ' |
|
| 259 | + if (!empty($context['back_link'])) { |
|
| 260 | + echo ' |
|
| 254 | 261 | <a class="button" href="', $scripturl, $context['back_link'], '">', $txt['back'], '</a>'; |
| 262 | + } |
|
| 255 | 263 | |
| 256 | 264 | echo ' |
| 257 | 265 | <span style="float: right; margin:.5em;"></span> |
@@ -288,25 +296,30 @@ discard block |
||
| 288 | 296 | <div class="windowbg"> |
| 289 | 297 | <ul class="padding">'; |
| 290 | 298 | |
| 291 | - if (!empty($context['error_info']['error_type'])) |
|
| 292 | - echo ' |
|
| 299 | + if (!empty($context['error_info']['error_type'])) { |
|
| 300 | + echo ' |
|
| 293 | 301 | <li>', $txt['error_type'], ': ', ucfirst($context['error_info']['error_type']), '</li>'; |
| 302 | + } |
|
| 294 | 303 | |
| 295 | - if (!empty($context['error_info']['message'])) |
|
| 296 | - echo ' |
|
| 304 | + if (!empty($context['error_info']['message'])) { |
|
| 305 | + echo ' |
|
| 297 | 306 | <li>', $txt['error_message'], ': ', $context['error_info']['message'], '</li>'; |
| 307 | + } |
|
| 298 | 308 | |
| 299 | - if (!empty($context['error_info']['file'])) |
|
| 300 | - echo ' |
|
| 309 | + if (!empty($context['error_info']['file'])) { |
|
| 310 | + echo ' |
|
| 301 | 311 | <li>', $txt['error_file'], ': ', $context['error_info']['file'], '</li>'; |
| 312 | + } |
|
| 302 | 313 | |
| 303 | - if (!empty($context['error_info']['line'])) |
|
| 304 | - echo ' |
|
| 314 | + if (!empty($context['error_info']['line'])) { |
|
| 315 | + echo ' |
|
| 305 | 316 | <li>', $txt['error_line'], ': ', $context['error_info']['line'], '</li>'; |
| 317 | + } |
|
| 306 | 318 | |
| 307 | - if (!empty($context['error_info']['url'])) |
|
| 308 | - echo ' |
|
| 319 | + if (!empty($context['error_info']['url'])) { |
|
| 320 | + echo ' |
|
| 309 | 321 | <li>', $txt['error_url'], ': ', $context['error_info']['url'], '</li>'; |
| 322 | + } |
|
| 310 | 323 | |
| 311 | 324 | |
| 312 | 325 | echo ' |
@@ -328,10 +341,12 @@ discard block |
||
| 328 | 341 | foreach ($context['error_info']['backtrace'] as $key => $value) |
| 329 | 342 | { |
| 330 | 343 | //Check for existing |
| 331 | - if (property_exists($value,'file') || empty($value->file)) |
|
| 332 | - $value->file = $txt['unknown']; |
|
| 333 | - if (property_exists($value, 'line') || empty($value->line)) |
|
| 334 | - $value->line = -1; |
|
| 344 | + if (property_exists($value,'file') || empty($value->file)) { |
|
| 345 | + $value->file = $txt['unknown']; |
|
| 346 | + } |
|
| 347 | + if (property_exists($value, 'line') || empty($value->line)) { |
|
| 348 | + $value->line = -1; |
|
| 349 | + } |
|
| 335 | 350 | |
| 336 | 351 | echo ' |
| 337 | 352 | <li class="backtrace">', sprintf($txt['backtrace_info'], $key, $value->function, $value->file, $value->line, base64_encode($value->file)), '</li>'; |