@@ -41,11 +41,12 @@ discard block |
||
41 | 41 | </div>'; |
42 | 42 | |
43 | 43 | // If this is an existing set, and there are still un-added smileys - offer an import opportunity. |
44 | - if (!empty($context['current_set']['can_import'])) |
|
45 | - echo ' |
|
44 | + if (!empty($context['current_set']['can_import'])) { |
|
45 | + echo ' |
|
46 | 46 | <div class="information"> |
47 | 47 | ', $context['current_set']['can_import'] == 1 ? sprintf($txt['smiley_set_import_single'], $context['current_set']['import_url']) : sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import'], $context['current_set']['import_url']), ' |
48 | 48 | </div>'; |
49 | + } |
|
49 | 50 | |
50 | 51 | echo ' |
51 | 52 | <div class="windowbg2 noup"> |
@@ -62,20 +63,20 @@ discard block |
||
62 | 63 | <dd> |
63 | 64 | ', $modSettings['smileys_url'], '/'; |
64 | 65 | |
65 | - if ($context['current_set']['id'] == 'default') |
|
66 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
67 | - |
|
68 | - elseif (empty($context['smiley_set_dirs'])) |
|
69 | - echo ' |
|
66 | + if ($context['current_set']['id'] == 'default') { |
|
67 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
68 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
69 | + echo ' |
|
70 | 70 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '"> '; |
71 | - else |
|
71 | + } else |
|
72 | 72 | { |
73 | 73 | echo ' |
74 | 74 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
75 | 75 | |
76 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
77 | - echo ' |
|
76 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
77 | + echo ' |
|
78 | 78 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
79 | + } |
|
79 | 80 | echo ' |
80 | 81 | </select> '; |
81 | 82 | } |
@@ -90,14 +91,15 @@ discard block |
||
90 | 91 | </dd>'; |
91 | 92 | |
92 | 93 | // If this is a new smiley set they have the option to import smileys already in the directory. |
93 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
94 | - echo ' |
|
94 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
95 | + echo ' |
|
95 | 96 | <dt> |
96 | 97 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
97 | 98 | </dt> |
98 | 99 | <dd> |
99 | 100 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1"> |
100 | 101 | </dd>'; |
102 | + } |
|
101 | 103 | |
102 | 104 | echo ' |
103 | 105 | </dl> |
@@ -131,9 +133,10 @@ discard block |
||
131 | 133 | <dd> |
132 | 134 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">'; |
133 | 135 | |
134 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
135 | - echo ' |
|
136 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
137 | + echo ' |
|
136 | 138 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
139 | + } |
|
137 | 140 | |
138 | 141 | echo ' |
139 | 142 | </select>) |
@@ -149,17 +152,18 @@ discard block |
||
149 | 152 | </dt> |
150 | 153 | <dd>'; |
151 | 154 | |
152 | - if (empty($context['filenames'])) |
|
153 | - echo ' |
|
155 | + if (empty($context['filenames'])) { |
|
156 | + echo ' |
|
154 | 157 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '">'; |
155 | - else |
|
158 | + } else |
|
156 | 159 | { |
157 | 160 | echo ' |
158 | 161 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
159 | 162 | |
160 | - foreach ($context['filenames'] as $filename) |
|
161 | - echo ' |
|
163 | + foreach ($context['filenames'] as $filename) { |
|
164 | + echo ' |
|
162 | 165 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
166 | + } |
|
163 | 167 | echo ' |
164 | 168 | </select>'; |
165 | 169 | } |
@@ -228,9 +232,10 @@ discard block |
||
228 | 232 | <dd> |
229 | 233 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
230 | 234 | |
231 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
232 | - echo ' |
|
235 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
236 | + echo ' |
|
233 | 237 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
238 | + } |
|
234 | 239 | |
235 | 240 | echo ' |
236 | 241 | </select> |
@@ -240,17 +245,18 @@ discard block |
||
240 | 245 | </dt> |
241 | 246 | <dd>'; |
242 | 247 | |
243 | - if (empty($context['filenames'])) |
|
244 | - echo ' |
|
248 | + if (empty($context['filenames'])) { |
|
249 | + echo ' |
|
245 | 250 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');">'; |
246 | - else |
|
251 | + } else |
|
247 | 252 | { |
248 | 253 | echo ' |
249 | 254 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
250 | 255 | |
251 | - foreach ($context['filenames'] as $filename) |
|
252 | - echo ' |
|
256 | + foreach ($context['filenames'] as $filename) { |
|
257 | + echo ' |
|
253 | 258 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
259 | + } |
|
254 | 260 | echo ' |
255 | 261 | </select>'; |
256 | 262 | } |
@@ -279,14 +285,15 @@ discard block |
||
279 | 285 | |
280 | 286 | <dl id="uploadMore" style="display: none;" class="settings">'; |
281 | 287 | |
282 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
283 | - echo ' |
|
288 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
289 | + echo ' |
|
284 | 290 | <dt> |
285 | 291 | ', sprintf($txt['smileys_add_upload_for'], '<strong>' . $smiley_set['name'] . '</strong>'), ': |
286 | 292 | </dt> |
287 | 293 | <dd> |
288 | 294 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');"> |
289 | 295 | </dd>'; |
296 | + } |
|
290 | 297 | |
291 | 298 | echo ' |
292 | 299 | </dl> |
@@ -357,27 +364,30 @@ discard block |
||
357 | 364 | |
358 | 365 | foreach ($location['rows'] as $row) |
359 | 366 | { |
360 | - if (!empty($context['move_smiley'])) |
|
361 | - echo ' |
|
367 | + if (!empty($context['move_smiley'])) { |
|
368 | + echo ' |
|
362 | 369 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
370 | + } |
|
363 | 371 | |
364 | 372 | foreach ($row as $smiley) |
365 | 373 | { |
366 | - if (empty($context['move_smiley'])) |
|
367 | - echo ' |
|
374 | + if (empty($context['move_smiley'])) { |
|
375 | + echo ' |
|
368 | 376 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '"></a>'; |
369 | - else |
|
370 | - echo ' |
|
377 | + } else { |
|
378 | + echo ' |
|
371 | 379 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '" ', $smiley['selected'] ? 'class="selected_item"' : '', '> |
372 | 380 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
381 | + } |
|
373 | 382 | } |
374 | 383 | |
375 | 384 | echo ' |
376 | 385 | <br>'; |
377 | 386 | } |
378 | - if (!empty($context['move_smiley'])) |
|
379 | - echo ' |
|
387 | + if (!empty($context['move_smiley'])) { |
|
388 | + echo ' |
|
380 | 389 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
390 | + } |
|
381 | 391 | echo ' |
382 | 392 | </div><!-- .windowbg2 --> |
383 | 393 | <input type="hidden" name="reorder" value="1"> |
@@ -414,14 +424,15 @@ discard block |
||
414 | 424 | <div class="windowbg2 noup"> |
415 | 425 | <dl class="settings">'; |
416 | 426 | |
417 | - if (!$context['new_icon']) |
|
418 | - echo ' |
|
427 | + if (!$context['new_icon']) { |
|
428 | + echo ' |
|
419 | 429 | <dt> |
420 | 430 | <strong>', $txt['smiley_preview'], ': </strong> |
421 | 431 | </dt> |
422 | 432 | <dd> |
423 | 433 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
424 | 434 | </dd>'; |
435 | + } |
|
425 | 436 | |
426 | 437 | echo ' |
427 | 438 | <dt> |
@@ -448,9 +459,10 @@ discard block |
||
448 | 459 | echo ' |
449 | 460 | <optgroup label="', $category['name'], '">'; |
450 | 461 | |
451 | - foreach ($category['boards'] as $board) |
|
452 | - echo ' |
|
462 | + foreach ($category['boards'] as $board) { |
|
463 | + echo ' |
|
453 | 464 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
465 | + } |
|
454 | 466 | |
455 | 467 | echo ' |
456 | 468 | </optgroup>'; |
@@ -467,19 +479,21 @@ discard block |
||
467 | 479 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
468 | 480 | |
469 | 481 | // Print the list of all the icons it can be put after... |
470 | - foreach ($context['icons'] as $id => $data) |
|
471 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
482 | + foreach ($context['icons'] as $id => $data) { |
|
483 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
472 | 484 | echo ' |
473 | 485 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
486 | + } |
|
474 | 487 | |
475 | 488 | echo ' |
476 | 489 | </select> |
477 | 490 | </dd> |
478 | 491 | </dl>'; |
479 | 492 | |
480 | - if (!$context['new_icon']) |
|
481 | - echo ' |
|
493 | + if (!$context['new_icon']) { |
|
494 | + echo ' |
|
482 | 495 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
496 | + } |
|
483 | 497 | |
484 | 498 | echo ' |
485 | 499 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button"> |
@@ -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 noup"> |
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"> |
@@ -69,9 +70,10 @@ discard block |
||
69 | 70 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
70 | 71 | |
71 | 72 | // Put each group into the box. |
72 | - foreach ($context['groups'] as $id => $name) |
|
73 | - echo ' |
|
73 | + foreach ($context['groups'] as $id => $name) { |
|
74 | + echo ' |
|
74 | 75 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
76 | + } |
|
75 | 77 | |
76 | 78 | echo ' |
77 | 79 | </select> |
@@ -83,12 +85,13 @@ discard block |
||
83 | 85 | <dd>'; |
84 | 86 | |
85 | 87 | // Put a checkbox in for each group |
86 | - foreach ($context['groups'] as $id => $name) |
|
87 | - echo ' |
|
88 | + foreach ($context['groups'] as $id => $name) { |
|
89 | + echo ' |
|
88 | 90 | <label for="addgroup_', $id, '"> |
89 | 91 | <input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', '> |
90 | 92 | <span class="smalltext">', $name, '</span> |
91 | 93 | </label><br>'; |
94 | + } |
|
92 | 95 | |
93 | 96 | echo ' |
94 | 97 | </dd> |
@@ -238,8 +241,8 @@ discard block |
||
238 | 241 | <dl class="settings">'; |
239 | 242 | |
240 | 243 | // Do we need a username? |
241 | - if ($context['action_type'] == 'add') |
|
242 | - echo ' |
|
244 | + if ($context['action_type'] == 'add') { |
|
245 | + echo ' |
|
243 | 246 | <dt> |
244 | 247 | <strong>', $txt['paid_username'], ':</strong><br> |
245 | 248 | <span class="smalltext">', $txt['one_username'], '</span> |
@@ -247,6 +250,7 @@ discard block |
||
247 | 250 | <dd> |
248 | 251 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30"> |
249 | 252 | </dd>'; |
253 | + } |
|
250 | 254 | |
251 | 255 | echo ' |
252 | 256 | <dt> |
@@ -264,9 +268,10 @@ discard block |
||
264 | 268 | <select name="year" id="year" onchange="generateDays();">'; |
265 | 269 | |
266 | 270 | // Show a list of all the years we allow... |
267 | - for ($year = 2005; $year <= 2030; $year++) |
|
268 | - echo ' |
|
271 | + for ($year = 2005; $year <= 2030; $year++) { |
|
272 | + echo ' |
|
269 | 273 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
274 | + } |
|
270 | 275 | |
271 | 276 | echo ' |
272 | 277 | </select> |
@@ -274,9 +279,10 @@ discard block |
||
274 | 279 | <select name="month" id="month" onchange="generateDays();">'; |
275 | 280 | |
276 | 281 | // There are 12 months per year - ensure that they all get listed. |
277 | - for ($month = 1; $month <= 12; $month++) |
|
278 | - echo ' |
|
282 | + for ($month = 1; $month <= 12; $month++) { |
|
283 | + echo ' |
|
279 | 284 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
285 | + } |
|
280 | 286 | |
281 | 287 | echo ' |
282 | 288 | </select> |
@@ -284,9 +290,10 @@ discard block |
||
284 | 290 | <select name="day" id="day">'; |
285 | 291 | |
286 | 292 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
287 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
288 | - echo ' |
|
293 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
294 | + echo ' |
|
289 | 295 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
296 | + } |
|
290 | 297 | |
291 | 298 | echo ' |
292 | 299 | </select> |
@@ -298,9 +305,10 @@ discard block |
||
298 | 305 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
299 | 306 | |
300 | 307 | // Show a list of all the years we allow... |
301 | - for ($year = 2005; $year <= 2030; $year++) |
|
302 | - echo ' |
|
308 | + for ($year = 2005; $year <= 2030; $year++) { |
|
309 | + echo ' |
|
303 | 310 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
311 | + } |
|
304 | 312 | |
305 | 313 | echo ' |
306 | 314 | </select> |
@@ -308,9 +316,10 @@ discard block |
||
308 | 316 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
309 | 317 | |
310 | 318 | // There are 12 months per year - ensure that they all get listed. |
311 | - for ($month = 1; $month <= 12; $month++) |
|
312 | - echo ' |
|
319 | + for ($month = 1; $month <= 12; $month++) { |
|
320 | + echo ' |
|
313 | 321 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
322 | + } |
|
314 | 323 | |
315 | 324 | echo ' |
316 | 325 | </select> |
@@ -318,9 +327,10 @@ discard block |
||
318 | 327 | <select name="dayend" id="dayend">'; |
319 | 328 | |
320 | 329 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
321 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
322 | - echo ' |
|
330 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
331 | + echo ' |
|
323 | 332 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
333 | + } |
|
324 | 334 | |
325 | 335 | echo ' |
326 | 336 | </select> |
@@ -359,8 +369,8 @@ discard block |
||
359 | 369 | <div class="windowbg"> |
360 | 370 | <ul>'; |
361 | 371 | |
362 | - foreach ($context['pending_payments'] as $id => $payment) |
|
363 | - echo ' |
|
372 | + foreach ($context['pending_payments'] as $id => $payment) { |
|
373 | + echo ' |
|
364 | 374 | <li> |
365 | 375 | ', $payment['desc'], ' |
366 | 376 | <span class="floatleft"> |
@@ -370,6 +380,7 @@ discard block |
||
370 | 380 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;lid=', $context['log_id'], ';pending=', $id, ';remove">', $txt['pending_payments_remove'], '</a> |
371 | 381 | </span> |
372 | 382 | </li>'; |
383 | + } |
|
373 | 384 | |
374 | 385 | echo ' |
375 | 386 | </ul> |
@@ -394,12 +405,12 @@ discard block |
||
394 | 405 | <h3 class="catbg">', $txt['subscriptions'], '</h3> |
395 | 406 | </div>'; |
396 | 407 | |
397 | - if (empty($context['subscriptions'])) |
|
398 | - echo ' |
|
408 | + if (empty($context['subscriptions'])) { |
|
409 | + echo ' |
|
399 | 410 | <div class="information"> |
400 | 411 | ', $txt['paid_subs_none'], ' |
401 | 412 | </div>'; |
402 | - else |
|
413 | + } else |
|
403 | 414 | { |
404 | 415 | echo ' |
405 | 416 | <div class="information"> |
@@ -410,8 +421,9 @@ discard block |
||
410 | 421 | foreach ($context['subscriptions'] as $id => $subscription) |
411 | 422 | { |
412 | 423 | // Ignore the inactive ones... |
413 | - if (empty($subscription['active'])) |
|
414 | - continue; |
|
424 | + if (empty($subscription['active'])) { |
|
425 | + continue; |
|
426 | + } |
|
415 | 427 | |
416 | 428 | echo ' |
417 | 429 | <div class="cat_bar"> |
@@ -421,9 +433,10 @@ discard block |
||
421 | 433 | <p><strong>', $subscription['name'], '</strong></p> |
422 | 434 | <p class="smalltext">', $subscription['desc'], '</p>'; |
423 | 435 | |
424 | - if (!$subscription['flexible']) |
|
425 | - echo ' |
|
436 | + if (!$subscription['flexible']) { |
|
437 | + echo ' |
|
426 | 438 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
439 | + } |
|
427 | 440 | |
428 | 441 | if ($context['user']['is_owner']) |
429 | 442 | { |
@@ -436,24 +449,25 @@ discard block |
||
436 | 449 | <select name="cur[', $subscription['id'], ']">'; |
437 | 450 | |
438 | 451 | // Print out the costs for this one. |
439 | - foreach ($subscription['costs'] as $duration => $value) |
|
440 | - echo ' |
|
452 | + foreach ($subscription['costs'] as $duration => $value) { |
|
453 | + echo ' |
|
441 | 454 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
455 | + } |
|
442 | 456 | |
443 | 457 | echo ' |
444 | 458 | </select>'; |
445 | - } |
|
446 | - else |
|
447 | - echo ' |
|
459 | + } else { |
|
460 | + echo ' |
|
448 | 461 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
462 | + } |
|
449 | 463 | |
450 | 464 | echo ' |
451 | 465 | <hr> |
452 | 466 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button">'; |
453 | - } |
|
454 | - else |
|
455 | - echo ' |
|
467 | + } else { |
|
468 | + echo ' |
|
456 | 469 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>'; |
470 | + } |
|
457 | 471 | |
458 | 472 | echo ' |
459 | 473 | </div><!-- .windowbg -->'; |
@@ -480,18 +494,19 @@ discard block |
||
480 | 494 | </thead> |
481 | 495 | <tbody>'; |
482 | 496 | |
483 | - if (empty($context['current'])) |
|
484 | - echo ' |
|
497 | + if (empty($context['current'])) { |
|
498 | + echo ' |
|
485 | 499 | <tr class="windowbg"> |
486 | 500 | <td colspan="4"> |
487 | 501 | ', $txt['paid_none_yet'], ' |
488 | 502 | </td> |
489 | 503 | </tr>'; |
504 | + } |
|
490 | 505 | |
491 | 506 | foreach ($context['current'] as $sub) |
492 | 507 | { |
493 | - if (!$sub['hide']) |
|
494 | - echo ' |
|
508 | + if (!$sub['hide']) { |
|
509 | + echo ' |
|
495 | 510 | <tr class="windowbg"> |
496 | 511 | <td> |
497 | 512 | ', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -502,6 +517,7 @@ discard block |
||
502 | 517 | <td>', $sub['start'], '</td> |
503 | 518 | <td>', $sub['end'], '</td> |
504 | 519 | </tr>'; |
520 | + } |
|
505 | 521 | } |
506 | 522 | |
507 | 523 | echo ' |
@@ -553,15 +569,17 @@ discard block |
||
553 | 569 | ', $gateway['desc'], '<br> |
554 | 570 | <form action="', $gateway['form'], '" method="post">'; |
555 | 571 | |
556 | - if (!empty($gateway['javascript'])) |
|
557 | - echo ' |
|
572 | + if (!empty($gateway['javascript'])) { |
|
573 | + echo ' |
|
558 | 574 | <script> |
559 | 575 | ', $gateway['javascript'], ' |
560 | 576 | </script>'; |
577 | + } |
|
561 | 578 | |
562 | - foreach ($gateway['hidden'] as $name => $value) |
|
563 | - echo ' |
|
579 | + foreach ($gateway['hidden'] as $name => $value) { |
|
580 | + echo ' |
|
564 | 581 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
582 | + } |
|
565 | 583 | |
566 | 584 | echo ' |
567 | 585 | <br> |