@@ -20,9 +20,10 @@ discard block |
||
20 | 20 | echo ' |
21 | 21 | <form action="', $scripturl, '?action=admin;area=paidsubscribe;sa=modify;sid=', $context['sub_id'], '" method="post">'; |
22 | 22 | |
23 | - if (!empty($context['disable_groups'])) |
|
24 | - echo ' |
|
23 | + if (!empty($context['disable_groups'])) { |
|
24 | + echo ' |
|
25 | 25 | <div class="noticebox">', $txt['paid_mod_edit_note'], '</div>'; |
26 | + } |
|
26 | 27 | |
27 | 28 | echo ' |
28 | 29 | <div class="cat_bar"> |
@@ -66,9 +67,10 @@ discard block |
||
66 | 67 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
67 | 68 | |
68 | 69 | // Put each group into the box. |
69 | - foreach ($context['groups'] as $id => $name) |
|
70 | - echo ' |
|
70 | + foreach ($context['groups'] as $id => $name) { |
|
71 | + echo ' |
|
71 | 72 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
73 | + } |
|
72 | 74 | |
73 | 75 | echo ' |
74 | 76 | </select> |
@@ -80,12 +82,13 @@ discard block |
||
80 | 82 | <dd>'; |
81 | 83 | |
82 | 84 | // Put a checkbox in for each group |
83 | - foreach ($context['groups'] as $id => $name) |
|
84 | - echo ' |
|
85 | + foreach ($context['groups'] as $id => $name) { |
|
86 | + echo ' |
|
85 | 87 | <label for="addgroup_', $id, '"> |
86 | 88 | <input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', '> |
87 | 89 | <span class="smalltext">', $name, '</span> |
88 | 90 | </label><br>'; |
91 | + } |
|
89 | 92 | |
90 | 93 | echo ' |
91 | 94 | </dd> |
@@ -230,8 +233,8 @@ discard block |
||
230 | 233 | <dl class="settings">'; |
231 | 234 | |
232 | 235 | // Do we need a username? |
233 | - if ($context['action_type'] == 'add') |
|
234 | - echo ' |
|
236 | + if ($context['action_type'] == 'add') { |
|
237 | + echo ' |
|
235 | 238 | <dt> |
236 | 239 | <strong>', $txt['paid_username'], ':</strong><br> |
237 | 240 | <span class="smalltext">', $txt['one_username'], '</span> |
@@ -239,6 +242,7 @@ discard block |
||
239 | 242 | <dd> |
240 | 243 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30"> |
241 | 244 | </dd>'; |
245 | + } |
|
242 | 246 | |
243 | 247 | echo ' |
244 | 248 | <dt> |
@@ -256,9 +260,10 @@ discard block |
||
256 | 260 | <select name="year" id="year" onchange="generateDays();">'; |
257 | 261 | |
258 | 262 | // Show a list of all the years we allow... |
259 | - for ($year = 2005; $year <= 2030; $year++) |
|
260 | - echo ' |
|
263 | + for ($year = 2005; $year <= 2030; $year++) { |
|
264 | + echo ' |
|
261 | 265 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
266 | + } |
|
262 | 267 | |
263 | 268 | echo ' |
264 | 269 | </select> |
@@ -266,9 +271,10 @@ discard block |
||
266 | 271 | <select name="month" id="month" onchange="generateDays();">'; |
267 | 272 | |
268 | 273 | // There are 12 months per year - ensure that they all get listed. |
269 | - for ($month = 1; $month <= 12; $month++) |
|
270 | - echo ' |
|
274 | + for ($month = 1; $month <= 12; $month++) { |
|
275 | + echo ' |
|
271 | 276 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
277 | + } |
|
272 | 278 | |
273 | 279 | echo ' |
274 | 280 | </select> |
@@ -276,9 +282,10 @@ discard block |
||
276 | 282 | <select name="day" id="day">'; |
277 | 283 | |
278 | 284 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
279 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
280 | - echo ' |
|
285 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
286 | + echo ' |
|
281 | 287 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
288 | + } |
|
282 | 289 | |
283 | 290 | echo ' |
284 | 291 | </select> |
@@ -290,9 +297,10 @@ discard block |
||
290 | 297 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
291 | 298 | |
292 | 299 | // Show a list of all the years we allow... |
293 | - for ($year = 2005; $year <= 2030; $year++) |
|
294 | - echo ' |
|
300 | + for ($year = 2005; $year <= 2030; $year++) { |
|
301 | + echo ' |
|
295 | 302 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
303 | + } |
|
296 | 304 | |
297 | 305 | echo ' |
298 | 306 | </select> |
@@ -300,9 +308,10 @@ discard block |
||
300 | 308 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
301 | 309 | |
302 | 310 | // There are 12 months per year - ensure that they all get listed. |
303 | - for ($month = 1; $month <= 12; $month++) |
|
304 | - echo ' |
|
311 | + for ($month = 1; $month <= 12; $month++) { |
|
312 | + echo ' |
|
305 | 313 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
314 | + } |
|
306 | 315 | |
307 | 316 | echo ' |
308 | 317 | </select> |
@@ -310,9 +319,10 @@ discard block |
||
310 | 319 | <select name="dayend" id="dayend">'; |
311 | 320 | |
312 | 321 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
313 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
314 | - echo ' |
|
322 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
323 | + echo ' |
|
315 | 324 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
325 | + } |
|
316 | 326 | |
317 | 327 | echo ' |
318 | 328 | </select> |
@@ -351,8 +361,8 @@ discard block |
||
351 | 361 | <div class="windowbg"> |
352 | 362 | <ul>'; |
353 | 363 | |
354 | - foreach ($context['pending_payments'] as $id => $payment) |
|
355 | - echo ' |
|
364 | + foreach ($context['pending_payments'] as $id => $payment) { |
|
365 | + echo ' |
|
356 | 366 | <li> |
357 | 367 | ', $payment['desc'], ' |
358 | 368 | <span class="floatleft"> |
@@ -362,6 +372,7 @@ discard block |
||
362 | 372 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;lid=', $context['log_id'], ';pending=', $id, ';remove">', $txt['pending_payments_remove'], '</a> |
363 | 373 | </span> |
364 | 374 | </li>'; |
375 | + } |
|
365 | 376 | |
366 | 377 | echo ' |
367 | 378 | </ul>'; |
@@ -385,12 +396,12 @@ discard block |
||
385 | 396 | <h3 class="catbg">', $txt['subscriptions'], '</h3> |
386 | 397 | </div>'; |
387 | 398 | |
388 | - if (empty($context['subscriptions'])) |
|
389 | - echo ' |
|
399 | + if (empty($context['subscriptions'])) { |
|
400 | + echo ' |
|
390 | 401 | <div class="information"> |
391 | 402 | ', $txt['paid_subs_none'], ' |
392 | 403 | </div>'; |
393 | - else |
|
404 | + } else |
|
394 | 405 | { |
395 | 406 | echo ' |
396 | 407 | <div class="information"> |
@@ -401,8 +412,9 @@ discard block |
||
401 | 412 | foreach ($context['subscriptions'] as $id => $subscription) |
402 | 413 | { |
403 | 414 | // Ignore the inactive ones... |
404 | - if (empty($subscription['active'])) |
|
405 | - continue; |
|
415 | + if (empty($subscription['active'])) { |
|
416 | + continue; |
|
417 | + } |
|
406 | 418 | |
407 | 419 | echo ' |
408 | 420 | <div class="cat_bar"> |
@@ -412,9 +424,10 @@ discard block |
||
412 | 424 | <p><strong>', $subscription['name'], '</strong></p> |
413 | 425 | <p class="smalltext">', $subscription['desc'], '</p>'; |
414 | 426 | |
415 | - if (!$subscription['flexible']) |
|
416 | - echo ' |
|
427 | + if (!$subscription['flexible']) { |
|
428 | + echo ' |
|
417 | 429 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
430 | + } |
|
418 | 431 | |
419 | 432 | if ($context['user']['is_owner']) |
420 | 433 | { |
@@ -427,24 +440,25 @@ discard block |
||
427 | 440 | <select name="cur[', $subscription['id'], ']">'; |
428 | 441 | |
429 | 442 | // Print out the costs for this one. |
430 | - foreach ($subscription['costs'] as $duration => $value) |
|
431 | - echo ' |
|
443 | + foreach ($subscription['costs'] as $duration => $value) { |
|
444 | + echo ' |
|
432 | 445 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
446 | + } |
|
433 | 447 | |
434 | 448 | echo ' |
435 | 449 | </select>'; |
436 | - } |
|
437 | - else |
|
438 | - echo ' |
|
450 | + } else { |
|
451 | + echo ' |
|
439 | 452 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
453 | + } |
|
440 | 454 | |
441 | 455 | echo ' |
442 | 456 | <hr> |
443 | 457 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button">'; |
444 | - } |
|
445 | - else |
|
446 | - echo ' |
|
458 | + } else { |
|
459 | + echo ' |
|
447 | 460 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>'; |
461 | + } |
|
448 | 462 | |
449 | 463 | echo ' |
450 | 464 | </div><!-- .windowbg -->'; |
@@ -471,18 +485,19 @@ discard block |
||
471 | 485 | </thead> |
472 | 486 | <tbody>'; |
473 | 487 | |
474 | - if (empty($context['current'])) |
|
475 | - echo ' |
|
488 | + if (empty($context['current'])) { |
|
489 | + echo ' |
|
476 | 490 | <tr class="windowbg"> |
477 | 491 | <td colspan="4"> |
478 | 492 | ', $txt['paid_none_yet'], ' |
479 | 493 | </td> |
480 | 494 | </tr>'; |
495 | + } |
|
481 | 496 | |
482 | 497 | foreach ($context['current'] as $sub) |
483 | 498 | { |
484 | - if (!$sub['hide']) |
|
485 | - echo ' |
|
499 | + if (!$sub['hide']) { |
|
500 | + echo ' |
|
486 | 501 | <tr class="windowbg"> |
487 | 502 | <td> |
488 | 503 | ', ($context['user']['is_admin'] ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -493,6 +508,7 @@ discard block |
||
493 | 508 | <td>', $sub['start'], '</td> |
494 | 509 | <td>', $sub['end'], '</td> |
495 | 510 | </tr>'; |
511 | + } |
|
496 | 512 | } |
497 | 513 | |
498 | 514 | echo ' |
@@ -544,15 +560,17 @@ discard block |
||
544 | 560 | ', $gateway['desc'], '<br> |
545 | 561 | <form action="', $gateway['form'], '" method="post">'; |
546 | 562 | |
547 | - if (!empty($gateway['javascript'])) |
|
548 | - echo ' |
|
563 | + if (!empty($gateway['javascript'])) { |
|
564 | + echo ' |
|
549 | 565 | <script> |
550 | 566 | ', $gateway['javascript'], ' |
551 | 567 | </script>'; |
568 | + } |
|
552 | 569 | |
553 | - foreach ($gateway['hidden'] as $name => $value) |
|
554 | - echo ' |
|
570 | + foreach ($gateway['hidden'] as $name => $value) { |
|
571 | + echo ' |
|
555 | 572 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
573 | + } |
|
556 | 574 | |
557 | 575 | echo ' |
558 | 576 | <br> |
@@ -19,26 +19,28 @@ discard block |
||
19 | 19 | global $context, $settings, $scripturl, $txt, $modSettings; |
20 | 20 | |
21 | 21 | // Not allowed to edit? |
22 | - if (!$context['can_modify']) |
|
23 | - echo ' |
|
22 | + if (!$context['can_modify']) { |
|
23 | + echo ' |
|
24 | 24 | <div class="errorbox"> |
25 | 25 | ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' |
26 | 26 | </div>'; |
27 | + } |
|
27 | 28 | |
28 | 29 | echo ' |
29 | 30 | <div id="admin_form_wrapper"> |
30 | 31 | <form action="', $scripturl, '?action=admin;area=permissions;sa=quick" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" id="permissionForm">'; |
31 | 32 | |
32 | - if (!empty($context['profile'])) |
|
33 | - echo ' |
|
33 | + if (!empty($context['profile'])) { |
|
34 | + echo ' |
|
34 | 35 | <div class="cat_bar"> |
35 | 36 | <h3 class="catbg">', $txt['permissions_for_profile'], ': "', $context['profile']['name'], '"</h3> |
36 | 37 | </div>'; |
37 | - else |
|
38 | - echo ' |
|
38 | + } else { |
|
39 | + echo ' |
|
39 | 40 | <div class="cat_bar"> |
40 | 41 | <h3 class="catbg">', $txt['permissions_title'], '</h3> |
41 | 42 | </div>'; |
43 | + } |
|
42 | 44 | |
43 | 45 | echo ' |
44 | 46 | <table class="table_grid"> |
@@ -47,13 +49,14 @@ discard block |
||
47 | 49 | <th>', $txt['membergroups_name'], '</th> |
48 | 50 | <th class="small_table">', $txt['membergroups_members_top'], '</th>'; |
49 | 51 | |
50 | - if (empty($modSettings['permission_enable_deny'])) |
|
51 | - echo ' |
|
52 | + if (empty($modSettings['permission_enable_deny'])) { |
|
53 | + echo ' |
|
52 | 54 | <th class="small_table">', $txt['membergroups_permissions'], '</th>'; |
53 | - else |
|
54 | - echo ' |
|
55 | + } else { |
|
56 | + echo ' |
|
55 | 57 | <th class="small_table">', $txt['permissions_allowed'], '</th> |
56 | 58 | <th class="small_table">', $txt['permissions_denied'], '</th>'; |
59 | + } |
|
57 | 60 | |
58 | 61 | echo ' |
59 | 62 | <th class="small_table">', $context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view'], '</th> |
@@ -71,26 +74,28 @@ discard block |
||
71 | 74 | <td> |
72 | 75 | ', !empty($group['help']) ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=' . $group['help'] . '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="' . $txt['help'] . '"></span></a> ' : '<img class="icon" src="' . $settings['images_url'] . '/blank.png" alt="' . $txt['help'] . '">', '<span>', $group['name'], '</span>'; |
73 | 76 | |
74 | - if (!empty($group['children'])) |
|
75 | - echo ' |
|
77 | + if (!empty($group['children'])) { |
|
78 | + echo ' |
|
76 | 79 | <br> |
77 | 80 | <span class="smalltext">', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"</span>'; |
81 | + } |
|
78 | 82 | |
79 | 83 | echo ' |
80 | 84 | </td> |
81 | 85 | <td>', $group['can_search'] ? $group['link'] : $group['num_members'], '</td>'; |
82 | 86 | |
83 | - if (empty($modSettings['permission_enable_deny'])) |
|
84 | - echo ' |
|
87 | + if (empty($modSettings['permission_enable_deny'])) { |
|
88 | + echo ' |
|
85 | 89 | <td>', $group['num_permissions']['allowed'], '</td>'; |
86 | - else |
|
87 | - echo ' |
|
90 | + } else { |
|
91 | + echo ' |
|
88 | 92 | <td ', $group['id'] == 1 ? ' style="font-style: italic;"' : '', '> |
89 | 93 | ', $group['num_permissions']['allowed'], ' |
90 | 94 | </td> |
91 | 95 | <td ', $group['id'] == 1 || $group['id'] == -1 ? ' style="font-style: italic;"' : (!empty($group['num_permissions']['denied']) ? ' class="red"' : ''), '> |
92 | 96 | ', $group['num_permissions']['denied'], ' |
93 | 97 | </td>'; |
98 | + } |
|
94 | 99 | |
95 | 100 | echo ' |
96 | 101 | <td> |
@@ -141,10 +146,11 @@ discard block |
||
141 | 146 | <select name="copy_from"> |
142 | 147 | <option value="empty">(', $txt['permissions_select_membergroup'], ')</option>'; |
143 | 148 | |
144 | - foreach ($context['groups'] as $group) |
|
145 | - if ($group['id'] != 1) |
|
149 | + foreach ($context['groups'] as $group) { |
|
150 | + if ($group['id'] != 1) |
|
146 | 151 | echo ' |
147 | 152 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
153 | + } |
|
148 | 154 | |
149 | 155 | echo ' |
150 | 156 | </select> |
@@ -154,9 +160,10 @@ discard block |
||
154 | 160 | <option value="add">', $txt['permissions_add'], '...</option> |
155 | 161 | <option value="clear">', $txt['permissions_remove'], '...</option>'; |
156 | 162 | |
157 | - if (!empty($modSettings['permission_enable_deny'])) |
|
158 | - echo ' |
|
163 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
164 | + echo ' |
|
159 | 165 | <option value="deny">', $txt['permissions_deny'], '...</option>'; |
166 | + } |
|
160 | 167 | |
161 | 168 | echo ' |
162 | 169 | </select> |
@@ -167,31 +174,35 @@ discard block |
||
167 | 174 | |
168 | 175 | foreach ($context['permissions'] as $permissionType) |
169 | 176 | { |
170 | - if ($permissionType['id'] == 'membergroup' && !empty($context['profile'])) |
|
171 | - continue; |
|
177 | + if ($permissionType['id'] == 'membergroup' && !empty($context['profile'])) { |
|
178 | + continue; |
|
179 | + } |
|
172 | 180 | |
173 | 181 | foreach ($permissionType['columns'] as $column) |
174 | 182 | { |
175 | 183 | foreach ($column as $permissionGroup) |
176 | 184 | { |
177 | - if ($permissionGroup['hidden']) |
|
178 | - continue; |
|
185 | + if ($permissionGroup['hidden']) { |
|
186 | + continue; |
|
187 | + } |
|
179 | 188 | |
180 | 189 | echo ' |
181 | 190 | <option value="" disabled>[', $permissionGroup['name'], ']</option>'; |
182 | 191 | |
183 | 192 | foreach ($permissionGroup['permissions'] as $perm) |
184 | 193 | { |
185 | - if ($perm['hidden']) |
|
186 | - continue; |
|
194 | + if ($perm['hidden']) { |
|
195 | + continue; |
|
196 | + } |
|
187 | 197 | |
188 | - if ($perm['has_own_any']) |
|
189 | - echo ' |
|
198 | + if ($perm['has_own_any']) { |
|
199 | + echo ' |
|
190 | 200 | <option value="', $permissionType['id'], '/', $perm['own']['id'], '"> ', $perm['name'], ' (', $perm['own']['name'], ')</option> |
191 | 201 | <option value="', $permissionType['id'], '/', $perm['any']['id'], '"> ', $perm['name'], ' (', $perm['any']['name'], ')</option>'; |
192 | - else |
|
193 | - echo ' |
|
202 | + } else { |
|
203 | + echo ' |
|
194 | 204 | <option value="', $permissionType['id'], '/', $perm['id'], '"> ', $perm['name'], '</option>'; |
205 | + } |
|
195 | 206 | } |
196 | 207 | } |
197 | 208 | } |
@@ -256,9 +267,10 @@ discard block |
||
256 | 267 | } |
257 | 268 | </script>'; |
258 | 269 | |
259 | - if (!empty($context['profile'])) |
|
260 | - echo ' |
|
270 | + if (!empty($context['profile'])) { |
|
271 | + echo ' |
|
261 | 272 | <input type="hidden" name="pid" value="', $context['profile']['id'], '">'; |
273 | + } |
|
262 | 274 | |
263 | 275 | echo ' |
264 | 276 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -302,9 +314,10 @@ discard block |
||
302 | 314 | <h3 class="subbg">', $category['name'], '</h3> |
303 | 315 | </div>'; |
304 | 316 | |
305 | - if (!empty($category['boards'])) |
|
306 | - echo ' |
|
317 | + if (!empty($category['boards'])) { |
|
318 | + echo ' |
|
307 | 319 | <ul class="perm_boards flow_hidden">'; |
320 | + } |
|
308 | 321 | |
309 | 322 | foreach ($category['boards'] as $board) |
310 | 323 | { |
@@ -320,33 +333,36 @@ discard block |
||
320 | 333 | echo ' |
321 | 334 | <select name="boardprofile[', $board['id'], ']">'; |
322 | 335 | |
323 | - foreach ($context['profiles'] as $id => $profile) |
|
324 | - echo ' |
|
336 | + foreach ($context['profiles'] as $id => $profile) { |
|
337 | + echo ' |
|
325 | 338 | <option value="', $id, '"', $id == $board['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
339 | + } |
|
326 | 340 | |
327 | 341 | echo ' |
328 | 342 | </select>'; |
329 | - } |
|
330 | - else |
|
331 | - echo ' |
|
343 | + } else { |
|
344 | + echo ' |
|
332 | 345 | <a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $board['profile'], ';', $context['session_var'], '=', $context['session_id'], '">', $board['profile_name'], '</a>'; |
346 | + } |
|
333 | 347 | |
334 | 348 | echo ' |
335 | 349 | </span> |
336 | 350 | </li>'; |
337 | 351 | } |
338 | 352 | |
339 | - if (!empty($category['boards'])) |
|
340 | - echo ' |
|
353 | + if (!empty($category['boards'])) { |
|
354 | + echo ' |
|
341 | 355 | </ul>'; |
356 | + } |
|
342 | 357 | } |
343 | 358 | |
344 | - if ($context['edit_all']) |
|
345 | - echo ' |
|
359 | + if ($context['edit_all']) { |
|
360 | + echo ' |
|
346 | 361 | <input type="submit" name="save_changes" value="', $txt['save'], '" class="button">'; |
347 | - else |
|
348 | - echo ' |
|
362 | + } else { |
|
363 | + echo ' |
|
349 | 364 | <a class="button" href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">', $txt['permissions_board_all'], '</a>'; |
365 | + } |
|
350 | 366 | |
351 | 367 | echo ' |
352 | 368 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -385,12 +401,13 @@ discard block |
||
385 | 401 | <tr class="windowbg"> |
386 | 402 | <td>'; |
387 | 403 | |
388 | - if (!empty($context['show_rename_boxes']) && $profile['can_edit']) |
|
389 | - echo ' |
|
404 | + if (!empty($context['show_rename_boxes']) && $profile['can_edit']) { |
|
405 | + echo ' |
|
390 | 406 | <input type="text" name="rename_profile[', $profile['id'], ']" value="', $profile['name'], '">'; |
391 | - else |
|
392 | - echo ' |
|
407 | + } else { |
|
408 | + echo ' |
|
393 | 409 | <a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $profile['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $profile['name'], '</a>'; |
410 | + } |
|
394 | 411 | |
395 | 412 | echo ' |
396 | 413 | </td> |
@@ -410,9 +427,10 @@ discard block |
||
410 | 427 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
411 | 428 | <input type="hidden" name="', $context['admin-mpp_token_var'], '" value="', $context['admin-mpp_token'], '">'; |
412 | 429 | |
413 | - if ($context['can_edit_something']) |
|
414 | - echo ' |
|
430 | + if ($context['can_edit_something']) { |
|
431 | + echo ' |
|
415 | 432 | <input type="submit" name="rename" value="', empty($context['show_rename_boxes']) ? $txt['permissions_profile_rename'] : $txt['permissions_commit'], '" class="button">'; |
433 | + } |
|
416 | 434 | |
417 | 435 | echo ' |
418 | 436 | <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" class="button" ', !empty($context['show_rename_boxes']) ? ' style="display:none"' : '', '> |
@@ -437,9 +455,10 @@ discard block |
||
437 | 455 | <dd> |
438 | 456 | <select name="copy_from">'; |
439 | 457 | |
440 | - foreach ($context['profiles'] as $id => $profile) |
|
441 | - echo ' |
|
458 | + foreach ($context['profiles'] as $id => $profile) { |
|
459 | + echo ' |
|
442 | 460 | <option value="', $id, '">', $profile['name'], '</option>'; |
461 | + } |
|
443 | 462 | |
444 | 463 | echo ' |
445 | 464 | </select> |
@@ -461,13 +480,13 @@ discard block |
||
461 | 480 | global $context, $scripturl, $txt, $modSettings; |
462 | 481 | |
463 | 482 | // Cannot be edited? |
464 | - if (!$context['profile']['can_modify']) |
|
465 | - echo ' |
|
483 | + if (!$context['profile']['can_modify']) { |
|
484 | + echo ' |
|
466 | 485 | <div class="errorbox"> |
467 | 486 | ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' |
468 | 487 | </div>'; |
469 | - else |
|
470 | - echo ' |
|
488 | + } else { |
|
489 | + echo ' |
|
471 | 490 | <script> |
472 | 491 | window.smf_usedDeny = false; |
473 | 492 | |
@@ -479,26 +498,29 @@ discard block |
||
479 | 498 | return true; |
480 | 499 | } |
481 | 500 | </script>'; |
501 | + } |
|
482 | 502 | |
483 | 503 | echo ' |
484 | 504 | <form id="permissions" action="', $scripturl, '?action=admin;area=permissions;sa=modify2;group=', $context['group']['id'], ';pid=', $context['profile']['id'], '" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" onsubmit="return warnAboutDeny();">'; |
485 | 505 | |
486 | - if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) |
|
487 | - echo ' |
|
506 | + if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) { |
|
507 | + echo ' |
|
488 | 508 | <div class="information"> |
489 | 509 | ', $txt['permissions_option_desc'], ' |
490 | 510 | </div>'; |
511 | + } |
|
491 | 512 | |
492 | 513 | echo ' |
493 | 514 | <div class="cat_bar"> |
494 | 515 | <h3 class="catbg">'; |
495 | 516 | |
496 | - if ($context['permission_type'] == 'board') |
|
497 | - echo ' |
|
517 | + if ($context['permission_type'] == 'board') { |
|
518 | + echo ' |
|
498 | 519 | ', $txt['permissions_local_for'], ' "', $context['group']['name'], '" ', $txt['permissions_on'], ' "', $context['profile']['name'], '"'; |
499 | - else |
|
500 | - echo ' |
|
520 | + } else { |
|
521 | + echo ' |
|
501 | 522 | ', $context['permission_type'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'], ' - "', $context['group']['name'], '"'; |
523 | + } |
|
502 | 524 | echo ' |
503 | 525 | </h3> |
504 | 526 | </div>'; |
@@ -521,15 +543,17 @@ discard block |
||
521 | 543 | template_modify_group_display('board'); |
522 | 544 | } |
523 | 545 | |
524 | - if ($context['profile']['can_modify']) |
|
525 | - echo ' |
|
546 | + if ($context['profile']['can_modify']) { |
|
547 | + echo ' |
|
526 | 548 | <div class="padding"> |
527 | 549 | <input type="submit" value="', $txt['permissions_commit'], '" class="button"> |
528 | 550 | </div>'; |
551 | + } |
|
529 | 552 | |
530 | - foreach ($context['hidden_perms'] as $hidden_perm) |
|
531 | - echo ' |
|
553 | + foreach ($context['hidden_perms'] as $hidden_perm) { |
|
554 | + echo ' |
|
532 | 555 | <input type="hidden" name="perm[', $hidden_perm[0], '][', $hidden_perm[1], ']" value="', $hidden_perm[2], '">'; |
556 | + } |
|
533 | 557 | |
534 | 558 | echo ' |
535 | 559 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -556,17 +580,19 @@ discard block |
||
556 | 580 | |
557 | 581 | foreach ($column as $permissionGroup) |
558 | 582 | { |
559 | - if (empty($permissionGroup['permissions'])) |
|
560 | - continue; |
|
583 | + if (empty($permissionGroup['permissions'])) { |
|
584 | + continue; |
|
585 | + } |
|
561 | 586 | |
562 | 587 | // Are we likely to have something in this group to display or is it all hidden? |
563 | 588 | $has_display_content = false; |
564 | 589 | if (!$permissionGroup['hidden']) |
565 | 590 | { |
566 | 591 | // Before we go any further check we are going to have some data to print otherwise we just have a silly heading. |
567 | - foreach ($permissionGroup['permissions'] as $permission) |
|
568 | - if (!$permission['hidden']) |
|
592 | + foreach ($permissionGroup['permissions'] as $permission) { |
|
593 | + if (!$permission['hidden']) |
|
569 | 594 | $has_display_content = true; |
595 | + } |
|
570 | 596 | |
571 | 597 | if ($has_display_content) |
572 | 598 | { |
@@ -575,10 +601,11 @@ discard block |
||
575 | 601 | <th></th> |
576 | 602 | <th', $context['group']['id'] == -1 ? ' colspan="2"' : '', ' class="smalltext">', $permissionGroup['name'], '</th>'; |
577 | 603 | |
578 | - if ($context['group']['id'] != -1) |
|
579 | - echo ' |
|
604 | + if ($context['group']['id'] != -1) { |
|
605 | + echo ' |
|
580 | 606 | <th>', $txt['permissions_option_own'], '</th> |
581 | 607 | <th>', $txt['permissions_option_any'], '</th>'; |
608 | + } |
|
582 | 609 | |
583 | 610 | echo ' |
584 | 611 | </tr>'; |
@@ -601,17 +628,18 @@ discard block |
||
601 | 628 | // Guests can't do their own thing. |
602 | 629 | if ($context['group']['id'] != -1) |
603 | 630 | { |
604 | - if (empty($modSettings['permission_enable_deny'])) |
|
605 | - echo ' |
|
631 | + if (empty($modSettings['permission_enable_deny'])) { |
|
632 | + echo ' |
|
606 | 633 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']"', $permission['own']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" id="', $permission['own']['id'], '_on" ', $disable_field, '>'; |
607 | - else |
|
634 | + } else |
|
608 | 635 | { |
609 | 636 | echo ' |
610 | 637 | <select name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']" ', $disable_field, '>'; |
611 | 638 | |
612 | - foreach (array('on', 'off', 'deny') as $c) |
|
613 | - echo ' |
|
639 | + foreach (array('on', 'off', 'deny') as $c) { |
|
640 | + echo ' |
|
614 | 641 | <option ', $permission['own']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
642 | + } |
|
615 | 643 | echo ' |
616 | 644 | </select>'; |
617 | 645 | } |
@@ -621,39 +649,41 @@ discard block |
||
621 | 649 | <td>'; |
622 | 650 | } |
623 | 651 | |
624 | - if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) |
|
625 | - echo ' |
|
652 | + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) { |
|
653 | + echo ' |
|
626 | 654 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']"', $permission['any']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" ', $disable_field, '>'; |
627 | - else |
|
655 | + } else |
|
628 | 656 | { |
629 | 657 | echo ' |
630 | 658 | <select name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']" ', $disable_field, '>'; |
631 | 659 | |
632 | - foreach (array('on', 'off', 'deny') as $c) |
|
633 | - echo ' |
|
660 | + foreach (array('on', 'off', 'deny') as $c) { |
|
661 | + echo ' |
|
634 | 662 | <option ', $permission['any']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
663 | + } |
|
635 | 664 | echo ' |
636 | 665 | </select>'; |
637 | 666 | } |
638 | - } |
|
639 | - else |
|
667 | + } else |
|
640 | 668 | { |
641 | - if ($context['group']['id'] != -1) |
|
642 | - echo ' |
|
669 | + if ($context['group']['id'] != -1) { |
|
670 | + echo ' |
|
643 | 671 | </td> |
644 | 672 | <td>'; |
673 | + } |
|
645 | 674 | |
646 | - if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) |
|
647 | - echo ' |
|
675 | + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) { |
|
676 | + echo ' |
|
648 | 677 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['id'], ']"', $permission['select'] == 'on' ? ' checked="checked"' : '', ' value="on" ', $disable_field, '>'; |
649 | - else |
|
678 | + } else |
|
650 | 679 | { |
651 | 680 | echo ' |
652 | 681 | <select name="perm[', $permission_type['id'], '][', $permission['id'], ']" ', $disable_field, '>'; |
653 | 682 | |
654 | - foreach (array('on', 'off', 'deny') as $c) |
|
655 | - echo ' |
|
683 | + foreach (array('on', 'off', 'deny') as $c) { |
|
684 | + echo ' |
|
656 | 685 | <option ', $permission['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
686 | + } |
|
657 | 687 | echo ' |
658 | 688 | </select>'; |
659 | 689 | } |
@@ -685,11 +715,11 @@ discard block |
||
685 | 715 | <fieldset id="', $context['current_permission'], '"> |
686 | 716 | <legend><a href="javascript:void(0);" onclick="document.getElementById(\'', $context['current_permission'], '\').style.display = \'none\';document.getElementById(\'', $context['current_permission'], '_groups_link\').style.display = \'block\'; return false;" class="toggle_up"> ', $txt['avatar_select_permission'], '</a></legend>'; |
687 | 717 | |
688 | - if (empty($modSettings['permission_enable_deny'])) |
|
689 | - echo ' |
|
718 | + if (empty($modSettings['permission_enable_deny'])) { |
|
719 | + echo ' |
|
690 | 720 | <ul>'; |
691 | - else |
|
692 | - echo ' |
|
721 | + } else { |
|
722 | + echo ' |
|
693 | 723 | <div class="information">', $txt['permissions_option_desc'], '</div> |
694 | 724 | <dl class="settings"> |
695 | 725 | <dt> |
@@ -699,47 +729,52 @@ discard block |
||
699 | 729 | </dt> |
700 | 730 | <dd> |
701 | 731 | </dd>'; |
732 | + } |
|
702 | 733 | |
703 | 734 | foreach ($context['member_groups'] as $group) |
704 | 735 | { |
705 | - if (!empty($modSettings['permission_enable_deny'])) |
|
706 | - echo ' |
|
736 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
737 | + echo ' |
|
707 | 738 | <dt>'; |
708 | - else |
|
709 | - echo ' |
|
739 | + } else { |
|
740 | + echo ' |
|
710 | 741 | <li>'; |
742 | + } |
|
711 | 743 | |
712 | - if (empty($modSettings['permission_enable_deny'])) |
|
713 | - echo ' |
|
744 | + if (empty($modSettings['permission_enable_deny'])) { |
|
745 | + echo ' |
|
714 | 746 | <input type="checkbox" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', '>'; |
715 | - else |
|
716 | - echo ' |
|
747 | + } else { |
|
748 | + echo ' |
|
717 | 749 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', '></span> |
718 | 750 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="off"', $group['status'] == 'off' ? ' checked' : '', '></span> |
719 | 751 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="deny"', $group['status'] == 'deny' ? ' checked' : '', '></span>'; |
752 | + } |
|
720 | 753 | |
721 | - if (!empty($modSettings['permission_enable_deny'])) |
|
722 | - echo ' |
|
754 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
755 | + echo ' |
|
723 | 756 | </dt> |
724 | 757 | <dd> |
725 | 758 | <span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span> |
726 | 759 | </dd>'; |
727 | - else |
|
728 | - echo ' |
|
760 | + } else { |
|
761 | + echo ' |
|
729 | 762 | <span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span> |
730 | 763 | </li>'; |
764 | + } |
|
731 | 765 | } |
732 | 766 | |
733 | - if (empty($modSettings['permission_enable_deny'])) |
|
734 | - echo ' |
|
767 | + if (empty($modSettings['permission_enable_deny'])) { |
|
768 | + echo ' |
|
735 | 769 | <li> |
736 | 770 | <input type="checkbox" onclick="invertAll(this, this.form, \''. $context['current_permission'] . '[\');"> |
737 | 771 | <span>', $txt['check_all'], '</span> |
738 | 772 | </li> |
739 | 773 | </ul>'; |
740 | - else |
|
741 | - echo ' |
|
774 | + } else { |
|
775 | + echo ' |
|
742 | 776 | </dl>'; |
777 | + } |
|
743 | 778 | |
744 | 779 | echo ' |
745 | 780 | </fieldset> |
@@ -779,9 +814,10 @@ discard block |
||
779 | 814 | if (!empty($modSettings['postmod_active'])) |
780 | 815 | { |
781 | 816 | // Got advanced permissions - if so warn! |
782 | - if (!empty($modSettings['permission_enable_deny'])) |
|
783 | - echo ' |
|
817 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
818 | + echo ' |
|
784 | 819 | <div class="information">', $txt['permissions_post_moderation_deny_note'], '</div>'; |
820 | + } |
|
785 | 821 | |
786 | 822 | echo ' |
787 | 823 | <div class="padding"> |
@@ -796,10 +832,11 @@ discard block |
||
796 | 832 | ', $txt['permissions_post_moderation_select'], ': |
797 | 833 | <select name="pid" onchange="document.forms.postmodForm.submit();">'; |
798 | 834 | |
799 | - foreach ($context['profiles'] as $profile) |
|
800 | - if ($profile['can_modify']) |
|
835 | + foreach ($context['profiles'] as $profile) { |
|
836 | + if ($profile['can_modify']) |
|
801 | 837 | echo ' |
802 | 838 | <option value="', $profile['id'], '"', $profile['id'] == $context['current_profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
839 | + } |
|
803 | 840 | |
804 | 841 | echo ' |
805 | 842 | </select> |
@@ -820,11 +857,12 @@ discard block |
||
820 | 857 | ', $txt['permissions_post_moderation_replies_any'], ' |
821 | 858 | </th>'; |
822 | 859 | |
823 | - if ($modSettings['attachmentEnable'] == 1) |
|
824 | - echo ' |
|
860 | + if ($modSettings['attachmentEnable'] == 1) { |
|
861 | + echo ' |
|
825 | 862 | <th class="centercol" colspan="3"> |
826 | 863 | ', $txt['permissions_post_moderation_attachments'], ' |
827 | 864 | </th>'; |
865 | + } |
|
828 | 866 | |
829 | 867 | echo ' |
830 | 868 | </tr> |
@@ -842,11 +880,12 @@ discard block |
||
842 | 880 | <th><span class="generic_icons post_moderation_moderate"></span></th> |
843 | 881 | <th><span class="generic_icons post_moderation_deny"></span></th>'; |
844 | 882 | |
845 | - if ($modSettings['attachmentEnable'] == 1) |
|
846 | - echo ' |
|
883 | + if ($modSettings['attachmentEnable'] == 1) { |
|
884 | + echo ' |
|
847 | 885 | <th><span class="generic_icons post_moderation_allow"></span></th> |
848 | 886 | <th><span class="generic_icons post_moderation_moderate"></span></th> |
849 | 887 | <th><span class="generic_icons post_moderation_deny"></span></th>'; |
888 | + } |
|
850 | 889 | |
851 | 890 | echo ' |
852 | 891 | </tr> |
@@ -860,10 +899,11 @@ discard block |
||
860 | 899 | <td class="half_table"> |
861 | 900 | <span ', ($group['color'] ? 'style="color: ' . $group['color'] . '"' : ''), '>', $group['name'], '</span>'; |
862 | 901 | |
863 | - if (!empty($group['children'])) |
|
864 | - echo ' |
|
902 | + if (!empty($group['children'])) { |
|
903 | + echo ' |
|
865 | 904 | <br> |
866 | 905 | <span class="smalltext">', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"</span>'; |
906 | + } |
|
867 | 907 | |
868 | 908 | echo ' |
869 | 909 | </td> |
@@ -878,11 +918,11 @@ discard block |
||
878 | 918 | </td>'; |
879 | 919 | |
880 | 920 | // Guests can't have "own" permissions |
881 | - if ($group['id'] == '-1') |
|
882 | - echo ' |
|
921 | + if ($group['id'] == '-1') { |
|
922 | + echo ' |
|
883 | 923 | <td colspan="3"></td>'; |
884 | - else |
|
885 | - echo ' |
|
924 | + } else { |
|
925 | + echo ' |
|
886 | 926 | <td class="centercol"> |
887 | 927 | <input type="radio" name="replies_own[', $group['id'], ']" value="allow"', $group['replies_own'] == 'allow' ? ' checked' : '', '> |
888 | 928 | </td> |
@@ -892,6 +932,7 @@ discard block |
||
892 | 932 | <td class="centercol"> |
893 | 933 | <input type="radio" name="replies_own[', $group['id'], ']" value="disallow"', $group['replies_own'] == 'disallow' ? ' checked' : '', '> |
894 | 934 | </td>'; |
935 | + } |
|
895 | 936 | |
896 | 937 | echo ' |
897 | 938 | <td class="centercol"> |
@@ -904,8 +945,8 @@ discard block |
||
904 | 945 | <input type="radio" name="replies_any[', $group['id'], ']" value="disallow"', $group['replies_any'] == 'disallow' ? ' checked' : '', '> |
905 | 946 | </td>'; |
906 | 947 | |
907 | - if ($modSettings['attachmentEnable'] == 1) |
|
908 | - echo ' |
|
948 | + if ($modSettings['attachmentEnable'] == 1) { |
|
949 | + echo ' |
|
909 | 950 | <td class="centercol"> |
910 | 951 | <input type="radio" name="attachment[', $group['id'], ']" value="allow"', $group['attachment'] == 'allow' ? ' checked' : '', '> |
911 | 952 | </td> |
@@ -915,6 +956,7 @@ discard block |
||
915 | 956 | <td class="centercol"> |
916 | 957 | <input type="radio" name="attachment[', $group['id'], ']" value="disallow"', $group['attachment'] == 'disallow' ? ' checked' : '', '> |
917 | 958 | </td>'; |
959 | + } |
|
918 | 960 | |
919 | 961 | echo ' |
920 | 962 | </tr>'; |
@@ -18,9 +18,10 @@ discard block |
||
18 | 18 | global $context, $txt, $scripturl; |
19 | 19 | |
20 | 20 | // Are we done sending the newsletter? |
21 | - if (!empty($context['newsletter_sent'])) |
|
22 | - echo ' |
|
21 | + if (!empty($context['newsletter_sent'])) { |
|
22 | + echo ' |
|
23 | 23 | <div class="infobox">', $txt['admin_news_newsletter_' . $context['newsletter_sent']], '</div>'; |
24 | + } |
|
24 | 25 | |
25 | 26 | echo ' |
26 | 27 | <form action="', $scripturl, '?action=admin;area=news;sa=mailingcompose" method="post" id="admin_newsletters" class="flow_hidden" accept-charset="', $context['character_set'], '"> |
@@ -38,9 +39,10 @@ discard block |
||
38 | 39 | </dt> |
39 | 40 | <dd>'; |
40 | 41 | |
41 | - foreach ($context['groups'] as $group) |
|
42 | - echo ' |
|
42 | + foreach ($context['groups'] as $group) { |
|
43 | + echo ' |
|
43 | 44 | <label for="groups_', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups_', $group['id'], '" value="', $group['id'], '" checked> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
45 | + } |
|
44 | 46 | |
45 | 47 | echo ' |
46 | 48 | <br> |
@@ -79,9 +81,10 @@ discard block |
||
79 | 81 | </dt> |
80 | 82 | <dd>'; |
81 | 83 | |
82 | - foreach ($context['groups'] as $group) |
|
83 | - echo ' |
|
84 | + foreach ($context['groups'] as $group) { |
|
85 | + echo ' |
|
84 | 86 | <label for="exclude_groups_', $group['id'], '"><input type="checkbox" name="exclude_groups[', $group['id'], ']" id="exclude_groups_', $group['id'], '" value="', $group['id'], '"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
87 | + } |
|
85 | 88 | |
86 | 89 | echo ' |
87 | 90 | <br> |
@@ -225,9 +228,10 @@ discard block |
||
225 | 228 | <div id="bbcBox_message"></div>'; |
226 | 229 | |
227 | 230 | // What about smileys? |
228 | - if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) |
|
229 | - echo ' |
|
231 | + if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) { |
|
232 | + echo ' |
|
230 | 233 | <div id="smileyBox_message"></div>'; |
234 | + } |
|
231 | 235 | |
232 | 236 | // Show BBC buttons, smileys and textbox. |
233 | 237 | echo ' |
@@ -248,9 +252,10 @@ discard block |
||
248 | 252 | <input type="hidden" name="email_force" value="', $context['email_force'], '"> |
249 | 253 | <input type="hidden" name="total_emails" value="', $context['total_emails'], '">'; |
250 | 254 | |
251 | - foreach ($context['recipients'] as $key => $values) |
|
252 | - echo ' |
|
255 | + foreach ($context['recipients'] as $key => $values) { |
|
256 | + echo ' |
|
253 | 257 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
258 | + } |
|
254 | 259 | |
255 | 260 | echo ' |
256 | 261 | <script>'; |
@@ -404,9 +409,10 @@ discard block |
||
404 | 409 | <input type="hidden" name="parse_html" value="', $context['parse_html'], '">'; |
405 | 410 | |
406 | 411 | // All the things we must remember! |
407 | - foreach ($context['recipients'] as $key => $values) |
|
408 | - echo ' |
|
412 | + foreach ($context['recipients'] as $key => $values) { |
|
413 | + echo ' |
|
409 | 414 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
415 | + } |
|
410 | 416 | |
411 | 417 | echo ' |
412 | 418 | </div><!-- .windowbg --> |
@@ -438,9 +444,10 @@ discard block |
||
438 | 444 | { |
439 | 445 | global $context, $txt; |
440 | 446 | |
441 | - if (!empty($context['saved_successful'])) |
|
442 | - echo ' |
|
447 | + if (!empty($context['saved_successful'])) { |
|
448 | + echo ' |
|
443 | 449 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
450 | + } |
|
444 | 451 | |
445 | 452 | template_show_list('news_lists'); |
446 | 453 | } |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | <div class="windowbg"> |
125 | 125 | <dl class="settings">'; |
126 | 126 | |
127 | - if (!empty($context['table_info'])) |
|
128 | - echo ' |
|
127 | + if (!empty($context['table_info'])) { |
|
128 | + echo ' |
|
129 | 129 | <dt> |
130 | 130 | <strong>', $txt['search_method_messages_table_space'], ':</strong> |
131 | 131 | </dt> |
@@ -138,6 +138,7 @@ discard block |
||
138 | 138 | <dd> |
139 | 139 | ', $context['table_info']['index_length'], ' |
140 | 140 | </dd>'; |
141 | + } |
|
141 | 142 | echo ' |
142 | 143 | </dl> |
143 | 144 | ', $context['double_index'] ? '<div class="noticebox"> |
@@ -160,17 +161,17 @@ discard block |
||
160 | 161 | <dd> |
161 | 162 | <span class="smalltext">'; |
162 | 163 | |
163 | - if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) |
|
164 | - echo ' |
|
164 | + if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) { |
|
165 | + echo ' |
|
165 | 166 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_create'], '</a>]'; |
166 | - |
|
167 | - elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) |
|
168 | - echo ' |
|
167 | + } elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) { |
|
168 | + echo ' |
|
169 | 169 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create']; |
170 | - else |
|
171 | - echo ' |
|
170 | + } else { |
|
171 | + echo ' |
|
172 | 172 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_remove'], '</a>]<br> |
173 | 173 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length']; |
174 | + } |
|
174 | 175 | echo ' |
175 | 176 | </span> |
176 | 177 | </dd>'; |
@@ -184,26 +185,27 @@ discard block |
||
184 | 185 | <dd> |
185 | 186 | <span class="smalltext">'; |
186 | 187 | |
187 | - if ($context['custom_index']) |
|
188 | - echo ' |
|
188 | + if ($context['custom_index']) { |
|
189 | + echo ' |
|
189 | 190 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>]<br> |
190 | 191 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
191 | - |
|
192 | - elseif ($context['partial_custom_index']) |
|
193 | - echo ' |
|
192 | + } elseif ($context['partial_custom_index']) { |
|
193 | + echo ' |
|
194 | 194 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_resume'], '</a>]<br> |
195 | 195 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
196 | - else |
|
197 | - echo ' |
|
196 | + } else { |
|
197 | + echo ' |
|
198 | 198 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>]'; |
199 | + } |
|
199 | 200 | echo ' |
200 | 201 | </span> |
201 | 202 | </dd>'; |
202 | 203 | |
203 | 204 | foreach ($context['search_apis'] as $api) |
204 | 205 | { |
205 | - if (empty($api['label']) || $api['has_template']) |
|
206 | - continue; |
|
206 | + if (empty($api['label']) || $api['has_template']) { |
|
207 | + continue; |
|
208 | + } |
|
207 | 209 | |
208 | 210 | echo ' |
209 | 211 | <dt> |
@@ -211,11 +213,12 @@ discard block |
||
211 | 213 | ', $api['label'], ' |
212 | 214 | </dt>'; |
213 | 215 | |
214 | - if ($api['desc']) |
|
215 | - echo ' |
|
216 | + if ($api['desc']) { |
|
217 | + echo ' |
|
216 | 218 | <dd> |
217 | 219 | <span class="smalltext">', $api['desc'], '</span> |
218 | 220 | </dd>'; |
221 | + } |
|
219 | 222 | } |
220 | 223 | |
221 | 224 | echo ' |
@@ -34,11 +34,12 @@ discard block |
||
34 | 34 | </div>'; |
35 | 35 | |
36 | 36 | // If this is an existing set, and there are still un-added smileys - offer an import opportunity. |
37 | - if (!empty($context['current_set']['can_import'])) |
|
38 | - echo ' |
|
37 | + if (!empty($context['current_set']['can_import'])) { |
|
38 | + echo ' |
|
39 | 39 | <div class="information noup"> |
40 | 40 | ', $context['current_set']['can_import'] == 1 ? sprintf($txt['smiley_set_import_single'], $context['current_set']['import_url']) : sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import'], $context['current_set']['import_url']), ' |
41 | 41 | </div>'; |
42 | + } |
|
42 | 43 | |
43 | 44 | echo ' |
44 | 45 | <div class="windowbg noup"> |
@@ -54,20 +55,20 @@ discard block |
||
54 | 55 | </dt> |
55 | 56 | <dd> |
56 | 57 | ', $modSettings['smileys_url'], '/'; |
57 | - if ($context['current_set']['id'] == 'default') |
|
58 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
59 | - |
|
60 | - elseif (empty($context['smiley_set_dirs'])) |
|
61 | - echo ' |
|
58 | + if ($context['current_set']['id'] == 'default') { |
|
59 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
60 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
61 | + echo ' |
|
62 | 62 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '"> '; |
63 | - else |
|
63 | + } else |
|
64 | 64 | { |
65 | 65 | echo ' |
66 | 66 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
67 | 67 | |
68 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
69 | - echo ' |
|
68 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
69 | + echo ' |
|
70 | 70 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
71 | + } |
|
71 | 72 | echo ' |
72 | 73 | </select> '; |
73 | 74 | } |
@@ -82,14 +83,15 @@ discard block |
||
82 | 83 | </dd>'; |
83 | 84 | |
84 | 85 | // If this is a new smiley set they have the option to import smileys already in the directory. |
85 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
86 | - echo ' |
|
86 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
87 | + echo ' |
|
87 | 88 | <dt> |
88 | 89 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
89 | 90 | </dt> |
90 | 91 | <dd> |
91 | 92 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1"> |
92 | 93 | </dd>'; |
94 | + } |
|
93 | 95 | |
94 | 96 | echo ' |
95 | 97 | </dl> |
@@ -121,9 +123,10 @@ discard block |
||
121 | 123 | <dd> |
122 | 124 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">'; |
123 | 125 | |
124 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
125 | - echo ' |
|
126 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
127 | + echo ' |
|
126 | 128 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
129 | + } |
|
127 | 130 | |
128 | 131 | echo ' |
129 | 132 | </select>) |
@@ -139,17 +142,18 @@ discard block |
||
139 | 142 | </dt> |
140 | 143 | <dd>'; |
141 | 144 | |
142 | - if (empty($context['filenames'])) |
|
143 | - echo ' |
|
145 | + if (empty($context['filenames'])) { |
|
146 | + echo ' |
|
144 | 147 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '">'; |
145 | - else |
|
148 | + } else |
|
146 | 149 | { |
147 | 150 | echo ' |
148 | 151 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
149 | 152 | |
150 | - foreach ($context['filenames'] as $filename) |
|
151 | - echo ' |
|
153 | + foreach ($context['filenames'] as $filename) { |
|
154 | + echo ' |
|
152 | 155 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
156 | + } |
|
153 | 157 | echo ' |
154 | 158 | </select>'; |
155 | 159 | } |
@@ -216,9 +220,10 @@ discard block |
||
216 | 220 | <dd> |
217 | 221 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
218 | 222 | |
219 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
220 | - echo ' |
|
223 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
224 | + echo ' |
|
221 | 225 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
226 | + } |
|
222 | 227 | |
223 | 228 | echo ' |
224 | 229 | </select> |
@@ -228,17 +233,18 @@ discard block |
||
228 | 233 | </dt> |
229 | 234 | <dd>'; |
230 | 235 | |
231 | - if (empty($context['filenames'])) |
|
232 | - echo ' |
|
236 | + if (empty($context['filenames'])) { |
|
237 | + echo ' |
|
233 | 238 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');">'; |
234 | - else |
|
239 | + } else |
|
235 | 240 | { |
236 | 241 | echo ' |
237 | 242 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
238 | 243 | |
239 | - foreach ($context['filenames'] as $filename) |
|
240 | - echo ' |
|
244 | + foreach ($context['filenames'] as $filename) { |
|
245 | + echo ' |
|
241 | 246 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
247 | + } |
|
242 | 248 | echo ' |
243 | 249 | </select>'; |
244 | 250 | } |
@@ -267,14 +273,15 @@ discard block |
||
267 | 273 | |
268 | 274 | <dl id="uploadMore" style="display: none;" class="settings">'; |
269 | 275 | |
270 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
271 | - echo ' |
|
276 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
277 | + echo ' |
|
272 | 278 | <dt> |
273 | 279 | ', sprintf($txt['smileys_add_upload_for'], '<strong>' . $smiley_set['name'] . '</strong>'), ': |
274 | 280 | </dt> |
275 | 281 | <dd> |
276 | 282 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');"> |
277 | 283 | </dd>'; |
284 | + } |
|
278 | 285 | |
279 | 286 | echo ' |
280 | 287 | </dl> |
@@ -341,27 +348,30 @@ discard block |
||
341 | 348 | |
342 | 349 | foreach ($location['rows'] as $row) |
343 | 350 | { |
344 | - if (!empty($context['move_smiley'])) |
|
345 | - echo ' |
|
351 | + if (!empty($context['move_smiley'])) { |
|
352 | + echo ' |
|
346 | 353 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
354 | + } |
|
347 | 355 | |
348 | 356 | foreach ($row as $smiley) |
349 | 357 | { |
350 | - if (empty($context['move_smiley'])) |
|
351 | - echo ' |
|
358 | + if (empty($context['move_smiley'])) { |
|
359 | + echo ' |
|
352 | 360 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '"></a>'; |
353 | - else |
|
354 | - echo ' |
|
361 | + } else { |
|
362 | + echo ' |
|
355 | 363 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '" ', $smiley['selected'] ? 'class="selected_item"' : '', '> |
356 | 364 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
365 | + } |
|
357 | 366 | } |
358 | 367 | |
359 | 368 | echo ' |
360 | 369 | <br>'; |
361 | 370 | } |
362 | - if (!empty($context['move_smiley'])) |
|
363 | - echo ' |
|
371 | + if (!empty($context['move_smiley'])) { |
|
372 | + echo ' |
|
364 | 373 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
374 | + } |
|
365 | 375 | echo ' |
366 | 376 | </div><!-- .windowbg --> |
367 | 377 | <input type="hidden" name="reorder" value="1"> |
@@ -394,14 +404,15 @@ discard block |
||
394 | 404 | <div class="windowbg"> |
395 | 405 | <dl class="settings">'; |
396 | 406 | |
397 | - if (!$context['new_icon']) |
|
398 | - echo ' |
|
407 | + if (!$context['new_icon']) { |
|
408 | + echo ' |
|
399 | 409 | <dt> |
400 | 410 | <strong>', $txt['smiley_preview'], ': </strong> |
401 | 411 | </dt> |
402 | 412 | <dd> |
403 | 413 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
404 | 414 | </dd>'; |
415 | + } |
|
405 | 416 | |
406 | 417 | echo ' |
407 | 418 | <dt> |
@@ -428,9 +439,10 @@ discard block |
||
428 | 439 | echo ' |
429 | 440 | <optgroup label="', $category['name'], '">'; |
430 | 441 | |
431 | - foreach ($category['boards'] as $board) |
|
432 | - echo ' |
|
442 | + foreach ($category['boards'] as $board) { |
|
443 | + echo ' |
|
433 | 444 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
445 | + } |
|
434 | 446 | |
435 | 447 | echo ' |
436 | 448 | </optgroup>'; |
@@ -447,19 +459,21 @@ discard block |
||
447 | 459 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
448 | 460 | |
449 | 461 | // Print the list of all the icons it can be put after... |
450 | - foreach ($context['icons'] as $id => $data) |
|
451 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
462 | + foreach ($context['icons'] as $id => $data) { |
|
463 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
452 | 464 | echo ' |
453 | 465 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
466 | + } |
|
454 | 467 | |
455 | 468 | echo ' |
456 | 469 | </select> |
457 | 470 | </dd> |
458 | 471 | </dl>'; |
459 | 472 | |
460 | - if (!$context['new_icon']) |
|
461 | - echo ' |
|
473 | + if (!$context['new_icon']) { |
|
474 | + echo ' |
|
462 | 475 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
476 | + } |
|
463 | 477 | |
464 | 478 | echo ' |
465 | 479 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button"> |