@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | </div> |
| 102 | 102 | <ul id="messages_not_selected" class="split_messages smalltext">'; |
| 103 | 103 | |
| 104 | - foreach ($context['not_selected']['messages'] as $message) |
|
| 105 | - echo ' |
|
| 104 | + foreach ($context['not_selected']['messages'] as $message) { |
|
| 105 | + echo ' |
|
| 106 | 106 | <li class="windowbg" id="not_selected_', $message['id'], '"> |
| 107 | 107 | <div class="message_header"> |
| 108 | 108 | <a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><span class="generic_icons split_sel" title="->"></span></a> |
@@ -111,6 +111,7 @@ discard block |
||
| 111 | 111 | </div> |
| 112 | 112 | <div class="post">', $message['body'], '</div> |
| 113 | 113 | </li>'; |
| 114 | + } |
|
| 114 | 115 | |
| 115 | 116 | echo ' |
| 116 | 117 | <li class="dummy"> |
@@ -130,8 +131,8 @@ discard block |
||
| 130 | 131 | </div> |
| 131 | 132 | <ul id="messages_selected" class="split_messages smalltext">'; |
| 132 | 133 | |
| 133 | - if (!empty($context['selected']['messages'])) |
|
| 134 | - foreach ($context['selected']['messages'] as $message) |
|
| 134 | + if (!empty($context['selected']['messages'])) { |
|
| 135 | + foreach ($context['selected']['messages'] as $message) |
|
| 135 | 136 | echo ' |
| 136 | 137 | <li class="windowbg" id="selected_', $message['id'], '"> |
| 137 | 138 | <div class="message_header"> |
@@ -141,6 +142,7 @@ discard block |
||
| 141 | 142 | </div> |
| 142 | 143 | <div class="post">', $message['body'], '</div> |
| 143 | 144 | </li>'; |
| 145 | + } |
|
| 144 | 146 | |
| 145 | 147 | echo ' |
| 146 | 148 | <li class="dummy"> |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | <h3 class="catbg">', $context['page_title'], '</h3> |
| 47 | 47 | </div>'; |
| 48 | 48 | |
| 49 | - if (!empty($context['poll_error']['messages'])) |
|
| 50 | - echo ' |
|
| 49 | + if (!empty($context['poll_error']['messages'])) { |
|
| 50 | + echo ' |
|
| 51 | 51 | <div class="errorbox"> |
| 52 | 52 | <dl class="poll_error"> |
| 53 | 53 | <dt> |
@@ -58,6 +58,7 @@ discard block |
||
| 58 | 58 | </dt> |
| 59 | 59 | </dl> |
| 60 | 60 | </div>'; |
| 61 | + } |
|
| 61 | 62 | |
| 62 | 63 | echo ' |
| 63 | 64 | <div> |
@@ -79,8 +80,9 @@ discard block |
||
| 79 | 80 | <input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" class="input_text" size="80" maxlength="255">'; |
| 80 | 81 | |
| 81 | 82 | // Does this option have a vote count yet, or is it new? |
| 82 | - if ($choice['votes'] != -1) |
|
| 83 | - echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; |
|
| 83 | + if ($choice['votes'] != -1) { |
|
| 84 | + echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; |
|
| 85 | + } |
|
| 84 | 86 | |
| 85 | 87 | echo ' |
| 86 | 88 | </dd>'; |
@@ -118,14 +120,15 @@ discard block |
||
| 118 | 120 | <input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', ' class="input_check"> |
| 119 | 121 | </dd>'; |
| 120 | 122 | |
| 121 | - if ($context['poll']['guest_vote_allowed']) |
|
| 122 | - echo ' |
|
| 123 | + if ($context['poll']['guest_vote_allowed']) { |
|
| 124 | + echo ' |
|
| 123 | 125 | <dt> |
| 124 | 126 | <label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label> |
| 125 | 127 | </dt> |
| 126 | 128 | <dd> |
| 127 | 129 | <input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll']['guest_vote']) ? ' checked' : '', ' class="input_check"> |
| 128 | 130 | </dd>'; |
| 131 | + } |
|
| 129 | 132 | } |
| 130 | 133 | |
| 131 | 134 | echo ' |
@@ -140,12 +143,13 @@ discard block |
||
| 140 | 143 | </dl> |
| 141 | 144 | </fieldset>'; |
| 142 | 145 | // If this is an edit, we can allow them to reset the vote counts. |
| 143 | - if ($context['is_edit']) |
|
| 144 | - echo ' |
|
| 146 | + if ($context['is_edit']) { |
|
| 147 | + echo ' |
|
| 145 | 148 | <fieldset id="poll_reset"> |
| 146 | 149 | <legend>', $txt['reset_votes'], '</legend> |
| 147 | 150 | <input type="checkbox" name="resetVoteCount" value="on" class="input_check"> ' . $txt['reset_votes_check'] . ' |
| 148 | 151 | </fieldset>'; |
| 152 | + } |
|
| 149 | 153 | echo ' |
| 150 | 154 | <input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit"> |
| 151 | 155 | </div> |
@@ -145,11 +145,12 @@ discard block |
||
| 145 | 145 | <div class="question">', $txt['poll_question'], ': <strong>', $context['poll']['question'], '</strong>'; |
| 146 | 146 | |
| 147 | 147 | $options = 1; |
| 148 | - foreach ($context['poll']['options'] as $option) |
|
| 149 | - echo ' |
|
| 148 | + foreach ($context['poll']['options'] as $option) { |
|
| 149 | + echo ' |
|
| 150 | 150 | <div class="', $option['voted_this'] ? 'voted' : '', '">', $txt['option'], ' ', $options++, ': <strong>', $option['option'], '</strong> |
| 151 | 151 | ', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', ' |
| 152 | 152 | </div>'; |
| 153 | + } |
|
| 153 | 154 | |
| 154 | 155 | echo ' |
| 155 | 156 | </div>'; |
@@ -171,9 +172,10 @@ discard block |
||
| 171 | 172 | echo ' |
| 172 | 173 | <hr>'; |
| 173 | 174 | |
| 174 | - foreach ($context['printattach'][$post['id_msg']] as $attach) |
|
| 175 | - echo ' |
|
| 175 | + foreach ($context['printattach'][$post['id_msg']] as $attach) { |
|
| 176 | + echo ' |
|
| 176 | 177 | <img width="' . $attach['width'] . '" height="' . $attach['height'] . '" src="', $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attach['id_attach'] . '" alt="">'; |
| 178 | + } |
|
| 177 | 179 | } |
| 178 | 180 | |
| 179 | 181 | echo ' |
@@ -213,11 +215,12 @@ discard block |
||
| 213 | 215 | <div class="print_options">'; |
| 214 | 216 | |
| 215 | 217 | // which option is set, text or text&images |
| 216 | - if (isset($_REQUEST['images'])) |
|
| 217 | - echo ' |
|
| 218 | + if (isset($_REQUEST['images'])) { |
|
| 219 | + echo ' |
|
| 218 | 220 | <a href="', $url_text, '">', $txt['print_page_text'], '</a> | <strong><a href="', $url_images, '">', $txt['print_page_images'], '</a></strong>'; |
| 219 | - else |
|
| 220 | - echo ' |
|
| 221 | + } else { |
|
| 222 | + echo ' |
|
| 221 | 223 | <strong><a href="', $url_text, '">', $txt['print_page_text'], '</a></strong> | <a href="', $url_images, '">', $txt['print_page_images'], '</a>'; |
| 222 | -} |
|
| 224 | + } |
|
| 225 | + } |
|
| 223 | 226 | ?> |
| 224 | 227 | \ No newline at end of file |
@@ -24,11 +24,12 @@ discard block |
||
| 24 | 24 | <h3 class="catbg">', $txt['paid_' . $context['action_type'] . '_subscription'], '</h3> |
| 25 | 25 | </div>'; |
| 26 | 26 | |
| 27 | - if (!empty($context['disable_groups'])) |
|
| 28 | - echo ' |
|
| 27 | + if (!empty($context['disable_groups'])) { |
|
| 28 | + echo ' |
|
| 29 | 29 | <div class="information"> |
| 30 | 30 | <span class="alert">', $txt['paid_mod_edit_note'], '</span> |
| 31 | 31 | </div>'; |
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | echo ' |
| 34 | 35 | <div class="windowbg2"> |
@@ -68,9 +69,10 @@ discard block |
||
| 68 | 69 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
| 69 | 70 | |
| 70 | 71 | // Put each group into the box. |
| 71 | - foreach ($context['groups'] as $id => $name) |
|
| 72 | - echo ' |
|
| 72 | + foreach ($context['groups'] as $id => $name) { |
|
| 73 | + echo ' |
|
| 73 | 74 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
| 75 | + } |
|
| 74 | 76 | |
| 75 | 77 | echo ' |
| 76 | 78 | </select> |
@@ -81,9 +83,10 @@ discard block |
||
| 81 | 83 | <dd>'; |
| 82 | 84 | |
| 83 | 85 | // Put a checkbox in for each group |
| 84 | - foreach ($context['groups'] as $id => $name) |
|
| 85 | - echo ' |
|
| 86 | + foreach ($context['groups'] as $id => $name) { |
|
| 87 | + echo ' |
|
| 86 | 88 | <label for="addgroup_', $id, '"><input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', ' class="input_check"> <span class="smalltext">', $name, '</span></label><br>'; |
| 89 | + } |
|
| 87 | 90 | |
| 88 | 91 | echo ' |
| 89 | 92 | </dd> |
@@ -135,8 +138,8 @@ discard block |
||
| 135 | 138 | <fieldset>'; |
| 136 | 139 | |
| 137 | 140 | //!! Removed until implemented |
| 138 | - if (!empty($sdflsdhglsdjgs)) |
|
| 139 | - echo ' |
|
| 141 | + if (!empty($sdflsdhglsdjgs)) { |
|
| 142 | + echo ' |
|
| 140 | 143 | <dl class="settings"> |
| 141 | 144 | <dt> |
| 142 | 145 | <label for="allow_partial_check">', $txt['paid_mod_allow_partial'], '</label>:<br><span class="smalltext">', $txt['paid_mod_allow_partial_desc'], '</span> |
@@ -145,6 +148,7 @@ discard block |
||
| 145 | 148 | <input type="checkbox" name="allow_partial" id="allow_partial_check"', empty($context['sub']['allow_partial']) ? '' : ' checked', ' class="input_check"> |
| 146 | 149 | </dd> |
| 147 | 150 | </dl>'; |
| 151 | + } |
|
| 148 | 152 | |
| 149 | 153 | echo ' |
| 150 | 154 | <div class="information"> |
@@ -245,8 +249,8 @@ discard block |
||
| 245 | 249 | <dl class="settings">'; |
| 246 | 250 | |
| 247 | 251 | // Do we need a username? |
| 248 | - if ($context['action_type'] == 'add') |
|
| 249 | - echo ' |
|
| 252 | + if ($context['action_type'] == 'add') { |
|
| 253 | + echo ' |
|
| 250 | 254 | |
| 251 | 255 | <dt> |
| 252 | 256 | <strong>', $txt['paid_username'], ':</strong><br> |
@@ -255,6 +259,7 @@ discard block |
||
| 255 | 259 | <dd> |
| 256 | 260 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30" class="input_text"> |
| 257 | 261 | </dd>'; |
| 262 | + } |
|
| 258 | 263 | |
| 259 | 264 | echo ' |
| 260 | 265 | <dt> |
@@ -272,9 +277,10 @@ discard block |
||
| 272 | 277 | <select name="year" id="year" onchange="generateDays();">'; |
| 273 | 278 | |
| 274 | 279 | // Show a list of all the years we allow... |
| 275 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 276 | - echo ' |
|
| 280 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 281 | + echo ' |
|
| 277 | 282 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 283 | + } |
|
| 278 | 284 | |
| 279 | 285 | echo ' |
| 280 | 286 | </select> |
@@ -282,9 +288,10 @@ discard block |
||
| 282 | 288 | <select name="month" id="month" onchange="generateDays();">'; |
| 283 | 289 | |
| 284 | 290 | // There are 12 months per year - ensure that they all get listed. |
| 285 | - for ($month = 1; $month <= 12; $month++) |
|
| 286 | - echo ' |
|
| 291 | + for ($month = 1; $month <= 12; $month++) { |
|
| 292 | + echo ' |
|
| 287 | 293 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 294 | + } |
|
| 288 | 295 | |
| 289 | 296 | echo ' |
| 290 | 297 | </select> |
@@ -292,9 +299,10 @@ discard block |
||
| 292 | 299 | <select name="day" id="day">'; |
| 293 | 300 | |
| 294 | 301 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 295 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
| 296 | - echo ' |
|
| 302 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
| 303 | + echo ' |
|
| 297 | 304 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 305 | + } |
|
| 298 | 306 | |
| 299 | 307 | echo ' |
| 300 | 308 | </select> |
@@ -306,9 +314,10 @@ discard block |
||
| 306 | 314 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
| 307 | 315 | |
| 308 | 316 | // Show a list of all the years we allow... |
| 309 | - for ($year = 2005; $year <= 2030; $year++) |
|
| 310 | - echo ' |
|
| 317 | + for ($year = 2005; $year <= 2030; $year++) { |
|
| 318 | + echo ' |
|
| 311 | 319 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
| 320 | + } |
|
| 312 | 321 | |
| 313 | 322 | echo ' |
| 314 | 323 | </select> |
@@ -316,9 +325,10 @@ discard block |
||
| 316 | 325 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
| 317 | 326 | |
| 318 | 327 | // There are 12 months per year - ensure that they all get listed. |
| 319 | - for ($month = 1; $month <= 12; $month++) |
|
| 320 | - echo ' |
|
| 328 | + for ($month = 1; $month <= 12; $month++) { |
|
| 329 | + echo ' |
|
| 321 | 330 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
| 331 | + } |
|
| 322 | 332 | |
| 323 | 333 | echo ' |
| 324 | 334 | </select> |
@@ -326,9 +336,10 @@ discard block |
||
| 326 | 336 | <select name="dayend" id="dayend">'; |
| 327 | 337 | |
| 328 | 338 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 329 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
| 330 | - echo ' |
|
| 339 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
| 340 | + echo ' |
|
| 331 | 341 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
| 342 | + } |
|
| 332 | 343 | |
| 333 | 344 | echo ' |
| 334 | 345 | </select> |
@@ -410,8 +421,7 @@ discard block |
||
| 410 | 421 | <div class="information"> |
| 411 | 422 | ', $txt['paid_subs_none'], ' |
| 412 | 423 | </div>'; |
| 413 | - } |
|
| 414 | - else |
|
| 424 | + } else |
|
| 415 | 425 | { |
| 416 | 426 | echo ' |
| 417 | 427 | <div class="information"> |
@@ -423,8 +433,9 @@ discard block |
||
| 423 | 433 | { |
| 424 | 434 | |
| 425 | 435 | // Ignore the inactive ones... |
| 426 | - if (empty($subscription['active'])) |
|
| 427 | - continue; |
|
| 436 | + if (empty($subscription['active'])) { |
|
| 437 | + continue; |
|
| 438 | + } |
|
| 428 | 439 | |
| 429 | 440 | echo ' |
| 430 | 441 | <div class="cat_bar"> |
@@ -434,9 +445,10 @@ discard block |
||
| 434 | 445 | <p><strong>', $subscription['name'], '</strong></p> |
| 435 | 446 | <p class="smalltext">', $subscription['desc'], '</p>'; |
| 436 | 447 | |
| 437 | - if (!$subscription['flexible']) |
|
| 438 | - echo ' |
|
| 448 | + if (!$subscription['flexible']) { |
|
| 449 | + echo ' |
|
| 439 | 450 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
| 451 | + } |
|
| 440 | 452 | |
| 441 | 453 | if ($context['user']['is_owner']) |
| 442 | 454 | { |
@@ -449,24 +461,25 @@ discard block |
||
| 449 | 461 | <select name="cur[', $subscription['id'], ']">'; |
| 450 | 462 | |
| 451 | 463 | // Print out the costs for this one. |
| 452 | - foreach ($subscription['costs'] as $duration => $value) |
|
| 453 | - echo ' |
|
| 464 | + foreach ($subscription['costs'] as $duration => $value) { |
|
| 465 | + echo ' |
|
| 454 | 466 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
| 467 | + } |
|
| 455 | 468 | |
| 456 | 469 | echo ' |
| 457 | 470 | </select>'; |
| 458 | - } |
|
| 459 | - else |
|
| 460 | - echo ' |
|
| 471 | + } else { |
|
| 472 | + echo ' |
|
| 461 | 473 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
| 474 | + } |
|
| 462 | 475 | |
| 463 | 476 | echo ' |
| 464 | 477 | <hr> |
| 465 | 478 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button_submit">'; |
| 466 | - } |
|
| 467 | - else |
|
| 468 | - echo ' |
|
| 479 | + } else { |
|
| 480 | + echo ' |
|
| 469 | 481 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>'; |
| 482 | + } |
|
| 470 | 483 | |
| 471 | 484 | echo ' |
| 472 | 485 | </div>'; |
@@ -493,19 +506,20 @@ discard block |
||
| 493 | 506 | </thead> |
| 494 | 507 | <tbody>'; |
| 495 | 508 | |
| 496 | - if (empty($context['current'])) |
|
| 497 | - echo ' |
|
| 509 | + if (empty($context['current'])) { |
|
| 510 | + echo ' |
|
| 498 | 511 | <tr class="windowbg"> |
| 499 | 512 | <td colspan="4"> |
| 500 | 513 | ', $txt['paid_none_yet'], ' |
| 501 | 514 | </td> |
| 502 | 515 | </tr>'; |
| 516 | + } |
|
| 503 | 517 | |
| 504 | 518 | foreach ($context['current'] as $sub) |
| 505 | 519 | { |
| 506 | 520 | |
| 507 | - if (!$sub['hide']) |
|
| 508 | - echo ' |
|
| 521 | + if (!$sub['hide']) { |
|
| 522 | + echo ' |
|
| 509 | 523 | <tr class="windowbg"> |
| 510 | 524 | <td> |
| 511 | 525 | ', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -517,6 +531,7 @@ discard block |
||
| 517 | 531 | ', $sub['end'], ' |
| 518 | 532 | </td> |
| 519 | 533 | </tr>'; |
| 534 | + } |
|
| 520 | 535 | } |
| 521 | 536 | echo ' |
| 522 | 537 | </tbody> |
@@ -567,15 +582,17 @@ discard block |
||
| 567 | 582 | ', $gateway['desc'], '<br> |
| 568 | 583 | <form action="', $gateway['form'], '" method="post">'; |
| 569 | 584 | |
| 570 | - if (!empty($gateway['javascript'])) |
|
| 571 | - echo ' |
|
| 585 | + if (!empty($gateway['javascript'])) { |
|
| 586 | + echo ' |
|
| 572 | 587 | <script> |
| 573 | 588 | ', $gateway['javascript'], ' |
| 574 | 589 | </script>'; |
| 590 | + } |
|
| 575 | 591 | |
| 576 | - foreach ($gateway['hidden'] as $name => $value) |
|
| 577 | - echo ' |
|
| 592 | + foreach ($gateway['hidden'] as $name => $value) { |
|
| 593 | + echo ' |
|
| 578 | 594 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
| 595 | + } |
|
| 579 | 596 | |
| 580 | 597 | echo ' |
| 581 | 598 | <br><input type="submit" value="', $gateway['submit'], '" class="button_submit"> |
@@ -28,14 +28,16 @@ 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><br>'; |
| 34 | + } |
|
| 34 | 35 | |
| 35 | 36 | // Or perhaps there's some special description for this time? |
| 36 | - if (isset($context['description'])) |
|
| 37 | - echo ' |
|
| 37 | + if (isset($context['description'])) { |
|
| 38 | + echo ' |
|
| 38 | 39 | <div class="information">', $context['description'], '</div>'; |
| 40 | + } |
|
| 39 | 41 | |
| 40 | 42 | // Now just get the basic information - username, password, etc. |
| 41 | 43 | echo ' |
@@ -51,10 +53,11 @@ discard block |
||
| 51 | 53 | <dt>', $txt['always_logged_in'], ':</dt> |
| 52 | 54 | <dd><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked' : '', ' class="input_check" onclick="this.form.cookielength.disabled = this.checked;"></dd>'; |
| 53 | 55 | // If they have deleted their account, give them a chance to change their mind. |
| 54 | - if (isset($context['login_show_undelete'])) |
|
| 55 | - echo ' |
|
| 56 | + if (isset($context['login_show_undelete'])) { |
|
| 57 | + echo ' |
|
| 56 | 58 | <dt class="alert">', $txt['undelete_account'], ':</dt> |
| 57 | 59 | <dd><input type="checkbox" name="undelete" class="input_check"></dd>'; |
| 60 | + } |
|
| 58 | 61 | echo ' |
| 59 | 62 | </dl> |
| 60 | 63 | <p><input type="submit" value="', $txt['login'], '" class="button_submit"></p> |
@@ -66,8 +69,8 @@ discard block |
||
| 66 | 69 | setTimeout(function() { |
| 67 | 70 | document.getElementById("', !empty($context['from_ajax']) ? 'ajax_' : '', isset($context['default_username']) && $context['default_username'] != '' ? 'loginpass' : 'loginuser', '").focus(); |
| 68 | 71 | }, 150);'; |
| 69 | - if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) |
|
| 70 | - echo ' |
|
| 72 | + if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) { |
|
| 73 | + echo ' |
|
| 71 | 74 | form = $("#frmLogin"); |
| 72 | 75 | form.submit(function(e) { |
| 73 | 76 | e.preventDefault(); |
@@ -100,16 +103,18 @@ discard block |
||
| 100 | 103 | |
| 101 | 104 | return false; |
| 102 | 105 | });'; |
| 106 | + } |
|
| 103 | 107 | |
| 104 | 108 | echo ' |
| 105 | 109 | </script> |
| 106 | 110 | </form>'; |
| 107 | 111 | |
| 108 | 112 | // It is a long story as to why we have this when we're clearly not going to use it. |
| 109 | - if (!empty($context['from_ajax'])) |
|
| 110 | - echo ' |
|
| 113 | + if (!empty($context['from_ajax'])) { |
|
| 114 | + echo ' |
|
| 111 | 115 | <br> |
| 112 | 116 | <a href="javascript:self.close();"></a>'; |
| 117 | + } |
|
| 113 | 118 | echo ' |
| 114 | 119 | </div> |
| 115 | 120 | </div>'; |
@@ -130,9 +135,10 @@ discard block |
||
| 130 | 135 | </h3> |
| 131 | 136 | </div> |
| 132 | 137 | <div class="roundframe noup">'; |
| 133 | - if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) |
|
| 134 | - echo ' |
|
| 138 | + if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) { |
|
| 139 | + echo ' |
|
| 135 | 140 | <div class="error">', $txt['tfa_' . (!empty($context['tfa_error']) ? 'code_' : 'backup_') . 'invalid'], '</div>'; |
| 141 | + } |
|
| 136 | 142 | echo ' |
| 137 | 143 | <form action="', $context['tfa_url'], '" method="post" id="frmTfa"> |
| 138 | 144 | <div id="tfaCode"> |
@@ -155,8 +161,8 @@ discard block |
||
| 155 | 161 | </form> |
| 156 | 162 | <script> |
| 157 | 163 | form = $("#frmTfa");'; |
| 158 | - if (!empty($context['from_ajax'])) |
|
| 159 | - echo ' |
|
| 164 | + if (!empty($context['from_ajax'])) { |
|
| 165 | + echo ' |
|
| 160 | 166 | form.submit(function(e) { |
| 161 | 167 | // If we are submitting backup code, let normal workflow follow since it redirects a couple times into a different page |
| 162 | 168 | if (form.find("input[name=tfa_backup]:first").val().length > 0) |
@@ -175,6 +181,7 @@ discard block |
||
| 175 | 181 | |
| 176 | 182 | return false; |
| 177 | 183 | });'; |
| 184 | + } |
|
| 178 | 185 | echo ' |
| 179 | 186 | form.find("input[name=backup]").click(function(e) { |
| 180 | 187 | $("#tfaBackup").show(); |
@@ -206,10 +213,11 @@ discard block |
||
| 206 | 213 | ', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br>'; |
| 207 | 214 | |
| 208 | 215 | |
| 209 | - if ($context['can_register']) |
|
| 210 | - echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
| 211 | - else |
|
| 212 | - echo $txt['login_below']; |
|
| 216 | + if ($context['can_register']) { |
|
| 217 | + echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
| 218 | + } else { |
|
| 219 | + echo $txt['login_below']; |
|
| 220 | + } |
|
| 213 | 221 | |
| 214 | 222 | // And now the login information. |
| 215 | 223 | echo ' |
@@ -305,9 +313,10 @@ discard block |
||
| 305 | 313 | </div> |
| 306 | 314 | <div class="roundframe centertext noup">'; |
| 307 | 315 | |
| 308 | - if (!empty($context['incorrect_password'])) |
|
| 309 | - echo ' |
|
| 316 | + if (!empty($context['incorrect_password'])) { |
|
| 317 | + echo ' |
|
| 310 | 318 | <div class="error">', $txt['admin_incorrect_password'], '</div>'; |
| 319 | + } |
|
| 311 | 320 | |
| 312 | 321 | echo ' |
| 313 | 322 | <strong>', $txt['password'], ':</strong> |
@@ -347,11 +356,12 @@ discard block |
||
| 347 | 356 | <div class="roundframe">'; |
| 348 | 357 | |
| 349 | 358 | // You didn't even have an ID? |
| 350 | - if (empty($context['member_id'])) |
|
| 351 | - echo ' |
|
| 359 | + if (empty($context['member_id'])) { |
|
| 360 | + echo ' |
|
| 352 | 361 | <dl> |
| 353 | 362 | <dt>', $txt['invalid_activation_username'], ':</dt> |
| 354 | 363 | <dd><input type="text" name="user" size="30" class="input_text"></dd>'; |
| 364 | + } |
|
| 355 | 365 | |
| 356 | 366 | echo ' |
| 357 | 367 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
@@ -388,13 +398,14 @@ discard block |
||
| 388 | 398 | <dd><input type="password" name="passwd" size="30" class="input_password"></dd> |
| 389 | 399 | </dl>'; |
| 390 | 400 | |
| 391 | - if ($context['can_activate']) |
|
| 392 | - echo ' |
|
| 401 | + if ($context['can_activate']) { |
|
| 402 | + echo ' |
|
| 393 | 403 | <p>', $txt['invalid_activation_known'], '</p> |
| 394 | 404 | <dl> |
| 395 | 405 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
| 396 | 406 | <dd><input type="text" name="code" size="30" class="input_text"></dd> |
| 397 | 407 | </dl>'; |
| 408 | + } |
|
| 398 | 409 | |
| 399 | 410 | echo ' |
| 400 | 411 | <p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button_submit"></p> |
@@ -44,10 +44,11 @@ discard block |
||
| 44 | 44 | <dt>', $txt['users_online_today'], ':</dt> |
| 45 | 45 | <dd>', $context['online_today'], '</dd>'; |
| 46 | 46 | |
| 47 | - if (!empty($modSettings['hitStats'])) |
|
| 48 | - echo ' |
|
| 47 | + if (!empty($modSettings['hitStats'])) { |
|
| 48 | + echo ' |
|
| 49 | 49 | <dt>', $txt['num_hits'], ':</dt> |
| 50 | 50 | <dd>', $context['num_hits'], '</dd>'; |
| 51 | + } |
|
| 51 | 52 | |
| 52 | 53 | echo ' |
| 53 | 54 | </dl> |
@@ -71,17 +72,19 @@ discard block |
||
| 71 | 72 | <dt>', $txt['gender_stats'], ':</dt> |
| 72 | 73 | <dd>'; |
| 73 | 74 | |
| 74 | - foreach ($context['gender'] as $g => $n) |
|
| 75 | - echo $g, ': ', $n, '<br>'; |
|
| 75 | + foreach ($context['gender'] as $g => $n) { |
|
| 76 | + echo $g, ': ', $n, '<br>'; |
|
| 77 | + } |
|
| 76 | 78 | |
| 77 | 79 | echo ' |
| 78 | 80 | </dd>'; |
| 79 | 81 | } |
| 80 | 82 | |
| 81 | - if (!empty($modSettings['hitStats'])) |
|
| 82 | - echo ' |
|
| 83 | + if (!empty($modSettings['hitStats'])) { |
|
| 84 | + echo ' |
|
| 83 | 85 | <dt>', $txt['average_hits'], ':</dt> |
| 84 | 86 | <dd>', $context['average_hits'], '</dd>'; |
| 87 | + } |
|
| 85 | 88 | |
| 86 | 89 | echo ' |
| 87 | 90 | </dl>'; |
@@ -105,14 +108,15 @@ discard block |
||
| 105 | 108 | </dt> |
| 106 | 109 | <dd class="statsbar">'; |
| 107 | 110 | |
| 108 | - if (!empty($item['percent'])) |
|
| 109 | - echo ' |
|
| 111 | + if (!empty($item['percent'])) { |
|
| 112 | + echo ' |
|
| 110 | 113 | <div class="bar" style="width: ', $item['percent'], '%;"> |
| 111 | 114 | <span class="righttext">', $item['num'], '</span> |
| 112 | 115 | </div>'; |
| 113 | - else |
|
| 114 | - echo ' |
|
| 116 | + } else { |
|
| 117 | + echo ' |
|
| 115 | 118 | <div class="bar empty"><span class="righttext">', $item['num'], '</span></div>'; |
| 119 | + } |
|
| 116 | 120 | |
| 117 | 121 | echo ' |
| 118 | 122 | </dd>'; |
@@ -144,9 +148,10 @@ discard block |
||
| 144 | 148 | <th>', $txt['stats_new_members'], '</th> |
| 145 | 149 | <th>', $txt['most_online'], '</th>'; |
| 146 | 150 | |
| 147 | - if (!empty($modSettings['hitStats'])) |
|
| 148 | - echo ' |
|
| 151 | + if (!empty($modSettings['hitStats'])) { |
|
| 152 | + echo ' |
|
| 149 | 153 | <th>', $txt['page_views'], '</th>'; |
| 154 | + } |
|
| 150 | 155 | |
| 151 | 156 | echo ' |
| 152 | 157 | </tr> |
@@ -165,9 +170,10 @@ discard block |
||
| 165 | 170 | <th>', $year['new_members'], '</th> |
| 166 | 171 | <th>', $year['most_members_online'], '</th>'; |
| 167 | 172 | |
| 168 | - if (!empty($modSettings['hitStats'])) |
|
| 169 | - echo ' |
|
| 173 | + if (!empty($modSettings['hitStats'])) { |
|
| 174 | + echo ' |
|
| 170 | 175 | <th>', $year['hits'], '</th>'; |
| 176 | + } |
|
| 171 | 177 | |
| 172 | 178 | echo ' |
| 173 | 179 | </tr>'; |
@@ -184,9 +190,10 @@ discard block |
||
| 184 | 190 | <th>', $month['new_members'], '</th> |
| 185 | 191 | <th>', $month['most_members_online'], '</th>'; |
| 186 | 192 | |
| 187 | - if (!empty($modSettings['hitStats'])) |
|
| 188 | - echo ' |
|
| 193 | + if (!empty($modSettings['hitStats'])) { |
|
| 194 | + echo ' |
|
| 189 | 195 | <th>', $month['hits'], '</th>'; |
| 196 | + } |
|
| 190 | 197 | |
| 191 | 198 | echo ' |
| 192 | 199 | </tr>'; |
@@ -203,9 +210,10 @@ discard block |
||
| 203 | 210 | <td>', $day['new_members'], '</td> |
| 204 | 211 | <td>', $day['most_members_online'], '</td>'; |
| 205 | 212 | |
| 206 | - if (!empty($modSettings['hitStats'])) |
|
| 207 | - echo ' |
|
| 213 | + if (!empty($modSettings['hitStats'])) { |
|
| 214 | + echo ' |
|
| 208 | 215 | <td>', $day['hits'], '</td>'; |
| 216 | + } |
|
| 209 | 217 | |
| 210 | 218 | echo ' |
| 211 | 219 | </tr>'; |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | <meta charset="', $context['character_set'], '"> |
| 25 | 25 | <meta name="robots" content="noindex"> |
| 26 | 26 | <title>', $context['page_title'], '</title> |
| 27 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
| 28 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 27 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
| 28 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 29 | 29 | </head> |
| 30 | 30 | <body id="help_popup"> |
| 31 | 31 | <div class="windowbg description"> |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | <title>', $txt['find_members'], '</title> |
| 51 | 51 | <meta charset="', $context['character_set'], '"> |
| 52 | 52 | <meta name="robots" content="noindex"> |
| 53 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
| 54 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 53 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
| 54 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 55 | 55 | <script> |
| 56 | 56 | var membersAdded = []; |
| 57 | 57 | function addMember(name) |
@@ -86,9 +86,10 @@ discard block |
||
| 86 | 86 | <span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br>'; |
| 87 | 87 | |
| 88 | 88 | // Only offer to search for buddies if we have some! |
| 89 | - if (!empty($context['show_buddies'])) |
|
| 90 | - echo ' |
|
| 89 | + if (!empty($context['show_buddies'])) { |
|
| 90 | + echo ' |
|
| 91 | 91 | <span class="smalltext"><label for="buddies"><input type="checkbox" class="input_check" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked' : '', '> ', $txt['find_buddies'], '</label></span><br>'; |
| 92 | + } |
|
| 92 | 93 | |
| 93 | 94 | echo ' |
| 94 | 95 | <div class="padding righttext"> |
@@ -103,10 +104,10 @@ discard block |
||
| 103 | 104 | <h3 class="catbg">', $txt['find_results'], '</h3> |
| 104 | 105 | </div>'; |
| 105 | 106 | |
| 106 | - if (empty($context['results'])) |
|
| 107 | - echo ' |
|
| 107 | + if (empty($context['results'])) { |
|
| 108 | + echo ' |
|
| 108 | 109 | <p class="error">', $txt['find_no_results'], '</p>'; |
| 109 | - else |
|
| 110 | + } else |
|
| 110 | 111 | { |
| 111 | 112 | echo ' |
| 112 | 113 | <ul class="padding">'; |
@@ -135,11 +136,12 @@ discard block |
||
| 135 | 136 | <input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '"> |
| 136 | 137 | </form>'; |
| 137 | 138 | |
| 138 | - if (empty($context['results'])) |
|
| 139 | - echo ' |
|
| 139 | + if (empty($context['results'])) { |
|
| 140 | + echo ' |
|
| 140 | 141 | <script> |
| 141 | 142 | document.getElementById("search").focus(); |
| 142 | 143 | </script>'; |
| 144 | + } |
|
| 143 | 145 | |
| 144 | 146 | echo ' |
| 145 | 147 | </body> |
@@ -183,8 +185,8 @@ discard block |
||
| 183 | 185 | { |
| 184 | 186 | global $txt, $context, $modSettings; |
| 185 | 187 | |
| 186 | - if (!empty($modSettings['requireAgreement'])) |
|
| 187 | - echo ' |
|
| 188 | + if (!empty($modSettings['requireAgreement'])) { |
|
| 189 | + echo ' |
|
| 188 | 190 | <div class="cat_bar"> |
| 189 | 191 | <h3 class="catbg"> |
| 190 | 192 | ', $txt['terms_and_rules'], ' - ', $context['forum_name_html_safe'], ' |
@@ -193,11 +195,12 @@ discard block |
||
| 193 | 195 | <div class="roundframe"> |
| 194 | 196 | ', $context['agreement'], ' |
| 195 | 197 | </div>'; |
| 196 | - else |
|
| 197 | - echo ' |
|
| 198 | + } else { |
|
| 199 | + echo ' |
|
| 198 | 200 | <div class="noticebox"> |
| 199 | 201 | ', $txt['agreement_disabled'], ' |
| 200 | 202 | </div>'; |
| 201 | -} |
|
| 203 | + } |
|
| 204 | + } |
|
| 202 | 205 | |
| 203 | 206 | ?> |
| 204 | 207 | \ No newline at end of file |
@@ -31,9 +31,10 @@ discard block |
||
| 31 | 31 | <div class="selectbox floatright" id="upper_show">', $txt['who_show1'], ' |
| 32 | 32 | <select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
| 33 | 33 | |
| 34 | - foreach ($context['show_methods'] as $value => $label) |
|
| 35 | - echo ' |
|
| 34 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 35 | + echo ' |
|
| 36 | 36 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 37 | + } |
|
| 37 | 38 | echo ' |
| 38 | 39 | </select> |
| 39 | 40 | <noscript> |
@@ -71,9 +72,10 @@ discard block |
||
| 71 | 72 | ', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', ' |
| 72 | 73 | </span>'; |
| 73 | 74 | |
| 74 | - if (!empty($member['ip'])) |
|
| 75 | - echo ' |
|
| 75 | + if (!empty($member['ip'])) { |
|
| 76 | + echo ' |
|
| 76 | 77 | (<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)'; |
| 78 | + } |
|
| 77 | 79 | |
| 78 | 80 | echo ' |
| 79 | 81 | </td> |
@@ -103,9 +105,10 @@ discard block |
||
| 103 | 105 | <div class="selectbox floatright">', $txt['who_show1'], ' |
| 104 | 106 | <select name="show" onchange="document.forms.whoFilter.submit();">'; |
| 105 | 107 | |
| 106 | - foreach ($context['show_methods'] as $value => $label) |
|
| 107 | - echo ' |
|
| 108 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 109 | + echo ' |
|
| 108 | 110 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 111 | + } |
|
| 109 | 112 | echo ' |
| 110 | 113 | </select> |
| 111 | 114 | <noscript> |
@@ -134,17 +137,19 @@ discard block |
||
| 134 | 137 | |
| 135 | 138 | foreach ($context['credits'] as $section) |
| 136 | 139 | { |
| 137 | - if (isset($section['pretext'])) |
|
| 138 | - echo ' |
|
| 140 | + if (isset($section['pretext'])) { |
|
| 141 | + echo ' |
|
| 139 | 142 | <div class="windowbg noup"> |
| 140 | 143 | <p>', $section['pretext'], '</p> |
| 141 | 144 | </div>'; |
| 145 | + } |
|
| 142 | 146 | |
| 143 | - if (isset($section['title'])) |
|
| 144 | - echo ' |
|
| 147 | + if (isset($section['title'])) { |
|
| 148 | + echo ' |
|
| 145 | 149 | <div class="cat_bar"> |
| 146 | 150 | <h3 class="catbg">', $section['title'], '</h3> |
| 147 | 151 | </div>'; |
| 152 | + } |
|
| 148 | 153 | |
| 149 | 154 | echo ' |
| 150 | 155 | <div class="windowbg2 noup"> |
@@ -152,17 +157,18 @@ discard block |
||
| 152 | 157 | |
| 153 | 158 | foreach ($section['groups'] as $group) |
| 154 | 159 | { |
| 155 | - if (isset($group['title'])) |
|
| 156 | - echo ' |
|
| 160 | + if (isset($group['title'])) { |
|
| 161 | + echo ' |
|
| 157 | 162 | <dt> |
| 158 | 163 | <strong>', $group['title'], '</strong> |
| 159 | 164 | </dt> |
| 160 | 165 | <dd>'; |
| 166 | + } |
|
| 161 | 167 | |
| 162 | 168 | // Try to make this read nicely. |
| 163 | - if (count($group['members']) <= 2) |
|
| 164 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 165 | - else |
|
| 169 | + if (count($group['members']) <= 2) { |
|
| 170 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 171 | + } else |
|
| 166 | 172 | { |
| 167 | 173 | $last_peep = array_pop($group['members']); |
| 168 | 174 | echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep; |
@@ -175,9 +181,10 @@ discard block |
||
| 175 | 181 | echo ' |
| 176 | 182 | </dl>'; |
| 177 | 183 | |
| 178 | - if (isset($section['posttext'])) |
|
| 179 | - echo ' |
|
| 184 | + if (isset($section['posttext'])) { |
|
| 185 | + echo ' |
|
| 180 | 186 | <p class="posttext">', $section['posttext'], '</p>'; |
| 187 | + } |
|
| 181 | 188 | |
| 182 | 189 | echo ' |
| 183 | 190 | </div>'; |
@@ -192,26 +199,29 @@ discard block |
||
| 192 | 199 | </div> |
| 193 | 200 | <div class="windowbg noup">'; |
| 194 | 201 | |
| 195 | - if (!empty($context['credits_software_graphics']['graphics'])) |
|
| 196 | - echo ' |
|
| 202 | + if (!empty($context['credits_software_graphics']['graphics'])) { |
|
| 203 | + echo ' |
|
| 197 | 204 | <dl> |
| 198 | 205 | <dt><strong>', $txt['credits_graphics'], '</strong></dt> |
| 199 | 206 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd> |
| 200 | 207 | </dl>'; |
| 208 | + } |
|
| 201 | 209 | |
| 202 | - if (!empty($context['credits_software_graphics']['software'])) |
|
| 203 | - echo ' |
|
| 210 | + if (!empty($context['credits_software_graphics']['software'])) { |
|
| 211 | + echo ' |
|
| 204 | 212 | <dl> |
| 205 | 213 | <dt><strong>', $txt['credits_software'], '</strong></dt> |
| 206 | 214 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd> |
| 207 | 215 | </dl>'; |
| 216 | + } |
|
| 208 | 217 | |
| 209 | - if (!empty($context['credits_software_graphics']['fonts'])) |
|
| 210 | - echo ' |
|
| 218 | + if (!empty($context['credits_software_graphics']['fonts'])) { |
|
| 219 | + echo ' |
|
| 211 | 220 | <dl> |
| 212 | 221 | <dt><strong>', $txt['credits_fonts'], '</strong></dt> |
| 213 | 222 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd> |
| 214 | 223 | </dl>'; |
| 224 | + } |
|
| 215 | 225 | echo ' |
| 216 | 226 | </div>'; |
| 217 | 227 | } |
@@ -226,16 +236,18 @@ discard block |
||
| 226 | 236 | <div class="windowbg noup">'; |
| 227 | 237 | |
| 228 | 238 | // Display the credits. |
| 229 | - if (!empty($context['credits_modifications'])) |
|
| 230 | - echo ' |
|
| 239 | + if (!empty($context['credits_modifications'])) { |
|
| 240 | + echo ' |
|
| 231 | 241 | ', implode(' |
| 232 | 242 | <br>', $context['credits_modifications']); |
| 243 | + } |
|
| 233 | 244 | |
| 234 | 245 | // Legacy. |
| 235 | - if (!empty($context['copyrights']['mods'])) |
|
| 236 | - echo (empty($context['credits_modifications']) ? '<br>' : ''), |
|
| 246 | + if (!empty($context['copyrights']['mods'])) { |
|
| 247 | + echo (empty($context['credits_modifications']) ? '<br>' : ''), |
|
| 237 | 248 | implode(' |
| 238 | 249 | <br>', $context['copyrights']['mods']); |
| 250 | + } |
|
| 239 | 251 | |
| 240 | 252 | echo ' |
| 241 | 253 | </div>'; |
@@ -65,18 +65,19 @@ discard block |
||
| 65 | 65 | </dt> |
| 66 | 66 | <dd> |
| 67 | 67 | ', $modSettings['smileys_url'], '/'; |
| 68 | - if ($context['current_set']['id'] == 'default') |
|
| 69 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 70 | - elseif (empty($context['smiley_set_dirs'])) |
|
| 71 | - echo ' |
|
| 68 | + if ($context['current_set']['id'] == 'default') { |
|
| 69 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 70 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
| 71 | + echo ' |
|
| 72 | 72 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '" class="input_text"> '; |
| 73 | - else |
|
| 73 | + } else |
|
| 74 | 74 | { |
| 75 | 75 | echo ' |
| 76 | 76 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
| 77 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
| 78 | - echo ' |
|
| 77 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
| 78 | + echo ' |
|
| 79 | 79 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
| 80 | + } |
|
| 80 | 81 | echo ' |
| 81 | 82 | </select> '; |
| 82 | 83 | } |
@@ -91,14 +92,15 @@ discard block |
||
| 91 | 92 | </dd>'; |
| 92 | 93 | |
| 93 | 94 | // If this is a new smiley set they have the option to import smileys already in the directory. |
| 94 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
| 95 | - echo ' |
|
| 95 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
| 96 | + echo ' |
|
| 96 | 97 | <dt> |
| 97 | 98 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
| 98 | 99 | </dt> |
| 99 | 100 | <dd> |
| 100 | 101 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1" class="input_check"> |
| 101 | 102 | </dd>'; |
| 103 | + } |
|
| 102 | 104 | |
| 103 | 105 | echo ' |
| 104 | 106 | </dl> |
@@ -132,9 +134,10 @@ discard block |
||
| 132 | 134 | <dd> |
| 133 | 135 | <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();">'; |
| 134 | 136 | |
| 135 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 136 | - echo ' |
|
| 137 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 138 | + echo ' |
|
| 137 | 139 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 140 | + } |
|
| 138 | 141 | |
| 139 | 142 | echo ' |
| 140 | 143 | </select>) |
@@ -149,16 +152,17 @@ discard block |
||
| 149 | 152 | <strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong> |
| 150 | 153 | </dt> |
| 151 | 154 | <dd>'; |
| 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'], '" class="input_text">'; |
| 155 | - else |
|
| 158 | + } else |
|
| 156 | 159 | { |
| 157 | 160 | echo ' |
| 158 | 161 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
| 159 | - foreach ($context['filenames'] as $filename) |
|
| 160 | - echo ' |
|
| 162 | + foreach ($context['filenames'] as $filename) { |
|
| 163 | + echo ' |
|
| 161 | 164 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 165 | + } |
|
| 162 | 166 | echo ' |
| 163 | 167 | </select>'; |
| 164 | 168 | } |
@@ -227,9 +231,10 @@ discard block |
||
| 227 | 231 | <dd> |
| 228 | 232 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 229 | 233 | |
| 230 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 231 | - echo ' |
|
| 234 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 235 | + echo ' |
|
| 232 | 236 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 237 | + } |
|
| 233 | 238 | |
| 234 | 239 | echo ' |
| 235 | 240 | </select> |
@@ -238,16 +243,17 @@ discard block |
||
| 238 | 243 | <strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong> |
| 239 | 244 | </dt> |
| 240 | 245 | <dd>'; |
| 241 | - if (empty($context['filenames'])) |
|
| 242 | - echo ' |
|
| 246 | + if (empty($context['filenames'])) { |
|
| 247 | + echo ' |
|
| 243 | 248 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');" class="input_text">'; |
| 244 | - else |
|
| 249 | + } else |
|
| 245 | 250 | { |
| 246 | 251 | echo ' |
| 247 | 252 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 248 | - foreach ($context['filenames'] as $filename) |
|
| 249 | - echo ' |
|
| 253 | + foreach ($context['filenames'] as $filename) { |
|
| 254 | + echo ' |
|
| 250 | 255 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 256 | + } |
|
| 251 | 257 | echo ' |
| 252 | 258 | </select>'; |
| 253 | 259 | } |
@@ -275,14 +281,15 @@ discard block |
||
| 275 | 281 | </fieldset> |
| 276 | 282 | |
| 277 | 283 | <dl id="uploadMore" style="display: none;" class="settings">'; |
| 278 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 279 | - echo ' |
|
| 284 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 285 | + echo ' |
|
| 280 | 286 | <dt> |
| 281 | 287 | ', $txt['smileys_add_upload_for1'], ' <strong>', $smiley_set['name'], '</strong> ', $txt['smileys_add_upload_for2'], ': |
| 282 | 288 | </dt> |
| 283 | 289 | <dd> |
| 284 | 290 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');" class="input_file"> |
| 285 | 291 | </dd>'; |
| 292 | + } |
|
| 286 | 293 | echo ' |
| 287 | 294 | </dl> |
| 288 | 295 | </div> |
@@ -351,24 +358,27 @@ discard block |
||
| 351 | 358 | <strong>', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...</strong><br>'; |
| 352 | 359 | foreach ($location['rows'] as $row) |
| 353 | 360 | { |
| 354 | - if (!empty($context['move_smiley'])) |
|
| 355 | - echo ' |
|
| 361 | + if (!empty($context['move_smiley'])) { |
|
| 362 | + echo ' |
|
| 356 | 363 | <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>'; |
| 364 | + } |
|
| 357 | 365 | |
| 358 | 366 | foreach ($row as $smiley) |
| 359 | 367 | { |
| 360 | - if (empty($context['move_smiley'])) |
|
| 361 | - echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>'; |
|
| 362 | - else |
|
| 363 | - echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><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>'; |
|
| 368 | + if (empty($context['move_smiley'])) { |
|
| 369 | + echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>'; |
|
| 370 | + } else { |
|
| 371 | + echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><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>'; |
|
| 372 | + } |
|
| 364 | 373 | } |
| 365 | 374 | |
| 366 | 375 | echo ' |
| 367 | 376 | <br>'; |
| 368 | 377 | } |
| 369 | - if (!empty($context['move_smiley'])) |
|
| 370 | - echo ' |
|
| 378 | + if (!empty($context['move_smiley'])) { |
|
| 379 | + echo ' |
|
| 371 | 380 | <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>'; |
| 381 | + } |
|
| 372 | 382 | echo ' |
| 373 | 383 | </div> |
| 374 | 384 | <input type="hidden" name="reorder" value="1"> |
@@ -404,14 +414,15 @@ discard block |
||
| 404 | 414 | </div> |
| 405 | 415 | <div class="windowbg2"> |
| 406 | 416 | <dl class="settings">'; |
| 407 | - if (!$context['new_icon']) |
|
| 408 | - echo ' |
|
| 417 | + if (!$context['new_icon']) { |
|
| 418 | + echo ' |
|
| 409 | 419 | <dt> |
| 410 | 420 | <strong>', $txt['smiley_preview'], ': </strong> |
| 411 | 421 | </dt> |
| 412 | 422 | <dd> |
| 413 | 423 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
| 414 | 424 | </dd>'; |
| 425 | + } |
|
| 415 | 426 | echo ' |
| 416 | 427 | <dt> |
| 417 | 428 | <strong><label for="icon_filename">', $txt['smileys_filename'], '</label>: </strong><br><span class="smalltext">', $txt['icons_filename_all_png'], '</span> |
@@ -436,9 +447,10 @@ discard block |
||
| 436 | 447 | { |
| 437 | 448 | echo ' |
| 438 | 449 | <optgroup label="', $category['name'], '">'; |
| 439 | - foreach ($category['boards'] as $board) |
|
| 440 | - echo ' |
|
| 450 | + foreach ($category['boards'] as $board) { |
|
| 451 | + echo ' |
|
| 441 | 452 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
| 453 | + } |
|
| 442 | 454 | echo ' |
| 443 | 455 | </optgroup>'; |
| 444 | 456 | } |
@@ -453,19 +465,21 @@ discard block |
||
| 453 | 465 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
| 454 | 466 | |
| 455 | 467 | // Print the list of all the icons it can be put after... |
| 456 | - foreach ($context['icons'] as $id => $data) |
|
| 457 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 468 | + foreach ($context['icons'] as $id => $data) { |
|
| 469 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 458 | 470 | echo ' |
| 459 | 471 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
| 472 | + } |
|
| 460 | 473 | |
| 461 | 474 | echo ' |
| 462 | 475 | </select> |
| 463 | 476 | </dd> |
| 464 | 477 | </dl>'; |
| 465 | 478 | |
| 466 | - if (!$context['new_icon']) |
|
| 467 | - echo ' |
|
| 479 | + if (!$context['new_icon']) { |
|
| 480 | + echo ' |
|
| 468 | 481 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
| 482 | + } |
|
| 469 | 483 | |
| 470 | 484 | echo ' |
| 471 | 485 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button_submit"> |