@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -12,5 +12,6 @@ |
||
12 | 12 | header('Location: ' . $boardurl); |
13 | 13 | } |
14 | 14 | // Can't find it... just forget it. |
15 | -else |
|
16 | - exit; |
|
17 | 15 | \ No newline at end of file |
16 | +else { |
|
17 | + exit; |
|
18 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -51,7 +51,9 @@ discard block |
||
51 | 51 | global $context, $settings, $txt, $options; |
52 | 52 | |
53 | 53 | if ($context['no_topic_listing']) |
54 | - return; |
|
54 | + { |
|
55 | + return; |
|
56 | + } |
|
55 | 57 | |
56 | 58 | template_pagesection('normal_buttons', 'right'); |
57 | 59 | |
@@ -62,14 +64,18 @@ discard block |
||
62 | 64 | |
63 | 65 | // Show the board description |
64 | 66 | if (!empty($context['description'])) |
65 | - echo ' |
|
67 | + { |
|
68 | + echo ' |
|
66 | 69 | <div id="boarddescription"> |
67 | 70 | ', $context['description'], ' |
68 | 71 | </div>'; |
72 | + } |
|
69 | 73 | |
70 | 74 | if (!empty($context['moderators'])) |
71 | - echo ' |
|
75 | + { |
|
76 | + echo ' |
|
72 | 77 | <div class="moderators">', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.</div>'; |
78 | + } |
|
73 | 79 | |
74 | 80 | echo ' |
75 | 81 | <div id="whoisviewing">'; |
@@ -78,9 +84,12 @@ discard block |
||
78 | 84 | if (!empty($settings['display_who_viewing'])) |
79 | 85 | { |
80 | 86 | if ($settings['display_who_viewing'] == 1) |
81 | - echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
82 | - else |
|
83 | - echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); |
|
87 | + { |
|
88 | + echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
89 | + } |
|
90 | + else { |
|
91 | + echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); |
|
92 | + } |
|
84 | 93 | |
85 | 94 | echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board']; |
86 | 95 | } |
@@ -90,10 +99,12 @@ discard block |
||
90 | 99 | <ul id="sort_by" class="topic_sorting">'; |
91 | 100 | |
92 | 101 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) |
93 | - echo ' |
|
102 | + { |
|
103 | + echo ' |
|
94 | 104 | <li class="listlevel1 quickmod_select_all"> |
95 | 105 | <input type="checkbox" onclick="invertAll(this, document.getElementById(\'quickModForm\'), \'topics[]\');" /> |
96 | 106 | </li>'; |
107 | + } |
|
97 | 108 | |
98 | 109 | $current_header = $context['topics_headers'][$context['sort_by']]; |
99 | 110 | echo ' |
@@ -106,8 +117,10 @@ discard block |
||
106 | 117 | <ul class="menulevel2" id="sortby">'; |
107 | 118 | |
108 | 119 | foreach ($context['topics_headers'] as $key => $value) |
109 | - echo ' |
|
120 | + { |
|
121 | + echo ' |
|
110 | 122 | <li class="listlevel2 sort_by_item" id="sort_by_item_', $key, '"><a href="', $value['url'], '" class="linklevel2">', $txt[$key], ' ', $value['sort_dir_img'], '</a></li>'; |
123 | + } |
|
111 | 124 | |
112 | 125 | echo ' |
113 | 126 | </ul> |
@@ -129,13 +142,17 @@ discard block |
||
129 | 142 | { |
130 | 143 | // If Quick Moderation is enabled start the form. |
131 | 144 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
132 | - echo ' |
|
145 | + { |
|
146 | + echo ' |
|
133 | 147 | <form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="UTF-8" class="clear" name="quickModForm" id="quickModForm">'; |
148 | + } |
|
134 | 149 | |
135 | 150 | // If this person can approve items and we have some awaiting approval tell them. |
136 | 151 | if (!empty($context['unapproved_posts_message'])) |
137 | - echo ' |
|
152 | + { |
|
153 | + echo ' |
|
138 | 154 | <div class="warningbox">', $context['unapproved_posts_message'], '</div>'; |
155 | + } |
|
139 | 156 | |
140 | 157 | echo ' |
141 | 158 | <main> |
@@ -143,7 +160,8 @@ discard block |
||
143 | 160 | |
144 | 161 | // No topics.... just say, "sorry bub". |
145 | 162 | if (empty($context['topics'])) |
146 | - echo ' |
|
163 | + { |
|
164 | + echo ' |
|
147 | 165 | <li class="basic_row"> |
148 | 166 | <div class="topic_info"> |
149 | 167 | <div class="topic_name"> |
@@ -153,24 +171,34 @@ discard block |
||
153 | 171 | </div> |
154 | 172 | </div> |
155 | 173 | </li>'; |
174 | + } |
|
156 | 175 | |
157 | 176 | foreach ($context['topics'] as $topic) |
158 | 177 | { |
159 | 178 | // Is this topic pending approval, or does it have any posts pending approval? |
160 | 179 | if ($context['can_approve_posts'] && $topic['unapproved_posts']) |
161 | - $color_class = !$topic['approved'] ? 'approvetopic_row' : 'approve_row'; |
|
180 | + { |
|
181 | + $color_class = !$topic['approved'] ? 'approvetopic_row' : 'approve_row'; |
|
182 | + } |
|
162 | 183 | // We start with locked and sticky topics. |
163 | 184 | elseif ($topic['is_sticky'] && $topic['is_locked']) |
164 | - $color_class = 'locked_row sticky_row'; |
|
185 | + { |
|
186 | + $color_class = 'locked_row sticky_row'; |
|
187 | + } |
|
165 | 188 | // Sticky topics should get a different color, too. |
166 | 189 | elseif ($topic['is_sticky']) |
167 | - $color_class = 'sticky_row'; |
|
190 | + { |
|
191 | + $color_class = 'sticky_row'; |
|
192 | + } |
|
168 | 193 | // Locked topics get special treatment as well. |
169 | 194 | elseif ($topic['is_locked']) |
170 | - $color_class = 'locked_row'; |
|
195 | + { |
|
196 | + $color_class = 'locked_row'; |
|
197 | + } |
|
171 | 198 | // Last, but not least: regular topics. |
172 | - else |
|
173 | - $color_class = 'basic_row'; |
|
199 | + else { |
|
200 | + $color_class = 'basic_row'; |
|
201 | + } |
|
174 | 202 | |
175 | 203 | echo ' |
176 | 204 | <li class="', $color_class, '"> |
@@ -178,8 +206,10 @@ discard block |
||
178 | 206 | <p class="topic_icons', empty($modSettings['messageIcons_enable']) ? ' topicicon i-' . $topic['first_post']['icon'] : '', '">'; |
179 | 207 | |
180 | 208 | if (!empty($modSettings['messageIcons_enable'])) |
181 | - echo ' |
|
209 | + { |
|
210 | + echo ' |
|
182 | 211 | <img src="', $topic['first_post']['icon_url'], '" alt="" />'; |
212 | + } |
|
183 | 213 | |
184 | 214 | echo ' |
185 | 215 | ', $topic['is_posted_in'] ? '<span class="fred topicicon i-profile"></span>' : '', ' |
@@ -189,12 +219,16 @@ discard block |
||
189 | 219 | |
190 | 220 | // Is this topic new? (assuming they are logged in!) |
191 | 221 | if ($topic['new'] && $context['user']['is_logged']) |
192 | - echo ' |
|
222 | + { |
|
223 | + echo ' |
|
193 | 224 | <a class="new_posts" href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '">' . $txt['new'] . '</a>'; |
225 | + } |
|
194 | 226 | |
195 | 227 | // Is this an unapproved topic and they can approve it? |
196 | 228 | if ($context['can_approve_posts'] && !$topic['approved']) |
197 | - echo '<span class="require_approval">' . $txt['awaiting_approval'] . '</span>'; |
|
229 | + { |
|
230 | + echo '<span class="require_approval">' . $txt['awaiting_approval'] . '</span>'; |
|
231 | + } |
|
198 | 232 | |
199 | 233 | echo ' |
200 | 234 | ', $topic['is_sticky'] ? '<strong>' : '', '<span class="preview" title="', $topic['default_preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span></span>', $topic['is_sticky'] ? '</strong>' : '', ' |
@@ -212,19 +246,24 @@ discard block |
||
212 | 246 | |
213 | 247 | // Show likes? |
214 | 248 | if (!empty($modSettings['likes_enabled'])) |
215 | - echo '<br /> |
|
249 | + { |
|
250 | + echo '<br /> |
|
216 | 251 | ', $topic['likes'], ' ', $txt['likes']; |
252 | + } |
|
217 | 253 | |
218 | 254 | echo ' |
219 | 255 | </p> |
220 | 256 | <p class="topic_lastpost">'; |
221 | 257 | |
222 | 258 | if (!empty($topic['last_post']['member']['avatar'])) |
223 | - echo ' |
|
259 | + { |
|
260 | + echo ' |
|
224 | 261 | <span class="board_avatar"><a href="', $topic['last_post']['member']['href'], '"><img class="avatar" src="', $topic['last_post']['member']['avatar']['href'], '" alt="" loading="lazy" /></a></span>'; |
225 | - else |
|
226 | - echo ' |
|
262 | + } |
|
263 | + else { |
|
264 | + echo ' |
|
227 | 265 | <span class="board_avatar"><a href="#"></a></span>'; |
266 | + } |
|
228 | 267 | |
229 | 268 | echo ' |
230 | 269 | <a class="topicicon i-last_post" href="', $topic['last_post']['href'], '" title="', $txt['last_post'], '"></a> |
@@ -240,25 +279,37 @@ discard block |
||
240 | 279 | <p class="topic_moderation', $options['display_quick_mod'] == 1 ? '' : '_alt', '" >'; |
241 | 280 | |
242 | 281 | if ($options['display_quick_mod'] == 1) |
243 | - echo ' |
|
282 | + { |
|
283 | + echo ' |
|
244 | 284 | <input type="checkbox" name="topics[]" value="', $topic['id'], '" />'; |
285 | + } |
|
245 | 286 | else |
246 | 287 | { |
247 | 288 | // Check permissions on each and show only the ones they are allowed to use. |
248 | 289 | if ($topic['quick_mod']['remove']) |
249 | - echo '<a class="topicicon i-remove" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt['remove_topic'], '"></a>'; |
|
290 | + { |
|
291 | + echo '<a class="topicicon i-remove" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt['remove_topic'], '"></a>'; |
|
292 | + } |
|
250 | 293 | |
251 | 294 | if ($topic['quick_mod']['lock']) |
252 | - echo '<a class="topicicon i-locked" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_locked'] ? 'set_unlock' : 'set_lock'], '"></a>'; |
|
295 | + { |
|
296 | + echo '<a class="topicicon i-locked" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_locked'] ? 'set_unlock' : 'set_lock'], '"></a>'; |
|
297 | + } |
|
253 | 298 | |
254 | 299 | if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
255 | - echo '<br />'; |
|
300 | + { |
|
301 | + echo '<br />'; |
|
302 | + } |
|
256 | 303 | |
257 | 304 | if ($topic['quick_mod']['sticky']) |
258 | - echo '<a class="topicicon i-sticky" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_sticky'] ? 'set_nonsticky' : 'set_sticky'], '"></a>'; |
|
305 | + { |
|
306 | + echo '<a class="topicicon i-sticky" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_sticky'] ? 'set_nonsticky' : 'set_sticky'], '"></a>'; |
|
307 | + } |
|
259 | 308 | |
260 | 309 | if ($topic['quick_mod']['move']) |
261 | - echo '<a class="topicicon i-move" href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0" title="', $txt['move_topic'], '"></a>'; |
|
310 | + { |
|
311 | + echo '<a class="topicicon i-move" href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0" title="', $txt['move_topic'], '"></a>'; |
|
312 | + } |
|
262 | 313 | } |
263 | 314 | |
264 | 315 | echo ' |
@@ -281,17 +332,21 @@ discard block |
||
281 | 332 | <option value=""> </option>'; |
282 | 333 | |
283 | 334 | foreach ($context['qmod_actions'] as $qmod_action) |
284 | - if ($context['can_' . $qmod_action]) |
|
335 | + { |
|
336 | + if ($context['can_' . $qmod_action]) |
|
285 | 337 | echo ' |
286 | 338 | <option value="' . $qmod_action . '">➤ ', $txt['quick_mod_' . $qmod_action] . '</option>'; |
339 | + } |
|
287 | 340 | |
288 | 341 | echo ' |
289 | 342 | </select>'; |
290 | 343 | |
291 | 344 | // Show a list of boards they can move the topic to. |
292 | 345 | if ($context['can_move']) |
293 | - echo ' |
|
346 | + { |
|
347 | + echo ' |
|
294 | 348 | <span id="quick_mod_jump_to"> </span>'; |
349 | + } |
|
295 | 350 | |
296 | 351 | echo ' |
297 | 352 | <input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" /> |
@@ -300,9 +355,11 @@ discard block |
||
300 | 355 | |
301 | 356 | // Finish off the form - again. |
302 | 357 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
303 | - echo ' |
|
358 | + { |
|
359 | + echo ' |
|
304 | 360 | <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" /> |
305 | 361 | </form>'; |
362 | + } |
|
306 | 363 | } |
307 | 364 | } |
308 | 365 | |
@@ -314,7 +371,9 @@ discard block |
||
314 | 371 | global $context, $txt, $options; |
315 | 372 | |
316 | 373 | if ($context['no_topic_listing']) |
317 | - return; |
|
374 | + { |
|
375 | + return; |
|
376 | + } |
|
318 | 377 | |
319 | 378 | template_pagesection('normal_buttons', 'right'); |
320 | 379 | |
@@ -326,17 +385,22 @@ discard block |
||
326 | 385 | <div class="qaction_row floatright" id="message_index_jump_to"> </div>'; |
327 | 386 | |
328 | 387 | if (!$context['no_topic_listing']) |
329 | - template_basicicons_legend(); |
|
388 | + { |
|
389 | + template_basicicons_legend(); |
|
390 | + } |
|
330 | 391 | |
331 | 392 | echo ' |
332 | 393 | <script>'; |
333 | 394 | |
334 | 395 | if (!empty($context['using_relative_time'])) |
335 | - echo ' |
|
396 | + { |
|
397 | + echo ' |
|
336 | 398 | $(\'.topic_latest\').addClass(\'relative\');'; |
399 | + } |
|
337 | 400 | |
338 | 401 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) |
339 | - echo ' |
|
402 | + { |
|
403 | + echo ' |
|
340 | 404 | aJumpTo[aJumpTo.length] = new JumpTo({ |
341 | 405 | sContainerId: "quick_mod_jump_to", |
342 | 406 | sClassName: "qaction", |
@@ -352,6 +416,7 @@ discard block |
||
352 | 416 | bDisabled: true, |
353 | 417 | sCustomName: "move_to" |
354 | 418 | });'; |
419 | + } |
|
355 | 420 | |
356 | 421 | echo ' |
357 | 422 | aJumpTo[aJumpTo.length] = new JumpTo({ |
@@ -66,7 +66,8 @@ discard block |
||
66 | 66 | </fieldset>'; |
67 | 67 | |
68 | 68 | if (!empty($context['can_move'])) |
69 | - echo ' |
|
69 | + { |
|
70 | + echo ' |
|
70 | 71 | <p> |
71 | 72 | <label for="move_new_topic"> |
72 | 73 | <input type="checkbox" name="move_new_topic" id="move_new_topic" onclick="document.getElementById(\'board_list\').style.display = this.checked ? \'\' : \'none\';" /> ', $txt['splittopic_move'], ' |
@@ -75,6 +76,7 @@ discard block |
||
75 | 76 | document.getElementById(\'board_list\').style.display = \'none\'; |
76 | 77 | </script> |
77 | 78 | </p>'; |
79 | + } |
|
78 | 80 | |
79 | 81 | echo ' |
80 | 82 | <div class="submitbutton"> |
@@ -132,7 +134,8 @@ discard block |
||
132 | 134 | <ul id="messages_not_selected" class="split_messages smalltext">'; |
133 | 135 | |
134 | 136 | foreach ($context['not_selected']['messages'] as $message) |
135 | - echo ' |
|
137 | + { |
|
138 | + echo ' |
|
136 | 139 | <li id="not_selected_', $message['id'], '"> |
137 | 140 | <div class="content"> |
138 | 141 | <div class="message_header"> |
@@ -143,6 +146,7 @@ discard block |
||
143 | 146 | <div class="post">', $message['body'], '</div> |
144 | 147 | </div> |
145 | 148 | </li>'; |
149 | + } |
|
146 | 150 | |
147 | 151 | echo ' |
148 | 152 | <li class="dummy"></li> |
@@ -160,7 +164,8 @@ discard block |
||
160 | 164 | if (!empty($context['selected']['messages'])) |
161 | 165 | { |
162 | 166 | foreach ($context['selected']['messages'] as $message) |
163 | - echo ' |
|
167 | + { |
|
168 | + echo ' |
|
164 | 169 | <li id="selected_', $message['id'], '"> |
165 | 170 | <div class="content"> |
166 | 171 | <div class="message_header"> |
@@ -171,6 +176,7 @@ discard block |
||
171 | 176 | <div class="post">', $message['body'], '</div> |
172 | 177 | </div> |
173 | 178 | </li>'; |
179 | + } |
|
174 | 180 | } |
175 | 181 | |
176 | 182 | echo ' |
@@ -26,11 +26,13 @@ discard block |
||
26 | 26 | <h2 class="category_header">', $txt['paid_' . $context['action_type'] . '_subscription'], '</h2>'; |
27 | 27 | |
28 | 28 | if (!empty($context['disable_groups'])) |
29 | - echo ' |
|
29 | + { |
|
30 | + echo ' |
|
30 | 31 | <div class="warningbox"> |
31 | 32 | ', $txt['paid_mod_edit_note'], ' |
32 | 33 | </div> |
33 | 34 | '; |
35 | + } |
|
34 | 36 | |
35 | 37 | echo ' |
36 | 38 | <div class="content"> |
@@ -71,8 +73,10 @@ discard block |
||
71 | 73 | |
72 | 74 | // Put each group into the box. |
73 | 75 | foreach ($context['groups'] as $groups) |
74 | - echo ' |
|
76 | + { |
|
77 | + echo ' |
|
75 | 78 | <option value="', $groups['id'], '" ', $context['sub']['prim_group'] == $groups['id'] ? 'selected="selected"' : '', '>', $groups['name'], '</option>'; |
79 | + } |
|
76 | 80 | |
77 | 81 | echo ' |
78 | 82 | </select> |
@@ -84,8 +88,10 @@ discard block |
||
84 | 88 | |
85 | 89 | // Put a checkbox in for each group |
86 | 90 | foreach ($context['groups'] as $groups) |
87 | - echo ' |
|
91 | + { |
|
92 | + echo ' |
|
88 | 93 | <input type="checkbox" id="addgroup_', $groups['id'], '" name="addgroup[', $groups['id'], ']"', in_array($groups['id'], $context['sub']['add_groups']) ? ' checked="checked"' : '', ' ', !empty($context['disable_groups']) ? ' disabled="disabled"' : '', ' /> <label for="addgroup_', $groups['id'], '" class="smalltext">', $groups['name'], '</label><br />'; |
94 | + } |
|
89 | 95 | |
90 | 96 | echo ' |
91 | 97 | </dd> |
@@ -239,7 +245,8 @@ discard block |
||
239 | 245 | |
240 | 246 | // Do we need a username? |
241 | 247 | if ($context['action_type'] == 'add') |
242 | - echo ' |
|
248 | + { |
|
249 | + echo ' |
|
243 | 250 | <dt> |
244 | 251 | <label for="name_control">', $txt['paid_username'], ':</label><br /> |
245 | 252 | <span class="smalltext">', $txt['one_username'], '</span> |
@@ -247,6 +254,7 @@ discard block |
||
247 | 254 | <dd> |
248 | 255 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30" class="input_text" /> |
249 | 256 | </dd>'; |
257 | + } |
|
250 | 258 | |
251 | 259 | echo ' |
252 | 260 | <dt> |
@@ -265,8 +273,10 @@ discard block |
||
265 | 273 | |
266 | 274 | // Show a list of all the years we allow... |
267 | 275 | for ($year = 2010; $year <= 2030; $year++) |
268 | - echo ' |
|
276 | + { |
|
277 | + echo ' |
|
269 | 278 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected="selected"' : '', '>', $year, '</option>'; |
279 | + } |
|
270 | 280 | |
271 | 281 | echo ' |
272 | 282 | </select> |
@@ -275,8 +285,10 @@ discard block |
||
275 | 285 | |
276 | 286 | // There are 12 months per year - ensure that they all get listed. |
277 | 287 | for ($month = 1; $month <= 12; $month++) |
278 | - echo ' |
|
288 | + { |
|
289 | + echo ' |
|
279 | 290 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>'; |
291 | + } |
|
280 | 292 | |
281 | 293 | echo ' |
282 | 294 | </select> |
@@ -285,8 +297,10 @@ discard block |
||
285 | 297 | |
286 | 298 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
287 | 299 | for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
288 | - echo ' |
|
300 | + { |
|
301 | + echo ' |
|
289 | 302 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected="selected"' : '', '>', $day, '</option>'; |
303 | + } |
|
290 | 304 | |
291 | 305 | echo ' |
292 | 306 | </select> |
@@ -300,8 +314,10 @@ discard block |
||
300 | 314 | |
301 | 315 | // Show a list of all the years we allow... |
302 | 316 | for ($year = 2010; $year <= 2030; $year++) |
303 | - echo ' |
|
317 | + { |
|
318 | + echo ' |
|
304 | 319 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected="selected"' : '', '>', $year, '</option>'; |
320 | + } |
|
305 | 321 | |
306 | 322 | echo ' |
307 | 323 | </select> |
@@ -310,8 +326,10 @@ discard block |
||
310 | 326 | |
311 | 327 | // There are 12 months per year - ensure that they all get listed. |
312 | 328 | for ($month = 1; $month <= 12; $month++) |
313 | - echo ' |
|
329 | + { |
|
330 | + echo ' |
|
314 | 331 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>'; |
332 | + } |
|
315 | 333 | |
316 | 334 | echo ' |
317 | 335 | </select> |
@@ -320,8 +338,10 @@ discard block |
||
320 | 338 | |
321 | 339 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
322 | 340 | for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
323 | - echo ' |
|
341 | + { |
|
342 | + echo ' |
|
324 | 343 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected="selected"' : '', '>', $day, '</option>'; |
344 | + } |
|
325 | 345 | |
326 | 346 | echo ' |
327 | 347 | </select> |
@@ -410,7 +430,9 @@ discard block |
||
410 | 430 | { |
411 | 431 | // Ignore the inactive ones... |
412 | 432 | if (empty($subscription['active'])) |
413 | - continue; |
|
433 | + { |
|
434 | + continue; |
|
435 | + } |
|
414 | 436 | |
415 | 437 | echo ' |
416 | 438 | <h2 class="category_header">', $subscription['name'], '</h2> |
@@ -419,10 +441,12 @@ discard block |
||
419 | 441 | <p class="content">', $subscription['desc'], '</p>'; |
420 | 442 | |
421 | 443 | if (!$subscription['flexible']) |
422 | - echo ' |
|
444 | + { |
|
445 | + echo ' |
|
423 | 446 | <div> |
424 | 447 | <strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], ' |
425 | 448 | </div>'; |
449 | + } |
|
426 | 450 | |
427 | 451 | if ($context['user']['is_owner']) |
428 | 452 | { |
@@ -436,22 +460,26 @@ discard block |
||
436 | 460 | |
437 | 461 | // Print out the costs for this one. |
438 | 462 | foreach ($subscription['costs'] as $duration => $value) |
439 | - echo ' |
|
463 | + { |
|
464 | + echo ' |
|
440 | 465 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
466 | + } |
|
441 | 467 | |
442 | 468 | echo ' |
443 | 469 | </select>'; |
444 | 470 | } |
445 | - else |
|
446 | - echo ' |
|
471 | + else { |
|
472 | + echo ' |
|
447 | 473 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
474 | + } |
|
448 | 475 | |
449 | 476 | echo ' |
450 | 477 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="right_submit" />'; |
451 | 478 | } |
452 | - else |
|
453 | - echo ' |
|
479 | + else { |
|
480 | + echo ' |
|
454 | 481 | <a class="linkbutton" 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 | + } |
|
455 | 483 | |
456 | 484 | echo ' |
457 | 485 | </div>'; |
@@ -477,17 +505,20 @@ discard block |
||
477 | 505 | <tbody>'; |
478 | 506 | |
479 | 507 | if (empty($context['current'])) |
480 | - echo ' |
|
508 | + { |
|
509 | + echo ' |
|
481 | 510 | <tr> |
482 | 511 | <td class="centertext" colspan="4"> |
483 | 512 | ', $txt['paid_none_ordered'], ' |
484 | 513 | </td> |
485 | 514 | </tr>'; |
515 | + } |
|
486 | 516 | |
487 | 517 | foreach ($context['current'] as $sub) |
488 | 518 | { |
489 | 519 | if (!$sub['hide']) |
490 | - echo ' |
|
520 | + { |
|
521 | + echo ' |
|
491 | 522 | <tr> |
492 | 523 | <td> |
493 | 524 | ', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -499,6 +530,7 @@ discard block |
||
499 | 530 | ', $sub['end'], ' |
500 | 531 | </td> |
501 | 532 | </tr>'; |
533 | + } |
|
502 | 534 | } |
503 | 535 | echo ' |
504 | 536 | </tbody> |
@@ -547,8 +579,10 @@ discard block |
||
547 | 579 | <form id="', $gateway['id'], '" action="', $gateway['form'], '" method="post">'; |
548 | 580 | |
549 | 581 | foreach ($gateway['hidden'] as $name => $value) |
550 | - echo ' |
|
582 | + { |
|
583 | + echo ' |
|
551 | 584 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '" />'; |
585 | + } |
|
552 | 586 | |
553 | 587 | echo ' |
554 | 588 | <div class="submitbutton"> |