@@ -12,7 +12,8 @@ |
||
12 | 12 | header('Location: ' . $boardurl); |
13 | 13 | } |
14 | 14 | // Can't find it... just forget it. |
15 | -else |
|
15 | +else { |
|
16 | 16 | exit; |
17 | +} |
|
17 | 18 | |
18 | 19 | ?> |
19 | 20 | \ No newline at end of file |
@@ -1,9 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
6 | +} else { |
|
7 | 7 | exit; |
8 | +} |
|
8 | 9 | |
9 | 10 | ?> |
10 | 11 | \ No newline at end of file |
@@ -583,8 +583,7 @@ discard block |
||
583 | 583 | { |
584 | 584 | $header = '<?php require("' . ($user_info['is_admin'] ? addslashes(realpath($boarddir . '/SSI.php')) : 'SSI.php') . '"); ?>' . "\n" . $header; |
585 | 585 | return $header . template_homepage_sample1_html() . $footer; |
586 | - } |
|
587 | - else |
|
586 | + } else |
|
588 | 587 | { |
589 | 588 | echo $header; |
590 | 589 | template_homepage_sample1_php(); |
@@ -599,9 +598,10 @@ discard block |
||
599 | 598 | |
600 | 599 | $topics = ssi_recentTopics(8, null, null, 'array'); |
601 | 600 | |
602 | - foreach ($topics as $topic) |
|
603 | - echo ' |
|
601 | + foreach ($topics as $topic) { |
|
602 | + echo ' |
|
604 | 603 | <li><a href="', $topic['href'], '">', $topic['subject'], '</a> ', $txt['by'], ' ', $topic['poster']['link'], '</li>'; |
604 | + } |
|
605 | 605 | |
606 | 606 | unset($topics); |
607 | 607 |
@@ -186,8 +186,9 @@ discard block |
||
186 | 186 | |
187 | 187 | ########## Error-Catching ########## |
188 | 188 | # Note: You shouldn't touch these settings. |
189 | -if (file_exists(dirname(__FILE__) . '/db_last_error.php')) |
|
189 | +if (file_exists(dirname(__FILE__) . '/db_last_error.php')) { |
|
190 | 190 | include(dirname(__FILE__) . '/db_last_error.php'); |
191 | +} |
|
191 | 192 | |
192 | 193 | if (!isset($db_last_error)) |
193 | 194 | { |
@@ -202,11 +203,14 @@ discard block |
||
202 | 203 | } |
203 | 204 | |
204 | 205 | # Make sure the paths are correct... at least try to fix them. |
205 | -if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt')) |
|
206 | +if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt')) { |
|
206 | 207 | $boarddir = dirname(__FILE__); |
207 | -if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources')) |
|
208 | +} |
|
209 | +if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources')) { |
|
208 | 210 | $sourcedir = $boarddir . '/Sources'; |
209 | -if (!file_exists($cachedir) && file_exists($boarddir . '/cache')) |
|
211 | +} |
|
212 | +if (!file_exists($cachedir) && file_exists($boarddir . '/cache')) { |
|
210 | 213 | $cachedir = $boarddir . '/cache'; |
214 | +} |
|
211 | 215 | |
212 | 216 | ?> |
213 | 217 | \ No newline at end of file |
@@ -145,11 +145,12 @@ discard block |
||
145 | 145 | <div class="question">', $txt['poll_question'], ': <strong>', $context['poll']['question'], '</strong>'; |
146 | 146 | |
147 | 147 | $options = 1; |
148 | - foreach ($context['poll']['options'] as $option) |
|
149 | - echo ' |
|
148 | + foreach ($context['poll']['options'] as $option) { |
|
149 | + echo ' |
|
150 | 150 | <div class="', $option['voted_this'] ? 'voted' : '', '">', $txt['option'], ' ', $options++, ': <strong>', $option['option'], '</strong> |
151 | 151 | ', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', ' |
152 | 152 | </div>'; |
153 | + } |
|
153 | 154 | |
154 | 155 | echo ' |
155 | 156 | </div>'; |
@@ -171,9 +172,10 @@ discard block |
||
171 | 172 | echo ' |
172 | 173 | <hr>'; |
173 | 174 | |
174 | - foreach ($context['printattach'][$post['id_msg']] as $attach) |
|
175 | - echo ' |
|
175 | + foreach ($context['printattach'][$post['id_msg']] as $attach) { |
|
176 | + echo ' |
|
176 | 177 | <img width="' . $attach['width'] . '" height="' . $attach['height'] . '" src="', $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attach['id_attach'] . '" alt="">'; |
178 | + } |
|
177 | 179 | } |
178 | 180 | |
179 | 181 | echo ' |
@@ -213,11 +215,12 @@ discard block |
||
213 | 215 | <div class="print_options">'; |
214 | 216 | |
215 | 217 | // which option is set, text or text&images |
216 | - if (isset($_REQUEST['images'])) |
|
217 | - echo ' |
|
218 | + if (isset($_REQUEST['images'])) { |
|
219 | + echo ' |
|
218 | 220 | <a href="', $url_text, '">', $txt['print_page_text'], '</a> | <strong><a href="', $url_images, '">', $txt['print_page_images'], '</a></strong>'; |
219 | - else |
|
220 | - echo ' |
|
221 | + } else { |
|
222 | + echo ' |
|
221 | 223 | <strong><a href="', $url_text, '">', $txt['print_page_text'], '</a></strong> | <a href="', $url_images, '">', $txt['print_page_images'], '</a>'; |
222 | -} |
|
224 | + } |
|
225 | + } |
|
223 | 226 | ?> |
224 | 227 | \ No newline at end of file |
@@ -36,11 +36,12 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | // An error? |
39 | - if (!empty($context['error_message'])) |
|
40 | - echo ' |
|
39 | + if (!empty($context['error_message'])) { |
|
40 | + echo ' |
|
41 | 41 | <div class="errorbox"> |
42 | 42 | ', $context['error_message'], ' |
43 | 43 | </div>'; |
44 | + } |
|
44 | 45 | |
45 | 46 | // Provide something of an introduction... |
46 | 47 | echo ' |
@@ -67,11 +68,12 @@ discard block |
||
67 | 68 | // If the files are not writable, we might! |
68 | 69 | if (!empty($context['still_not_writable'])) |
69 | 70 | { |
70 | - if (!empty($context['package_ftp']['error'])) |
|
71 | - echo ' |
|
71 | + if (!empty($context['package_ftp']['error'])) { |
|
72 | + echo ' |
|
72 | 73 | <div class="errorbox"> |
73 | 74 | ', $context['package_ftp']['error'], ' |
74 | 75 | </div>'; |
76 | + } |
|
75 | 77 | |
76 | 78 | echo ' |
77 | 79 | <div class="cat_bar"> |
@@ -243,11 +245,12 @@ discard block |
||
243 | 245 | |
244 | 246 | // Is it not writable? |
245 | 247 | // Show an error. |
246 | - if (!empty($context['entries_not_writable_message'])) |
|
247 | - echo ' |
|
248 | + if (!empty($context['entries_not_writable_message'])) { |
|
249 | + echo ' |
|
248 | 250 | <div class="errorbox"> |
249 | 251 | ', $context['entries_not_writable_message'], ' |
250 | 252 | </div>'; |
253 | + } |
|
251 | 254 | |
252 | 255 | // Already have some file entries? |
253 | 256 | if (!empty($context['file_entries'])) |
@@ -39,9 +39,10 @@ discard block |
||
39 | 39 | <select name="year" id="year" onchange="generateDays();"> |
40 | 40 | <option value="0000"', $context['holiday']['year'] == '0000' ? ' selected' : '', '>', $txt['every_year'], '</option>'; |
41 | 41 | // Show a list of all the years we allow... |
42 | - for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) |
|
43 | - echo ' |
|
42 | + for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) { |
|
43 | + echo ' |
|
44 | 44 | <option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected' : '', '>', $year, '</option>'; |
45 | + } |
|
45 | 46 | |
46 | 47 | echo ' |
47 | 48 | </select> |
@@ -49,9 +50,10 @@ discard block |
||
49 | 50 | <select name="month" id="month" onchange="generateDays();">'; |
50 | 51 | |
51 | 52 | // There are 12 months per year - ensure that they all get listed. |
52 | - for ($month = 1; $month <= 12; $month++) |
|
53 | - echo ' |
|
53 | + for ($month = 1; $month <= 12; $month++) { |
|
54 | + echo ' |
|
54 | 55 | <option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
56 | + } |
|
55 | 57 | |
56 | 58 | echo ' |
57 | 59 | </select> |
@@ -59,23 +61,25 @@ discard block |
||
59 | 61 | <select name="day" id="day" onchange="generateDays();">'; |
60 | 62 | |
61 | 63 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
62 | - for ($day = 1; $day <= $context['holiday']['last_day']; $day++) |
|
63 | - echo ' |
|
64 | + for ($day = 1; $day <= $context['holiday']['last_day']; $day++) { |
|
65 | + echo ' |
|
64 | 66 | <option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected' : '', '>', $day, '</option>'; |
67 | + } |
|
65 | 68 | |
66 | 69 | echo ' |
67 | 70 | </select> |
68 | 71 | </dd> |
69 | 72 | </dl>'; |
70 | 73 | |
71 | - if ($context['is_new']) |
|
72 | - echo ' |
|
74 | + if ($context['is_new']) { |
|
75 | + echo ' |
|
73 | 76 | <input type="submit" value="', $txt['holidays_button_add'], '" class="button_submit">'; |
74 | - else |
|
75 | - echo ' |
|
77 | + } else { |
|
78 | + echo ' |
|
76 | 79 | <input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" class="button_submit"> |
77 | 80 | <input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" class="button_submit"> |
78 | 81 | <input type="hidden" name="holiday" value="', $context['holiday']['id'], '">'; |
82 | + } |
|
79 | 83 | echo ' |
80 | 84 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
81 | 85 | </div> |
@@ -220,7 +220,7 @@ |
||
220 | 220 | ), |
221 | 221 | ), |
222 | 222 | ); |
223 | - */ |
|
223 | + */ |
|
224 | 224 | |
225 | 225 | // Are we using right-to-left orientation? |
226 | 226 | $first = $context['right_to_left'] ? 'last' : 'first'; |
@@ -21,26 +21,30 @@ discard block |
||
21 | 21 | |
22 | 22 | // Get a shortcut to the current list. |
23 | 23 | $list_id = $list_id === null ? (!empty($context['default_list']) ? $context['default_list'] : '') : $list_id; |
24 | - if (empty($list_id) || empty($context[$list_id])) |
|
25 | - return; |
|
24 | + if (empty($list_id) || empty($context[$list_id])) { |
|
25 | + return; |
|
26 | + } |
|
26 | 27 | $cur_list = &$context[$list_id]; |
27 | 28 | |
28 | 29 | // These are the main tabs that is used all around the template. |
29 | - if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) |
|
30 | - template_create_list_menu($cur_list['list_menu'], 'top'); |
|
30 | + if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) { |
|
31 | + template_create_list_menu($cur_list['list_menu'], 'top'); |
|
32 | + } |
|
31 | 33 | |
32 | - if (isset($cur_list['form'])) |
|
33 | - echo ' |
|
34 | + if (isset($cur_list['form'])) { |
|
35 | + echo ' |
|
34 | 36 | <form action="', $cur_list['form']['href'], '" method="post"', empty($cur_list['form']['name']) ? '' : ' name="' . $cur_list['form']['name'] . '" id="' . $cur_list['form']['name'] . '"', ' accept-charset="', $context['character_set'], '">'; |
37 | + } |
|
35 | 38 | |
36 | 39 | // Show the title of the table (if any). |
37 | - if (!empty($cur_list['title'])) |
|
38 | - echo ' |
|
40 | + if (!empty($cur_list['title'])) { |
|
41 | + echo ' |
|
39 | 42 | <div class="cat_bar"> |
40 | 43 | <h3 class="catbg"> |
41 | 44 | ', $cur_list['title'], ' |
42 | 45 | </h3> |
43 | 46 | </div>'; |
47 | + } |
|
44 | 48 | |
45 | 49 | if (isset($cur_list['additional_rows']['after_title'])) |
46 | 50 | { |
@@ -51,20 +55,23 @@ discard block |
||
51 | 55 | </div>'; |
52 | 56 | } |
53 | 57 | |
54 | - if (isset($cur_list['additional_rows']['top_of_list'])) |
|
55 | - template_additional_rows('top_of_list', $cur_list); |
|
58 | + if (isset($cur_list['additional_rows']['top_of_list'])) { |
|
59 | + template_additional_rows('top_of_list', $cur_list); |
|
60 | + } |
|
56 | 61 | |
57 | 62 | if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['above_column_headers'])) |
58 | 63 | { |
59 | 64 | // Show the page index (if this list doesn't intend to show all items). |
60 | - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) |
|
61 | - echo ' |
|
65 | + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { |
|
66 | + echo ' |
|
62 | 67 | <div class="floatleft"> |
63 | 68 | <div class="pagesection">', $cur_list['page_index'], '</div> |
64 | 69 | </div>'; |
70 | + } |
|
65 | 71 | |
66 | - if (isset($cur_list['additional_rows']['above_column_headers'])) |
|
67 | - template_additional_rows('above_column_headers', $cur_list); |
|
72 | + if (isset($cur_list['additional_rows']['above_column_headers'])) { |
|
73 | + template_additional_rows('above_column_headers', $cur_list); |
|
74 | + } |
|
68 | 75 | } |
69 | 76 | |
70 | 77 | echo ' |
@@ -94,11 +101,12 @@ discard block |
||
94 | 101 | <tbody>'; |
95 | 102 | |
96 | 103 | // Show a nice message informing there are no items in this list. |
97 | - if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) |
|
98 | - echo ' |
|
104 | + if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) { |
|
105 | + echo ' |
|
99 | 106 | <tr class="windowbg"> |
100 | 107 | <td colspan="', $cur_list['num_columns'], '" class="', !empty($cur_list['no_items_align']) ? $cur_list['no_items_align'] : 'centertext', '">', $cur_list['no_items_label'], '</td> |
101 | 108 | </tr>'; |
109 | + } |
|
102 | 110 | |
103 | 111 | // Show the list rows. |
104 | 112 | elseif (!empty($cur_list['rows'])) |
@@ -108,10 +116,11 @@ discard block |
||
108 | 116 | echo ' |
109 | 117 | <tr class="windowbg', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', ' id="list_', $list_id, '_', $id, '">'; |
110 | 118 | |
111 | - if (!empty($row['data'])) |
|
112 | - foreach ($row['data'] as $row_data) |
|
119 | + if (!empty($row['data'])) { |
|
120 | + foreach ($row['data'] as $row_data) |
|
113 | 121 | echo ' |
114 | 122 | <td', empty($row_data['class']) ? '' : ' class="' . $row_data['class'] . '"', empty($row_data['style']) ? '' : ' style="' . $row_data['style'] . '"', '>', $row_data['value'], '</td>'; |
123 | + } |
|
115 | 124 | |
116 | 125 | echo ' |
117 | 126 | </tr>'; |
@@ -128,46 +137,53 @@ discard block |
||
128 | 137 | <div class="flow_auto">'; |
129 | 138 | |
130 | 139 | // Show the page index (if this list doesn't intend to show all items). |
131 | - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) |
|
132 | - echo ' |
|
140 | + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { |
|
141 | + echo ' |
|
133 | 142 | <div class="floatleft"> |
134 | 143 | <div class="pagesection">', $cur_list['page_index'], '</div> |
135 | 144 | </div>'; |
145 | + } |
|
136 | 146 | |
137 | - if (isset($cur_list['additional_rows']['below_table_data'])) |
|
138 | - template_additional_rows('below_table_data', $cur_list); |
|
147 | + if (isset($cur_list['additional_rows']['below_table_data'])) { |
|
148 | + template_additional_rows('below_table_data', $cur_list); |
|
149 | + } |
|
139 | 150 | |
140 | 151 | echo ' |
141 | 152 | </div>'; |
142 | 153 | } |
143 | 154 | |
144 | - if (isset($cur_list['additional_rows']['bottom_of_list'])) |
|
145 | - template_additional_rows('bottom_of_list', $cur_list); |
|
155 | + if (isset($cur_list['additional_rows']['bottom_of_list'])) { |
|
156 | + template_additional_rows('bottom_of_list', $cur_list); |
|
157 | + } |
|
146 | 158 | |
147 | 159 | if (isset($cur_list['form'])) |
148 | 160 | { |
149 | - foreach ($cur_list['form']['hidden_fields'] as $name => $value) |
|
150 | - echo ' |
|
161 | + foreach ($cur_list['form']['hidden_fields'] as $name => $value) { |
|
162 | + echo ' |
|
151 | 163 | <input type="hidden" name="', $name, '" value="', $value, '">'; |
164 | + } |
|
152 | 165 | |
153 | - if (isset($cur_list['form']['token'])) |
|
154 | - echo ' |
|
166 | + if (isset($cur_list['form']['token'])) { |
|
167 | + echo ' |
|
155 | 168 | <input type="hidden" name="', $context[$cur_list['form']['token'] . '_token_var'], '" value="', $context[$cur_list['form']['token'] . '_token'], '">'; |
169 | + } |
|
156 | 170 | |
157 | 171 | echo ' |
158 | 172 | </form>'; |
159 | 173 | } |
160 | 174 | |
161 | 175 | // Tabs at the bottom. Usually bottom aligned. |
162 | - if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) |
|
163 | - template_create_list_menu($cur_list['list_menu'], 'bottom'); |
|
176 | + if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) { |
|
177 | + template_create_list_menu($cur_list['list_menu'], 'bottom'); |
|
178 | + } |
|
164 | 179 | |
165 | - if (isset($cur_list['javascript'])) |
|
166 | - echo ' |
|
180 | + if (isset($cur_list['javascript'])) { |
|
181 | + echo ' |
|
167 | 182 | <script> |
168 | 183 | ', $cur_list['javascript'], ' |
169 | 184 | </script>'; |
170 | -} |
|
185 | + } |
|
186 | + } |
|
171 | 187 | |
172 | 188 | /** |
173 | 189 | * This template displays additional rows above or below the list. |
@@ -177,10 +193,11 @@ discard block |
||
177 | 193 | */ |
178 | 194 | function template_additional_rows($row_position, $cur_list) |
179 | 195 | { |
180 | - foreach ($cur_list['additional_rows'][$row_position] as $row) |
|
181 | - echo ' |
|
196 | + foreach ($cur_list['additional_rows'][$row_position] as $row) { |
|
197 | + echo ' |
|
182 | 198 | <div class="additional_row', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', '>', $row['value'], '</div>'; |
183 | -} |
|
199 | + } |
|
200 | + } |
|
184 | 201 | |
185 | 202 | /** |
186 | 203 | * This function creates a menu |
@@ -239,18 +256,19 @@ discard block |
||
239 | 256 | |
240 | 257 | foreach ($list_menu['links'] as $link) |
241 | 258 | { |
242 | - if ($link['is_selected']) |
|
243 | - echo ' |
|
259 | + if ($link['is_selected']) { |
|
260 | + echo ' |
|
244 | 261 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $first, '"> </td> |
245 | 262 | <td class="', $direction == 'top' ? 'mirrortab' : 'maintab', '_active_back"> |
246 | 263 | <a href="', $link['href'], '">', $link['label'], '</a> |
247 | 264 | </td> |
248 | 265 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $last, '"> </td>'; |
249 | - else |
|
250 | - echo ' |
|
266 | + } else { |
|
267 | + echo ' |
|
251 | 268 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_back"> |
252 | 269 | <a href="', $link['href'], '">', $link['label'], '</a> |
253 | 270 | </td>'; |
271 | + } |
|
254 | 272 | } |
255 | 273 | |
256 | 274 | echo ' |
@@ -261,12 +279,12 @@ discard block |
||
261 | 279 | <td> </td>' : '', ' |
262 | 280 | </tr> |
263 | 281 | </table>'; |
264 | - } |
|
265 | - elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons') |
|
282 | + } elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons') |
|
266 | 283 | { |
267 | 284 | $links = array(); |
268 | - foreach ($list_menu['links'] as $link) |
|
269 | - $links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>'; |
|
285 | + foreach ($list_menu['links'] as $link) { |
|
286 | + $links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>'; |
|
287 | + } |
|
270 | 288 | |
271 | 289 | echo ' |
272 | 290 | <table style="margin-', $list_menu['position'], ': 10px; width: 100%;"> |
@@ -26,9 +26,10 @@ discard block |
||
26 | 26 | <div class="cat_bar"> |
27 | 27 | <h3 class="catbg"> |
28 | 28 | <span class="floatleft">', $txt['members_list'], '</span>'; |
29 | - if (!isset($context['old_search'])) |
|
30 | - echo ' |
|
29 | + if (!isset($context['old_search'])) { |
|
30 | + echo ' |
|
31 | 31 | <span class="floatright">', $context['letter_links'], '</span>'; |
32 | + } |
|
32 | 33 | echo ' |
33 | 34 | </h3> |
34 | 35 | </div>'; |
@@ -43,19 +44,22 @@ discard block |
||
43 | 44 | foreach ($context['columns'] as $key => $column) |
44 | 45 | { |
45 | 46 | // @TODO maybe find something nicer? |
46 | - if ($key == 'email_address' && !$context['can_send_email']) |
|
47 | - continue; |
|
47 | + if ($key == 'email_address' && !$context['can_send_email']) { |
|
48 | + continue; |
|
49 | + } |
|
48 | 50 | |
49 | 51 | // This is a selected column, so underline it or some such. |
50 | - if ($column['selected']) |
|
51 | - echo ' |
|
52 | + if ($column['selected']) { |
|
53 | + echo ' |
|
52 | 54 | <th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', ' selected" style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . '> |
53 | 55 | <a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . '</a><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></th>'; |
56 | + } |
|
54 | 57 | // This is just some column... show the link and be done with it. |
55 | - else |
|
56 | - echo ' |
|
58 | + else { |
|
59 | + echo ' |
|
57 | 60 | <th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' style="width: ' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '> |
58 | 61 | ', $column['link'], '</th>'; |
62 | + } |
|
59 | 63 | } |
60 | 64 | echo ' |
61 | 65 | </tr> |
@@ -74,9 +78,10 @@ discard block |
||
74 | 78 | </td> |
75 | 79 | <td class="lefttext">', $member['link'], '</td>'; |
76 | 80 | |
77 | - if (!isset($context['disabled_fields']['website'])) |
|
78 | - echo ' |
|
81 | + if (!isset($context['disabled_fields']['website'])) { |
|
82 | + echo ' |
|
79 | 83 | <td class="centertext website_url">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><span class="generic_icons www" title="' . $member['website']['title'] . '"></span></a>' : '', '</td>'; |
84 | + } |
|
80 | 85 | |
81 | 86 | // Group and date. |
82 | 87 | echo ' |
@@ -89,11 +94,12 @@ discard block |
||
89 | 94 | <td class="centertext" style="white-space: nowrap; width: 15px">', $member['posts'], '</td> |
90 | 95 | <td class="centertext statsbar" style="width: 120px">'; |
91 | 96 | |
92 | - if (!empty($member['post_percent'])) |
|
93 | - echo ' |
|
97 | + if (!empty($member['post_percent'])) { |
|
98 | + echo ' |
|
94 | 99 | <div class="bar" style="width: ', $member['post_percent'] + 4, 'px;"> |
95 | 100 | <div style="width: ', $member['post_percent'], 'px;"></div> |
96 | 101 | </div>'; |
102 | + } |
|
97 | 103 | |
98 | 104 | echo ' |
99 | 105 | </td>'; |
@@ -102,9 +108,10 @@ discard block |
||
102 | 108 | // Show custom fields marked to be shown here |
103 | 109 | if (!empty($context['custom_profile_fields']['columns'])) |
104 | 110 | { |
105 | - foreach ($context['custom_profile_fields']['columns'] as $key => $column) |
|
106 | - echo ' |
|
111 | + foreach ($context['custom_profile_fields']['columns'] as $key => $column) { |
|
112 | + echo ' |
|
107 | 113 | <td class="righttext">', $member['options'][$key], '</td>'; |
114 | + } |
|
108 | 115 | } |
109 | 116 | |
110 | 117 | echo ' |
@@ -112,11 +119,12 @@ discard block |
||
112 | 119 | } |
113 | 120 | } |
114 | 121 | // No members? |
115 | - else |
|
116 | - echo ' |
|
122 | + else { |
|
123 | + echo ' |
|
117 | 124 | <tr> |
118 | 125 | <td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td> |
119 | 126 | </tr>'; |
127 | + } |
|
120 | 128 | |
121 | 129 | echo ' |
122 | 130 | </tbody> |
@@ -129,9 +137,10 @@ discard block |
||
129 | 137 | <div class="pagelinks floatleft">', $context['page_index'], '</div>'; |
130 | 138 | |
131 | 139 | // If it is displaying the result of a search show a "search again" link to edit their criteria. |
132 | - if (isset($context['old_search'])) |
|
133 | - echo ' |
|
140 | + if (isset($context['old_search'])) { |
|
141 | + echo ' |
|
134 | 142 | <a class="button_link" href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>'; |
143 | + } |
|
135 | 144 | echo ' |
136 | 145 | </div> |
137 | 146 | </div>'; |