@@ -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"> |
@@ -27,12 +27,14 @@ discard block |
||
27 | 27 | <table id="error_log" class="table_grid">'; |
28 | 28 | |
29 | 29 | if ($context['has_filter']) |
30 | - echo ' |
|
30 | + { |
|
31 | + echo ' |
|
31 | 32 | <tr> |
32 | 33 | <td colspan="3"> |
33 | 34 | <strong> ', $txt['badbehaviorlog_applying_filter'], ':</strong> ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' [<a href="', $scripturl, '?action=admin;area=logs;sa=badbehaviorlog', $context['sort_direction'] == 'down' ? ';desc' : '', '">', $txt['badbehaviorlog_clear_filter'], '</a>] |
34 | 35 | </td> |
35 | 36 | </tr>'; |
37 | + } |
|
36 | 38 | |
37 | 39 | // The checkall box |
38 | 40 | echo ' |
@@ -45,10 +47,12 @@ discard block |
||
45 | 47 | |
46 | 48 | // No log entries, then show a message |
47 | 49 | if (count($context['bb_entries']) == 0) |
48 | - echo ' |
|
50 | + { |
|
51 | + echo ' |
|
49 | 52 | <tr> |
50 | 53 | <td class="centertext" colspan="2">', $txt['badbehaviorlog_no_entries_found'], '</td> |
51 | 54 | </tr>'; |
55 | + } |
|
52 | 56 | |
53 | 57 | // We have some log entries, maybe even some spammers |
54 | 58 | $i = 0; |
@@ -77,8 +81,10 @@ discard block |
||
77 | 81 | <div class="error_type">'; |
78 | 82 | |
79 | 83 | if ($entries['member']['session'] !== '') |
80 | - echo ' |
|
84 | + { |
|
85 | + echo ' |
|
81 | 86 | <a href="', $scripturl, '?action=admin;area=logs;sa=badbehaviorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=session;value=', $entries['member']['session'], '" title="', $txt['badbehaviorlog_apply_filter'], ': ', $txt['badbehaviorlog_filter_only_session'], '"><i class="icon icon-small i-search" title="', $txt['badbehaviorlog_apply_filter'], ': ', $txt['badbehaviorlog_filter_only_session'], '"></i></a>', $entries['member']['session'], '<br />'; |
87 | + } |
|
82 | 88 | |
83 | 89 | echo ' |
84 | 90 | <a href="', $scripturl, '?action=admin;area=logs;sa=badbehaviorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=valid;value=', $entries['valid']['code'], '" title="', $txt['badbehaviorlog_apply_filter'], ': ', $txt['badbehaviorlog_filter_only_type'], '"><i class="icon icon-small i-search" title="', $txt['badbehaviorlog_apply_filter'], ': ', $txt['badbehaviorlog_filter_only_type'], '"></i></a>', $txt['badbehaviorlog_error_valid_response'], ': ', $entries['valid']['response'], '<br /> |
@@ -121,8 +127,10 @@ discard block |
||
121 | 127 | <input type="submit" name="delall" value="', $context['has_filter'] ? $txt['badbehaviorlog_remove_filtered_results'] : $txt['remove_all'], '" onclick="return confirm(\'', $context['has_filter'] ? $txt['badbehaviorlog_remove_filtered_results_confirm'] : $txt['badbehaviorlog_sure_remove'], '\');" />'; |
122 | 128 | |
123 | 129 | if ($context['sort_direction'] == 'down') |
124 | - echo ' |
|
130 | + { |
|
131 | + echo ' |
|
125 | 132 | <input type="hidden" name="desc" value="1" />'; |
133 | + } |
|
126 | 134 | |
127 | 135 | echo ' |
128 | 136 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
@@ -281,13 +289,15 @@ discard block |
||
281 | 289 | |
282 | 290 | // If we have none, then lets show a blank one. |
283 | 291 | if (empty($context['badbehavior_useragent_wl'])) |
284 | - echo ' |
|
292 | + { |
|
293 | + echo ' |
|
285 | 294 | <dt> |
286 | 295 | <input type="text" name="badbehavior_useragent_wl_desc[]" class="input_text" /> |
287 | 296 | </dt> |
288 | 297 | <dd> |
289 | 298 | <input type="text" name="badbehavior_useragent_wl[]" class="input_text" /> |
290 | 299 | </dd>'; |
300 | + } |
|
291 | 301 | |
292 | 302 | // And a link so they can add more |
293 | 303 | echo ' |
@@ -42,7 +42,9 @@ discard block |
||
42 | 42 | { |
43 | 43 | // Not supposed to be printed? |
44 | 44 | if (empty($area['label'])) |
45 | - continue; |
|
45 | + { |
|
46 | + continue; |
|
47 | + } |
|
46 | 48 | |
47 | 49 | echo ' |
48 | 50 | <li class="listlevel1', !empty($area['subsections']) ? ' subsections" aria-haspopup="true"' : '"', ' ', ($i == $menu_context['current_area']) ? 'id="menu_current_area"' : '', '>'; |
@@ -54,11 +56,14 @@ discard block |
||
54 | 56 | <strong><a class="linklevel1" href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['label'], '</a></strong>'; |
55 | 57 | |
56 | 58 | if (empty($context['tabs'])) |
57 | - $context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array(); |
|
59 | + { |
|
60 | + $context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array(); |
|
61 | + } |
|
58 | 62 | } |
59 | - else |
|
60 | - echo ' |
|
63 | + else { |
|
64 | + echo ' |
|
61 | 65 | <a class="linklevel1" href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['label'], '</a>'; |
66 | + } |
|
62 | 67 | |
63 | 68 | // Are there any subsections? |
64 | 69 | if (!empty($area['subsections'])) |
@@ -69,7 +74,9 @@ discard block |
||
69 | 74 | foreach ($area['subsections'] as $sa => $sub) |
70 | 75 | { |
71 | 76 | if (!empty($sub['disabled'])) |
72 | - continue; |
|
77 | + { |
|
78 | + continue; |
|
79 | + } |
|
73 | 80 | |
74 | 81 | $url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa; |
75 | 82 | |
@@ -98,8 +105,10 @@ discard block |
||
98 | 105 | |
99 | 106 | // If there are any "tabs" setup, this is the place to shown them. |
100 | 107 | if (empty($context['force_disable_tabs'])) |
101 | - template_generic_menu_tabs($menu_context); |
|
102 | -} |
|
108 | + { |
|
109 | + template_generic_menu_tabs($menu_context); |
|
110 | + } |
|
111 | + } |
|
103 | 112 | |
104 | 113 | /** |
105 | 114 | * Part of the sidebar layer - closes off the main bit. |
@@ -139,7 +148,9 @@ discard block |
||
139 | 148 | { |
140 | 149 | // Not supposed to be printed? |
141 | 150 | if (empty($area['label'])) |
142 | - continue; |
|
151 | + { |
|
152 | + continue; |
|
153 | + } |
|
143 | 154 | |
144 | 155 | echo ' |
145 | 156 | <li class="listlevel2', !empty($area['subsections']) ? ' subsections" aria-haspopup="true"' : '"', '>'; |
@@ -149,7 +160,9 @@ discard block |
||
149 | 160 | |
150 | 161 | // Is this the current area, or just some area? |
151 | 162 | if (!empty($area['selected']) && empty($context['tabs'])) |
152 | - $context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array(); |
|
163 | + { |
|
164 | + $context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array(); |
|
165 | + } |
|
153 | 166 | |
154 | 167 | // Are there any subsections? |
155 | 168 | if (!empty($area['subsections'])) |
@@ -160,7 +173,9 @@ discard block |
||
160 | 173 | foreach ($area['subsections'] as $sa => $sub) |
161 | 174 | { |
162 | 175 | if (!empty($sub['disabled'])) |
163 | - continue; |
|
176 | + { |
|
177 | + continue; |
|
178 | + } |
|
164 | 179 | |
165 | 180 | $url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa; |
166 | 181 | |
@@ -234,29 +249,43 @@ discard block |
||
234 | 249 | |
235 | 250 | // Did this not even exist - or do we not have a label? |
236 | 251 | if (!isset($tab_context['tabs'][$id])) |
237 | - $tab_context['tabs'][$id] = array('label' => $tab['label']); |
|
252 | + { |
|
253 | + $tab_context['tabs'][$id] = array('label' => $tab['label']); |
|
254 | + } |
|
238 | 255 | elseif (!isset($tab_context['tabs'][$id]['label'])) |
239 | - $tab_context['tabs'][$id]['label'] = $tab['label']; |
|
256 | + { |
|
257 | + $tab_context['tabs'][$id]['label'] = $tab['label']; |
|
258 | + } |
|
240 | 259 | |
241 | 260 | // Has a custom URL defined in the main admin structure? |
242 | 261 | if (isset($tab['url']) && !isset($tab_context['tabs'][$id]['url'])) |
243 | - $tab_context['tabs'][$id]['url'] = $tab['url']; |
|
262 | + { |
|
263 | + $tab_context['tabs'][$id]['url'] = $tab['url']; |
|
264 | + } |
|
244 | 265 | |
245 | 266 | // Any additional parameters for the url? |
246 | 267 | if (isset($tab['add_params']) && !isset($tab_context['tabs'][$id]['add_params'])) |
247 | - $tab_context['tabs'][$id]['add_params'] = $tab['add_params']; |
|
268 | + { |
|
269 | + $tab_context['tabs'][$id]['add_params'] = $tab['add_params']; |
|
270 | + } |
|
248 | 271 | |
249 | 272 | // Has it been deemed selected? |
250 | 273 | if (!empty($tab['is_selected'])) |
251 | - $tab_context['tabs'][$id]['is_selected'] = true; |
|
274 | + { |
|
275 | + $tab_context['tabs'][$id]['is_selected'] = true; |
|
276 | + } |
|
252 | 277 | |
253 | 278 | // Does it have its own help? |
254 | 279 | if (!empty($tab['help'])) |
255 | - $tab_context['tabs'][$id]['help'] = $tab['help']; |
|
280 | + { |
|
281 | + $tab_context['tabs'][$id]['help'] = $tab['help']; |
|
282 | + } |
|
256 | 283 | |
257 | 284 | // Is this the last one? |
258 | 285 | if (!empty($tab['is_last']) && !isset($tab_context['override_last'])) |
259 | - $tab_context['tabs'][$id]['is_last'] = true; |
|
286 | + { |
|
287 | + $tab_context['tabs'][$id]['is_last'] = true; |
|
288 | + } |
|
260 | 289 | } |
261 | 290 | |
262 | 291 | // Find the selected tab |
@@ -277,22 +306,29 @@ discard block |
||
277 | 306 | if (!empty($selected_tab['icon']) || !empty($tab_context['icon']) || !empty($selected_tab['help']) || !empty($tab_context['help']) || !empty($selected_tab['class']) || !empty($tab_context['class'])) |
278 | 307 | { |
279 | 308 | if (!empty($selected_tab['icon']) || !empty($tab_context['icon'])) |
280 | - echo ' |
|
309 | + { |
|
310 | + echo ' |
|
281 | 311 | <img src="', $settings['images_url'], '/icons/', !empty($selected_tab['icon']) ? $selected_tab['icon'] : $tab_context['icon'], '" alt="" class="icon" />'; |
312 | + } |
|
282 | 313 | elseif (!empty($selected_tab['class']) || !empty($tab_context['class'])) |
283 | - echo ' |
|
314 | + { |
|
315 | + echo ' |
|
284 | 316 | <span class="hdicon cat_img_', !empty($selected_tab['class']) ? $selected_tab['class'] : $tab_context['class'], '"></span>'; |
317 | + } |
|
285 | 318 | |
286 | 319 | if (!empty($selected_tab['help']) || !empty($tab_context['help'])) |
287 | - echo ' |
|
320 | + { |
|
321 | + echo ' |
|
288 | 322 | <a class="hdicon cat_img_helptopics help" href="', $scripturl, '?action=quickhelp;help=', !empty($selected_tab['help']) ? $selected_tab['help'] : $tab_context['help'], '" onclick="return reqOverlayDiv(this.href);" title="', $txt['help'], '"></a>'; |
323 | + } |
|
289 | 324 | |
290 | 325 | echo ' |
291 | 326 | ', $tab_context['title']; |
292 | 327 | } |
293 | - else |
|
294 | - echo ' |
|
328 | + else { |
|
329 | + echo ' |
|
295 | 330 | ', $tab_context['title']; |
331 | + } |
|
296 | 332 | |
297 | 333 | echo ' |
298 | 334 | </h3>'; |
@@ -300,17 +336,21 @@ discard block |
||
300 | 336 | // The function is in Admin.template.php, but since this template is used elsewhere, |
301 | 337 | // we need to check if the function is available. |
302 | 338 | if (function_exists('template_admin_quick_search')) |
303 | - template_admin_quick_search(); |
|
339 | + { |
|
340 | + template_admin_quick_search(); |
|
341 | + } |
|
304 | 342 | echo ' |
305 | 343 | </div>'; |
306 | 344 | } |
307 | 345 | |
308 | 346 | // Shall we use the tabs? Yes, it's the only known way! |
309 | 347 | if (!empty($selected_tab['description']) || !empty($tab_context['description'])) |
310 | - echo ' |
|
348 | + { |
|
349 | + echo ' |
|
311 | 350 | <p class="description"> |
312 | 351 | ', !empty($selected_tab['description']) ? $selected_tab['description'] : $tab_context['description'], ' |
313 | 352 | </p>'; |
353 | + } |
|
314 | 354 | |
315 | 355 | // Print out all the items in this tab (if any). |
316 | 356 | if (!empty($tab_context['tabs'])) |
@@ -322,18 +362,23 @@ discard block |
||
322 | 362 | foreach ($tab_context['tabs'] as $sa => $tab) |
323 | 363 | { |
324 | 364 | if (!empty($tab['disabled'])) |
325 | - continue; |
|
365 | + { |
|
366 | + continue; |
|
367 | + } |
|
326 | 368 | |
327 | 369 | if (!empty($tab['is_selected'])) |
328 | - echo ' |
|
370 | + { |
|
371 | + echo ' |
|
329 | 372 | <li class="listlevel1"> |
330 | 373 | <a class="linklevel1 active" href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">', $tab['label'], '</a> |
331 | 374 | </li>'; |
332 | - else |
|
333 | - echo ' |
|
375 | + } |
|
376 | + else { |
|
377 | + echo ' |
|
334 | 378 | <li class="listlevel1"> |
335 | 379 | <a class="linklevel1" href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">', $tab['label'], '</a> |
336 | 380 | </li>'; |
381 | + } |
|
337 | 382 | } |
338 | 383 | |
339 | 384 | // the end of tabs |
@@ -74,20 +74,26 @@ discard block |
||
74 | 74 | ', $modSettings['smileys_url'], '/'; |
75 | 75 | |
76 | 76 | if ($context['current_set']['id'] == 'default') |
77 | - echo ' |
|
77 | + { |
|
78 | + echo ' |
|
78 | 79 | <strong>default</strong> |
79 | 80 | <input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default" />'; |
81 | + } |
|
80 | 82 | elseif (empty($context['smiley_set_dirs'])) |
81 | - echo ' |
|
83 | + { |
|
84 | + echo ' |
|
82 | 85 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '" class="input_text" /> '; |
86 | + } |
|
83 | 87 | else |
84 | 88 | { |
85 | 89 | echo ' |
86 | 90 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
87 | 91 | |
88 | 92 | foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
89 | - echo ' |
|
93 | + { |
|
94 | + echo ' |
|
90 | 95 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected="selected"' : '', $smiley_set_dir['selectable'] ? '' : ' disabled="disabled"', '>', $smiley_set_dir['id'], '</option>'; |
96 | + } |
|
91 | 97 | |
92 | 98 | echo ' |
93 | 99 | </select>'; |
@@ -105,13 +111,15 @@ discard block |
||
105 | 111 | |
106 | 112 | // If this is a new smiley set they have the option to import smileys already in the directory. |
107 | 113 | if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
108 | - echo ' |
|
114 | + { |
|
115 | + echo ' |
|
109 | 116 | <dt> |
110 | 117 | <label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: |
111 | 118 | </dt> |
112 | 119 | <dd> |
113 | 120 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1" /> |
114 | 121 | </dd>'; |
122 | + } |
|
115 | 123 | |
116 | 124 | echo ' |
117 | 125 | </dl> |
@@ -146,8 +154,10 @@ discard block |
||
146 | 154 | <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();">'; |
147 | 155 | |
148 | 156 | foreach ($context['smiley_sets'] as $smiley_set) |
149 | - echo ' |
|
157 | + { |
|
158 | + echo ' |
|
150 | 159 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected="selected"' : '', '>', $smiley_set['name'], '</option>'; |
160 | + } |
|
151 | 161 | |
152 | 162 | echo ' |
153 | 163 | </select>) |
@@ -164,16 +174,20 @@ discard block |
||
164 | 174 | <dd>'; |
165 | 175 | |
166 | 176 | if (empty($context['filenames'])) |
167 | - echo ' |
|
177 | + { |
|
178 | + echo ' |
|
168 | 179 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" class="input_text" />'; |
180 | + } |
|
169 | 181 | else |
170 | 182 | { |
171 | 183 | echo ' |
172 | 184 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
173 | 185 | |
174 | 186 | foreach ($context['filenames'] as $filename) |
175 | - echo ' |
|
187 | + { |
|
188 | + echo ' |
|
176 | 189 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected="selected"' : '', '>', $filename['id'], '</option>'; |
190 | + } |
|
177 | 191 | |
178 | 192 | echo ' |
179 | 193 | </select>'; |
@@ -248,8 +262,10 @@ discard block |
||
248 | 262 | '; |
249 | 263 | |
250 | 264 | foreach ($context['smiley_sets'] as $smiley_set) |
251 | - echo ' |
|
265 | + { |
|
266 | + echo ' |
|
252 | 267 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected="selected"' : '', '>', $smiley_set['name'], '</option>'; |
268 | + } |
|
253 | 269 | |
254 | 270 | echo ' |
255 | 271 | </select> |
@@ -260,16 +276,20 @@ discard block |
||
260 | 276 | <dd>'; |
261 | 277 | |
262 | 278 | if (empty($context['filenames'])) |
263 | - echo ' |
|
279 | + { |
|
280 | + echo ' |
|
264 | 281 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');" class="input_text" />'; |
282 | + } |
|
265 | 283 | else |
266 | 284 | { |
267 | 285 | echo ' |
268 | 286 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
269 | 287 | |
270 | 288 | foreach ($context['filenames'] as $filename) |
271 | - echo ' |
|
289 | + { |
|
290 | + echo ' |
|
272 | 291 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected="selected"' : '', '>', $filename['id'], '</option>'; |
292 | + } |
|
273 | 293 | |
274 | 294 | echo ' |
275 | 295 | </select>'; |
@@ -299,13 +319,15 @@ discard block |
||
299 | 319 | <dl id="uploadMore" class="settings hide">'; |
300 | 320 | |
301 | 321 | foreach ($context['smiley_sets'] as $smiley_set) |
302 | - echo ' |
|
322 | + { |
|
323 | + echo ' |
|
303 | 324 | <dt> |
304 | 325 | ', $txt['smileys_add_upload_for1'], ' <strong>', $smiley_set['name'], '</strong> ', $txt['smileys_add_upload_for2'], ': |
305 | 326 | </dt> |
306 | 327 | <dd> |
307 | 328 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');" class="input_file" /> |
308 | 329 | </dd>'; |
330 | + } |
|
309 | 331 | |
310 | 332 | echo ' |
311 | 333 | </dl> |
@@ -390,18 +412,21 @@ discard block |
||
390 | 412 | foreach ($row as $smiley) |
391 | 413 | { |
392 | 414 | if (empty($context['move_smiley'])) |
393 | - echo ' |
|
415 | + { |
|
416 | + echo ' |
|
394 | 417 | <li id="smile_' . $smiley['id'] . '"> |
395 | 418 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"> |
396 | 419 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '" /> |
397 | 420 | </a> |
398 | 421 | </li>'; |
399 | - else |
|
400 | - echo ' |
|
422 | + } |
|
423 | + else { |
|
424 | + echo ' |
|
401 | 425 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: ', $smiley['selected'] ? '2px solid red' : '0px solid black', ';" alt="', $smiley['description'], '" /> |
402 | 426 | <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'], '"> |
403 | 427 | <img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $txt['smileys_move_here'], '" /> |
404 | 428 | </a>'; |
429 | + } |
|
405 | 430 | } |
406 | 431 | |
407 | 432 | echo ' |
@@ -413,8 +438,10 @@ discard block |
||
413 | 438 | <ul id="smiley_' . $location['id'] . '|' . ($key + 1) . '" class="sortable_smiley"><li></li></ul>'; |
414 | 439 | |
415 | 440 | if (!empty($context['move_smiley'])) |
416 | - echo ' |
|
441 | + { |
|
442 | + echo ' |
|
417 | 443 | <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'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $txt['smileys_move_here'], '" /></a>'; |
444 | + } |
|
418 | 445 | |
419 | 446 | echo ' |
420 | 447 | </div> |
@@ -426,7 +453,8 @@ discard block |
||
426 | 453 | </div>'; |
427 | 454 | |
428 | 455 | if (empty($context['move_smiley'])) |
429 | - echo ' |
|
456 | + { |
|
457 | + echo ' |
|
430 | 458 | <script> |
431 | 459 | $().elkSortable({ |
432 | 460 | sa: "smileyorder", |
@@ -441,7 +469,8 @@ discard block |
||
441 | 469 | token: {token_var: "' . $context['admin-sort_token_var'] . '", token_id: "' . $context['admin-sort_token'] . '"} |
442 | 470 | }); |
443 | 471 | </script>'; |
444 | -} |
|
472 | + } |
|
473 | + } |
|
445 | 474 | |
446 | 475 | /** |
447 | 476 | * Editing an individual message icon. |
@@ -460,13 +489,15 @@ discard block |
||
460 | 489 | <dl class="settings">'; |
461 | 490 | |
462 | 491 | if (!$context['new_icon']) |
463 | - echo ' |
|
492 | + { |
|
493 | + echo ' |
|
464 | 494 | <dt> |
465 | 495 | <label>', $txt['smiley_preview'], ': </label> |
466 | 496 | </dt> |
467 | 497 | <dd> |
468 | 498 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '" /> |
469 | 499 | </dd>'; |
500 | + } |
|
470 | 501 | |
471 | 502 | echo ' |
472 | 503 | <dt> |
@@ -495,9 +526,11 @@ discard block |
||
495 | 526 | |
496 | 527 | // Print the list of all the icons it can be put after... |
497 | 528 | foreach ($context['icons'] as $id => $data) |
498 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
529 | + { |
|
530 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
499 | 531 | echo ' |
500 | 532 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected="selected"' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
533 | + } |
|
501 | 534 | |
502 | 535 | echo ' |
503 | 536 | </select> |
@@ -505,8 +538,10 @@ discard block |
||
505 | 538 | </dl>'; |
506 | 539 | |
507 | 540 | if (!$context['new_icon']) |
508 | - echo ' |
|
541 | + { |
|
542 | + echo ' |
|
509 | 543 | <input type="hidden" name="icon" value="', $context['icon']['id'], '" />'; |
544 | + } |
|
510 | 545 | |
511 | 546 | echo ' |
512 | 547 | <div class="submitbutton"> |
@@ -73,9 +73,12 @@ discard block |
||
73 | 73 | if (is_array($value)) |
74 | 74 | { |
75 | 75 | if (isset($settings[$key])) |
76 | - $value = strtr($settings[$key], $value); |
|
77 | - else |
|
78 | - continue; |
|
76 | + { |
|
77 | + $value = strtr($settings[$key], $value); |
|
78 | + } |
|
79 | + else { |
|
80 | + continue; |
|
81 | + } |
|
79 | 82 | } |
80 | 83 | |
81 | 84 | echo ' |
@@ -92,9 +95,12 @@ discard block |
||
92 | 95 | if (is_array($value)) |
93 | 96 | { |
94 | 97 | if (isset($settings[$key])) |
95 | - $value = strtr($settings[$key], $value); |
|
96 | - else |
|
97 | - continue; |
|
98 | + { |
|
99 | + $value = strtr($settings[$key], $value); |
|
100 | + } |
|
101 | + else { |
|
102 | + continue; |
|
103 | + } |
|
98 | 104 | } |
99 | 105 | |
100 | 106 | echo ' |
@@ -262,8 +268,10 @@ discard block |
||
262 | 268 | <th class="history_head">', $txt['most_online'], '</th>'; |
263 | 269 | |
264 | 270 | if (!empty($modSettings['hitStats'])) |
265 | - echo ' |
|
271 | + { |
|
272 | + echo ' |
|
266 | 273 | <th class="history_head">', $txt['page_views'], '</th>'; |
274 | + } |
|
267 | 275 | |
268 | 276 | echo ' |
269 | 277 | </tr> |
@@ -283,8 +291,10 @@ discard block |
||
283 | 291 | <th>', $year['most_members_online'], '</th>'; |
284 | 292 | |
285 | 293 | if (!empty($modSettings['hitStats'])) |
286 | - echo ' |
|
294 | + { |
|
295 | + echo ' |
|
287 | 296 | <th>', $year['hits'], '</th>'; |
297 | + } |
|
288 | 298 | |
289 | 299 | echo ' |
290 | 300 | </tr>'; |
@@ -302,8 +312,10 @@ discard block |
||
302 | 312 | <th>', $month['most_members_online'], '</th>'; |
303 | 313 | |
304 | 314 | if (!empty($modSettings['hitStats'])) |
305 | - echo ' |
|
315 | + { |
|
316 | + echo ' |
|
306 | 317 | <th>', $month['hits'], '</th>'; |
318 | + } |
|
307 | 319 | |
308 | 320 | echo ' |
309 | 321 | </tr>'; |
@@ -321,8 +333,10 @@ discard block |
||
321 | 333 | <td>', $day['most_members_online'], '</td>'; |
322 | 334 | |
323 | 335 | if (!empty($modSettings['hitStats'])) |
324 | - echo ' |
|
336 | + { |
|
337 | + echo ' |
|
325 | 338 | <td>', $day['hits'], '</td>'; |
339 | + } |
|
326 | 340 | |
327 | 341 | echo ' |
328 | 342 | </tr>'; |