@@ -66,26 +66,31 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function checkRequest() |
| 68 | 68 | { |
| 69 | - if (!$this->enabled) |
|
| 70 | - return false; |
|
| 69 | + if (!$this->enabled) { |
|
| 70 | + return false; |
|
| 71 | + } |
|
| 71 | 72 | |
| 72 | 73 | // Try to create the image cache directory if it doesn't exist |
| 73 | - if (!file_exists($this->cache)) |
|
| 74 | - if (!mkdir($this->cache) || !copy(dirname($this->cache) . '/index.php', $this->cache . '/index.php')) |
|
| 74 | + if (!file_exists($this->cache)) { |
|
| 75 | + if (!mkdir($this->cache) || !copy(dirname($this->cache) . '/index.php', $this->cache . '/index.php')) |
|
| 75 | 76 | return false; |
| 77 | + } |
|
| 76 | 78 | |
| 77 | - if (empty($_GET['hash']) || empty($_GET['request'])) |
|
| 78 | - return false; |
|
| 79 | + if (empty($_GET['hash']) || empty($_GET['request'])) { |
|
| 80 | + return false; |
|
| 81 | + } |
|
| 79 | 82 | |
| 80 | 83 | $hash = $_GET['hash']; |
| 81 | 84 | $request = $_GET['request']; |
| 82 | 85 | |
| 83 | - if (md5($request . $this->secret) != $hash) |
|
| 84 | - return false; |
|
| 86 | + if (md5($request . $this->secret) != $hash) { |
|
| 87 | + return false; |
|
| 88 | + } |
|
| 85 | 89 | |
| 86 | 90 | // Attempt to cache the request if it doesn't exist |
| 87 | - if (!$this->isCached($request)) |
|
| 88 | - return $this->cacheImage($request); |
|
| 91 | + if (!$this->isCached($request)) { |
|
| 92 | + return $this->cacheImage($request); |
|
| 93 | + } |
|
| 89 | 94 | |
| 90 | 95 | return true; |
| 91 | 96 | } |
@@ -106,15 +111,17 @@ discard block |
||
| 106 | 111 | if (!$cached || time() - $cached['time'] > (5 * 86400)) |
| 107 | 112 | { |
| 108 | 113 | @unlink($cached_file); |
| 109 | - if ($this->checkRequest()) |
|
| 110 | - $this->serve(); |
|
| 114 | + if ($this->checkRequest()) { |
|
| 115 | + $this->serve(); |
|
| 116 | + } |
|
| 111 | 117 | exit; |
| 112 | 118 | } |
| 113 | 119 | |
| 114 | 120 | // Make sure we're serving an image |
| 115 | 121 | $contentParts = explode('/', !empty($cached['content_type']) ? $cached['content_type'] : ''); |
| 116 | - if ($contentParts[0] != 'image') |
|
| 117 | - exit; |
|
| 122 | + if ($contentParts[0] != 'image') { |
|
| 123 | + exit; |
|
| 124 | + } |
|
| 118 | 125 | |
| 119 | 126 | header('Content-type: ' . $cached['content_type']); |
| 120 | 127 | header('Content-length: ' . $cached['size']); |
@@ -160,19 +167,22 @@ discard block |
||
| 160 | 167 | $request = $curl->get_url_data($request); |
| 161 | 168 | $response = $request->result(); |
| 162 | 169 | |
| 163 | - if (empty($response)) |
|
| 164 | - return false; |
|
| 170 | + if (empty($response)) { |
|
| 171 | + return false; |
|
| 172 | + } |
|
| 165 | 173 | |
| 166 | 174 | $headers = $response['headers']; |
| 167 | 175 | |
| 168 | 176 | // Make sure the url is returning an image |
| 169 | 177 | $contentParts = explode('/', !empty($headers['content-type']) ? $headers['content-type'] : ''); |
| 170 | - if ($contentParts[0] != 'image') |
|
| 171 | - return false; |
|
| 178 | + if ($contentParts[0] != 'image') { |
|
| 179 | + return false; |
|
| 180 | + } |
|
| 172 | 181 | |
| 173 | 182 | // Validate the filesize |
| 174 | - if ($response['size'] > ($this->maxSize * 1024)) |
|
| 175 | - return false; |
|
| 183 | + if ($response['size'] > ($this->maxSize * 1024)) { |
|
| 184 | + return false; |
|
| 185 | + } |
|
| 176 | 186 | |
| 177 | 187 | return file_put_contents($dest, json_encode(array( |
| 178 | 188 | 'content_type' => $headers['content-type'], |
@@ -184,7 +194,8 @@ discard block |
||
| 184 | 194 | } |
| 185 | 195 | |
| 186 | 196 | $proxy = new ProxyServer(); |
| 187 | -if ($proxy->checkRequest()) |
|
| 197 | +if ($proxy->checkRequest()) { |
|
| 188 | 198 | $proxy->serve(); |
| 199 | +} |
|
| 189 | 200 | |
| 190 | 201 | exit; |
@@ -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 |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | global $context, $txt; |
| 25 | 25 | |
| 26 | - if (!empty($context['simple_action'])) |
|
| 27 | - echo ' |
|
| 26 | + if (!empty($context['simple_action'])) { |
|
| 27 | + echo ' |
|
| 28 | 28 | <strong> |
| 29 | 29 | ', $context['error_title'], ' |
| 30 | 30 | </strong><br> |
| 31 | 31 | <div ', $context['error_code'], 'class="padding">', $context['error_message'], '</div>'; |
| 32 | - else |
|
| 32 | + } else |
|
| 33 | 33 | { |
| 34 | 34 | echo ' |
| 35 | 35 | <div id="fatal_error"> |
@@ -82,21 +82,23 @@ discard block |
||
| 82 | 82 | ', $txt['apply_filter_of_type'], ':'; |
| 83 | 83 | |
| 84 | 84 | $error_types = array(); |
| 85 | - foreach ($context['error_types'] as $type => $details) |
|
| 86 | - $error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>'; |
|
| 85 | + foreach ($context['error_types'] as $type => $details) { |
|
| 86 | + $error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>'; |
|
| 87 | + } |
|
| 87 | 88 | |
| 88 | 89 | echo ' |
| 89 | 90 | ', implode(' | ', $error_types), ' |
| 90 | 91 | </td> |
| 91 | 92 | </tr>'; |
| 92 | 93 | |
| 93 | - if ($context['has_filter']) |
|
| 94 | - echo ' |
|
| 94 | + if ($context['has_filter']) { |
|
| 95 | + echo ' |
|
| 95 | 96 | <tr> |
| 96 | 97 | <td colspan="3" class="windowbg"> |
| 97 | 98 | <strong> ', $txt['applying_filter'], ':</strong> ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' [<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', '">', $txt['clear_filter'], '</a>] |
| 98 | 99 | </td> |
| 99 | 100 | </tr>'; |
| 101 | + } |
|
| 100 | 102 | |
| 101 | 103 | echo ' |
| 102 | 104 | <tr> |
@@ -107,11 +109,12 @@ discard block |
||
| 107 | 109 | </tr>'; |
| 108 | 110 | |
| 109 | 111 | // No errors, then show a message |
| 110 | - if (count($context['errors']) == 0) |
|
| 111 | - echo ' |
|
| 112 | + if (count($context['errors']) == 0) { |
|
| 113 | + echo ' |
|
| 112 | 114 | <tr class="windowbg"> |
| 113 | 115 | <td class="centertext" colspan="2">', $txt['errlog_no_entries'], '</td> |
| 114 | 116 | </tr>'; |
| 117 | + } |
|
| 115 | 118 | |
| 116 | 119 | // we have some errors, must be some mods installed :P |
| 117 | 120 | foreach ($context['errors'] as $error) |
@@ -126,20 +129,22 @@ discard block |
||
| 126 | 129 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? '' : ';desc', $context['has_filter'] ? $context['filter']['href'] : '', '" title="', $txt['reverse_direction'], '"><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></a> |
| 127 | 130 | ', $error['time'], '<br>'; |
| 128 | 131 | |
| 129 | - if (!empty($error['member']['ip'])) |
|
| 130 | - echo ' |
|
| 132 | + if (!empty($error['member']['ip'])) { |
|
| 133 | + echo ' |
|
| 131 | 134 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=ip;value=', $error['member']['ip'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_ip'], '"><span class="generic_icons filter centericon"></span></a> |
| 132 | 135 | <strong><a href="', $scripturl, '?action=trackip;searchip=', $error['member']['ip'], '">', $error['member']['ip'], '</a></strong> <br>'; |
| 136 | + } |
|
| 133 | 137 | |
| 134 | 138 | echo ' |
| 135 | 139 | </div> |
| 136 | 140 | |
| 137 | 141 | <div style="float: left; width: 50%; line-height: 1.8em; padding: 0 4px;">'; |
| 138 | 142 | |
| 139 | - if ($error['member']['session'] != '') |
|
| 140 | - echo ' |
|
| 143 | + if ($error['member']['session'] != '') { |
|
| 144 | + echo ' |
|
| 141 | 145 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=session;value=', $error['member']['session'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_session'], '"><span class="generic_icons filter centericon"></span></a> |
| 142 | 146 | ', $error['member']['session'], '<br>'; |
| 147 | + } |
|
| 143 | 148 | |
| 144 | 149 | echo ' |
| 145 | 150 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=error_type;value=', $error['error_type']['type'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '"><span class="generic_icons filter centericon"></span></a> |
@@ -153,8 +158,8 @@ discard block |
||
| 153 | 158 | <a style="display: table-cell;" href="', $error['url']['html'], '">', $error['url']['html'], '</a> |
| 154 | 159 | </div>'; |
| 155 | 160 | |
| 156 | - if (!empty($error['file'])) |
|
| 157 | - echo ' |
|
| 161 | + if (!empty($error['file'])) { |
|
| 162 | + echo ' |
|
| 158 | 163 | <div style="float: left; width: 100%; padding: 4px 0; line-height: 1.6em; border-top: 1px solid #e3e3e3;"> |
| 159 | 164 | <a style="display: table-cell; padding: 4px; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=file;value=', $error['file']['search'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_file'], '"><span class="generic_icons filter"></span></a> |
| 160 | 165 | <div> |
@@ -162,6 +167,7 @@ discard block |
||
| 162 | 167 | ', $txt['line'], ': ', $error['file']['line'], ' |
| 163 | 168 | </div> |
| 164 | 169 | </div>'; |
| 170 | + } |
|
| 165 | 171 | |
| 166 | 172 | echo ' |
| 167 | 173 | </td> |
@@ -190,9 +196,10 @@ discard block |
||
| 190 | 196 | </div> |
| 191 | 197 | <br>'; |
| 192 | 198 | |
| 193 | - if ($context['sort_direction'] == 'down') |
|
| 194 | - echo ' |
|
| 199 | + if ($context['sort_direction'] == 'down') { |
|
| 200 | + echo ' |
|
| 195 | 201 | <input type="hidden" name="desc" value="1">'; |
| 202 | + } |
|
| 196 | 203 | |
| 197 | 204 | echo ' |
| 198 | 205 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
@@ -19,26 +19,28 @@ discard block |
||
| 19 | 19 | global $context, $settings, $scripturl, $txt, $modSettings; |
| 20 | 20 | |
| 21 | 21 | // Not allowed to edit? |
| 22 | - if (!$context['can_modify']) |
|
| 23 | - echo ' |
|
| 22 | + if (!$context['can_modify']) { |
|
| 23 | + echo ' |
|
| 24 | 24 | <div class="errorbox"> |
| 25 | 25 | ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' |
| 26 | 26 | </div>'; |
| 27 | + } |
|
| 27 | 28 | |
| 28 | 29 | echo ' |
| 29 | 30 | <div id="admin_form_wrapper"> |
| 30 | 31 | <form action="', $scripturl, '?action=admin;area=permissions;sa=quick" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" id="permissionForm">'; |
| 31 | 32 | |
| 32 | - if (!empty($context['profile'])) |
|
| 33 | - echo ' |
|
| 33 | + if (!empty($context['profile'])) { |
|
| 34 | + echo ' |
|
| 34 | 35 | <div class="cat_bar"> |
| 35 | 36 | <h3 class="catbg">', $txt['permissions_for_profile'], ': "', $context['profile']['name'], '"</h3> |
| 36 | 37 | </div>'; |
| 37 | - else |
|
| 38 | - echo ' |
|
| 38 | + } else { |
|
| 39 | + echo ' |
|
| 39 | 40 | <div class="cat_bar"> |
| 40 | 41 | <h3 class="catbg">', $txt['permissions_title'], '</h3> |
| 41 | 42 | </div>'; |
| 43 | + } |
|
| 42 | 44 | |
| 43 | 45 | echo ' |
| 44 | 46 | <table class="table_grid"> |
@@ -47,13 +49,14 @@ discard block |
||
| 47 | 49 | <th>', $txt['membergroups_name'], '</th> |
| 48 | 50 | <th class="small_table">', $txt['membergroups_members_top'], '</th>'; |
| 49 | 51 | |
| 50 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 51 | - echo ' |
|
| 52 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 53 | + echo ' |
|
| 52 | 54 | <th class="small_table">', $txt['membergroups_permissions'], '</th>'; |
| 53 | - else |
|
| 54 | - echo ' |
|
| 55 | + } else { |
|
| 56 | + echo ' |
|
| 55 | 57 | <th class="small_table">', $txt['permissions_allowed'], '</th> |
| 56 | 58 | <th class="small_table">', $txt['permissions_denied'], '</th>'; |
| 59 | + } |
|
| 57 | 60 | |
| 58 | 61 | echo ' |
| 59 | 62 | <th class="small_table">', $context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view'], '</th> |
@@ -71,22 +74,24 @@ discard block |
||
| 71 | 74 | <td> |
| 72 | 75 | ', !empty($group['help']) ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=' . $group['help'] . '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="'. $txt['help'].'"></span></a>' : '<img class="icon" src="' . $settings['images_url'] . '/blank.png" alt="' . $txt['help'] . '">', ' <span>', $group['name'], '</span>'; |
| 73 | 76 | |
| 74 | - if (!empty($group['children'])) |
|
| 75 | - echo ' |
|
| 77 | + if (!empty($group['children'])) { |
|
| 78 | + echo ' |
|
| 76 | 79 | <br> |
| 77 | 80 | <span class="smalltext">', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"</span>'; |
| 81 | + } |
|
| 78 | 82 | |
| 79 | 83 | echo ' |
| 80 | 84 | </td> |
| 81 | 85 | <td>', $group['can_search'] ? $group['link'] : $group['num_members'], '</td>'; |
| 82 | 86 | |
| 83 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 84 | - echo ' |
|
| 87 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 88 | + echo ' |
|
| 85 | 89 | <td>', $group['num_permissions']['allowed'], '</td>'; |
| 86 | - else |
|
| 87 | - echo ' |
|
| 90 | + } else { |
|
| 91 | + echo ' |
|
| 88 | 92 | <td ', $group['id'] == 1 ? ' style="font-style: italic;"' : '', '>', $group['num_permissions']['allowed'], '</td> |
| 89 | 93 | <td ', $group['id'] == 1 || $group['id'] == -1 ? ' style="font-style: italic;"' : (!empty($group['num_permissions']['denied']) ? ' class="red"' : ''), '>', $group['num_permissions']['denied'], '</td>'; |
| 94 | + } |
|
| 90 | 95 | |
| 91 | 96 | echo ' |
| 92 | 97 | <td>', $group['allow_modify'] ? '<a href="' . $scripturl . '?action=admin;area=permissions;sa=modify;group=' . $group['id'] . (empty($context['profile']) ? '' : ';pid=' . $context['profile']['id']) . '">' . ($context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view']). '</a>' : '', '</td> |
@@ -133,9 +138,10 @@ discard block |
||
| 133 | 138 | <option value="empty">(', $txt['permissions_select_membergroup'], ')</option>'; |
| 134 | 139 | foreach ($context['groups'] as $group) |
| 135 | 140 | { |
| 136 | - if ($group['id'] != 1) |
|
| 137 | - echo ' |
|
| 141 | + if ($group['id'] != 1) { |
|
| 142 | + echo ' |
|
| 138 | 143 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
| 144 | + } |
|
| 139 | 145 | } |
| 140 | 146 | |
| 141 | 147 | echo ' |
@@ -145,9 +151,10 @@ discard block |
||
| 145 | 151 | <select name="add_remove"> |
| 146 | 152 | <option value="add">', $txt['permissions_add'], '...</option> |
| 147 | 153 | <option value="clear">', $txt['permissions_remove'], '...</option>'; |
| 148 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 149 | - echo ' |
|
| 154 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 155 | + echo ' |
|
| 150 | 156 | <option value="deny">', $txt['permissions_deny'], '...</option>'; |
| 157 | + } |
|
| 151 | 158 | echo ' |
| 152 | 159 | </select> |
| 153 | 160 | </dt> |
@@ -156,30 +163,34 @@ discard block |
||
| 156 | 163 | <option value="">(', $txt['permissions_select_permission'], ')</option>'; |
| 157 | 164 | foreach ($context['permissions'] as $permissionType) |
| 158 | 165 | { |
| 159 | - if ($permissionType['id'] == 'membergroup' && !empty($context['profile'])) |
|
| 160 | - continue; |
|
| 166 | + if ($permissionType['id'] == 'membergroup' && !empty($context['profile'])) { |
|
| 167 | + continue; |
|
| 168 | + } |
|
| 161 | 169 | |
| 162 | 170 | foreach ($permissionType['columns'] as $column) |
| 163 | 171 | { |
| 164 | 172 | foreach ($column as $permissionGroup) |
| 165 | 173 | { |
| 166 | - if ($permissionGroup['hidden']) |
|
| 167 | - continue; |
|
| 174 | + if ($permissionGroup['hidden']) { |
|
| 175 | + continue; |
|
| 176 | + } |
|
| 168 | 177 | |
| 169 | 178 | echo ' |
| 170 | 179 | <option value="" disabled>[', $permissionGroup['name'], ']</option>'; |
| 171 | 180 | foreach ($permissionGroup['permissions'] as $perm) |
| 172 | 181 | { |
| 173 | - if ($perm['hidden']) |
|
| 174 | - continue; |
|
| 182 | + if ($perm['hidden']) { |
|
| 183 | + continue; |
|
| 184 | + } |
|
| 175 | 185 | |
| 176 | - if ($perm['has_own_any']) |
|
| 177 | - echo ' |
|
| 186 | + if ($perm['has_own_any']) { |
|
| 187 | + echo ' |
|
| 178 | 188 | <option value="', $permissionType['id'], '/', $perm['own']['id'], '"> ', $perm['name'], ' (', $perm['own']['name'], ')</option> |
| 179 | 189 | <option value="', $permissionType['id'], '/', $perm['any']['id'], '"> ', $perm['name'], ' (', $perm['any']['name'], ')</option>'; |
| 180 | - else |
|
| 181 | - echo ' |
|
| 190 | + } else { |
|
| 191 | + echo ' |
|
| 182 | 192 | <option value="', $permissionType['id'], '/', $perm['id'], '"> ', $perm['name'], '</option>'; |
| 193 | + } |
|
| 183 | 194 | } |
| 184 | 195 | } |
| 185 | 196 | } |
@@ -246,17 +257,18 @@ discard block |
||
| 246 | 257 | } |
| 247 | 258 | </script>'; |
| 248 | 259 | |
| 249 | - if (!empty($context['profile'])) |
|
| 250 | - echo ' |
|
| 260 | + if (!empty($context['profile'])) { |
|
| 261 | + echo ' |
|
| 251 | 262 | <input type="hidden" name="pid" value="', $context['profile']['id'], '">'; |
| 263 | + } |
|
| 252 | 264 | |
| 253 | 265 | echo ' |
| 254 | 266 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 255 | 267 | <input type="hidden" name="', $context['admin-mpq_token_var'], '" value="', $context['admin-mpq_token'], '">'; |
| 256 | - } |
|
| 257 | - else |
|
| 258 | - echo ' |
|
| 268 | + } else { |
|
| 269 | + echo ' |
|
| 259 | 270 | </table>'; |
| 271 | + } |
|
| 260 | 272 | |
| 261 | 273 | echo ' |
| 262 | 274 | </form> |
@@ -296,9 +308,10 @@ discard block |
||
| 296 | 308 | <h3 class="subbg">', $category['name'], '</h3> |
| 297 | 309 | </div>'; |
| 298 | 310 | |
| 299 | - if (!empty($category['boards'])) |
|
| 300 | - echo ' |
|
| 311 | + if (!empty($category['boards'])) { |
|
| 312 | + echo ' |
|
| 301 | 313 | <ul class="perm_boards flow_hidden">'; |
| 314 | + } |
|
| 302 | 315 | |
| 303 | 316 | foreach ($category['boards'] as $board) |
| 304 | 317 | { |
@@ -315,33 +328,36 @@ discard block |
||
| 315 | 328 | echo ' |
| 316 | 329 | <select name="boardprofile[', $board['id'], ']">'; |
| 317 | 330 | |
| 318 | - foreach ($context['profiles'] as $id => $profile) |
|
| 319 | - echo ' |
|
| 331 | + foreach ($context['profiles'] as $id => $profile) { |
|
| 332 | + echo ' |
|
| 320 | 333 | <option value="', $id, '"', $id == $board['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
| 334 | + } |
|
| 321 | 335 | |
| 322 | 336 | echo ' |
| 323 | 337 | </select>'; |
| 324 | - } |
|
| 325 | - else |
|
| 326 | - echo ' |
|
| 338 | + } else { |
|
| 339 | + echo ' |
|
| 327 | 340 | <a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $board['profile'], ';', $context['session_var'], '=', $context['session_id'], '">', $board['profile_name'], '</a>'; |
| 341 | + } |
|
| 328 | 342 | |
| 329 | 343 | echo ' |
| 330 | 344 | </span> |
| 331 | 345 | </li>'; |
| 332 | 346 | } |
| 333 | 347 | |
| 334 | - if (!empty($category['boards'])) |
|
| 335 | - echo ' |
|
| 348 | + if (!empty($category['boards'])) { |
|
| 349 | + echo ' |
|
| 336 | 350 | </ul>'; |
| 351 | + } |
|
| 337 | 352 | } |
| 338 | 353 | |
| 339 | - if ($context['edit_all']) |
|
| 340 | - echo ' |
|
| 354 | + if ($context['edit_all']) { |
|
| 355 | + echo ' |
|
| 341 | 356 | <input type="submit" name="save_changes" value="', $txt['save'], '" class="button_submit">'; |
| 342 | - else |
|
| 343 | - echo ' |
|
| 357 | + } else { |
|
| 358 | + echo ' |
|
| 344 | 359 | <a class="button_link" href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">', $txt['permissions_board_all'], '</a>'; |
| 360 | + } |
|
| 345 | 361 | |
| 346 | 362 | echo ' |
| 347 | 363 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -381,12 +397,13 @@ discard block |
||
| 381 | 397 | <tr class="windowbg"> |
| 382 | 398 | <td>'; |
| 383 | 399 | |
| 384 | - if (!empty($context['show_rename_boxes']) && $profile['can_edit']) |
|
| 385 | - echo ' |
|
| 400 | + if (!empty($context['show_rename_boxes']) && $profile['can_edit']) { |
|
| 401 | + echo ' |
|
| 386 | 402 | <input type="text" name="rename_profile[', $profile['id'], ']" value="', $profile['name'], '" class="input_text">'; |
| 387 | - else |
|
| 388 | - echo ' |
|
| 403 | + } else { |
|
| 404 | + echo ' |
|
| 389 | 405 | <a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $profile['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $profile['name'], '</a>'; |
| 406 | + } |
|
| 390 | 407 | |
| 391 | 408 | echo ' |
| 392 | 409 | </td> |
@@ -406,9 +423,10 @@ discard block |
||
| 406 | 423 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 407 | 424 | <input type="hidden" name="', $context['admin-mpp_token_var'], '" value="', $context['admin-mpp_token'], '">'; |
| 408 | 425 | |
| 409 | - if ($context['can_edit_something']) |
|
| 410 | - echo ' |
|
| 426 | + if ($context['can_edit_something']) { |
|
| 427 | + echo ' |
|
| 411 | 428 | <input type="submit" name="rename" value="', empty($context['show_rename_boxes']) ? $txt['permissions_profile_rename'] : $txt['permissions_commit'], '" class="button_submit">'; |
| 429 | + } |
|
| 412 | 430 | |
| 413 | 431 | echo ' |
| 414 | 432 | <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" class="button_submit" ', !empty($context['show_rename_boxes']) ? ' style="display:none"' : '', '/> |
@@ -433,9 +451,10 @@ discard block |
||
| 433 | 451 | <dd> |
| 434 | 452 | <select name="copy_from">'; |
| 435 | 453 | |
| 436 | - foreach ($context['profiles'] as $id => $profile) |
|
| 437 | - echo ' |
|
| 454 | + foreach ($context['profiles'] as $id => $profile) { |
|
| 455 | + echo ' |
|
| 438 | 456 | <option value="', $id, '">', $profile['name'], '</option>'; |
| 457 | + } |
|
| 439 | 458 | |
| 440 | 459 | echo ' |
| 441 | 460 | </select> |
@@ -463,8 +482,7 @@ discard block |
||
| 463 | 482 | <div class="errorbox"> |
| 464 | 483 | ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' |
| 465 | 484 | </div>'; |
| 466 | - } |
|
| 467 | - else |
|
| 485 | + } else |
|
| 468 | 486 | { |
| 469 | 487 | echo ' |
| 470 | 488 | <script> |
@@ -484,21 +502,23 @@ discard block |
||
| 484 | 502 | <div id="admincenter"> |
| 485 | 503 | <form id="permissions" action="', $scripturl, '?action=admin;area=permissions;sa=modify2;group=', $context['group']['id'], ';pid=', $context['profile']['id'], '" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" onsubmit="return warnAboutDeny();">'; |
| 486 | 504 | |
| 487 | - if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) |
|
| 488 | - echo ' |
|
| 505 | + if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) { |
|
| 506 | + echo ' |
|
| 489 | 507 | <div class="information"> |
| 490 | 508 | ', $txt['permissions_option_desc'], ' |
| 491 | 509 | </div>'; |
| 510 | + } |
|
| 492 | 511 | |
| 493 | 512 | echo ' |
| 494 | 513 | <div class="cat_bar"> |
| 495 | 514 | <h3 class="catbg">'; |
| 496 | - if ($context['permission_type'] == 'board') |
|
| 497 | - echo ' |
|
| 515 | + if ($context['permission_type'] == 'board') { |
|
| 516 | + echo ' |
|
| 498 | 517 | ', $txt['permissions_local_for'], ' "', $context['group']['name'], '" ', $txt['permissions_on'], ' "', $context['profile']['name'], '"'; |
| 499 | - else |
|
| 500 | - echo ' |
|
| 518 | + } else { |
|
| 519 | + echo ' |
|
| 501 | 520 | ', $context['permission_type'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'], ' - "', $context['group']['name'], '"'; |
| 521 | + } |
|
| 502 | 522 | echo ' |
| 503 | 523 | </h3> |
| 504 | 524 | </div>'; |
@@ -521,15 +541,17 @@ discard block |
||
| 521 | 541 | template_modify_group_display('board'); |
| 522 | 542 | } |
| 523 | 543 | |
| 524 | - if ($context['profile']['can_modify']) |
|
| 525 | - echo ' |
|
| 544 | + if ($context['profile']['can_modify']) { |
|
| 545 | + echo ' |
|
| 526 | 546 | <div class="padding"> |
| 527 | 547 | <input type="submit" value="', $txt['permissions_commit'], '" class="button_submit"> |
| 528 | 548 | </div>'; |
| 549 | + } |
|
| 529 | 550 | |
| 530 | - foreach ($context['hidden_perms'] as $hidden_perm) |
|
| 531 | - echo ' |
|
| 551 | + foreach ($context['hidden_perms'] as $hidden_perm) { |
|
| 552 | + echo ' |
|
| 532 | 553 | <input type="hidden" name="perm[', $hidden_perm[0], '][', $hidden_perm[1], ']" value="', $hidden_perm[2], '">'; |
| 554 | + } |
|
| 533 | 555 | |
| 534 | 556 | echo ' |
| 535 | 557 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -557,17 +579,19 @@ discard block |
||
| 557 | 579 | |
| 558 | 580 | foreach ($column as $permissionGroup) |
| 559 | 581 | { |
| 560 | - if (empty($permissionGroup['permissions'])) |
|
| 561 | - continue; |
|
| 582 | + if (empty($permissionGroup['permissions'])) { |
|
| 583 | + continue; |
|
| 584 | + } |
|
| 562 | 585 | |
| 563 | 586 | // Are we likely to have something in this group to display or is it all hidden? |
| 564 | 587 | $has_display_content = false; |
| 565 | 588 | if (!$permissionGroup['hidden']) |
| 566 | 589 | { |
| 567 | 590 | // Before we go any further check we are going to have some data to print otherwise we just have a silly heading. |
| 568 | - foreach ($permissionGroup['permissions'] as $permission) |
|
| 569 | - if (!$permission['hidden']) |
|
| 591 | + foreach ($permissionGroup['permissions'] as $permission) { |
|
| 592 | + if (!$permission['hidden']) |
|
| 570 | 593 | $has_display_content = true; |
| 594 | + } |
|
| 571 | 595 | |
| 572 | 596 | if ($has_display_content) |
| 573 | 597 | { |
@@ -576,10 +600,11 @@ discard block |
||
| 576 | 600 | <th></th> |
| 577 | 601 | <th', $context['group']['id'] == -1 ? ' colspan="2"' : '', ' class="smalltext">', $permissionGroup['name'], '</th>'; |
| 578 | 602 | |
| 579 | - if ($context['group']['id'] != -1) |
|
| 580 | - echo ' |
|
| 603 | + if ($context['group']['id'] != -1) { |
|
| 604 | + echo ' |
|
| 581 | 605 | <th>', $txt['permissions_option_own'], '</th> |
| 582 | 606 | <th>', $txt['permissions_option_any'], '</th>'; |
| 607 | + } |
|
| 583 | 608 | |
| 584 | 609 | echo ' |
| 585 | 610 | </tr>'; |
@@ -602,17 +627,18 @@ discard block |
||
| 602 | 627 | // Guests can't do their own thing. |
| 603 | 628 | if ($context['group']['id'] != -1) |
| 604 | 629 | { |
| 605 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 606 | - echo ' |
|
| 630 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 631 | + echo ' |
|
| 607 | 632 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']"', $permission['own']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" id="', $permission['own']['id'], '_on" class="input_check" ', $disable_field, '/>'; |
| 608 | - else |
|
| 633 | + } else |
|
| 609 | 634 | { |
| 610 | 635 | echo ' |
| 611 | 636 | <select name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']" ', $disable_field, '>'; |
| 612 | 637 | |
| 613 | - foreach (array('on', 'off', 'deny') as $c) |
|
| 614 | - echo ' |
|
| 638 | + foreach (array('on', 'off', 'deny') as $c) { |
|
| 639 | + echo ' |
|
| 615 | 640 | <option ', $permission['own']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
| 641 | + } |
|
| 616 | 642 | echo ' |
| 617 | 643 | </select>'; |
| 618 | 644 | } |
@@ -622,39 +648,41 @@ discard block |
||
| 622 | 648 | <td>'; |
| 623 | 649 | } |
| 624 | 650 | |
| 625 | - if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) |
|
| 626 | - echo ' |
|
| 651 | + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) { |
|
| 652 | + echo ' |
|
| 627 | 653 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']"', $permission['any']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" class="input_check" ', $disable_field, '/>'; |
| 628 | - else |
|
| 654 | + } else |
|
| 629 | 655 | { |
| 630 | 656 | echo ' |
| 631 | 657 | <select name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']" ', $disable_field, '>'; |
| 632 | 658 | |
| 633 | - foreach (array('on', 'off', 'deny') as $c) |
|
| 634 | - echo ' |
|
| 659 | + foreach (array('on', 'off', 'deny') as $c) { |
|
| 660 | + echo ' |
|
| 635 | 661 | <option ', $permission['any']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
| 662 | + } |
|
| 636 | 663 | echo ' |
| 637 | 664 | </select>'; |
| 638 | 665 | } |
| 639 | - } |
|
| 640 | - else |
|
| 666 | + } else |
|
| 641 | 667 | { |
| 642 | - if ($context['group']['id'] != -1) |
|
| 643 | - echo ' |
|
| 668 | + if ($context['group']['id'] != -1) { |
|
| 669 | + echo ' |
|
| 644 | 670 | </td> |
| 645 | 671 | <td>'; |
| 672 | + } |
|
| 646 | 673 | |
| 647 | - if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) |
|
| 648 | - echo ' |
|
| 674 | + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) { |
|
| 675 | + echo ' |
|
| 649 | 676 | <input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['id'], ']"', $permission['select'] == 'on' ? ' checked="checked"' : '', ' value="on" class="input_check" ', $disable_field, '/>'; |
| 650 | - else |
|
| 677 | + } else |
|
| 651 | 678 | { |
| 652 | 679 | echo ' |
| 653 | 680 | <select name="perm[', $permission_type['id'], '][', $permission['id'], ']" ', $disable_field, '>'; |
| 654 | 681 | |
| 655 | - foreach (array('on', 'off', 'deny') as $c) |
|
| 656 | - echo ' |
|
| 682 | + foreach (array('on', 'off', 'deny') as $c) { |
|
| 683 | + echo ' |
|
| 657 | 684 | <option ', $permission['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>'; |
| 685 | + } |
|
| 658 | 686 | echo ' |
| 659 | 687 | </select>'; |
| 660 | 688 | } |
@@ -684,11 +712,11 @@ discard block |
||
| 684 | 712 | echo ' |
| 685 | 713 | <fieldset id="', $context['current_permission'], '"> |
| 686 | 714 | <legend><a href="javascript:void(0);" onclick="document.getElementById(\'', $context['current_permission'], '\').style.display = \'none\';document.getElementById(\'', $context['current_permission'], '_groups_link\').style.display = \'block\'; return false;" class="toggle_up"> ', $txt['avatar_select_permission'], '</a></legend>'; |
| 687 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 688 | - echo ' |
|
| 715 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 716 | + echo ' |
|
| 689 | 717 | <ul>'; |
| 690 | - else |
|
| 691 | - echo ' |
|
| 718 | + } else { |
|
| 719 | + echo ' |
|
| 692 | 720 | <div class="information">', $txt['permissions_option_desc'], '</div> |
| 693 | 721 | <dl class="settings"> |
| 694 | 722 | <dt> |
@@ -698,46 +726,51 @@ discard block |
||
| 698 | 726 | </dt> |
| 699 | 727 | <dd> |
| 700 | 728 | </dd>'; |
| 729 | + } |
|
| 701 | 730 | foreach ($context['member_groups'] as $group) |
| 702 | 731 | { |
| 703 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 704 | - echo ' |
|
| 732 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 733 | + echo ' |
|
| 705 | 734 | <dt>'; |
| 706 | - else |
|
| 707 | - echo ' |
|
| 735 | + } else { |
|
| 736 | + echo ' |
|
| 708 | 737 | <li>'; |
| 738 | + } |
|
| 709 | 739 | |
| 710 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 711 | - echo ' |
|
| 740 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 741 | + echo ' |
|
| 712 | 742 | <input type="checkbox" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', ' class="input_check">'; |
| 713 | - else |
|
| 714 | - echo ' |
|
| 743 | + } else { |
|
| 744 | + echo ' |
|
| 715 | 745 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', ' class="input_radio"></span> |
| 716 | 746 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="off"', $group['status'] == 'off' ? ' checked' : '', ' class="input_radio"></span> |
| 717 | 747 | <span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="deny"', $group['status'] == 'deny' ? ' checked' : '', ' class="input_radio"></span>'; |
| 748 | + } |
|
| 718 | 749 | |
| 719 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 720 | - echo ' |
|
| 750 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 751 | + echo ' |
|
| 721 | 752 | </dt> |
| 722 | 753 | <dd> |
| 723 | 754 | <span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span> |
| 724 | 755 | </dd>'; |
| 725 | - else |
|
| 726 | - echo ' |
|
| 756 | + } else { |
|
| 757 | + echo ' |
|
| 727 | 758 | <span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span> |
| 728 | 759 | </li>'; |
| 760 | + } |
|
| 729 | 761 | } |
| 730 | 762 | |
| 731 | - if (empty($modSettings['permission_enable_deny'])) |
|
| 732 | - echo ' |
|
| 763 | + if (empty($modSettings['permission_enable_deny'])) { |
|
| 764 | + echo ' |
|
| 733 | 765 | <li> |
| 734 | 766 | <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \''. $context['current_permission']. '[\');"> |
| 735 | 767 | <span>', $txt['check_all'], '</span> |
| 736 | 768 | </li> |
| 737 | 769 | </ul>'; |
| 738 | - else |
|
| 739 | - echo ' |
|
| 770 | + } else { |
|
| 771 | + echo ' |
|
| 740 | 772 | </dl>'; |
| 773 | + } |
|
| 741 | 774 | |
| 742 | 775 | echo ' |
| 743 | 776 | </fieldset> |
@@ -777,9 +810,10 @@ discard block |
||
| 777 | 810 | if (!empty($modSettings['postmod_active'])) |
| 778 | 811 | { |
| 779 | 812 | // Got advanced permissions - if so warn! |
| 780 | - if (!empty($modSettings['permission_enable_deny'])) |
|
| 781 | - echo ' |
|
| 813 | + if (!empty($modSettings['permission_enable_deny'])) { |
|
| 814 | + echo ' |
|
| 782 | 815 | <div class="information">', $txt['permissions_post_moderation_deny_note'], '</div>'; |
| 816 | + } |
|
| 783 | 817 | |
| 784 | 818 | echo ' |
| 785 | 819 | <div class="padding"> |
@@ -794,10 +828,11 @@ discard block |
||
| 794 | 828 | ', $txt['permissions_post_moderation_select'], ': |
| 795 | 829 | <select name="pid" onchange="document.forms.postmodForm.submit();">'; |
| 796 | 830 | |
| 797 | - foreach ($context['profiles'] as $profile) |
|
| 798 | - if ($profile['can_modify']) |
|
| 831 | + foreach ($context['profiles'] as $profile) { |
|
| 832 | + if ($profile['can_modify']) |
|
| 799 | 833 | echo ' |
| 800 | 834 | <option value="', $profile['id'], '"', $profile['id'] == $context['current_profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
| 835 | + } |
|
| 801 | 836 | |
| 802 | 837 | echo ' |
| 803 | 838 | </select> |
@@ -818,11 +853,12 @@ discard block |
||
| 818 | 853 | ', $txt['permissions_post_moderation_replies_any'], ' |
| 819 | 854 | </th>'; |
| 820 | 855 | |
| 821 | - if ($modSettings['attachmentEnable'] == 1) |
|
| 822 | - echo ' |
|
| 856 | + if ($modSettings['attachmentEnable'] == 1) { |
|
| 857 | + echo ' |
|
| 823 | 858 | <th class="centercol" colspan="3"> |
| 824 | 859 | ', $txt['permissions_post_moderation_attachments'], ' |
| 825 | 860 | </th>'; |
| 861 | + } |
|
| 826 | 862 | |
| 827 | 863 | echo ' |
| 828 | 864 | </tr> |
@@ -840,11 +876,12 @@ discard block |
||
| 840 | 876 | <th><span class="generic_icons post_moderation_moderate"></span></th> |
| 841 | 877 | <th><span class="generic_icons post_moderation_deny"></span></th>'; |
| 842 | 878 | |
| 843 | - if ($modSettings['attachmentEnable'] == 1) |
|
| 844 | - echo ' |
|
| 879 | + if ($modSettings['attachmentEnable'] == 1) { |
|
| 880 | + echo ' |
|
| 845 | 881 | <th><span class="generic_icons post_moderation_allow"></span></th> |
| 846 | 882 | <th><span class="generic_icons post_moderation_moderate"></span></th> |
| 847 | 883 | <th><span class="generic_icons post_moderation_deny"></span></th>'; |
| 884 | + } |
|
| 848 | 885 | |
| 849 | 886 | echo ' |
| 850 | 887 | </tr> |
@@ -857,9 +894,10 @@ discard block |
||
| 857 | 894 | <tr class="windowbg"> |
| 858 | 895 | <td class="half_table"> |
| 859 | 896 | <span ', ($group['color'] ? 'style="color: ' . $group['color'] . '"' : ''), '>', $group['name'], '</span>'; |
| 860 | - if (!empty($group['children'])) |
|
| 861 | - echo ' |
|
| 897 | + if (!empty($group['children'])) { |
|
| 898 | + echo ' |
|
| 862 | 899 | <br><span class="smalltext">', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"</span>'; |
| 900 | + } |
|
| 863 | 901 | |
| 864 | 902 | echo ' |
| 865 | 903 | </td> |
@@ -872,8 +910,7 @@ discard block |
||
| 872 | 910 | { |
| 873 | 911 | echo ' |
| 874 | 912 | <td colspan="3"></td>'; |
| 875 | - } |
|
| 876 | - else |
|
| 913 | + } else |
|
| 877 | 914 | { |
| 878 | 915 | echo ' |
| 879 | 916 | <td class="centercol"><input type="radio" name="replies_own[', $group['id'], ']" value="allow"', $group['replies_own'] == 'allow' ? ' checked' : '', ' class="input_radio"></td> |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | foreach ($message['custom_fields']['above_member'] as $custom) |
| 233 | 233 | echo ' |
| 234 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
| 234 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
| 235 | 235 | |
| 236 | 236 | echo ' |
| 237 | 237 | </ul> |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | if (!empty($message['custom_fields']['below_avatar'])) |
| 269 | 269 | foreach ($message['custom_fields']['below_avatar'] as $custom) |
| 270 | 270 | echo ' |
| 271 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
| 271 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
| 272 | 272 | |
| 273 | 273 | if (!$message['member']['is_guest']) |
| 274 | 274 | echo ' |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | foreach ($message['custom_fields']['icons'] as $custom) |
| 312 | 312 | echo ' |
| 313 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
| 313 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
| 314 | 314 | |
| 315 | 315 | echo ' |
| 316 | 316 | </ol> |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | if (!empty($message['custom_fields']['standard'])) |
| 369 | 369 | foreach ($message['custom_fields']['standard'] as $custom) |
| 370 | 370 | echo ' |
| 371 | - <li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>'; |
|
| 371 | + <li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>'; |
|
| 372 | 372 | |
| 373 | 373 | // Are we showing the warning status? |
| 374 | 374 | if ($message['member']['can_see_warning']) |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | if (!empty($message['custom_fields']['bottom_poster'])) |
| 380 | 380 | foreach ($message['custom_fields']['bottom_poster'] as $custom) |
| 381 | 381 | echo ' |
| 382 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
| 382 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | // Done with the information about the poster... on to the post itself. |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | |
| 479 | 479 | foreach ($message['custom_fields']['above_signature'] as $custom) |
| 480 | 480 | echo ' |
| 481 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
| 481 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
| 482 | 482 | |
| 483 | 483 | echo ' |
| 484 | 484 | </ul> |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | |
| 500 | 500 | foreach ($message['custom_fields']['below_signature'] as $custom) |
| 501 | 501 | echo ' |
| 502 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
| 502 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
| 503 | 503 | |
| 504 | 504 | echo ' |
| 505 | 505 | </ul> |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | while ($message = $context['get_pmessage']('subject')) |
| 632 | 632 | { |
| 633 | 633 | echo ' |
| 634 | - <tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '','"> |
|
| 634 | + <tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '', '"> |
|
| 635 | 635 | <td class="table_icon"> |
| 636 | 636 | <script> |
| 637 | 637 | currentLabels[', $message['id'], '] = {'; |
@@ -903,12 +903,12 @@ discard block |
||
| 903 | 903 | // You can only reply if they are not a guest... |
| 904 | 904 | if (!$message['member']['is_guest']) |
| 905 | 905 | echo ' |
| 906 | - <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], ' |
|
| 907 | - <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button , '</a> ', $context['menu_separator']; |
|
| 906 | + <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button, '</a>', $context['menu_separator'], ' |
|
| 907 | + <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a> ', $context['menu_separator']; |
|
| 908 | 908 | // This is for "forwarding" - even if the member is gone. |
| 909 | 909 | else |
| 910 | 910 | echo ' |
| 911 | - <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button , '</a>', $context['menu_separator']; |
|
| 911 | + <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button, '</a>', $context['menu_separator']; |
|
| 912 | 912 | } |
| 913 | 913 | |
| 914 | 914 | echo ' |
@@ -1008,7 +1008,7 @@ discard block |
||
| 1008 | 1008 | <div class="', empty($context['error_type']) || $context['error_type'] != 'serious' ? 'noticebox' : 'errorbox', '"', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors"> |
| 1009 | 1009 | <dl> |
| 1010 | 1010 | <dt> |
| 1011 | - <strong id="error_serious">', $txt['error_while_submitting'] , '</strong> |
|
| 1011 | + <strong id="error_serious">', $txt['error_while_submitting'], '</strong> |
|
| 1012 | 1012 | </dt> |
| 1013 | 1013 | <dd class="error" id="error_list"> |
| 1014 | 1014 | ', empty($context['post_error']['messages']) ? '' : implode('<br>', $context['post_error']['messages']), ' |
@@ -1064,7 +1064,7 @@ discard block |
||
| 1064 | 1064 | <span', (isset($context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', $txt['subject'], ':</span> |
| 1065 | 1065 | </dt> |
| 1066 | 1066 | <dd id="pm_subject"> |
| 1067 | - <input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"',isset($context['post_error']['no_subject']) ? ' class="error"' : ' class="input_text"', '/> |
|
| 1067 | + <input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"', isset($context['post_error']['no_subject']) ? ' class="error"' : ' class="input_text"', '/> |
|
| 1068 | 1068 | </dd> |
| 1069 | 1069 | </dl><hr>'; |
| 1070 | 1070 | |
@@ -1427,7 +1427,7 @@ discard block |
||
| 1427 | 1427 | echo ' |
| 1428 | 1428 | <div class="padding"> |
| 1429 | 1429 | <input type="submit" name="save" value="', $txt['save'], '" class="button_submit"> |
| 1430 | - <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button_submit you_sure"> |
|
| 1430 | + <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'], '" class="button_submit you_sure"> |
|
| 1431 | 1431 | </div>'; |
| 1432 | 1432 | |
| 1433 | 1433 | echo ' |
@@ -1591,7 +1591,7 @@ discard block |
||
| 1591 | 1591 | if (!empty($context['rules'])) |
| 1592 | 1592 | echo ' |
| 1593 | 1593 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 1594 | - <input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button_submit smalltext you_sure">'; |
|
| 1594 | + <input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'], '" class="button_submit smalltext you_sure">'; |
|
| 1595 | 1595 | |
| 1596 | 1596 | echo ' |
| 1597 | 1597 | </div> |
@@ -1832,9 +1832,9 @@ discard block |
||
| 1832 | 1832 | |
| 1833 | 1833 | echo ' |
| 1834 | 1834 | <select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();"> |
| 1835 | - <option value="">', $txt['pm_rule_sel_action'] , ':</option> |
|
| 1836 | - <option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'] , '</option> |
|
| 1837 | - <option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'] , '</option> |
|
| 1835 | + <option value="">', $txt['pm_rule_sel_action'], ':</option> |
|
| 1836 | + <option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'], '</option> |
|
| 1837 | + <option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'], '</option> |
|
| 1838 | 1838 | </select> |
| 1839 | 1839 | <span id="labdiv', $k, '"> |
| 1840 | 1840 | <select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();"> |
@@ -1951,7 +1951,7 @@ discard block |
||
| 1951 | 1951 | </div> |
| 1952 | 1952 | <ul class="quickbuttons"> |
| 1953 | 1953 | <li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;id_draft=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons modifybutton"></span>', $txt['draft_edit'], '</a></li> |
| 1954 | - <li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'] ,'?" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li> |
|
| 1954 | + <li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'], '?" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li> |
|
| 1955 | 1955 | </ul> |
| 1956 | 1956 | </div>'; |
| 1957 | 1957 | } |
@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | <div id="personal_messages">'; |
| 22 | 22 | |
| 23 | 23 | // Show the capacity bar, if available. |
| 24 | - if (!empty($context['limit_bar'])) |
|
| 25 | - echo ' |
|
| 24 | + if (!empty($context['limit_bar'])) { |
|
| 25 | + echo ' |
|
| 26 | 26 | <div class="cat_bar"> |
| 27 | 27 | <h3 class="catbg"> |
| 28 | 28 | <span class="floatleft">', $txt['pm_capacity'], ':</span> |
@@ -32,14 +32,16 @@ discard block |
||
| 32 | 32 | <span class="floatright', $context['limit_bar']['percent'] > 90 ? ' alert' : '', '">', $context['limit_bar']['text'], '</span> |
| 33 | 33 | </h3> |
| 34 | 34 | </div>'; |
| 35 | + } |
|
| 35 | 36 | |
| 36 | 37 | // Message sent? Show a small indication. |
| 37 | - if (isset($context['pm_sent'])) |
|
| 38 | - echo ' |
|
| 38 | + if (isset($context['pm_sent'])) { |
|
| 39 | + echo ' |
|
| 39 | 40 | <div class="infobox"> |
| 40 | 41 | ', $txt['pm_sent'], ' |
| 41 | 42 | </div>'; |
| 42 | -} |
|
| 43 | + } |
|
| 44 | + } |
|
| 43 | 45 | |
| 44 | 46 | /** |
| 45 | 47 | * Just the end of the index bar, nothing special. |
@@ -72,8 +74,7 @@ discard block |
||
| 72 | 74 | { |
| 73 | 75 | echo ' |
| 74 | 76 | <div class="no_unread">', $txt['pm_no_unread'], '</div>'; |
| 75 | - } |
|
| 76 | - else |
|
| 77 | + } else |
|
| 77 | 78 | { |
| 78 | 79 | foreach ($context['unread_pms'] as $id_pm => $pm_details) |
| 79 | 80 | { |
@@ -193,14 +194,15 @@ discard block |
||
| 193 | 194 | if ($context['get_pmessage']('message', true)) |
| 194 | 195 | { |
| 195 | 196 | // Show the helpful titlebar - generally. |
| 196 | - if ($context['display_mode'] != 1) |
|
| 197 | - echo ' |
|
| 197 | + if ($context['display_mode'] != 1) { |
|
| 198 | + echo ' |
|
| 198 | 199 | <div class="cat_bar"> |
| 199 | 200 | <h3 class="catbg"> |
| 200 | 201 | <span id="author">', $txt['author'], '</span> |
| 201 | 202 | <span id="topic_title">', $txt[$context['display_mode'] == 0 ? 'messages' : 'conversation'], '</span> |
| 202 | 203 | </h3> |
| 203 | 204 | </div>'; |
| 205 | + } |
|
| 204 | 206 | |
| 205 | 207 | // Show a few buttons if we are in conversation mode and outputting the first message. |
| 206 | 208 | if ($context['display_mode'] == 2) |
@@ -229,9 +231,10 @@ discard block |
||
| 229 | 231 | <div class="custom_fields_above_member"> |
| 230 | 232 | <ul class="nolist">'; |
| 231 | 233 | |
| 232 | - foreach ($message['custom_fields']['above_member'] as $custom) |
|
| 233 | - echo ' |
|
| 234 | + foreach ($message['custom_fields']['above_member'] as $custom) { |
|
| 235 | + echo ' |
|
| 234 | 236 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
| 237 | + } |
|
| 235 | 238 | |
| 236 | 239 | echo ' |
| 237 | 240 | </ul> |
@@ -243,9 +246,10 @@ discard block |
||
| 243 | 246 | <a id="msg', $message['id'], '"></a>'; |
| 244 | 247 | |
| 245 | 248 | // Show online and offline buttons? |
| 246 | - if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) |
|
| 247 | - echo ' |
|
| 249 | + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) { |
|
| 250 | + echo ' |
|
| 248 | 251 | <span class="' . ($message['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $message['member']['online']['text'] . '"></span>'; |
| 252 | + } |
|
| 249 | 253 | |
| 250 | 254 | // Show a link to the member's profile (but only if the sender isn't a guest). |
| 251 | 255 | echo ' |
@@ -258,48 +262,56 @@ discard block |
||
| 258 | 262 | <ul class="user_info">'; |
| 259 | 263 | |
| 260 | 264 | // Show the user's avatar. |
| 261 | - if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) |
|
| 262 | - echo ' |
|
| 265 | + if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) { |
|
| 266 | + echo ' |
|
| 263 | 267 | <li class="avatar"> |
| 264 | 268 | <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">', $message['member']['avatar']['image'], '</a> |
| 265 | 269 | </li>'; |
| 270 | + } |
|
| 266 | 271 | |
| 267 | 272 | // Are there any custom fields below the avatar? |
| 268 | - if (!empty($message['custom_fields']['below_avatar'])) |
|
| 269 | - foreach ($message['custom_fields']['below_avatar'] as $custom) |
|
| 273 | + if (!empty($message['custom_fields']['below_avatar'])) { |
|
| 274 | + foreach ($message['custom_fields']['below_avatar'] as $custom) |
|
| 270 | 275 | echo ' |
| 271 | 276 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
| 277 | + } |
|
| 272 | 278 | |
| 273 | - if (!$message['member']['is_guest']) |
|
| 274 | - echo ' |
|
| 279 | + if (!$message['member']['is_guest']) { |
|
| 280 | + echo ' |
|
| 275 | 281 | <li class="icons">', $message['member']['group_icons'], '</li>'; |
| 282 | + } |
|
| 276 | 283 | // Show the member's primary group (like 'Administrator') if they have one. |
| 277 | - if (isset($message['member']['group']) && $message['member']['group'] != '') |
|
| 278 | - echo ' |
|
| 284 | + if (isset($message['member']['group']) && $message['member']['group'] != '') { |
|
| 285 | + echo ' |
|
| 279 | 286 | <li class="membergroup">', $message['member']['group'], '</li>'; |
| 287 | + } |
|
| 280 | 288 | |
| 281 | 289 | // Show the member's custom title, if they have one. |
| 282 | - if (isset($message['member']['title']) && $message['member']['title'] != '') |
|
| 283 | - echo ' |
|
| 290 | + if (isset($message['member']['title']) && $message['member']['title'] != '') { |
|
| 291 | + echo ' |
|
| 284 | 292 | <li class="title">', $message['member']['title'], '</li>'; |
| 293 | + } |
|
| 285 | 294 | |
| 286 | 295 | // Don't show these things for guests. |
| 287 | 296 | if (!$message['member']['is_guest']) |
| 288 | 297 | { |
| 289 | 298 | // Show the post group if and only if they have no other group or the option is on, and they are in a post group. |
| 290 | - if ((empty($modSettings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') |
|
| 291 | - echo ' |
|
| 299 | + if ((empty($modSettings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') { |
|
| 300 | + echo ' |
|
| 292 | 301 | <li class="postgroup">', $message['member']['post_group'], '</li>'; |
| 302 | + } |
|
| 293 | 303 | |
| 294 | 304 | // Show how many posts they have made. |
| 295 | - if (!isset($context['disabled_fields']['posts'])) |
|
| 296 | - echo ' |
|
| 305 | + if (!isset($context['disabled_fields']['posts'])) { |
|
| 306 | + echo ' |
|
| 297 | 307 | <li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>'; |
| 308 | + } |
|
| 298 | 309 | |
| 299 | 310 | // Show their personal text? |
| 300 | - if (!empty($modSettings['show_blurb']) && $message['member']['blurb'] != '') |
|
| 301 | - echo ' |
|
| 311 | + if (!empty($modSettings['show_blurb']) && $message['member']['blurb'] != '') { |
|
| 312 | + echo ' |
|
| 302 | 313 | <li class="blurb">', $message['member']['blurb'], '</li>'; |
| 314 | + } |
|
| 303 | 315 | |
| 304 | 316 | // Any custom fields to show as icons? |
| 305 | 317 | if (!empty($message['custom_fields']['icons'])) |
@@ -308,9 +320,10 @@ discard block |
||
| 308 | 320 | <li class="im_icons"> |
| 309 | 321 | <ol>'; |
| 310 | 322 | |
| 311 | - foreach ($message['custom_fields']['icons'] as $custom) |
|
| 312 | - echo ' |
|
| 323 | + foreach ($message['custom_fields']['icons'] as $custom) { |
|
| 324 | + echo ' |
|
| 313 | 325 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
| 326 | + } |
|
| 314 | 327 | |
| 315 | 328 | echo ' |
| 316 | 329 | </ol> |
@@ -318,19 +331,22 @@ discard block |
||
| 318 | 331 | } |
| 319 | 332 | |
| 320 | 333 | // Show the IP to this user for this post - because you can moderate? |
| 321 | - if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip'])) |
|
| 322 | - echo ' |
|
| 334 | + if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip'])) { |
|
| 335 | + echo ' |
|
| 323 | 336 | <li class="poster_ip"><a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);" class="help">(?)</a></li>'; |
| 337 | + } |
|
| 324 | 338 | |
| 325 | 339 | // Or, should we show it because this is you? |
| 326 | - elseif ($message['can_see_ip']) |
|
| 327 | - echo ' |
|
| 340 | + elseif ($message['can_see_ip']) { |
|
| 341 | + echo ' |
|
| 328 | 342 | <li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $message['member']['ip'], '</a></li>'; |
| 343 | + } |
|
| 329 | 344 | |
| 330 | 345 | // Okay, you are logged in, then we can show something about why IPs are logged... |
| 331 | - else |
|
| 332 | - echo ' |
|
| 346 | + else { |
|
| 347 | + echo ' |
|
| 333 | 348 | <li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $txt['logged'], '</a></li>'; |
| 349 | + } |
|
| 334 | 350 | |
| 335 | 351 | // Show the profile, website, email address, and personal message buttons. |
| 336 | 352 | if ($message['member']['show_profile_buttons']) |
@@ -340,24 +356,28 @@ discard block |
||
| 340 | 356 | <ol class="profile_icons">'; |
| 341 | 357 | |
| 342 | 358 | // Show the profile button |
| 343 | - if ($message['member']['can_view_profile']) |
|
| 344 | - echo ' |
|
| 359 | + if ($message['member']['can_view_profile']) { |
|
| 360 | + echo ' |
|
| 345 | 361 | <li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '">' : $txt['view_profile']), '</a></li>'; |
| 362 | + } |
|
| 346 | 363 | |
| 347 | 364 | // Don't show an icon if they haven't specified a website. |
| 348 | - if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) |
|
| 349 | - echo ' |
|
| 365 | + if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) { |
|
| 366 | + echo ' |
|
| 350 | 367 | <li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<span class="generic_icons www centericon" title="' . $message['member']['website']['title'] . '"></span>' : $txt['www']), '</a></li>'; |
| 368 | + } |
|
| 351 | 369 | |
| 352 | 370 | // Don't show the email address if they want it hidden. |
| 353 | - if ($message['member']['show_email']) |
|
| 354 | - echo ' |
|
| 371 | + if ($message['member']['show_email']) { |
|
| 372 | + echo ' |
|
| 355 | 373 | <li><a href="mailto:', $message['member']['email'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<span class="generic_icons mail centericon" title="' . $txt['email'] . '"></span>' : $txt['email']), '</a></li>'; |
| 374 | + } |
|
| 356 | 375 | |
| 357 | 376 | // Since we know this person isn't a guest, you *can* message them. |
| 358 | - if ($context['can_send_pm']) |
|
| 359 | - echo ' |
|
| 377 | + if ($context['can_send_pm']) { |
|
| 378 | + echo ' |
|
| 360 | 379 | <li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<span class="generic_icons im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . ' centericon" title="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '"></span> ' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>'; |
| 380 | + } |
|
| 361 | 381 | |
| 362 | 382 | echo ' |
| 363 | 383 | </ol> |
@@ -365,21 +385,24 @@ discard block |
||
| 365 | 385 | } |
| 366 | 386 | |
| 367 | 387 | // Any custom fields for standard placement? |
| 368 | - if (!empty($message['custom_fields']['standard'])) |
|
| 369 | - foreach ($message['custom_fields']['standard'] as $custom) |
|
| 388 | + if (!empty($message['custom_fields']['standard'])) { |
|
| 389 | + foreach ($message['custom_fields']['standard'] as $custom) |
|
| 370 | 390 | echo ' |
| 371 | 391 | <li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>'; |
| 392 | + } |
|
| 372 | 393 | |
| 373 | 394 | // Are we showing the warning status? |
| 374 | - if ($message['member']['can_see_warning']) |
|
| 375 | - echo ' |
|
| 395 | + if ($message['member']['can_see_warning']) { |
|
| 396 | + echo ' |
|
| 376 | 397 | <li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<span class="generic_icons warning_', $message['member']['warning_status'], '"></span>', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>'; |
| 398 | + } |
|
| 377 | 399 | |
| 378 | 400 | // Are there any custom fields to show at the bottom of the poster info? |
| 379 | - if (!empty($message['custom_fields']['bottom_poster'])) |
|
| 380 | - foreach ($message['custom_fields']['bottom_poster'] as $custom) |
|
| 401 | + if (!empty($message['custom_fields']['bottom_poster'])) { |
|
| 402 | + foreach ($message['custom_fields']['bottom_poster'] as $custom) |
|
| 381 | 403 | echo ' |
| 382 | 404 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
| 405 | + } |
|
| 383 | 406 | } |
| 384 | 407 | |
| 385 | 408 | // Done with the information about the poster... on to the post itself. |
@@ -398,25 +421,29 @@ discard block |
||
| 398 | 421 | <span class="smalltext">« <strong> ', $txt['sent_to'], ':</strong> '; |
| 399 | 422 | |
| 400 | 423 | // People it was sent directly to.... |
| 401 | - if (!empty($message['recipients']['to'])) |
|
| 402 | - echo implode(', ', $message['recipients']['to']); |
|
| 424 | + if (!empty($message['recipients']['to'])) { |
|
| 425 | + echo implode(', ', $message['recipients']['to']); |
|
| 426 | + } |
|
| 403 | 427 | // Otherwise, we're just going to say "some people"... |
| 404 | - elseif ($context['folder'] != 'sent') |
|
| 405 | - echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
| 428 | + elseif ($context['folder'] != 'sent') { |
|
| 429 | + echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
| 430 | + } |
|
| 406 | 431 | |
| 407 | 432 | echo ' |
| 408 | 433 | <strong> ', $txt['on'], ':</strong> ', $message['time'], ' » |
| 409 | 434 | </span>'; |
| 410 | 435 | |
| 411 | 436 | // If we're in the sent items, show who it was sent to besides the "To:" people. |
| 412 | - if (!empty($message['recipients']['bcc'])) |
|
| 413 | - echo ' |
|
| 437 | + if (!empty($message['recipients']['bcc'])) { |
|
| 438 | + echo ' |
|
| 414 | 439 | <br><span class="smalltext">« <strong> ', $txt['pm_bcc'], ':</strong> ', implode(', ', $message['recipients']['bcc']), ' »</span>'; |
| 440 | + } |
|
| 415 | 441 | |
| 416 | - if (!empty($message['is_replied_to'])) |
|
| 417 | - echo ' |
|
| 442 | + if (!empty($message['is_replied_to'])) { |
|
| 443 | + echo ' |
|
| 418 | 444 | <br><span class="smalltext">« ', $txt['pm_is_replied_to'], ' »</span> |
| 419 | 445 | <br><span class="smalltext">« ', $context['folder'] == 'sent' ? $txt['pm_sent_is_replied_to'] : $txt['pm_is_replied_to'], ' »</span>'; |
| 446 | + } |
|
| 420 | 447 | |
| 421 | 448 | echo ' |
| 422 | 449 | </div> |
@@ -424,13 +451,15 @@ discard block |
||
| 424 | 451 | <div class="post"> |
| 425 | 452 | <div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>'; |
| 426 | 453 | |
| 427 | - if ($message['can_report'] || $context['can_send_pm']) |
|
| 428 | - echo ' |
|
| 454 | + if ($message['can_report'] || $context['can_send_pm']) { |
|
| 455 | + echo ' |
|
| 429 | 456 | <div class="under_message">'; |
| 457 | + } |
|
| 430 | 458 | |
| 431 | - if ($message['can_report']) |
|
| 432 | - echo ' |
|
| 459 | + if ($message['can_report']) { |
|
| 460 | + echo ' |
|
| 433 | 461 | <a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '" class="floatright">' . $txt['pm_report_to_admin'] . '</a>'; |
| 462 | + } |
|
| 434 | 463 | |
| 435 | 464 | echo ' |
| 436 | 465 | <ul class="quickbuttons">'; |
@@ -442,32 +471,36 @@ discard block |
||
| 442 | 471 | if (!$message['member']['is_guest']) |
| 443 | 472 | { |
| 444 | 473 | // Is there than more than one recipient you can reply to? |
| 445 | - if ($message['number_recipients'] > 1) |
|
| 446 | - echo ' |
|
| 474 | + if ($message['number_recipients'] > 1) { |
|
| 475 | + echo ' |
|
| 447 | 476 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all"><span class="generic_icons reply_all_button"></span>', $txt['reply_to_all'], '</a></li>'; |
| 477 | + } |
|
| 448 | 478 | |
| 449 | 479 | echo ' |
| 450 | 480 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li> |
| 451 | 481 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>'; |
| 452 | 482 | } |
| 453 | 483 | // This is for "forwarding" - even if the member is gone. |
| 454 | - else |
|
| 455 | - echo ' |
|
| 484 | + else { |
|
| 485 | + echo ' |
|
| 456 | 486 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote"><span class="generic_icons quote"></span>', $txt['reply_quote'], '</a></li>'; |
| 487 | + } |
|
| 457 | 488 | } |
| 458 | 489 | echo ' |
| 459 | 490 | <li><a href="', $scripturl, '?action=pm;sa=pmactions;pm_actions%5b', $message['id'], '%5D=delete;f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', addslashes($txt['remove_message_question']), '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['delete'], '</a></li>'; |
| 460 | 491 | |
| 461 | - if (empty($context['display_mode'])) |
|
| 462 | - echo ' |
|
| 492 | + if (empty($context['display_mode'])) { |
|
| 493 | + echo ' |
|
| 463 | 494 | <li><input type="checkbox" name="pms[]" id="deletedisplay', $message['id'], '" value="', $message['id'], '" onclick="document.getElementById(\'deletelisting', $message['id'], '\').checked = this.checked;" class="input_check"></li>'; |
| 495 | + } |
|
| 464 | 496 | |
| 465 | 497 | echo ' |
| 466 | 498 | </ul>'; |
| 467 | 499 | |
| 468 | - if ($message['can_report'] || $context['can_send_pm']) |
|
| 469 | - echo ' |
|
| 500 | + if ($message['can_report'] || $context['can_send_pm']) { |
|
| 501 | + echo ' |
|
| 470 | 502 | </div>'; |
| 503 | + } |
|
| 471 | 504 | |
| 472 | 505 | // Are there any custom profile fields for above the signature? |
| 473 | 506 | if (!empty($message['custom_fields']['above_signature'])) |
@@ -476,9 +509,10 @@ discard block |
||
| 476 | 509 | <div class="custom_fields_above_signature"> |
| 477 | 510 | <ul class="nolist">'; |
| 478 | 511 | |
| 479 | - foreach ($message['custom_fields']['above_signature'] as $custom) |
|
| 480 | - echo ' |
|
| 512 | + foreach ($message['custom_fields']['above_signature'] as $custom) { |
|
| 513 | + echo ' |
|
| 481 | 514 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
| 515 | + } |
|
| 482 | 516 | |
| 483 | 517 | echo ' |
| 484 | 518 | </ul> |
@@ -486,9 +520,10 @@ discard block |
||
| 486 | 520 | } |
| 487 | 521 | |
| 488 | 522 | // Show the member's signature? |
| 489 | - if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) |
|
| 490 | - echo ' |
|
| 523 | + if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) { |
|
| 524 | + echo ' |
|
| 491 | 525 | <div class="signature">', $message['member']['signature'], '</div>'; |
| 526 | + } |
|
| 492 | 527 | |
| 493 | 528 | // Are there any custom profile fields for below the signature? |
| 494 | 529 | if (!empty($message['custom_fields']['below_signature'])) |
@@ -497,9 +532,10 @@ discard block |
||
| 497 | 532 | <div class="custom_fields_below_signature"> |
| 498 | 533 | <ul class="nolist">'; |
| 499 | 534 | |
| 500 | - foreach ($message['custom_fields']['below_signature'] as $custom) |
|
| 501 | - echo ' |
|
| 535 | + foreach ($message['custom_fields']['below_signature'] as $custom) { |
|
| 536 | + echo ' |
|
| 502 | 537 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
| 538 | + } |
|
| 503 | 539 | |
| 504 | 540 | echo ' |
| 505 | 541 | </ul> |
@@ -524,19 +560,21 @@ discard block |
||
| 524 | 560 | { |
| 525 | 561 | echo ' |
| 526 | 562 | <option value="" disabled>', $txt['pm_msg_label_apply'], ':</option>'; |
| 527 | - foreach ($context['labels'] as $label) |
|
| 528 | - if (!isset($message['labels'][$label['id']])) |
|
| 563 | + foreach ($context['labels'] as $label) { |
|
| 564 | + if (!isset($message['labels'][$label['id']])) |
|
| 529 | 565 | echo ' |
| 530 | 566 | <option value="', $label['id'], '"> ', $label['name'], '</option>'; |
| 567 | + } |
|
| 531 | 568 | } |
| 532 | 569 | // ... and are there any that can be removed? |
| 533 | 570 | if (!empty($message['labels']) && (count($message['labels']) > 1 || !isset($message['labels'][-1]))) |
| 534 | 571 | { |
| 535 | 572 | echo ' |
| 536 | 573 | <option value="" disabled>', $txt['pm_msg_label_remove'], ':</option>'; |
| 537 | - foreach ($message['labels'] as $label) |
|
| 538 | - echo ' |
|
| 574 | + foreach ($message['labels'] as $label) { |
|
| 575 | + echo ' |
|
| 539 | 576 | <option value="', $label['id'], '"> ', $label['name'], '</option>'; |
| 577 | + } |
|
| 540 | 578 | } |
| 541 | 579 | echo ' |
| 542 | 580 | </select> |
@@ -556,13 +594,14 @@ discard block |
||
| 556 | 594 | </div>'; |
| 557 | 595 | } |
| 558 | 596 | |
| 559 | - if (empty($context['display_mode'])) |
|
| 560 | - echo ' |
|
| 597 | + if (empty($context['display_mode'])) { |
|
| 598 | + echo ' |
|
| 561 | 599 | |
| 562 | 600 | <div class="pagesection"> |
| 563 | 601 | <div class="floatleft">', $context['page_index'], '</div> |
| 564 | 602 | <div class="floatright"><input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['delete_selected_confirm'], '\')) return false;" class="button_submit"></div> |
| 565 | 603 | </div>'; |
| 604 | + } |
|
| 566 | 605 | |
| 567 | 606 | // Show a few buttons if we are in conversation mode and outputting the first message. |
| 568 | 607 | elseif ($context['display_mode'] == 2 && isset($context['conversation_buttons'])) |
@@ -622,11 +661,12 @@ discard block |
||
| 622 | 661 | </tr> |
| 623 | 662 | </thead> |
| 624 | 663 | <tbody>'; |
| 625 | - if (!$context['show_delete']) |
|
| 626 | - echo ' |
|
| 664 | + if (!$context['show_delete']) { |
|
| 665 | + echo ' |
|
| 627 | 666 | <tr class="windowbg"> |
| 628 | 667 | <td colspan="5">', $txt['pm_alert_none'], '</td> |
| 629 | 668 | </tr>'; |
| 669 | + } |
|
| 630 | 670 | |
| 631 | 671 | while ($message = $context['get_pmessage']('subject')) |
| 632 | 672 | { |
@@ -679,9 +719,10 @@ discard block |
||
| 679 | 719 | |
| 680 | 720 | foreach ($context['labels'] as $label) |
| 681 | 721 | { |
| 682 | - if ($label['id'] != $context['current_label_id']) |
|
| 683 | - echo ' |
|
| 722 | + if ($label['id'] != $context['current_label_id']) { |
|
| 723 | + echo ' |
|
| 684 | 724 | <option value="add_', $label['id'], '"> ', $label['name'], '</option>'; |
| 725 | + } |
|
| 685 | 726 | } |
| 686 | 727 | |
| 687 | 728 | echo ' |
@@ -766,9 +807,10 @@ discard block |
||
| 766 | 807 | <dt class="between">', $txt['pm_search_post_age'], ':</dt> |
| 767 | 808 | <dd>', $txt['pm_search_between'], ' <input type="number" name="minage" value="', empty($context['search_params']['minage']) ? '0' : $context['search_params']['minage'], '" size="5" maxlength="5" class="input_text" min="0" max="9999"> ', $txt['pm_search_between_and'], ' <input type="number" name="maxage" value="', empty($context['search_params']['maxage']) ? '9999' : $context['search_params']['maxage'], '" size="5" maxlength="5" class="input_text" min="0" max="9999"> ', $txt['pm_search_between_days'], '</dd> |
| 768 | 809 | </dl>'; |
| 769 | - if (!$context['currently_using_labels']) |
|
| 770 | - echo ' |
|
| 810 | + if (!$context['currently_using_labels']) { |
|
| 811 | + echo ' |
|
| 771 | 812 | <input type="submit" name="pm_search" value="', $txt['pm_search_go'], '" class="button_submit">'; |
| 813 | + } |
|
| 772 | 814 | echo ' |
| 773 | 815 | <br class="clear_right"> |
| 774 | 816 | </div> |
@@ -788,12 +830,13 @@ discard block |
||
| 788 | 830 | <div id="advanced_panel_div"> |
| 789 | 831 | <ul id="searchLabelsExpand">'; |
| 790 | 832 | |
| 791 | - foreach ($context['search_labels'] as $label) |
|
| 792 | - echo ' |
|
| 833 | + foreach ($context['search_labels'] as $label) { |
|
| 834 | + echo ' |
|
| 793 | 835 | <li> |
| 794 | 836 | <label for="searchlabel_', $label['id'], '"><input type="checkbox" id="searchlabel_', $label['id'], '" name="searchlabel[', $label['id'], ']" value="', $label['id'], '"', $label['checked'] ? ' checked' : '', ' class="input_check"> |
| 795 | 837 | ', $label['name'], '</label> |
| 796 | 838 | </li>'; |
| 839 | + } |
|
| 797 | 840 | |
| 798 | 841 | echo ' |
| 799 | 842 | </ul> |
@@ -853,8 +896,8 @@ discard block |
||
| 853 | 896 | </div>'; |
| 854 | 897 | |
| 855 | 898 | // complete results ? |
| 856 | - if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) |
|
| 857 | - echo ' |
|
| 899 | + if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) { |
|
| 900 | + echo ' |
|
| 858 | 901 | <table class="table_grid"> |
| 859 | 902 | <thead> |
| 860 | 903 | <tr class="title_bar"> |
@@ -864,6 +907,7 @@ discard block |
||
| 864 | 907 | </tr> |
| 865 | 908 | </thead> |
| 866 | 909 | <tbody>'; |
| 910 | + } |
|
| 867 | 911 | |
| 868 | 912 | // Print each message out... |
| 869 | 913 | foreach ($context['personal_messages'] as $message) |
@@ -883,11 +927,13 @@ discard block |
||
| 883 | 927 | |
| 884 | 928 | // Show the recipients. |
| 885 | 929 | // @todo This doesn't deal with the sent item searching quite right for bcc. |
| 886 | - if (!empty($message['recipients']['to'])) |
|
| 887 | - echo implode(', ', $message['recipients']['to']); |
|
| 930 | + if (!empty($message['recipients']['to'])) { |
|
| 931 | + echo implode(', ', $message['recipients']['to']); |
|
| 932 | + } |
|
| 888 | 933 | // Otherwise, we're just going to say "some people"... |
| 889 | - elseif ($context['folder'] != 'sent') |
|
| 890 | - echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
| 934 | + elseif ($context['folder'] != 'sent') { |
|
| 935 | + echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
| 936 | + } |
|
| 891 | 937 | |
| 892 | 938 | echo ' |
| 893 | 939 | </h3> |
@@ -901,14 +947,16 @@ discard block |
||
| 901 | 947 | $quote_button = create_button('quote.png', 'reply_quote', 'reply_quote', 'class="centericon"'); |
| 902 | 948 | $reply_button = create_button('im_reply.png', 'reply', 'reply', 'class="centericon"'); |
| 903 | 949 | // You can only reply if they are not a guest... |
| 904 | - if (!$message['member']['is_guest']) |
|
| 905 | - echo ' |
|
| 950 | + if (!$message['member']['is_guest']) { |
|
| 951 | + echo ' |
|
| 906 | 952 | <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], ' |
| 907 | 953 | <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button , '</a> ', $context['menu_separator']; |
| 954 | + } |
|
| 908 | 955 | // This is for "forwarding" - even if the member is gone. |
| 909 | - else |
|
| 910 | - echo ' |
|
| 956 | + else { |
|
| 957 | + echo ' |
|
| 911 | 958 | <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button , '</a>', $context['menu_separator']; |
| 959 | + } |
|
| 912 | 960 | } |
| 913 | 961 | |
| 914 | 962 | echo ' |
@@ -929,17 +977,19 @@ discard block |
||
| 929 | 977 | } |
| 930 | 978 | |
| 931 | 979 | // Finish off the page... |
| 932 | - if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) |
|
| 933 | - echo ' |
|
| 980 | + if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) { |
|
| 981 | + echo ' |
|
| 934 | 982 | </tbody> |
| 935 | 983 | </table>'; |
| 984 | + } |
|
| 936 | 985 | |
| 937 | 986 | // No results? |
| 938 | - if (empty($context['personal_messages'])) |
|
| 939 | - echo ' |
|
| 987 | + if (empty($context['personal_messages'])) { |
|
| 988 | + echo ' |
|
| 940 | 989 | <div class="windowbg"> |
| 941 | 990 | <p class="centertext">', $txt['pm_search_none_found'], '</p> |
| 942 | 991 | </div>'; |
| 992 | + } |
|
| 943 | 993 | |
| 944 | 994 | echo ' |
| 945 | 995 | <div class="pagesection"> |
@@ -963,12 +1013,14 @@ discard block |
||
| 963 | 1013 | <h3 class="catbg">', $txt['pm_send_report'], '</h3> |
| 964 | 1014 | </div> |
| 965 | 1015 | <div class="windowbg">'; |
| 966 | - if (!empty($context['send_log']['sent'])) |
|
| 967 | - foreach ($context['send_log']['sent'] as $log_entry) |
|
| 1016 | + if (!empty($context['send_log']['sent'])) { |
|
| 1017 | + foreach ($context['send_log']['sent'] as $log_entry) |
|
| 968 | 1018 | echo '<span class="error">', $log_entry, '</span><br>'; |
| 969 | - if (!empty($context['send_log']['failed'])) |
|
| 970 | - foreach ($context['send_log']['failed'] as $log_entry) |
|
| 1019 | + } |
|
| 1020 | + if (!empty($context['send_log']['failed'])) { |
|
| 1021 | + foreach ($context['send_log']['failed'] as $log_entry) |
|
| 971 | 1022 | echo '<span class="error">', $log_entry, '</span><br>'; |
| 1023 | + } |
|
| 972 | 1024 | echo ' |
| 973 | 1025 | </div> |
| 974 | 1026 | <br>'; |
@@ -1016,12 +1068,13 @@ discard block |
||
| 1016 | 1068 | </dl> |
| 1017 | 1069 | </div>'; |
| 1018 | 1070 | |
| 1019 | - if (!empty($modSettings['drafts_pm_enabled'])) |
|
| 1020 | - echo ' |
|
| 1071 | + if (!empty($modSettings['drafts_pm_enabled'])) { |
|
| 1072 | + echo ' |
|
| 1021 | 1073 | <div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>', |
| 1022 | 1074 | sprintf($txt['draft_pm_saved'], $scripturl . '?action=pm;sa=showpmdrafts'), ' |
| 1023 | 1075 | ', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), ' |
| 1024 | 1076 | </div>'; |
| 1077 | + } |
|
| 1025 | 1078 | |
| 1026 | 1079 | echo ' |
| 1027 | 1080 | <dl id="post_header">'; |
@@ -1076,9 +1129,10 @@ discard block |
||
| 1076 | 1129 | } |
| 1077 | 1130 | |
| 1078 | 1131 | // What about smileys? |
| 1079 | - if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) |
|
| 1080 | - echo ' |
|
| 1132 | + if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) { |
|
| 1133 | + echo ' |
|
| 1081 | 1134 | <div id="smileyBox_message"></div>'; |
| 1135 | + } |
|
| 1082 | 1136 | |
| 1083 | 1137 | // Show BBC buttons, smileys and textbox. |
| 1084 | 1138 | echo ' |
@@ -1125,10 +1179,11 @@ discard block |
||
| 1125 | 1179 | <dt><strong>', $txt['subject'], '</strong></dt> |
| 1126 | 1180 | <dd><strong>', $txt['draft_saved_on'], '</strong></dd>'; |
| 1127 | 1181 | |
| 1128 | - foreach ($context['drafts'] as $draft) |
|
| 1129 | - echo ' |
|
| 1182 | + foreach ($context['drafts'] as $draft) { |
|
| 1183 | + echo ' |
|
| 1130 | 1184 | <dt>', $draft['link'], '</dt> |
| 1131 | 1185 | <dd>', $draft['poster_time'], '</dd>'; |
| 1186 | + } |
|
| 1132 | 1187 | echo ' |
| 1133 | 1188 | </dl> |
| 1134 | 1189 | </div>'; |
@@ -1234,8 +1289,8 @@ discard block |
||
| 1234 | 1289 | }'; |
| 1235 | 1290 | |
| 1236 | 1291 | // Code for showing and hiding drafts |
| 1237 | - if (!empty($context['drafts'])) |
|
| 1238 | - echo ' |
|
| 1292 | + if (!empty($context['drafts'])) { |
|
| 1293 | + echo ' |
|
| 1239 | 1294 | var oSwapDraftOptions = new smc_Toggle({ |
| 1240 | 1295 | bToggleEnabled: true, |
| 1241 | 1296 | bCurrentlyCollapsed: true, |
@@ -1257,13 +1312,14 @@ discard block |
||
| 1257 | 1312 | } |
| 1258 | 1313 | ] |
| 1259 | 1314 | });'; |
| 1315 | + } |
|
| 1260 | 1316 | |
| 1261 | 1317 | echo ' |
| 1262 | 1318 | </script>'; |
| 1263 | 1319 | |
| 1264 | 1320 | // Show the message you're replying to. |
| 1265 | - if ($context['reply']) |
|
| 1266 | - echo ' |
|
| 1321 | + if ($context['reply']) { |
|
| 1322 | + echo ' |
|
| 1267 | 1323 | <br> |
| 1268 | 1324 | <br> |
| 1269 | 1325 | <div class="cat_bar"> |
@@ -1277,6 +1333,7 @@ discard block |
||
| 1277 | 1333 | <hr> |
| 1278 | 1334 | ', $context['quoted_message']['body'], ' |
| 1279 | 1335 | </div><br class="clear">'; |
| 1336 | + } |
|
| 1280 | 1337 | |
| 1281 | 1338 | echo ' |
| 1282 | 1339 | <script> |
@@ -1287,22 +1344,24 @@ discard block |
||
| 1287 | 1344 | sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\', |
| 1288 | 1345 | sToControlId: \'to_control\', |
| 1289 | 1346 | aToRecipients: ['; |
| 1290 | - foreach ($context['recipients']['to'] as $i => $member) |
|
| 1291 | - echo ' |
|
| 1347 | + foreach ($context['recipients']['to'] as $i => $member) { |
|
| 1348 | + echo ' |
|
| 1292 | 1349 | { |
| 1293 | 1350 | sItemId: ', JavaScriptEscape($member['id']), ', |
| 1294 | 1351 | sItemName: ', JavaScriptEscape($member['name']), ' |
| 1295 | 1352 | }', $i == count($context['recipients']['to']) - 1 ? '' : ','; |
| 1353 | + } |
|
| 1296 | 1354 | |
| 1297 | 1355 | echo ' |
| 1298 | 1356 | ], |
| 1299 | 1357 | aBccRecipients: ['; |
| 1300 | - foreach ($context['recipients']['bcc'] as $i => $member) |
|
| 1301 | - echo ' |
|
| 1358 | + foreach ($context['recipients']['bcc'] as $i => $member) { |
|
| 1359 | + echo ' |
|
| 1302 | 1360 | { |
| 1303 | 1361 | sItemId: ', JavaScriptEscape($member['id']), ', |
| 1304 | 1362 | sItemName: ', JavaScriptEscape($member['name']), ' |
| 1305 | 1363 | }', $i == count($context['recipients']['bcc']) - 1 ? '' : ','; |
| 1364 | + } |
|
| 1306 | 1365 | |
| 1307 | 1366 | echo ' |
| 1308 | 1367 | ], |
@@ -1389,26 +1448,28 @@ discard block |
||
| 1389 | 1448 | </th> |
| 1390 | 1449 | <th class="centertext table_icon">'; |
| 1391 | 1450 | |
| 1392 | - if (count($context['labels']) > 2) |
|
| 1393 | - echo ' |
|
| 1451 | + if (count($context['labels']) > 2) { |
|
| 1452 | + echo ' |
|
| 1394 | 1453 | <input type="checkbox" class="input_check" onclick="invertAll(this, this.form);">'; |
| 1454 | + } |
|
| 1395 | 1455 | |
| 1396 | 1456 | echo ' |
| 1397 | 1457 | </th> |
| 1398 | 1458 | </tr> |
| 1399 | 1459 | </thead> |
| 1400 | 1460 | <tbody>'; |
| 1401 | - if (count($context['labels']) < 2) |
|
| 1402 | - echo ' |
|
| 1461 | + if (count($context['labels']) < 2) { |
|
| 1462 | + echo ' |
|
| 1403 | 1463 | <tr class="windowbg"> |
| 1404 | 1464 | <td colspan="2">', $txt['pm_labels_no_exist'], '</td> |
| 1405 | 1465 | </tr>'; |
| 1406 | - else |
|
| 1466 | + } else |
|
| 1407 | 1467 | { |
| 1408 | 1468 | foreach ($context['labels'] as $label) |
| 1409 | 1469 | { |
| 1410 | - if ($label['id'] == -1) |
|
| 1411 | - continue; |
|
| 1470 | + if ($label['id'] == -1) { |
|
| 1471 | + continue; |
|
| 1472 | + } |
|
| 1412 | 1473 | |
| 1413 | 1474 | echo ' |
| 1414 | 1475 | <tr class="windowbg"> |
@@ -1423,12 +1484,13 @@ discard block |
||
| 1423 | 1484 | </tbody> |
| 1424 | 1485 | </table>'; |
| 1425 | 1486 | |
| 1426 | - if (!count($context['labels']) < 2) |
|
| 1427 | - echo ' |
|
| 1487 | + if (!count($context['labels']) < 2) { |
|
| 1488 | + echo ' |
|
| 1428 | 1489 | <div class="padding"> |
| 1429 | 1490 | <input type="submit" name="save" value="', $txt['save'], '" class="button_submit"> |
| 1430 | 1491 | <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button_submit you_sure"> |
| 1431 | 1492 | </div>'; |
| 1493 | + } |
|
| 1432 | 1494 | |
| 1433 | 1495 | echo ' |
| 1434 | 1496 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -1483,9 +1545,10 @@ discard block |
||
| 1483 | 1545 | <dd> |
| 1484 | 1546 | <select name="id_admin"> |
| 1485 | 1547 | <option value="0">', $txt['pm_report_all_admins'], '</option>'; |
| 1486 | - foreach ($context['admins'] as $id => $name) |
|
| 1487 | - echo ' |
|
| 1548 | + foreach ($context['admins'] as $id => $name) { |
|
| 1549 | + echo ' |
|
| 1488 | 1550 | <option value="', $id, '">', $name, '</option>'; |
| 1551 | + } |
|
| 1489 | 1552 | echo ' |
| 1490 | 1553 | </select> |
| 1491 | 1554 | </dd>'; |
@@ -1547,9 +1610,10 @@ discard block |
||
| 1547 | 1610 | </th> |
| 1548 | 1611 | <th class="centertext table_icon">'; |
| 1549 | 1612 | |
| 1550 | - if (!empty($context['rules'])) |
|
| 1551 | - echo ' |
|
| 1613 | + if (!empty($context['rules'])) { |
|
| 1614 | + echo ' |
|
| 1552 | 1615 | <input type="checkbox" onclick="invertAll(this, this.form);" class="input_check">'; |
| 1616 | + } |
|
| 1553 | 1617 | |
| 1554 | 1618 | echo ' |
| 1555 | 1619 | </th> |
@@ -1557,13 +1621,14 @@ discard block |
||
| 1557 | 1621 | </thead> |
| 1558 | 1622 | <tbody>'; |
| 1559 | 1623 | |
| 1560 | - if (empty($context['rules'])) |
|
| 1561 | - echo ' |
|
| 1624 | + if (empty($context['rules'])) { |
|
| 1625 | + echo ' |
|
| 1562 | 1626 | <tr class="windowbg"> |
| 1563 | 1627 | <td colspan="2"> |
| 1564 | 1628 | ', $txt['pm_rules_none'], ' |
| 1565 | 1629 | </td> |
| 1566 | 1630 | </tr>'; |
| 1631 | + } |
|
| 1567 | 1632 | |
| 1568 | 1633 | foreach ($context['rules'] as $rule) |
| 1569 | 1634 | { |
@@ -1584,14 +1649,16 @@ discard block |
||
| 1584 | 1649 | <div class="righttext"> |
| 1585 | 1650 | <a class="button_link" href="', $scripturl, '?action=pm;sa=manrules;add;rid=0">', $txt['pm_add_rule'], '</a>'; |
| 1586 | 1651 | |
| 1587 | - if (!empty($context['rules'])) |
|
| 1588 | - echo ' |
|
| 1652 | + if (!empty($context['rules'])) { |
|
| 1653 | + echo ' |
|
| 1589 | 1654 | [<a href="', $scripturl, '?action=pm;sa=manrules;apply;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['pm_js_apply_rules_confirm'], '\');">', $txt['pm_apply_rules'], '</a>]'; |
| 1655 | + } |
|
| 1590 | 1656 | |
| 1591 | - if (!empty($context['rules'])) |
|
| 1592 | - echo ' |
|
| 1657 | + if (!empty($context['rules'])) { |
|
| 1658 | + echo ' |
|
| 1593 | 1659 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 1594 | 1660 | <input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button_submit smalltext you_sure">'; |
| 1661 | + } |
|
| 1595 | 1662 | |
| 1596 | 1663 | echo ' |
| 1597 | 1664 | </div> |
@@ -1613,14 +1680,16 @@ discard block |
||
| 1613 | 1680 | var groups = new Array() |
| 1614 | 1681 | var labels = new Array()'; |
| 1615 | 1682 | |
| 1616 | - foreach ($context['groups'] as $id => $title) |
|
| 1617 | - echo ' |
|
| 1683 | + foreach ($context['groups'] as $id => $title) { |
|
| 1684 | + echo ' |
|
| 1618 | 1685 | groups[', $id, '] = "', addslashes($title), '";'; |
| 1686 | + } |
|
| 1619 | 1687 | |
| 1620 | - foreach ($context['labels'] as $label) |
|
| 1621 | - if ($label['id'] != -1) |
|
| 1688 | + foreach ($context['labels'] as $label) { |
|
| 1689 | + if ($label['id'] != -1) |
|
| 1622 | 1690 | echo ' |
| 1623 | 1691 | labels[', ($label['id']), '] = "', addslashes($label['name']), '";'; |
| 1692 | + } |
|
| 1624 | 1693 | |
| 1625 | 1694 | echo ' |
| 1626 | 1695 | function addCriteriaOption() |
@@ -1635,8 +1704,9 @@ discard block |
||
| 1635 | 1704 | |
| 1636 | 1705 | setOuterHTML(document.getElementById("criteriaAddHere"), \'<br><select name="ruletype[\' + criteriaNum + \']" id="ruletype\' + criteriaNum + \'" onchange="updateRuleDef(\' + criteriaNum + \'); rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_criteria_pick']), ':<\' + \'/option><option value="mid">', addslashes($txt['pm_rule_mid']), '<\' + \'/option><option value="gid">', addslashes($txt['pm_rule_gid']), '<\' + \'/option><option value="sub">', addslashes($txt['pm_rule_sub']), '<\' + \'/option><option value="msg">', addslashes($txt['pm_rule_msg']), '<\' + \'/option><option value="bud">', addslashes($txt['pm_rule_bud']), '<\' + \'/option><\' + \'/select> <span id="defdiv\' + criteriaNum + \'" style="display: none;"><input type="text" name="ruledef[\' + criteriaNum + \']" id="ruledef\' + criteriaNum + \'" onkeyup="rebuildRuleDesc();" value="" class="input_text"><\' + \'/span><span id="defseldiv\' + criteriaNum + \'" style="display: none;"><select name="ruledefgroup[\' + criteriaNum + \']" id="ruledefgroup\' + criteriaNum + \'" onchange="rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_group']), '<\' + \'/option>'; |
| 1637 | 1706 | |
| 1638 | - foreach ($context['groups'] as $id => $group) |
|
| 1639 | - echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>'; |
|
| 1707 | + foreach ($context['groups'] as $id => $group) { |
|
| 1708 | + echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>'; |
|
| 1709 | + } |
|
| 1640 | 1710 | |
| 1641 | 1711 | echo '<\' + \'/select><\' + \'/span><span id="criteriaAddHere"><\' + \'/span>\'); |
| 1642 | 1712 | } |
@@ -1653,9 +1723,10 @@ discard block |
||
| 1653 | 1723 | |
| 1654 | 1724 | setOuterHTML(document.getElementById("actionAddHere"), \'<br><select name="acttype[\' + actionNum + \']" id="acttype\' + actionNum + \'" onchange="updateActionDef(\' + actionNum + \'); rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_action']), ':<\' + \'/option><option value="lab">', addslashes($txt['pm_rule_label']), '<\' + \'/option><option value="del">', addslashes($txt['pm_rule_delete']), '<\' + \'/option><\' + \'/select> <span id="labdiv\' + actionNum + \'" style="display: none;"><select name="labdef[\' + actionNum + \']" id="labdef\' + actionNum + \'" onchange="rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_label']), '<\' + \'/option>'; |
| 1655 | 1725 | |
| 1656 | - foreach ($context['labels'] as $label) |
|
| 1657 | - if ($label['id'] != -1) |
|
| 1726 | + foreach ($context['labels'] as $label) { |
|
| 1727 | + if ($label['id'] != -1) |
|
| 1658 | 1728 | echo '<option value="', ($label['id']), '">', addslashes($label['name']), '<\' + \'/option>'; |
| 1729 | + } |
|
| 1659 | 1730 | |
| 1660 | 1731 | echo '<\' + \'/select><\' + \'/span><span id="actionAddHere"><\' + \'/span>\'); |
| 1661 | 1732 | } |
@@ -1769,18 +1840,20 @@ discard block |
||
| 1769 | 1840 | $isFirst = true; |
| 1770 | 1841 | foreach ($context['rule']['criteria'] as $k => $criteria) |
| 1771 | 1842 | { |
| 1772 | - if (!$isFirst && $criteria['t'] == '') |
|
| 1773 | - echo '<div id="removeonjs1">'; |
|
| 1774 | - elseif (!$isFirst) |
|
| 1775 | - echo '<br>'; |
|
| 1843 | + if (!$isFirst && $criteria['t'] == '') { |
|
| 1844 | + echo '<div id="removeonjs1">'; |
|
| 1845 | + } elseif (!$isFirst) { |
|
| 1846 | + echo '<br>'; |
|
| 1847 | + } |
|
| 1776 | 1848 | |
| 1777 | 1849 | echo ' |
| 1778 | 1850 | <select name="ruletype[', $k, ']" id="ruletype', $k, '" onchange="updateRuleDef(', $k, '); rebuildRuleDesc();"> |
| 1779 | 1851 | <option value="">', $txt['pm_rule_criteria_pick'], ':</option>'; |
| 1780 | 1852 | |
| 1781 | - foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr) |
|
| 1782 | - echo ' |
|
| 1853 | + foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr) { |
|
| 1854 | + echo ' |
|
| 1783 | 1855 | <option value="', $cr, '"', $criteria['t'] == $cr ? ' selected' : '', '>', $txt['pm_rule_' . $cr], '</option>'; |
| 1856 | + } |
|
| 1784 | 1857 | |
| 1785 | 1858 | echo ' |
| 1786 | 1859 | </select> |
@@ -1791,18 +1864,20 @@ discard block |
||
| 1791 | 1864 | <select name="ruledefgroup[', $k, ']" id="ruledefgroup', $k, '" onchange="rebuildRuleDesc();"> |
| 1792 | 1865 | <option value="">', $txt['pm_rule_sel_group'], '</option>'; |
| 1793 | 1866 | |
| 1794 | - foreach ($context['groups'] as $id => $group) |
|
| 1795 | - echo ' |
|
| 1867 | + foreach ($context['groups'] as $id => $group) { |
|
| 1868 | + echo ' |
|
| 1796 | 1869 | <option value="', $id, '"', $criteria['t'] == 'gid' && $criteria['v'] == $id ? ' selected' : '', '>', $group, '</option>'; |
| 1870 | + } |
|
| 1797 | 1871 | echo ' |
| 1798 | 1872 | </select> |
| 1799 | 1873 | </span>'; |
| 1800 | 1874 | |
| 1801 | 1875 | // If this is the dummy we add a means to hide for non js users. |
| 1802 | - if ($isFirst) |
|
| 1803 | - $isFirst = false; |
|
| 1804 | - elseif ($criteria['t'] == '') |
|
| 1805 | - echo '</div>'; |
|
| 1876 | + if ($isFirst) { |
|
| 1877 | + $isFirst = false; |
|
| 1878 | + } elseif ($criteria['t'] == '') { |
|
| 1879 | + echo '</div>'; |
|
| 1880 | + } |
|
| 1806 | 1881 | } |
| 1807 | 1882 | |
| 1808 | 1883 | echo ' |
@@ -1825,10 +1900,11 @@ discard block |
||
| 1825 | 1900 | $isFirst = true; |
| 1826 | 1901 | foreach ($context['rule']['actions'] as $k => $action) |
| 1827 | 1902 | { |
| 1828 | - if (!$isFirst && $action['t'] == '') |
|
| 1829 | - echo '<div id="removeonjs2">'; |
|
| 1830 | - elseif (!$isFirst) |
|
| 1831 | - echo '<br>'; |
|
| 1903 | + if (!$isFirst && $action['t'] == '') { |
|
| 1904 | + echo '<div id="removeonjs2">'; |
|
| 1905 | + } elseif (!$isFirst) { |
|
| 1906 | + echo '<br>'; |
|
| 1907 | + } |
|
| 1832 | 1908 | |
| 1833 | 1909 | echo ' |
| 1834 | 1910 | <select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();"> |
@@ -1839,20 +1915,22 @@ discard block |
||
| 1839 | 1915 | <span id="labdiv', $k, '"> |
| 1840 | 1916 | <select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();"> |
| 1841 | 1917 | <option value="">', $txt['pm_rule_sel_label'], '</option>'; |
| 1842 | - foreach ($context['labels'] as $label) |
|
| 1843 | - if ($label['id'] != -1) |
|
| 1918 | + foreach ($context['labels'] as $label) { |
|
| 1919 | + if ($label['id'] != -1) |
|
| 1844 | 1920 | echo ' |
| 1845 | 1921 | <option value="', ($label['id']), '"', $action['t'] == 'lab' && $action['v'] == $label['id'] ? ' selected' : '', '>', $label['name'], '</option>'; |
| 1922 | + } |
|
| 1846 | 1923 | |
| 1847 | 1924 | echo ' |
| 1848 | 1925 | </select> |
| 1849 | 1926 | </span>'; |
| 1850 | 1927 | |
| 1851 | - if ($isFirst) |
|
| 1852 | - $isFirst = false; |
|
| 1853 | - elseif ($action['t'] == '') |
|
| 1854 | - echo ' |
|
| 1928 | + if ($isFirst) { |
|
| 1929 | + $isFirst = false; |
|
| 1930 | + } elseif ($action['t'] == '') { |
|
| 1931 | + echo ' |
|
| 1855 | 1932 | </div>'; |
| 1933 | + } |
|
| 1856 | 1934 | } |
| 1857 | 1935 | |
| 1858 | 1936 | echo ' |
@@ -1876,22 +1954,25 @@ discard block |
||
| 1876 | 1954 | echo ' |
| 1877 | 1955 | <script>'; |
| 1878 | 1956 | |
| 1879 | - foreach ($context['rule']['criteria'] as $k => $c) |
|
| 1880 | - echo ' |
|
| 1957 | + foreach ($context['rule']['criteria'] as $k => $c) { |
|
| 1958 | + echo ' |
|
| 1881 | 1959 | updateRuleDef(', $k, ');'; |
| 1960 | + } |
|
| 1882 | 1961 | |
| 1883 | - foreach ($context['rule']['actions'] as $k => $c) |
|
| 1884 | - echo ' |
|
| 1962 | + foreach ($context['rule']['actions'] as $k => $c) { |
|
| 1963 | + echo ' |
|
| 1885 | 1964 | updateActionDef(', $k, ');'; |
| 1965 | + } |
|
| 1886 | 1966 | |
| 1887 | 1967 | echo ' |
| 1888 | 1968 | rebuildRuleDesc();'; |
| 1889 | 1969 | |
| 1890 | 1970 | // If this isn't a new rule and we have JS enabled remove the JS compatibility stuff. |
| 1891 | - if ($context['rid']) |
|
| 1892 | - echo ' |
|
| 1971 | + if ($context['rid']) { |
|
| 1972 | + echo ' |
|
| 1893 | 1973 | document.getElementById("removeonjs1").style.display = "none"; |
| 1894 | 1974 | document.getElementById("removeonjs2").style.display = "none";'; |
| 1975 | + } |
|
| 1895 | 1976 | |
| 1896 | 1977 | echo ' |
| 1897 | 1978 | document.getElementById("addonjs1").style.display = ""; |
@@ -1924,12 +2005,12 @@ discard block |
||
| 1924 | 2005 | |
| 1925 | 2006 | |
| 1926 | 2007 | // No drafts? Just show an informative message. |
| 1927 | - if (empty($context['drafts'])) |
|
| 1928 | - echo ' |
|
| 2008 | + if (empty($context['drafts'])) { |
|
| 2009 | + echo ' |
|
| 1929 | 2010 | <div class="windowbg2 centertext"> |
| 1930 | 2011 | ', $txt['draft_none'], ' |
| 1931 | 2012 | </div>'; |
| 1932 | - else |
|
| 2013 | + } else |
|
| 1933 | 2014 | { |
| 1934 | 2015 | // For every draft to be displayed, give it its own div, and show the important details of the draft. |
| 1935 | 2016 | foreach ($context['drafts'] as $draft) |
@@ -116,9 +116,10 @@ discard block |
||
| 116 | 116 | <h3 class="catbg">', $txt['attachment_transfer'], '</h3> |
| 117 | 117 | </div>'; |
| 118 | 118 | |
| 119 | - if (!empty($context['results'])) |
|
| 120 | - echo ' |
|
| 119 | + if (!empty($context['results'])) { |
|
| 120 | + echo ' |
|
| 121 | 121 | <div class="noticebox">', $context['results'], '</div>'; |
| 122 | + } |
|
| 122 | 123 | |
| 123 | 124 | echo ' |
| 124 | 125 | <div class="windowbg2 noup"> |
@@ -129,9 +130,10 @@ discard block |
||
| 129 | 130 | <dd><select name="from"> |
| 130 | 131 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
| 131 | 132 | |
| 132 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
| 133 | - echo ' |
|
| 133 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
| 134 | + echo ' |
|
| 134 | 135 | <option value="', $id, '">', $dir, '</option>'; |
| 136 | + } |
|
| 135 | 137 | echo ' |
| 136 | 138 | </select></dd> |
| 137 | 139 | <dt>', $txt['attachment_transfer_auto'], '</dt> |
@@ -139,13 +141,14 @@ discard block |
||
| 139 | 141 | <option value="0">', $txt['attachment_transfer_auto_select'], '</option> |
| 140 | 142 | <option value="-1">', $txt['attachment_transfer_forum_root'], '</option>'; |
| 141 | 143 | |
| 142 | - if (!empty($context['base_dirs'])) |
|
| 143 | - foreach ($context['base_dirs'] as $id => $dir) |
|
| 144 | + if (!empty($context['base_dirs'])) { |
|
| 145 | + foreach ($context['base_dirs'] as $id => $dir) |
|
| 144 | 146 | echo ' |
| 145 | 147 | <option value="', $id, '">', $dir, '</option>'; |
| 146 | - else |
|
| 147 | - echo ' |
|
| 148 | + } else { |
|
| 149 | + echo ' |
|
| 148 | 150 | <option value="0" disabled>', $txt['attachment_transfer_no_base'], '</option>'; |
| 151 | + } |
|
| 149 | 152 | |
| 150 | 153 | echo ' |
| 151 | 154 | </select></dd> |
@@ -153,16 +156,18 @@ discard block |
||
| 153 | 156 | <dd><select name="to"> |
| 154 | 157 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
| 155 | 158 | |
| 156 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
| 157 | - echo ' |
|
| 159 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
| 160 | + echo ' |
|
| 158 | 161 | <option value="', $id, '">', $dir, '</option>'; |
| 162 | + } |
|
| 159 | 163 | echo ' |
| 160 | 164 | </select></dd>'; |
| 161 | 165 | |
| 162 | - if (!empty($modSettings['attachmentDirFileLimit'])) |
|
| 163 | - echo ' |
|
| 166 | + if (!empty($modSettings['attachmentDirFileLimit'])) { |
|
| 167 | + echo ' |
|
| 164 | 168 | <dt>', $txt['attachment_transfer_empty'], '</dt> |
| 165 | 169 | <dd><input type="checkbox" name="empty_it"', $context['checked'] ? ' checked' : '', '></dd>'; |
| 170 | + } |
|
| 166 | 171 | echo ' |
| 167 | 172 | </dl> |
| 168 | 173 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -238,10 +243,11 @@ discard block |
||
| 238 | 243 | // Loop through each error reporting the status |
| 239 | 244 | foreach ($context['repair_errors'] as $error => $number) |
| 240 | 245 | { |
| 241 | - if (!empty($number)) |
|
| 242 | - echo ' |
|
| 246 | + if (!empty($number)) { |
|
| 247 | + echo ' |
|
| 243 | 248 | <input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '" class="input_check"> |
| 244 | 249 | <label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label><br>'; |
| 250 | + } |
|
| 245 | 251 | } |
| 246 | 252 | |
| 247 | 253 | echo ' <br> |
@@ -18,9 +18,10 @@ discard block |
||
| 18 | 18 | global $context, $txt, $scripturl; |
| 19 | 19 | |
| 20 | 20 | // Are we done sending the newsletter? |
| 21 | - if (!empty($context['newsletter_sent'])) |
|
| 22 | - echo ' |
|
| 21 | + if (!empty($context['newsletter_sent'])) { |
|
| 22 | + echo ' |
|
| 23 | 23 | <div class="infobox">', $txt['admin_news_newsletter_'. $context['newsletter_sent']] ,'</div>'; |
| 24 | + } |
|
| 24 | 25 | |
| 25 | 26 | echo ' |
| 26 | 27 | <div id="admincenter"> |
@@ -39,9 +40,10 @@ discard block |
||
| 39 | 40 | </dt> |
| 40 | 41 | <dd>'; |
| 41 | 42 | |
| 42 | - foreach ($context['groups'] as $group) |
|
| 43 | - echo ' |
|
| 43 | + foreach ($context['groups'] as $group) { |
|
| 44 | + echo ' |
|
| 44 | 45 | <label for="groups_', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups_', $group['id'], '" value="', $group['id'], '" checked class="input_check"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
| 46 | + } |
|
| 45 | 47 | |
| 46 | 48 | echo ' |
| 47 | 49 | <br> |
@@ -82,9 +84,10 @@ discard block |
||
| 82 | 84 | </dt> |
| 83 | 85 | <dd>'; |
| 84 | 86 | |
| 85 | - foreach ($context['groups'] as $group) |
|
| 86 | - echo ' |
|
| 87 | + foreach ($context['groups'] as $group) { |
|
| 88 | + echo ' |
|
| 87 | 89 | <label for="exclude_groups_', $group['id'], '"><input type="checkbox" name="exclude_groups[', $group['id'], ']" id="exclude_groups_', $group['id'], '" value="', $group['id'], '" class="input_check"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>'; |
| 90 | + } |
|
| 88 | 91 | |
| 89 | 92 | echo ' |
| 90 | 93 | <br> |
@@ -228,9 +231,10 @@ discard block |
||
| 228 | 231 | <div id="bbcBox_message"></div>'; |
| 229 | 232 | |
| 230 | 233 | // What about smileys? |
| 231 | - if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) |
|
| 232 | - echo ' |
|
| 234 | + if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) { |
|
| 235 | + echo ' |
|
| 233 | 236 | <div id="smileyBox_message"></div>'; |
| 237 | + } |
|
| 234 | 238 | |
| 235 | 239 | // Show BBC buttons, smileys and textbox. |
| 236 | 240 | echo ' |
@@ -251,9 +255,10 @@ discard block |
||
| 251 | 255 | <input type="hidden" name="email_force" value="', $context['email_force'], '"> |
| 252 | 256 | <input type="hidden" name="total_emails" value="', $context['total_emails'], '">'; |
| 253 | 257 | |
| 254 | - foreach ($context['recipients'] as $key => $values) |
|
| 255 | - echo ' |
|
| 258 | + foreach ($context['recipients'] as $key => $values) { |
|
| 259 | + echo ' |
|
| 256 | 260 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
| 261 | + } |
|
| 257 | 262 | |
| 258 | 263 | echo ' |
| 259 | 264 | <script>'; |
@@ -408,9 +413,10 @@ discard block |
||
| 408 | 413 | <input type="hidden" name="parse_html" value="', $context['parse_html'], '">'; |
| 409 | 414 | |
| 410 | 415 | // All the things we must remember! |
| 411 | - foreach ($context['recipients'] as $key => $values) |
|
| 412 | - echo ' |
|
| 416 | + foreach ($context['recipients'] as $key => $values) { |
|
| 417 | + echo ' |
|
| 413 | 418 | <input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">'; |
| 419 | + } |
|
| 414 | 420 | |
| 415 | 421 | echo ' |
| 416 | 422 | </div> |
@@ -443,9 +449,10 @@ discard block |
||
| 443 | 449 | { |
| 444 | 450 | global $context, $txt; |
| 445 | 451 | |
| 446 | - if (!empty($context['saved_successful'])) |
|
| 447 | - echo ' |
|
| 452 | + if (!empty($context['saved_successful'])) { |
|
| 453 | + echo ' |
|
| 448 | 454 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 455 | + } |
|
| 449 | 456 | |
| 450 | 457 | template_show_list('news_lists'); |
| 451 | 458 | } |
@@ -64,9 +64,10 @@ discard block |
||
| 64 | 64 | <strong>', $txt['administrators'], ':</strong> |
| 65 | 65 | ', implode(', ', $context['administrators']); |
| 66 | 66 | // If we have lots of admins... don't show them all. |
| 67 | - if (!empty($context['more_admins_link'])) |
|
| 68 | - echo ' |
|
| 67 | + if (!empty($context['more_admins_link'])) { |
|
| 68 | + echo ' |
|
| 69 | 69 | (', $context['more_admins_link'], ')'; |
| 70 | + } |
|
| 70 | 71 | |
| 71 | 72 | echo ' |
| 72 | 73 | </div> |
@@ -83,16 +84,18 @@ discard block |
||
| 83 | 84 | foreach ($area['areas'] as $item_id => $item) |
| 84 | 85 | { |
| 85 | 86 | // No point showing the 'home' page here, we're already on it! |
| 86 | - if ($area_id == 'forum' && $item_id == 'index') |
|
| 87 | - continue; |
|
| 87 | + if ($area_id == 'forum' && $item_id == 'index') { |
|
| 88 | + continue; |
|
| 89 | + } |
|
| 88 | 90 | |
| 89 | 91 | $url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : ''); |
| 90 | - if (!empty($item['icon_file'])) |
|
| 91 | - echo ' |
|
| 92 | + if (!empty($item['icon_file'])) { |
|
| 93 | + echo ' |
|
| 92 | 94 | <a href="', $url, '" class="admin_group', !empty($item['inactive']) ? ' inactive' : '', '"><img class="large_admin_menu_icon_file" src="', $item['icon_file'], '" alt="">', $item['label'], '</a>'; |
| 93 | - else |
|
| 94 | - echo ' |
|
| 95 | + } else { |
|
| 96 | + echo ' |
|
| 95 | 97 | <a href="', $url, '"><span class="large_', $item['icon_class'], !empty($item['inactive']) ? ' inactive' : '', '"></span>', $item['label'], '</a>'; |
| 98 | + } |
|
| 96 | 99 | } |
| 97 | 100 | |
| 98 | 101 | echo ' |
@@ -103,10 +106,11 @@ discard block |
||
| 103 | 106 | </div>'; |
| 104 | 107 | |
| 105 | 108 | // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. |
| 106 | - if (empty($modSettings['disable_smf_js'])) |
|
| 107 | - echo ' |
|
| 109 | + if (empty($modSettings['disable_smf_js'])) { |
|
| 110 | + echo ' |
|
| 108 | 111 | <script src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script> |
| 109 | 112 | <script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>'; |
| 113 | + } |
|
| 110 | 114 | |
| 111 | 115 | // This sets the announcements and current versions themselves ;). |
| 112 | 116 | echo ' |
@@ -185,9 +189,10 @@ discard block |
||
| 185 | 189 | <em>', $version['version'], '</em>'; |
| 186 | 190 | |
| 187 | 191 | // more details for this item, show them a link |
| 188 | - if ($context['can_admin'] && isset($version['more'])) |
|
| 189 | - echo |
|
| 192 | + if ($context['can_admin'] && isset($version['more'])) { |
|
| 193 | + echo |
|
| 190 | 194 | ' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>'; |
| 195 | + } |
|
| 191 | 196 | echo ' |
| 192 | 197 | <br>'; |
| 193 | 198 | } |
@@ -218,20 +223,22 @@ discard block |
||
| 218 | 223 | |
| 219 | 224 | foreach ($context['credits'] as $section) |
| 220 | 225 | { |
| 221 | - if (isset($section['pretext'])) |
|
| 222 | - echo ' |
|
| 226 | + if (isset($section['pretext'])) { |
|
| 227 | + echo ' |
|
| 223 | 228 | <p>', $section['pretext'], '</p><hr>'; |
| 229 | + } |
|
| 224 | 230 | |
| 225 | 231 | echo ' |
| 226 | 232 | <dl>'; |
| 227 | 233 | |
| 228 | 234 | foreach ($section['groups'] as $group) |
| 229 | 235 | { |
| 230 | - if (isset($group['title'])) |
|
| 231 | - echo ' |
|
| 236 | + if (isset($group['title'])) { |
|
| 237 | + echo ' |
|
| 232 | 238 | <dt> |
| 233 | 239 | <strong>', $group['title'], ':</strong> |
| 234 | 240 | </dt>'; |
| 241 | + } |
|
| 235 | 242 | |
| 236 | 243 | echo ' |
| 237 | 244 | <dd>', implode(', ', $group['members']), '</dd>'; |
@@ -240,10 +247,11 @@ discard block |
||
| 240 | 247 | echo ' |
| 241 | 248 | </dl>'; |
| 242 | 249 | |
| 243 | - if (isset($section['posttext'])) |
|
| 244 | - echo ' |
|
| 250 | + if (isset($section['posttext'])) { |
|
| 251 | + echo ' |
|
| 245 | 252 | <hr> |
| 246 | 253 | <p>', $section['posttext'], '</p>'; |
| 254 | + } |
|
| 247 | 255 | } |
| 248 | 256 | |
| 249 | 257 | echo ' |
@@ -259,9 +267,10 @@ discard block |
||
| 259 | 267 | smfSupportVersions.forum = "', $context['forum_version'], '";'; |
| 260 | 268 | |
| 261 | 269 | // Don't worry, none of this is logged, it's just used to give information that might be of use. |
| 262 | - foreach ($context['current_versions'] as $variable => $version) |
|
| 263 | - echo ' |
|
| 270 | + foreach ($context['current_versions'] as $variable => $version) { |
|
| 271 | + echo ' |
|
| 264 | 272 | smfSupportVersions.', $variable, ' = "', $version['version'], '";'; |
| 273 | + } |
|
| 265 | 274 | |
| 266 | 275 | // Now we just have to include the script and wait ;). |
| 267 | 276 | echo ' |
@@ -358,8 +367,8 @@ discard block |
||
| 358 | 367 | <tbody>'; |
| 359 | 368 | |
| 360 | 369 | // Loop through every source file displaying its version - using javascript. |
| 361 | - foreach ($context['file_versions'] as $filename => $version) |
|
| 362 | - echo ' |
|
| 370 | + foreach ($context['file_versions'] as $filename => $version) { |
|
| 371 | + echo ' |
|
| 363 | 372 | <tr class="windowbg"> |
| 364 | 373 | <td class="half_table"> |
| 365 | 374 | ', $filename, ' |
@@ -371,6 +380,7 @@ discard block |
||
| 371 | 380 | <em id="currentSources', $filename, '">??</em> |
| 372 | 381 | </td> |
| 373 | 382 | </tr>'; |
| 383 | + } |
|
| 374 | 384 | |
| 375 | 385 | // Default template files. |
| 376 | 386 | echo ' |
@@ -396,8 +406,8 @@ discard block |
||
| 396 | 406 | <table id="Default" class="table_grid"> |
| 397 | 407 | <tbody>'; |
| 398 | 408 | |
| 399 | - foreach ($context['default_template_versions'] as $filename => $version) |
|
| 400 | - echo ' |
|
| 409 | + foreach ($context['default_template_versions'] as $filename => $version) { |
|
| 410 | + echo ' |
|
| 401 | 411 | <tr class="windowbg"> |
| 402 | 412 | <td class="half_table"> |
| 403 | 413 | ', $filename, ' |
@@ -409,6 +419,7 @@ discard block |
||
| 409 | 419 | <em id="currentDefault', $filename, '">??</em> |
| 410 | 420 | </td> |
| 411 | 421 | </tr>'; |
| 422 | + } |
|
| 412 | 423 | |
| 413 | 424 | // Now the language files... |
| 414 | 425 | echo ' |
@@ -436,8 +447,8 @@ discard block |
||
| 436 | 447 | |
| 437 | 448 | foreach ($context['default_language_versions'] as $language => $files) |
| 438 | 449 | { |
| 439 | - foreach ($files as $filename => $version) |
|
| 440 | - echo ' |
|
| 450 | + foreach ($files as $filename => $version) { |
|
| 451 | + echo ' |
|
| 441 | 452 | <tr class="windowbg"> |
| 442 | 453 | <td class="half_table"> |
| 443 | 454 | ', $filename, '.<em>', $language, '</em>.php |
@@ -449,6 +460,7 @@ discard block |
||
| 449 | 460 | <em id="current', $filename, '.', $language, '">??</em> |
| 450 | 461 | </td> |
| 451 | 462 | </tr>'; |
| 463 | + } |
|
| 452 | 464 | } |
| 453 | 465 | |
| 454 | 466 | echo ' |
@@ -478,8 +490,8 @@ discard block |
||
| 478 | 490 | <table id="Templates" class="table_grid"> |
| 479 | 491 | <tbody>'; |
| 480 | 492 | |
| 481 | - foreach ($context['template_versions'] as $filename => $version) |
|
| 482 | - echo ' |
|
| 493 | + foreach ($context['template_versions'] as $filename => $version) { |
|
| 494 | + echo ' |
|
| 483 | 495 | <tr class="windowbg"> |
| 484 | 496 | <td class="half_table"> |
| 485 | 497 | ', $filename, ' |
@@ -491,6 +503,7 @@ discard block |
||
| 491 | 503 | <em id="currentTemplates', $filename, '">??</em> |
| 492 | 504 | </td> |
| 493 | 505 | </tr>'; |
| 506 | + } |
|
| 494 | 507 | |
| 495 | 508 | echo ' |
| 496 | 509 | </tbody> |
@@ -520,8 +533,8 @@ discard block |
||
| 520 | 533 | <table id="Tasks" class="table_grid"> |
| 521 | 534 | <tbody>'; |
| 522 | 535 | |
| 523 | - foreach ($context['tasks_versions'] as $filename => $version) |
|
| 524 | - echo ' |
|
| 536 | + foreach ($context['tasks_versions'] as $filename => $version) { |
|
| 537 | + echo ' |
|
| 525 | 538 | <tr class="windowbg"> |
| 526 | 539 | <td class="half_table"> |
| 527 | 540 | ', $filename, ' |
@@ -533,6 +546,7 @@ discard block |
||
| 533 | 546 | <em id="currentTasks', $filename, '">??</em> |
| 534 | 547 | </td> |
| 535 | 548 | </tr>'; |
| 549 | + } |
|
| 536 | 550 | |
| 537 | 551 | echo ' |
| 538 | 552 | </tbody> |
@@ -574,9 +588,10 @@ discard block |
||
| 574 | 588 | { |
| 575 | 589 | global $context, $scripturl, $txt, $modSettings; |
| 576 | 590 | |
| 577 | - if (!empty($context['saved_successful'])) |
|
| 578 | - echo ' |
|
| 591 | + if (!empty($context['saved_successful'])) { |
|
| 592 | + echo ' |
|
| 579 | 593 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 594 | + } |
|
| 580 | 595 | |
| 581 | 596 | // First section is for adding/removing words from the censored list. |
| 582 | 597 | echo ' |
@@ -591,11 +606,12 @@ discard block |
||
| 591 | 606 | <p>', $txt['admin_censored_where'], '</p>'; |
| 592 | 607 | |
| 593 | 608 | // Show text boxes for censoring [bad ] => [good ]. |
| 594 | - foreach ($context['censored_words'] as $vulgar => $proper) |
|
| 595 | - echo ' |
|
| 609 | + foreach ($context['censored_words'] as $vulgar => $proper) { |
|
| 610 | + echo ' |
|
| 596 | 611 | <div class="block"> |
| 597 | 612 | <input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30"> => <input type="text" name="censor_proper[]" value="', $proper, '" size="30"> |
| 598 | 613 | </div>'; |
| 614 | + } |
|
| 599 | 615 | |
| 600 | 616 | // Now provide a way to censor more words. |
| 601 | 617 | echo ' |
@@ -669,19 +685,21 @@ discard block |
||
| 669 | 685 | <div class="windowbg2 noup"> |
| 670 | 686 | ', $txt['not_done_reason']; |
| 671 | 687 | |
| 672 | - if (!empty($context['continue_percent'])) |
|
| 673 | - echo ' |
|
| 688 | + if (!empty($context['continue_percent'])) { |
|
| 689 | + echo ' |
|
| 674 | 690 | <div class="progress_bar"> |
| 675 | 691 | <div class="full_bar">', $context['continue_percent'], '%</div> |
| 676 | 692 | <div class="green_percent" style="width: ', $context['continue_percent'], '%;"> </div> |
| 677 | 693 | </div>'; |
| 694 | + } |
|
| 678 | 695 | |
| 679 | - if (!empty($context['substep_enabled'])) |
|
| 680 | - echo ' |
|
| 696 | + if (!empty($context['substep_enabled'])) { |
|
| 697 | + echo ' |
|
| 681 | 698 | <div class="progress_bar"> |
| 682 | 699 | <div class="full_bar">', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</div> |
| 683 | 700 | <div class="blue_percent" style="width: ', $context['substep_continue_percent'], '%;"> </div> |
| 684 | 701 | </div>'; |
| 702 | + } |
|
| 685 | 703 | |
| 686 | 704 | echo ' |
| 687 | 705 | <form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit"> |
@@ -716,35 +734,40 @@ discard block |
||
| 716 | 734 | { |
| 717 | 735 | global $context, $txt, $settings, $scripturl; |
| 718 | 736 | |
| 719 | - if (!empty($context['saved_successful'])) |
|
| 720 | - echo ' |
|
| 737 | + if (!empty($context['saved_successful'])) { |
|
| 738 | + echo ' |
|
| 721 | 739 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 722 | - elseif (!empty($context['saved_failed'])) |
|
| 723 | - echo ' |
|
| 740 | + } elseif (!empty($context['saved_failed'])) { |
|
| 741 | + echo ' |
|
| 724 | 742 | <div class="errorbox">', sprintf($txt['settings_not_saved'], $context['saved_failed']), '</div>'; |
| 743 | + } |
|
| 725 | 744 | |
| 726 | - if (!empty($context['settings_pre_javascript'])) |
|
| 727 | - echo ' |
|
| 745 | + if (!empty($context['settings_pre_javascript'])) { |
|
| 746 | + echo ' |
|
| 728 | 747 | <script>', $context['settings_pre_javascript'], '</script>'; |
| 748 | + } |
|
| 729 | 749 | |
| 730 | - if (!empty($context['settings_insert_above'])) |
|
| 731 | - echo $context['settings_insert_above']; |
|
| 750 | + if (!empty($context['settings_insert_above'])) { |
|
| 751 | + echo $context['settings_insert_above']; |
|
| 752 | + } |
|
| 732 | 753 | |
| 733 | 754 | echo ' |
| 734 | 755 | <div id="admincenter"> |
| 735 | 756 | <form id="admin_form_wrapper" action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>'; |
| 736 | 757 | |
| 737 | 758 | // Is there a custom title? |
| 738 | - if (isset($context['settings_title'])) |
|
| 739 | - echo ' |
|
| 759 | + if (isset($context['settings_title'])) { |
|
| 760 | + echo ' |
|
| 740 | 761 | <div class="cat_bar"> |
| 741 | 762 | <h3 class="catbg">', $context['settings_title'], '</h3> |
| 742 | 763 | </div>'; |
| 764 | + } |
|
| 743 | 765 | |
| 744 | 766 | // Have we got a message to display? |
| 745 | - if (!empty($context['settings_message'])) |
|
| 746 | - echo ' |
|
| 767 | + if (!empty($context['settings_message'])) { |
|
| 768 | + echo ' |
|
| 747 | 769 | <div class="information">', $context['settings_message'], '</div>'; |
| 770 | + } |
|
| 748 | 771 | |
| 749 | 772 | // Now actually loop through all the variables. |
| 750 | 773 | $is_open = false; |
@@ -797,8 +820,9 @@ discard block |
||
| 797 | 820 | // Hang about? Are you pulling my leg - a callback?! |
| 798 | 821 | if (is_array($config_var) && $config_var['type'] == 'callback') |
| 799 | 822 | { |
| 800 | - if (function_exists('template_callback_' . $config_var['name'])) |
|
| 801 | - call_user_func('template_callback_' . $config_var['name']); |
|
| 823 | + if (function_exists('template_callback_' . $config_var['name'])) { |
|
| 824 | + call_user_func('template_callback_' . $config_var['name']); |
|
| 825 | + } |
|
| 802 | 826 | |
| 803 | 827 | continue; |
| 804 | 828 | } |
@@ -828,9 +852,10 @@ discard block |
||
| 828 | 852 | $text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time'); |
| 829 | 853 | |
| 830 | 854 | // Show the [?] button. |
| 831 | - if ($config_var['help']) |
|
| 832 | - echo ' |
|
| 855 | + if ($config_var['help']) { |
|
| 856 | + echo ' |
|
| 833 | 857 | <a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'],'"></span></a> '; |
| 858 | + } |
|
| 834 | 859 | |
| 835 | 860 | echo ' |
| 836 | 861 | <a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span> |
@@ -839,22 +864,25 @@ discard block |
||
| 839 | 864 | $config_var['preinput']; |
| 840 | 865 | |
| 841 | 866 | // Show a check box. |
| 842 | - if ($config_var['type'] == 'check') |
|
| 843 | - echo ' |
|
| 867 | + if ($config_var['type'] == 'check') { |
|
| 868 | + echo ' |
|
| 844 | 869 | <input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked' : ''), ' value="1" class="input_check">'; |
| 870 | + } |
|
| 845 | 871 | // Escape (via htmlspecialchars.) the text box. |
| 846 | - elseif ($config_var['type'] == 'password') |
|
| 847 | - echo ' |
|
| 872 | + elseif ($config_var['type'] == 'password') { |
|
| 873 | + echo ' |
|
| 848 | 874 | <input type="password"', $disabled, $javascript, ' name="', $config_var['name'], '[0]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' value="*#fakepass#*" onfocus="this.value = \'\'; this.form.', $config_var['name'], '.disabled = false;" class="input_password"><br> |
| 849 | 875 | <input type="password" disabled id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_password">'; |
| 876 | + } |
|
| 850 | 877 | // Show a selection box. |
| 851 | 878 | elseif ($config_var['type'] == 'select') |
| 852 | 879 | { |
| 853 | 880 | echo ' |
| 854 | 881 | <select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), (!empty($config_var['multiple']) && !empty($config_var['size']) ? ' size="' . $config_var['size'] . '"' : ''), '>'; |
| 855 | - foreach ($config_var['data'] as $option) |
|
| 856 | - echo ' |
|
| 882 | + foreach ($config_var['data'] as $option) { |
|
| 883 | + echo ' |
|
| 857 | 884 | <option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected' : ''), '>', $option[1], '</option>'; |
| 885 | + } |
|
| 858 | 886 | echo ' |
| 859 | 887 | </select>'; |
| 860 | 888 | } |
@@ -869,15 +897,17 @@ discard block |
||
| 869 | 897 | <legend class="board_selector"><a href="#">', $txt['select_boards_from_list'], '</a></legend>'; |
| 870 | 898 | foreach ($context['board_list'] as $id_cat => $cat) |
| 871 | 899 | { |
| 872 | - if (!$first) |
|
| 873 | - echo ' |
|
| 900 | + if (!$first) { |
|
| 901 | + echo ' |
|
| 874 | 902 | <hr>'; |
| 903 | + } |
|
| 875 | 904 | echo ' |
| 876 | 905 | <strong>', $cat['name'], '</strong> |
| 877 | 906 | <ul>'; |
| 878 | - foreach ($cat['boards'] as $id_board => $brd) |
|
| 879 | - echo ' |
|
| 907 | + foreach ($cat['boards'] as $id_board => $brd) { |
|
| 908 | + echo ' |
|
| 880 | 909 | <li><label><input type="checkbox" name="', $config_var['name'], '[', $brd['id'], ']" value="1" class="input_check"', in_array($brd['id'], $config_var['value']) ? ' checked' : '', '> ', $brd['child_level'] > 0 ? str_repeat(' ', $brd['child_level']) : '', $brd['name'], '</label></li>'; |
| 910 | + } |
|
| 881 | 911 | |
| 882 | 912 | echo ' |
| 883 | 913 | </ul>'; |
@@ -887,12 +917,14 @@ discard block |
||
| 887 | 917 | </fieldset>'; |
| 888 | 918 | } |
| 889 | 919 | // Text area? |
| 890 | - elseif ($config_var['type'] == 'large_text') |
|
| 891 | - echo ' |
|
| 920 | + elseif ($config_var['type'] == 'large_text') { |
|
| 921 | + echo ' |
|
| 892 | 922 | <textarea rows="', (!empty($config_var['size']) ? $config_var['size'] : (!empty($config_var['rows']) ? $config_var['rows'] : 4)), '" cols="', (!empty($config_var['cols']) ? $config_var['cols'] : 30), '" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>'; |
| 923 | + } |
|
| 893 | 924 | // Permission group? |
| 894 | - elseif ($config_var['type'] == 'permissions') |
|
| 895 | - theme_inline_permissions($config_var['name']); |
|
| 925 | + elseif ($config_var['type'] == 'permissions') { |
|
| 926 | + theme_inline_permissions($config_var['name']); |
|
| 927 | + } |
|
| 896 | 928 | // BBC selection? |
| 897 | 929 | elseif ($config_var['type'] == 'bbc') |
| 898 | 930 | { |
@@ -903,20 +935,22 @@ discard block |
||
| 903 | 935 | |
| 904 | 936 | foreach ($context['bbc_columns'] as $bbcColumn) |
| 905 | 937 | { |
| 906 | - foreach ($bbcColumn as $bbcTag) |
|
| 907 | - echo ' |
|
| 938 | + foreach ($bbcColumn as $bbcTag) { |
|
| 939 | + echo ' |
|
| 908 | 940 | <li class="list_bbc floatleft"> |
| 909 | 941 | <input type="checkbox" name="', $config_var['name'], '_enabledTags[]" id="tag_', $config_var['name'], '_', $bbcTag['tag'], '" value="', $bbcTag['tag'], '"', !in_array($bbcTag['tag'], $context['bbc_sections'][$config_var['name']]['disabled']) ? ' checked' : '', ' class="input_check"> <label for="tag_', $config_var['name'], '_', $bbcTag['tag'], '">', $bbcTag['tag'], '</label>', $bbcTag['show_help'] ? ' (<a href="' . $scripturl . '?action=helpadmin;help=tag_' . $bbcTag['tag'] . '" onclick="return reqOverlayDiv(this.href);">?</a>)' : '', ' |
| 910 | 942 | </li>'; |
| 943 | + } |
|
| 911 | 944 | } |
| 912 | 945 | echo ' </ul> |
| 913 | 946 | <input type="checkbox" id="bbc_', $config_var['name'], '_select_all" onclick="invertAll(this, this.form, \'', $config_var['name'], '_enabledTags\');"', $context['bbc_sections'][$config_var['name']]['all_selected'] ? ' checked' : '', ' class="input_check"> <label for="bbc_', $config_var['name'], '_select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label> |
| 914 | 947 | </fieldset>'; |
| 915 | 948 | } |
| 916 | 949 | // A simple message? |
| 917 | - elseif ($config_var['type'] == 'var_message') |
|
| 918 | - echo ' |
|
| 950 | + elseif ($config_var['type'] == 'var_message') { |
|
| 951 | + echo ' |
|
| 919 | 952 | <div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '>', $config_var['var_message'], '</div>'; |
| 953 | + } |
|
| 920 | 954 | // Assume it must be a text box |
| 921 | 955 | else |
| 922 | 956 | { |
@@ -941,63 +975,70 @@ discard block |
||
| 941 | 975 | ' . $config_var['postinput'] : '', |
| 942 | 976 | '</dd>'; |
| 943 | 977 | } |
| 944 | - } |
|
| 945 | - |
|
| 946 | - else |
|
| 978 | + } else |
|
| 947 | 979 | { |
| 948 | 980 | // Just show a separator. |
| 949 | - if ($config_var == '') |
|
| 950 | - echo ' |
|
| 981 | + if ($config_var == '') { |
|
| 982 | + echo ' |
|
| 951 | 983 | </dl> |
| 952 | 984 | <hr> |
| 953 | 985 | <dl class="settings">'; |
| 954 | - else |
|
| 955 | - echo ' |
|
| 986 | + } else { |
|
| 987 | + echo ' |
|
| 956 | 988 | <dd> |
| 957 | 989 | <strong>' . $config_var . '</strong> |
| 958 | 990 | </dd>'; |
| 991 | + } |
|
| 959 | 992 | } |
| 960 | 993 | } |
| 961 | 994 | |
| 962 | - if ($is_open) |
|
| 963 | - echo ' |
|
| 995 | + if ($is_open) { |
|
| 996 | + echo ' |
|
| 964 | 997 | </dl>'; |
| 998 | + } |
|
| 965 | 999 | |
| 966 | - if (empty($context['settings_save_dont_show'])) |
|
| 967 | - echo ' |
|
| 1000 | + if (empty($context['settings_save_dont_show'])) { |
|
| 1001 | + echo ' |
|
| 968 | 1002 | <input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button_submit">'; |
| 1003 | + } |
|
| 969 | 1004 | |
| 970 | - if ($is_open) |
|
| 971 | - echo ' |
|
| 1005 | + if ($is_open) { |
|
| 1006 | + echo ' |
|
| 972 | 1007 | </div>'; |
| 1008 | + } |
|
| 973 | 1009 | |
| 974 | 1010 | |
| 975 | 1011 | // At least one token has to be used! |
| 976 | - if (isset($context['admin-ssc_token'])) |
|
| 977 | - echo ' |
|
| 1012 | + if (isset($context['admin-ssc_token'])) { |
|
| 1013 | + echo ' |
|
| 978 | 1014 | <input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '">'; |
| 1015 | + } |
|
| 979 | 1016 | |
| 980 | - if (isset($context['admin-dbsc_token'])) |
|
| 981 | - echo ' |
|
| 1017 | + if (isset($context['admin-dbsc_token'])) { |
|
| 1018 | + echo ' |
|
| 982 | 1019 | <input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '">'; |
| 1020 | + } |
|
| 983 | 1021 | |
| 984 | - if (isset($context['admin-mp_token'])) |
|
| 985 | - echo ' |
|
| 1022 | + if (isset($context['admin-mp_token'])) { |
|
| 1023 | + echo ' |
|
| 986 | 1024 | <input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '">'; |
| 1025 | + } |
|
| 987 | 1026 | |
| 988 | 1027 | echo ' |
| 989 | 1028 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 990 | 1029 | </form> |
| 991 | 1030 | </div>'; |
| 992 | 1031 | |
| 993 | - if (!empty($context['settings_post_javascript'])) |
|
| 994 | - echo ' |
|
| 1032 | + if (!empty($context['settings_post_javascript'])) { |
|
| 1033 | + echo ' |
|
| 995 | 1034 | <script> |
| 996 | 1035 | ', $context['settings_post_javascript'], ' |
| 997 | 1036 | </script>'; |
| 1037 | + } |
|
| 998 | 1038 | |
| 999 | - if (!empty($context['settings_insert_below'])) |
|
| 1000 | - echo $context['settings_insert_below']; |
|
| 1039 | + if (!empty($context['settings_insert_below'])) { |
|
| 1040 | + echo $context['settings_insert_below']; |
|
| 1041 | + } |
|
| 1001 | 1042 | |
| 1002 | 1043 | // We may have added a board listing. If we did, we need to make it work. |
| 1003 | 1044 | addInlineJavascript(' |
@@ -1020,9 +1061,10 @@ discard block |
||
| 1020 | 1061 | { |
| 1021 | 1062 | global $context, $txt; |
| 1022 | 1063 | |
| 1023 | - if (!empty($context['saved_successful'])) |
|
| 1024 | - echo ' |
|
| 1064 | + if (!empty($context['saved_successful'])) { |
|
| 1065 | + echo ' |
|
| 1025 | 1066 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 1067 | + } |
|
| 1026 | 1068 | |
| 1027 | 1069 | // Standard fields. |
| 1028 | 1070 | template_show_list('standard_profile_fields'); |
@@ -1054,11 +1096,12 @@ discard block |
||
| 1054 | 1096 | if (isset($_GET['msg'])) |
| 1055 | 1097 | { |
| 1056 | 1098 | loadLanguage('Errors'); |
| 1057 | - if (isset($txt['custom_option_' . $_GET['msg']])) |
|
| 1058 | - echo ' |
|
| 1099 | + if (isset($txt['custom_option_' . $_GET['msg']])) { |
|
| 1100 | + echo ' |
|
| 1059 | 1101 | <div class="errorbox">', |
| 1060 | 1102 | $txt['custom_option_' . $_GET['msg']], ' |
| 1061 | 1103 | </div>'; |
| 1104 | + } |
|
| 1062 | 1105 | } |
| 1063 | 1106 | |
| 1064 | 1107 | echo ' |
@@ -1124,9 +1167,10 @@ discard block |
||
| 1124 | 1167 | <dd> |
| 1125 | 1168 | <select name="placement" id="placement">'; |
| 1126 | 1169 | |
| 1127 | - foreach ($context['cust_profile_fields_placement'] as $order => $name) |
|
| 1128 | - echo ' |
|
| 1170 | + foreach ($context['cust_profile_fields_placement'] as $order => $name) { |
|
| 1171 | + echo ' |
|
| 1129 | 1172 | <option value="', $order ,'"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_'. $name], '</option>'; |
| 1173 | + } |
|
| 1130 | 1174 | |
| 1131 | 1175 | echo ' |
| 1132 | 1176 | </select> |
@@ -1149,9 +1193,10 @@ discard block |
||
| 1149 | 1193 | </dt> |
| 1150 | 1194 | <dd> |
| 1151 | 1195 | <select name="field_type" id="field_type" onchange="updateInputBoxes();">'; |
| 1152 | - foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) |
|
| 1153 | - echo ' |
|
| 1196 | + foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) { |
|
| 1197 | + echo ' |
|
| 1154 | 1198 | <option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>'; |
| 1199 | + } |
|
| 1155 | 1200 | |
| 1156 | 1201 | echo ' |
| 1157 | 1202 | </select> |
@@ -1252,9 +1297,10 @@ discard block |
||
| 1252 | 1297 | </fieldset> |
| 1253 | 1298 | <input type="submit" name="save" value="', $txt['save'], '" class="button_submit">'; |
| 1254 | 1299 | |
| 1255 | - if ($context['fid']) |
|
| 1256 | - echo ' |
|
| 1300 | + if ($context['fid']) { |
|
| 1301 | + echo ' |
|
| 1257 | 1302 | <input type="submit" name="delete" value="', $txt['delete'], '" data-confirm="', $txt['custom_edit_delete_sure'], '" class="button_submit you_sure">'; |
| 1303 | + } |
|
| 1258 | 1304 | |
| 1259 | 1305 | echo ' |
| 1260 | 1306 | </div> |
@@ -1297,8 +1343,7 @@ discard block |
||
| 1297 | 1343 | { |
| 1298 | 1344 | echo ' |
| 1299 | 1345 | <p class="centertext"><strong>', $txt['admin_search_results_none'], '</strong></p>'; |
| 1300 | - } |
|
| 1301 | - else |
|
| 1346 | + } else |
|
| 1302 | 1347 | { |
| 1303 | 1348 | echo ' |
| 1304 | 1349 | <ol class="search_results">'; |
@@ -1324,9 +1369,10 @@ discard block |
||
| 1324 | 1369 | <li> |
| 1325 | 1370 | <a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'] , ']'; |
| 1326 | 1371 | |
| 1327 | - if ($result['help']) |
|
| 1328 | - echo ' |
|
| 1372 | + if ($result['help']) { |
|
| 1373 | + echo ' |
|
| 1329 | 1374 | <p class="double_height">', $result['help'], '</p>'; |
| 1375 | + } |
|
| 1330 | 1376 | |
| 1331 | 1377 | echo ' |
| 1332 | 1378 | </li>'; |
@@ -1366,18 +1412,20 @@ discard block |
||
| 1366 | 1412 | <strong>', $txt['setup_verification_answer'], '</strong> |
| 1367 | 1413 | </dd>'; |
| 1368 | 1414 | |
| 1369 | - if (!empty($context['qa_by_lang'][$lang_id])) |
|
| 1370 | - foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1415 | + if (!empty($context['qa_by_lang'][$lang_id])) { |
|
| 1416 | + foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1371 | 1417 | { |
| 1372 | 1418 | $question = $context['question_answers'][$q_id]; |
| 1419 | + } |
|
| 1373 | 1420 | echo ' |
| 1374 | 1421 | <dt> |
| 1375 | 1422 | <input type="text" name="question[', $lang_id, '][', $q_id, ']" value="', $question['question'], '" size="50" class="input_text verification_question"> |
| 1376 | 1423 | </dt> |
| 1377 | 1424 | <dd>'; |
| 1378 | - foreach ($question['answers'] as $answer) |
|
| 1379 | - echo ' |
|
| 1425 | + foreach ($question['answers'] as $answer) { |
|
| 1426 | + echo ' |
|
| 1380 | 1427 | <input type="text" name="answer[', $lang_id, '][', $q_id, '][]" value="', $answer, '" size="50" class="input_text verification_answer">'; |
| 1428 | + } |
|
| 1381 | 1429 | |
| 1382 | 1430 | echo ' |
| 1383 | 1431 | <div class="qa_add_answer"><a href="javascript:void(0);" onclick="return addAnswer(this);">[ ', $txt['setup_verification_add_answer'], ' ]</a></div> |
@@ -1416,11 +1464,12 @@ discard block |
||
| 1416 | 1464 | ', $txt['errors_found'], ': |
| 1417 | 1465 | <ul>'; |
| 1418 | 1466 | |
| 1419 | - foreach ($context['repair_errors'] as $error) |
|
| 1420 | - echo ' |
|
| 1467 | + foreach ($context['repair_errors'] as $error) { |
|
| 1468 | + echo ' |
|
| 1421 | 1469 | <li> |
| 1422 | 1470 | ', $error, ' |
| 1423 | 1471 | </li>'; |
| 1472 | + } |
|
| 1424 | 1473 | |
| 1425 | 1474 | echo ' |
| 1426 | 1475 | </ul> |
@@ -1430,16 +1479,15 @@ discard block |
||
| 1430 | 1479 | <p class="padding"> |
| 1431 | 1480 | <strong><a href="', $scripturl, '?action=admin;area=repairboards;fixErrors;', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $scripturl, '?action=admin;area=maintain">', $txt['no'], '</a></strong> |
| 1432 | 1481 | </p>'; |
| 1433 | - } |
|
| 1434 | - else |
|
| 1435 | - echo ' |
|
| 1482 | + } else { |
|
| 1483 | + echo ' |
|
| 1436 | 1484 | <p>', $txt['maintain_no_errors'], '</p> |
| 1437 | 1485 | <p class="padding"> |
| 1438 | 1486 | <a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a> |
| 1439 | 1487 | </p>'; |
| 1488 | + } |
|
| 1440 | 1489 | |
| 1441 | - } |
|
| 1442 | - else |
|
| 1490 | + } else |
|
| 1443 | 1491 | { |
| 1444 | 1492 | if (!empty($context['redirect_to_recount'])) |
| 1445 | 1493 | { |
@@ -1451,8 +1499,7 @@ discard block |
||
| 1451 | 1499 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 1452 | 1500 | <input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '"> |
| 1453 | 1501 | </form>'; |
| 1454 | - } |
|
| 1455 | - else |
|
| 1502 | + } else |
|
| 1456 | 1503 | { |
| 1457 | 1504 | echo ' |
| 1458 | 1505 | <p>', $txt['errors_fixed'], '</p> |
@@ -1604,8 +1651,8 @@ discard block |
||
| 1604 | 1651 | function template_admin_quick_search() |
| 1605 | 1652 | { |
| 1606 | 1653 | global $context, $txt, $scripturl; |
| 1607 | - if ($context['user']['is_admin']) |
|
| 1608 | - echo ' |
|
| 1654 | + if ($context['user']['is_admin']) { |
|
| 1655 | + echo ' |
|
| 1609 | 1656 | <span class="floatright"> |
| 1610 | 1657 | <span class="generic_icons filter centericon"></span> |
| 1611 | 1658 | <input type="search" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';" class="input_text"> |
@@ -1616,6 +1663,7 @@ discard block |
||
| 1616 | 1663 | </select> |
| 1617 | 1664 | <input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button_submit"> |
| 1618 | 1665 | </span>'; |
| 1619 | -} |
|
| 1666 | + } |
|
| 1667 | + } |
|
| 1620 | 1668 | |
| 1621 | 1669 | ?> |