@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('messages')) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <div class="container container-body" id="lyr3"> |
18 | 18 | <b><?= $_lang['messages_read_message'] ?></b> |
19 | 19 | <?php |
20 | - $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='" . (int)$_REQUEST['id'] . "'"); |
|
20 | + $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='".(int) $_REQUEST['id']."'"); |
|
21 | 21 | $message = $modx->db->getRow($rs); |
22 | 22 | if (!$message) { |
23 | 23 | echo "Wrong number of messages returned!"; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | <p><b><?= $_lang['messages_inbox'] ?></b></p> |
87 | 87 | <?php |
88 | 88 | // Get number of rows |
89 | - $rs = $modx->db->select('count(id)', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . ""); |
|
89 | + $rs = $modx->db->select('count(id)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID().""); |
|
90 | 90 | $num_rows = $modx->db->getValue($rs); |
91 | 91 | |
92 | 92 | // ============================================================== |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) { |
100 | 100 | $int_cur_position = 0; |
101 | 101 | } else { |
102 | - $int_cur_position = (int)$_REQUEST['int_cur_position']; |
|
102 | + $int_cur_position = (int) $_REQUEST['int_cur_position']; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // Number of result to display on the page, will be in the LIMIT of the sql query also |
@@ -116,21 +116,21 @@ discard block |
||
116 | 116 | $array_row_paging = $p->getPagingRowArray(); |
117 | 117 | |
118 | 118 | // Display the result as you like... |
119 | - $pager .= $_lang['showing'] . " " . $array_paging['lower']; |
|
120 | - $pager .= " " . $_lang['to'] . " " . $array_paging['upper']; |
|
121 | - $pager .= " (" . $array_paging['total'] . " " . $_lang['total'] . ")"; |
|
122 | - $pager .= "<br />" . $array_paging['previous_link'] . "<<" . (isset($array_paging['previous_link']) ? "</a> " : " "); |
|
119 | + $pager .= $_lang['showing']." ".$array_paging['lower']; |
|
120 | + $pager .= " ".$_lang['to']." ".$array_paging['upper']; |
|
121 | + $pager .= " (".$array_paging['total']." ".$_lang['total'].")"; |
|
122 | + $pager .= "<br />".$array_paging['previous_link']."<<".(isset($array_paging['previous_link']) ? "</a> " : " "); |
|
123 | 123 | for ($i = 0; $i < sizeof($array_row_paging); $i++) { |
124 | - $pager .= $array_row_paging[$i] . " "; |
|
124 | + $pager .= $array_row_paging[$i]." "; |
|
125 | 125 | } |
126 | - $pager .= $array_paging['next_link'] . ">>" . (isset($array_paging['next_link']) ? "</a>" : ""); |
|
126 | + $pager .= $array_paging['next_link'].">>".(isset($array_paging['next_link']) ? "</a>" : ""); |
|
127 | 127 | |
128 | 128 | // The above exemple print somethings like: |
129 | 129 | // Results 1 to 20 of 597 <<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 >>> |
130 | 130 | // Of course you can now play with array_row_paging in order to print |
131 | 131 | // only the results you would like... |
132 | 132 | |
133 | - $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . "", 'postdate DESC', "{$int_cur_position}, {$int_num_result}"); |
|
133 | + $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()."", 'postdate DESC', "{$int_cur_position}, {$int_num_result}"); |
|
134 | 134 | $limit = $modx->db->getRecordCount($rs); |
135 | 135 | if ($limit < 1) { |
136 | 136 | echo $_lang['messages_no_messages']; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | <p><b><?= $_lang['messages_compose'] ?></b></p> |
187 | 187 | <?php |
188 | 188 | if (($_REQUEST['m'] == 'rp' || $_REQUEST['m'] == 'f') && isset($_REQUEST['id'])) { |
189 | - $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='" . $_REQUEST['id'] . "'"); |
|
189 | + $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='".$_REQUEST['id']."'"); |
|
190 | 190 | $message = $modx->db->getRow($rs); |
191 | 191 | if (!$message) { |
192 | 192 | echo "Wrong number of messages returned!"; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | $subjecttext = $_REQUEST['m'] == 'rp' ? "Re: " : "Fwd: "; |
207 | 207 | $subjecttext .= $message['subject']; |
208 | - $messagetext = "\n\n\n-----\n" . $_lang['messages_from'] . ": $sendername\n" . $_lang['messages_sent'] . ": " . $modx->toDateFormat($message['postdate'] + $server_offset_time) . "\n" . $_lang['messages_subject'] . ": " . $message['subject'] . "\n\n" . $message['message']; |
|
208 | + $messagetext = "\n\n\n-----\n".$_lang['messages_from'].": $sendername\n".$_lang['messages_sent'].": ".$modx->toDateFormat($message['postdate'] + $server_offset_time)."\n".$_lang['messages_subject'].": ".$message['subject']."\n\n".$message['message']; |
|
209 | 209 | if ($_REQUEST['m'] == 'rp') { |
210 | 210 | $recipientindex = $message['sender']; |
211 | 211 | } |
@@ -292,9 +292,9 @@ discard block |
||
292 | 292 | |
293 | 293 | <?php |
294 | 294 | // count messages again, as any action on the messages page may have altered the message count |
295 | -$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . " and messageread=0"); |
|
295 | +$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()." and messageread=0"); |
|
296 | 296 | $_SESSION['nrnewmessages'] = $modx->db->getValue($rs); |
297 | -$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . ""); |
|
297 | +$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID().""); |
|
298 | 298 | $_SESSION['nrtotalmessages'] = $modx->db->getValue($rs); |
299 | 299 | $messagesallowed = $modx->hasPermission('messages'); |
300 | 300 | ?> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('change_password')) { |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if (!$modx->hasPermission('change_password')) { |
|
5 | +if (!$modx->hasPermission('change_password')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | ?> |
@@ -4,18 +4,18 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | switch ($modx->manager->action) { |
7 | - case 16: |
|
8 | - if (!$modx->hasPermission('edit_template')) { |
|
9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
10 | - } |
|
11 | - break; |
|
12 | - case 19: |
|
13 | - if (!$modx->hasPermission('new_template')) { |
|
7 | + case 16: |
|
8 | + if (!$modx->hasPermission('edit_template')) { |
|
9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
10 | + } |
|
11 | + break; |
|
12 | + case 19: |
|
13 | + if (!$modx->hasPermission('new_template')) { |
|
14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
15 | + } |
|
16 | + break; |
|
17 | + default: |
|
14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
15 | - } |
|
16 | - break; |
|
17 | - default: |
|
18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
19 | 19 | } |
20 | 20 | |
21 | -$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
24 | 24 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | } else { |
47 | 47 | $_SESSION['itemname'] = $_lang["new_template"]; |
48 | - $content['category'] = (int)$_REQUEST['catid']; |
|
48 | + $content['category'] = (int) $_REQUEST['catid']; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if ($modx->manager->hasFormValues()) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | // Add lock-element JS-Script |
59 | 59 | $lockElementId = $id; |
60 | 60 | $lockElementType = 1; |
61 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
61 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
62 | 62 | ?> |
63 | 63 | <script type="text/javascript"> |
64 | 64 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
110 | 110 | |
111 | 111 | <h1> |
112 | - <i class="fa fa-newspaper-o"></i><?= ($content['templatename'] ? $content['templatename'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_template']) ?><i class="fa fa-question-circle help"></i> |
|
112 | + <i class="fa fa-newspaper-o"></i><?= ($content['templatename'] ? $content['templatename'].'<small>('.$content['id'].')</small>' : $_lang['new_template']) ?><i class="fa fa-question-circle help"></i> |
|
113 | 113 | </h1> |
114 | 114 | |
115 | 115 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -133,14 +133,14 @@ discard block |
||
133 | 133 | <label class="col-md-3 col-lg-2"> |
134 | 134 | <?= $_lang['template_name'] ?> |
135 | 135 | <?php if ($id == $modx->config['default_template']) { |
136 | - echo '<small class="form-text text-danger">' . mb_strtolower(rtrim($_lang['defaulttemplate_title'], ':'), $modx_manager_charset) . '</small>'; |
|
136 | + echo '<small class="form-text text-danger">'.mb_strtolower(rtrim($_lang['defaulttemplate_title'], ':'), $modx_manager_charset).'</small>'; |
|
137 | 137 | } ?> |
138 | 138 | </label> |
139 | 139 | <div class="col-md-9 col-lg-10"> |
140 | 140 | <div class="form-control-name clearfix"> |
141 | 141 | <input name="templatename" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['templatename']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;"> |
142 | 142 | <?php if ($modx->hasPermission('save_role')): ?> |
143 | - <label class="custom-control" title="<?= $_lang['lock_template'] . "\n" . $_lang['lock_template_msg'] ?>" tooltip> |
|
143 | + <label class="custom-control" title="<?= $_lang['lock_template']."\n".$_lang['lock_template_msg'] ?>" tooltip> |
|
144 | 144 | <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
145 | 145 | <i class="fa fa-lock"></i> |
146 | 146 | </label> |
@@ -162,9 +162,9 @@ discard block |
||
162 | 162 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
163 | 163 | <option> </option> |
164 | 164 | <?php |
165 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
165 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
166 | 166 | foreach (getCategories() as $n => $v) { |
167 | - echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
167 | + echo "<option value='".$v['id']."'".($content["category"] == $v["id"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($v["category"])."</option>"; |
|
168 | 168 | } |
169 | 169 | ?> |
170 | 170 | </select> |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | while ($row = $modx->db->getRow($rs)) { |
207 | 207 | $selectedTvs[$row['tvid']] = $row; |
208 | 208 | } |
209 | - $selectedTvs = array_reverse($selectedTvs, true); // reverse ORDERBY DESC |
|
209 | + $selectedTvs = array_reverse($selectedTvs, true); // reverse ORDERBY DESC |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | $unselectedTvs = array(); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | <div class="container container-body"> |
240 | 240 | <?php |
241 | 241 | if ($total > 0) { |
242 | - echo '<p>' . $_lang['template_tv_msg'] . '</p>'; |
|
242 | + echo '<p>'.$_lang['template_tv_msg'].'</p>'; |
|
243 | 243 | } |
244 | 244 | if ($modx->hasPermission('save_template') && $total > 1 && $id) { |
245 | 245 | echo sprintf('<div class="form-group"><a class="btn btn-primary" href="index.php?a=117&id=%s">%s</a></div>', $id, $_lang['template_tv_edit']); |
@@ -250,8 +250,8 @@ discard block |
||
250 | 250 | if ($total > 0) { |
251 | 251 | $tvList .= '<ul>'; |
252 | 252 | foreach ($selectedTvs as $row) { |
253 | - $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
254 | - $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
253 | + $desc = !empty($row['tvdescription']) ? ' <small>('.$row['tvdescription'].')</small>' : ''; |
|
254 | + $locked = $row['tvlocked'] ? ' <em>('.$_lang['locked'].')</em>' : ""; |
|
255 | 255 | $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" checked="checked" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
256 | 256 | } |
257 | 257 | $tvList .= '</ul>'; |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | echo $tvList; |
262 | 262 | |
263 | 263 | // Unselected TVs |
264 | - $tvList = '<hr/><p>' . $_lang['template_notassigned_tv'] . '</p><ul>'; |
|
264 | + $tvList = '<hr/><p>'.$_lang['template_notassigned_tv'].'</p><ul>'; |
|
265 | 265 | $preCat = ''; |
266 | 266 | $insideUl = 0; |
267 | 267 | while ($row = array_shift($unselectedTvs)) { |
@@ -271,12 +271,12 @@ discard block |
||
271 | 271 | $row['category'] = stripslashes($row['category']); //pixelchutes |
272 | 272 | if ($preCat !== $row['category']) { |
273 | 273 | $tvList .= $insideUl ? '</ul>' : ''; |
274 | - $tvList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
274 | + $tvList .= '<li><strong>'.$row['category'].($row['catid'] != '' ? ' <small>('.$row['catid'].')</small>' : '').'</strong><ul>'; |
|
275 | 275 | $insideUl = 1; |
276 | 276 | } |
277 | 277 | |
278 | - $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
279 | - $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
278 | + $desc = !empty($row['tvdescription']) ? ' <small>('.$row['tvdescription'].')</small>' : ''; |
|
279 | + $locked = $row['tvlocked'] ? ' <em>('.$_lang['locked'].')</em>' : ""; |
|
280 | 280 | $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
281 | 281 | $tvList .= '</li>'; |
282 | 282 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
8 | 8 | } |
9 | 9 | |
10 | -$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
10 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
11 | 11 | |
12 | 12 | // Get table names (alphabetical) |
13 | 13 | $tbl_active_users = $modx->getFullTableName('active_users'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $modx->manager->initPageViewState(); |
25 | 25 | |
26 | 26 | // check to see the editor isn't locked |
27 | -$rs = $modx->db->select('username', $tbl_active_users, "action=108 AND id='{$id}' AND internalKey!='" . $modx->getLoginUserID() . "'"); |
|
27 | +$rs = $modx->db->select('username', $tbl_active_users, "action=108 AND id='{$id}' AND internalKey!='".$modx->getLoginUserID()."'"); |
|
28 | 28 | if ($username = $modx->db->getValue($rs)) { |
29 | 29 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $username, 'module')); |
30 | 30 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | if ($rt == 'tv') { |
58 | 58 | $type = 60; |
59 | 59 | } |
60 | - $modx->db->delete($tbl_site_module_depobj, "module='{$id}' AND resource IN (" . implode(',', $opids) . ") AND type='{$type}'"); |
|
60 | + $modx->db->delete($tbl_site_module_depobj, "module='{$id}' AND resource IN (".implode(',', $opids).") AND type='{$type}'"); |
|
61 | 61 | foreach ($opids as $opid) { |
62 | 62 | $modx->db->insert(array( |
63 | 63 | 'module' => $id, |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $opids = array_filter(array_map('intval', $_REQUEST['depid'])); |
73 | 73 | |
74 | 74 | // get resources that needs to be removed |
75 | - $ds = $modx->db->select('*', $tbl_site_module_depobj, "id IN (" . implode(",", $opids) . ")"); |
|
75 | + $ds = $modx->db->select('*', $tbl_site_module_depobj, "id IN (".implode(",", $opids).")"); |
|
76 | 76 | // loop through resources and look for plugins and snippets |
77 | 77 | $plids = array(); |
78 | 78 | $snid = array(); |
@@ -90,15 +90,15 @@ discard block |
||
90 | 90 | // reset moduleguid for deleted resources |
91 | 91 | if (($cp = count($plids)) || ($cs = count($snids))) { |
92 | 92 | if ($cp) { |
93 | - $modx->db->update(array('moduleguid' => ''), $tbl_site_plugins, "id IN (" . implode(',', $plids) . ") AND moduleguid='{$guid}'"); |
|
93 | + $modx->db->update(array('moduleguid' => ''), $tbl_site_plugins, "id IN (".implode(',', $plids).") AND moduleguid='{$guid}'"); |
|
94 | 94 | } |
95 | 95 | if ($cs) { |
96 | - $modx->db->update(array('moduleguid' => ''), $tbl_site_plugins, "id IN (" . implode(',', $snids) . ") AND moduleguid='{$guid}'"); |
|
96 | + $modx->db->update(array('moduleguid' => ''), $tbl_site_plugins, "id IN (".implode(',', $snids).") AND moduleguid='{$guid}'"); |
|
97 | 97 | } |
98 | 98 | // reset cache |
99 | 99 | $modx->clearCache('full'); |
100 | 100 | } |
101 | - $modx->db->delete($tbl_site_module_depobj, "id IN (" . implode(',', $opids) . ")"); |
|
101 | + $modx->db->delete($tbl_site_module_depobj, "id IN (".implode(',', $opids).")"); |
|
102 | 102 | break; |
103 | 103 | } |
104 | 104 | |
@@ -188,13 +188,13 @@ discard block |
||
188 | 188 | <input type="hidden" name="id" value="<?php echo $content['id']; ?>" /> |
189 | 189 | |
190 | 190 | <h1> |
191 | - <i class="fa fa-cogs"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['module_resource_title']) ?> |
|
191 | + <i class="fa fa-cogs"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['module_resource_title']) ?> |
|
192 | 192 | </h1> |
193 | 193 | |
194 | 194 | <?php echo $_style['actionbuttons']['dynamic']['close'] ?> |
195 | 195 | |
196 | 196 | <div class="section"> |
197 | - <div class="sectionHeader"><?php echo $content["name"] . " - " . $_lang['module_resource_title']; ?></div> |
|
197 | + <div class="sectionHeader"><?php echo $content["name"]." - ".$_lang['module_resource_title']; ?></div> |
|
198 | 198 | <div class="sectionBody"> |
199 | 199 | <p><?php echo $_lang['module_resource_msg']; ?></p> |
200 | 200 | <br /> |
@@ -218,14 +218,14 @@ discard block |
||
218 | 218 | LEFT JOIN {$tbl_site_snippets} AS ss ON ss.id = smd.resource AND smd.type = '40' |
219 | 219 | LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = '50' |
220 | 220 | LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = '60'", "smd.module={$id}", "smd.type,name"); |
221 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
221 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
222 | 222 | $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items |
223 | 223 | $grd->noRecordMsg = $_lang["no_records_found"]; |
224 | 224 | $grd->cssClass = "grid"; |
225 | 225 | $grd->columnHeaderClass = "gridHeader"; |
226 | 226 | $grd->itemClass = "gridItem"; |
227 | 227 | $grd->altItemClass = "gridAltItem"; |
228 | - $grd->columns = $_lang["element_name"] . " ," . $_lang["type"]; |
|
228 | + $grd->columns = $_lang["element_name"]." ,".$_lang["type"]; |
|
229 | 229 | $grd->colTypes = "template:<input type='checkbox' name='depid[]' value='[+id+]'> [+value+]"; |
230 | 230 | $grd->fields = "name,type"; |
231 | 231 | echo $grd->render(); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | <div class="tab-page"> |
31 | 31 | <div class="container container-body"> |
32 | 32 | <?php if ($num_rows_pub) { |
33 | - printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub); |
|
33 | + printf('<p>'.$_lang["refresh_published"].'</p>', $num_rows_pub); |
|
34 | 34 | } ?> |
35 | 35 | <?php if ($num_rows_unpub) { |
36 | - printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub); |
|
36 | + printf('<p>'.$_lang["refresh_unpublished"].'</p>', $num_rows_unpub); |
|
37 | 37 | } ?> |
38 | 38 | <?php |
39 | 39 | $modx->clearCache('full', true); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('save_document')) { |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | } |
8 | 8 | |
9 | 9 | if (isset($_REQUEST['id'])) { |
10 | - $id = (int)$_REQUEST['id']; |
|
10 | + $id = (int) $_REQUEST['id']; |
|
11 | 11 | } else { |
12 | 12 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
13 | 13 | } |
14 | 14 | |
15 | 15 | // check permissions on the document |
16 | -include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php"; |
|
16 | +include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php"; |
|
17 | 17 | $udperms = new udperms(); |
18 | 18 | $udperms->user = $modx->getLoginUserID(); |
19 | 19 | $udperms->document = $id; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | }, |
40 | 40 | cancel: function() { |
41 | 41 | documentDirty = false; |
42 | - <?= ($id == 0 ? 'document.location.href="index.php?a=2";' : 'document.location.href="index.php?a=3&id=' . $id . '";') ?> |
|
42 | + <?= ($id == 0 ? 'document.location.href="index.php?a=2";' : 'document.location.href="index.php?a=3&id='.$id.'";') ?> |
|
43 | 43 | } |
44 | 44 | }; |
45 | 45 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | </script> |
81 | 81 | |
82 | 82 | <h1> |
83 | - <i class="fa fa-arrows"></i><?= ($pagetitle ? $pagetitle . '<small>(' . $id . ')</small>' : $_lang['move_resource_title']) ?> |
|
83 | + <i class="fa fa-arrows"></i><?= ($pagetitle ? $pagetitle.'<small>('.$id.')</small>' : $_lang['move_resource_title']) ?> |
|
84 | 84 | </h1> |
85 | 85 | |
86 | 86 | <?= $_style['actionbuttons']['dynamic']['save'] ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('view_eventlog')) { |
@@ -7,11 +7,11 @@ discard block |
||
7 | 7 | } |
8 | 8 | |
9 | 9 | // get id |
10 | -$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
10 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
11 | 11 | |
12 | -$ds = $modx->db->select('el.*, IFNULL(wu.username,mu.username) as username', $modx->getFullTableName("event_log") . " el |
|
13 | - LEFT JOIN " . $modx->getFullTableName("manager_users") . " mu ON mu.id=el.user AND el.usertype=0 |
|
14 | - LEFT JOIN " . $modx->getFullTableName("web_users") . " wu ON wu.id=el.user AND el.usertype=1", "el.id='{$id}'"); |
|
12 | +$ds = $modx->db->select('el.*, IFNULL(wu.username,mu.username) as username', $modx->getFullTableName("event_log")." el |
|
13 | + LEFT JOIN " . $modx->getFullTableName("manager_users")." mu ON mu.id=el.user AND el.usertype=0 |
|
14 | + LEFT JOIN " . $modx->getFullTableName("web_users")." wu ON wu.id=el.user AND el.usertype=1", "el.id='{$id}'"); |
|
15 | 15 | $content = $modx->db->getRow($ds); |
16 | 16 | |
17 | 17 | ?> |
@@ -43,17 +43,17 @@ discard block |
||
43 | 43 | <?php |
44 | 44 | $date = $modx->toDateFormat($content["createdon"]); |
45 | 45 | if ($content["type"] == 1) { |
46 | - $icon = $_style['actions_info'] . ' text-info'; |
|
46 | + $icon = $_style['actions_info'].' text-info'; |
|
47 | 47 | $msgtype = $_lang["information"]; |
48 | 48 | } elseif ($content["type"] == 2) { |
49 | - $icon = $_style['actions_triangle'] . ' text-warning'; |
|
49 | + $icon = $_style['actions_triangle'].' text-warning'; |
|
50 | 50 | $msgtype = $_lang["warning"]; |
51 | 51 | } elseif ($content["type"] == 3) { |
52 | - $icon = $_style['actions_error'] . ' text-danger'; |
|
52 | + $icon = $_style['actions_error'].' text-danger'; |
|
53 | 53 | $msgtype = $_lang["error"]; |
54 | 54 | } |
55 | 55 | ?> |
56 | - <p><b><?= $content['source'] . " - " . $_lang['eventlog_viewer'] ?></b></p> |
|
56 | + <p><b><?= $content['source']." - ".$_lang['eventlog_viewer'] ?></b></p> |
|
57 | 57 | <p> |
58 | 58 | <i class="<?= $icon ?>"></i> <?= $msgtype ?> |
59 | 59 | </p> |
@@ -4,18 +4,18 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | switch ($modx->manager->action) { |
7 | - case 88: |
|
8 | - if (!$modx->hasPermission('edit_web_user')) { |
|
9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
10 | - } |
|
11 | - break; |
|
12 | - case 87: |
|
13 | - if (!$modx->hasPermission('new_web_user')) { |
|
7 | + case 88: |
|
8 | + if (!$modx->hasPermission('edit_web_user')) { |
|
9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
10 | + } |
|
11 | + break; |
|
12 | + case 87: |
|
13 | + if (!$modx->hasPermission('new_web_user')) { |
|
14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
15 | + } |
|
16 | + break; |
|
17 | + default: |
|
14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
15 | - } |
|
16 | - break; |
|
17 | - default: |
|
18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | $user = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
19 | 19 | } |
20 | 20 | |
21 | -$user = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$user = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | |
24 | 24 | // check to see the snippet editor isn't locked |
25 | -$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'"); |
|
25 | +$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='".$modx->getLoginUserID()."'"); |
|
26 | 26 | if ($username = $modx->db->getValue($rs)) { |
27 | 27 | $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user")); |
28 | 28 | } |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | |
81 | 81 | // include the country list language file |
82 | 82 | $_country_lang = array(); |
83 | -if ($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) { |
|
84 | - include_once "lang/country/" . $manager_language . "_country.inc.php"; |
|
83 | +if ($manager_language != "english" && file_exists($modx->config['site_manager_path']."includes/lang/country/".$manager_language."_country.inc.php")) { |
|
84 | + include_once "lang/country/".$manager_language."_country.inc.php"; |
|
85 | 85 | } else { |
86 | 86 | include_once "lang/country/english_country.inc.php"; |
87 | 87 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | <input type="hidden" name="blockedmode" value="<?php echo ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) ? "1" : "0" ?>" /> |
203 | 203 | |
204 | 204 | <h1> |
205 | - <i class="fa fa fa-users"></i><?= ($usernamedata['username'] ? $usernamedata['username'] . '<small>(' . $usernamedata['id'] . ')</small>' : $_lang['web_user_title']) ?> |
|
205 | + <i class="fa fa fa-users"></i><?= ($usernamedata['username'] ? $usernamedata['username'].'<small>('.$usernamedata['id'].')</small>' : $_lang['web_user_title']) ?> |
|
206 | 206 | </h1> |
207 | 207 | |
208 | 208 | <?php echo $_style['actionbuttons']['dynamic']['user'] ?> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | <td><input type="text" name="newusername" class="inputBox" value="<?php echo $modx->htmlspecialchars(isset($_POST['newusername']) ? $_POST['newusername'] : $usernamedata['username']); ?>" onChange='documentDirty=true;' maxlength="100" /></td> |
244 | 244 | </tr> |
245 | 245 | <tr> |
246 | - <th><?php echo $modx->manager->action == '87' ? $_lang['password'] . ":" : $_lang['change_password_new'] . ":"; ?></th> |
|
246 | + <th><?php echo $modx->manager->action == '87' ? $_lang['password'].":" : $_lang['change_password_new'].":"; ?></th> |
|
247 | 247 | <td> </td> |
248 | 248 | <td><input name="newpasswordcheck" type="checkbox" onClick="changestate(document.userform.newpassword);changePasswordState(document.userform.newpassword);"<?php echo $modx->manager->action == "87" ? " checked disabled" : ""; ?>> |
249 | 249 | <input type="hidden" name="newpassword" value="<?php echo $modx->manager->action == "87" ? 1 : 0; ?>" onChange="documentDirty=true;" /> |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | <option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> > </option> |
332 | 332 | <?php |
333 | 333 | foreach ($_country_lang as $key => $country) { |
334 | - echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>"; |
|
334 | + echo "<option value=\"$key\"".(isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '').">$country</option>"; |
|
335 | 335 | } |
336 | 336 | ?> |
337 | 337 | </select></td> |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | function BrowseServer() { |
480 | 480 | var w = screen.width * 0.7; |
481 | 481 | var h = screen.height * 0.7; |
482 | - OpenServerBrowser("<?php echo MODX_MANAGER_URL;?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h); |
|
482 | + OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h); |
|
483 | 483 | } |
484 | 484 | |
485 | 485 | function SetUrl(url, width, height, alt) { |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | <td class='comment'><?php echo $_lang["user_photo_message"] ?></td> |
499 | 499 | </tr> |
500 | 500 | <tr> |
501 | - <td colspan="2" align="center"><img name="iphoto" src="<?php echo isset($_POST['photo']) ? (strpos($_POST['photo'], "http://") === false ? MODX_SITE_URL : "") . $_POST['photo'] : !empty($userdata['photo']) ? (strpos($userdata['photo'], "http://") === false ? MODX_SITE_URL : "") . $userdata['photo'] : $_style["tx"]; ?>" /></td> |
|
501 | + <td colspan="2" align="center"><img name="iphoto" src="<?php echo isset($_POST['photo']) ? (strpos($_POST['photo'], "http://") === false ? MODX_SITE_URL : "").$_POST['photo'] : !empty($userdata['photo']) ? (strpos($userdata['photo'], "http://") === false ? MODX_SITE_URL : "").$userdata['photo'] : $_style["tx"]; ?>" /></td> |
|
502 | 502 | </tr> |
503 | 503 | </table> |
504 | 504 | </div> |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | <?php |
524 | 524 | $rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name'); |
525 | 525 | while ($row = $modx->db->getRow($rs)) { |
526 | - echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />'; |
|
526 | + echo '<label><input type="checkbox" name="user_groups[]" value="'.$row['id'].'"'.(in_array($row['id'], $groupsarray) ? ' checked="checked"' : '').' />'.$row['name'].'</label><br />'; |
|
527 | 527 | } |
528 | 528 | } |
529 | 529 | ?> |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
6 | -switch ($modx->manager->action) { |
|
6 | +switch ($modx->manager->action) { |
|
7 | 7 | case 88: |
8 | - if (!$modx->hasPermission('edit_web_user')) { |
|
8 | + if (!$modx->hasPermission('edit_web_user')) { |
|
9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
10 | 10 | } |
11 | 11 | break; |
12 | 12 | case 87: |
13 | - if (!$modx->hasPermission('new_web_user')) { |
|
13 | + if (!$modx->hasPermission('new_web_user')) { |
|
14 | 14 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
15 | 15 | } |
16 | 16 | break; |
@@ -23,23 +23,23 @@ discard block |
||
23 | 23 | |
24 | 24 | // check to see the snippet editor isn't locked |
25 | 25 | $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'"); |
26 | -if ($username = $modx->db->getValue($rs)) { |
|
26 | +if ($username = $modx->db->getValue($rs)) { |
|
27 | 27 | $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user")); |
28 | 28 | } |
29 | 29 | // end check for lock |
30 | 30 | |
31 | -if ($modx->manager->action == '88') { |
|
31 | +if ($modx->manager->action == '88') { |
|
32 | 32 | // get user attributes |
33 | 33 | $rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'"); |
34 | 34 | $userdata = $modx->db->getRow($rs); |
35 | - if (!$userdata) { |
|
35 | + if (!$userdata) { |
|
36 | 36 | $modx->webAlertAndQuit("No user returned!"); |
37 | 37 | } |
38 | 38 | |
39 | 39 | // get user settings |
40 | 40 | $rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'"); |
41 | 41 | $usersettings = array(); |
42 | - while ($row = $modx->db->getRow($rs)) { |
|
42 | + while ($row = $modx->db->getRow($rs)) { |
|
43 | 43 | $usersettings[$row['setting_name']] = $row['setting_value']; |
44 | 44 | } |
45 | 45 | extract($usersettings, EXTR_OVERWRITE); |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | // get user name |
48 | 48 | $rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'"); |
49 | 49 | $usernamedata = $modx->db->getRow($rs); |
50 | - if (!$usernamedata) { |
|
50 | + if (!$usernamedata) { |
|
51 | 51 | $modx->webAlertAndQuit("No user returned while getting username!"); |
52 | 52 | } |
53 | 53 | $_SESSION['itemname'] = $usernamedata['username']; |
54 | -} else { |
|
54 | +} else { |
|
55 | 55 | $userdata = array(); |
56 | 56 | $usersettings = array(); |
57 | 57 | $usernamedata = array(); |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | // avoid doubling htmlspecialchars (already encoded in DB) |
62 | -foreach ($userdata as $key => $val) { |
|
62 | +foreach ($userdata as $key => $val) { |
|
63 | 63 | $userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']); |
64 | 64 | }; |
65 | 65 | $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']); |
66 | 66 | |
67 | 67 | // restore saved form |
68 | 68 | $formRestored = false; |
69 | -if ($modx->manager->hasFormValues()) { |
|
69 | +if ($modx->manager->hasFormValues()) { |
|
70 | 70 | $modx->manager->loadFormValues(); |
71 | 71 | // restore post values |
72 | 72 | $userdata = array_merge($userdata, $_POST); |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | |
81 | 81 | // include the country list language file |
82 | 82 | $_country_lang = array(); |
83 | -if ($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) { |
|
83 | +if ($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) { |
|
84 | 84 | include_once "lang/country/" . $manager_language . "_country.inc.php"; |
85 | -} else { |
|
85 | +} else { |
|
86 | 86 | include_once "lang/country/english_country.inc.php"; |
87 | 87 | } |
88 | 88 | asort($_country_lang); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | <?php |
194 | 194 | // invoke OnWUsrFormPrerender event |
195 | 195 | $evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user)); |
196 | - if (is_array($evtOut)) { |
|
196 | + if (is_array($evtOut)) { |
|
197 | 197 | echo implode("", $evtOut); |
198 | 198 | } |
199 | 199 | ?> |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | <table border="0" cellspacing="0" cellpadding="3" class="table table--edit table--editUser"> |
221 | 221 | <tr> |
222 | 222 | <td colspan="3"><span id="blocked" class="warning"> |
223 | - <?php if ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) { |
|
223 | + <?php if ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) { |
|
224 | 224 | ?> |
225 | 225 | <b><?php echo $_lang['user_is_blocked']; ?></b> |
226 | 226 | <?php |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | </span> |
229 | 229 | <br /></td> |
230 | 230 | </tr> |
231 | - <?php if (!empty($userdata['id'])) { |
|
231 | + <?php if (!empty($userdata['id'])) { |
|
232 | 232 | ?> |
233 | 233 | <tr id="showname" style="display: <?php echo ($modx->manager->action == '88' && (!isset($usernamedata['oldusername']) || $usernamedata['oldusername'] == $usernamedata['username'])) ? $displayStyle : 'none'; ?> "> |
234 | 234 | <td colspan="3"><i class="<?php echo $_style["icons_user"] ?>"></i> <b><?php echo $modx->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?></b> - <span class="comment"><a href="javascript:;" onClick="changeName();return false;"><?php echo $_lang["change_name"]; ?></a></span> |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | <?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?> |
331 | 331 | <option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> > </option> |
332 | 332 | <?php |
333 | - foreach ($_country_lang as $key => $country) { |
|
333 | + foreach ($_country_lang as $key => $country) { |
|
334 | 334 | echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>"; |
335 | 335 | } |
336 | 336 | ?> |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | <td> </td> |
358 | 358 | <td><textarea type="text" name="comment" class="inputBox" rows="5" onChange="documentDirty=true;"><?php echo $modx->htmlspecialchars(isset($_POST['comment']) ? $_POST['comment'] : $userdata['comment']); ?></textarea></td> |
359 | 359 | </tr> |
360 | - <?php if ($modx->manager->action == '88') { |
|
360 | + <?php if ($modx->manager->action == '88') { |
|
361 | 361 | ?> |
362 | 362 | <tr> |
363 | 363 | <th><?php echo $_lang['user_logincount']; ?>:</th> |
@@ -503,16 +503,17 @@ discard block |
||
503 | 503 | </table> |
504 | 504 | </div> |
505 | 505 | <?php |
506 | - if ($use_udperms == 1) { |
|
506 | + if ($use_udperms == 1) { |
|
507 | 507 | $groupsarray = array(); |
508 | 508 | |
509 | - if ($modx->manager->action == '88') { // only do this bit if the user is being edited |
|
509 | + if ($modx->manager->action == '88') { |
|
510 | +// only do this bit if the user is being edited |
|
510 | 511 | $rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'"); |
511 | 512 | $groupsarray = $modx->db->getColumn('webgroup', $rs); |
512 | 513 | } |
513 | 514 | // retain selected user groups between post |
514 | - if (is_array($_POST['user_groups'])) { |
|
515 | - foreach ($_POST['user_groups'] as $n => $v) { |
|
515 | + if (is_array($_POST['user_groups'])) { |
|
516 | + foreach ($_POST['user_groups'] as $n => $v) { |
|
516 | 517 | $groupsarray[] = $v; |
517 | 518 | } |
518 | 519 | } ?> |
@@ -522,7 +523,7 @@ discard block |
||
522 | 523 | <p><?php echo $_lang['access_permissions_user_message'] ?></p> |
523 | 524 | <?php |
524 | 525 | $rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name'); |
525 | - while ($row = $modx->db->getRow($rs)) { |
|
526 | + while ($row = $modx->db->getRow($rs)) { |
|
526 | 527 | echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />'; |
527 | 528 | } |
528 | 529 | } |
@@ -533,7 +534,7 @@ discard block |
||
533 | 534 | $evtOut = $modx->invokeEvent("OnWUsrFormRender", array( |
534 | 535 | "id" => $user |
535 | 536 | )); |
536 | - if (is_array($evtOut)) { |
|
537 | + if (is_array($evtOut)) { |
|
537 | 538 | echo implode("", $evtOut); |
538 | 539 | } |
539 | 540 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('logs')) { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username'); |
76 | 76 | foreach ($logs_user as $row) { |
77 | 77 | $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : ''; |
78 | - echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n"; |
|
78 | + echo "\t\t".'<option value="'.$row['internalKey'].'"'.$selectedtext.'>'.$row['username']."</option>\n"; |
|
79 | 79 | } |
80 | 80 | ?> |
81 | 81 | </select> |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | continue; |
97 | 97 | } |
98 | 98 | $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : ''; |
99 | - echo "\t\t" . '<option value="' . $row['action'] . '"' . $selectedtext . '>' . $row['action'] . ' - ' . $action . "</option>\n"; |
|
99 | + echo "\t\t".'<option value="'.$row['action'].'"'.$selectedtext.'>'.$row['action'].' - '.$action."</option>\n"; |
|
100 | 100 | } |
101 | 101 | ?> |
102 | 102 | </select> |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid'); |
113 | 113 | foreach ($logs_items as $row) { |
114 | 114 | $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : ''; |
115 | - echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n"; |
|
115 | + echo "\t\t".'<option value="'.$row['itemid'].'"'.$selectedtext.'>'.$row['itemid']."</option>\n"; |
|
116 | 116 | } |
117 | 117 | ?> |
118 | 118 | </select> |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname'); |
129 | 129 | foreach ($logs_names as $row) { |
130 | 130 | $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : ''; |
131 | - echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n"; |
|
131 | + echo "\t\t".'<option value="'.$row['itemname'].'"'.$selectedtext.'>'.$row['itemname']."</option>\n"; |
|
132 | 132 | } |
133 | 133 | ?> |
134 | 134 | </select> |
@@ -186,26 +186,26 @@ discard block |
||
186 | 186 | // get the selections the user made. |
187 | 187 | $sqladd = array(); |
188 | 188 | if ($_REQUEST['searchuser'] != 0) { |
189 | - $sqladd[] = "internalKey='" . (int)$_REQUEST['searchuser'] . "'"; |
|
189 | + $sqladd[] = "internalKey='".(int) $_REQUEST['searchuser']."'"; |
|
190 | 190 | } |
191 | 191 | if ($_REQUEST['action'] != 0) { |
192 | - $sqladd[] = "action=" . (int)$_REQUEST['action']; |
|
192 | + $sqladd[] = "action=".(int) $_REQUEST['action']; |
|
193 | 193 | } |
194 | 194 | if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
195 | - $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'"; |
|
195 | + $sqladd[] = "itemid='".$_REQUEST['itemid']."'"; |
|
196 | 196 | } |
197 | 197 | if ($_REQUEST['itemname'] != '0') { |
198 | - $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'"; |
|
198 | + $sqladd[] = "itemname='".$modx->db->escape($_REQUEST['itemname'])."'"; |
|
199 | 199 | } |
200 | 200 | if ($_REQUEST['message'] != "") { |
201 | - $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'"; |
|
201 | + $sqladd[] = "message LIKE '%".$modx->db->escape($_REQUEST['message'])."%'"; |
|
202 | 202 | } |
203 | 203 | // date stuff |
204 | 204 | if ($_REQUEST['datefrom'] != "") { |
205 | - $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']); |
|
205 | + $sqladd[] = "timestamp>".$modx->toTimeStamp($_REQUEST['datefrom']); |
|
206 | 206 | } |
207 | 207 | if ($_REQUEST['dateto'] != "") { |
208 | - $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']); |
|
208 | + $sqladd[] = "timestamp<".$modx->toTimeStamp($_REQUEST['dateto']); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | // If current position is not set, set it to zero |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | // Number of result to display on the page, will be in the LIMIT of the sql query also |
219 | 219 | $int_num_result = is_numeric($_REQUEST['nrresults']) ? $_REQUEST['nrresults'] : $number_of_logs; |
220 | 220 | |
221 | - $extargv = "&a=13&searchuser=" . $_REQUEST['searchuser'] . "&action=" . $_REQUEST['action'] . "&itemid=" . $_REQUEST['itemid'] . "&itemname=" . $_REQUEST['itemname'] . "&message=" . $_REQUEST['message'] . "&dateto=" . $_REQUEST['dateto'] . "&datefrom=" . $_REQUEST['datefrom'] . "&nrresults=" . $int_num_result . "&log_submit=" . $_REQUEST['log_submit']; // extra argv here (could be anything depending on your page) |
|
221 | + $extargv = "&a=13&searchuser=".$_REQUEST['searchuser']."&action=".$_REQUEST['action']."&itemid=".$_REQUEST['itemid']."&itemname=".$_REQUEST['itemname']."&message=".$_REQUEST['message']."&dateto=".$_REQUEST['dateto']."&datefrom=".$_REQUEST['datefrom']."&nrresults=".$int_num_result."&log_submit=".$_REQUEST['log_submit']; // extra argv here (could be anything depending on your page) |
|
222 | 222 | |
223 | 223 | // build the sql |
224 | 224 | $limit = $num_rows = $modx->db->getValue($modx->db->select('COUNT(*)', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''))); |
@@ -226,9 +226,9 @@ discard block |
||
226 | 226 | $rs = $modx->db->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}"); |
227 | 227 | |
228 | 228 | if ($limit < 1) { |
229 | - echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>'; |
|
229 | + echo '<p>'.$_lang["mgrlog_emptysrch"].'</p>'; |
|
230 | 230 | } else { |
231 | - echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>'; |
|
231 | + echo '<p>'.$_lang["mgrlog_sortinst"].'</p>'; |
|
232 | 232 | |
233 | 233 | include_once "paginate.inc.php"; |
234 | 234 | // New instance of the Paging class, you can modify the color and the width of the html table |
@@ -240,11 +240,11 @@ discard block |
||
240 | 240 | $current_row = $int_cur_position / $int_num_result; |
241 | 241 | |
242 | 242 | // Display the result as you like... |
243 | - print "<p>" . $_lang["paging_showing"] . " " . $array_paging['lower']; |
|
244 | - print " " . $_lang["paging_to"] . " " . $array_paging['upper']; |
|
245 | - print " (" . $array_paging['total'] . " " . $_lang["paging_total"] . ")<br />"; |
|
246 | - $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " "); |
|
247 | - $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " "); |
|
243 | + print "<p>".$_lang["paging_showing"]." ".$array_paging['lower']; |
|
244 | + print " ".$_lang["paging_to"]." ".$array_paging['upper']; |
|
245 | + print " (".$array_paging['total']." ".$_lang["paging_total"].")<br />"; |
|
246 | + $paging = $array_paging['first_link'].$_lang["paging_first"].(isset($array_paging['first_link']) ? "</a> " : " "); |
|
247 | + $paging .= $array_paging['previous_link'].$_lang["paging_prev"].(isset($array_paging['previous_link']) ? "</a> " : " "); |
|
248 | 248 | $pagesfound = sizeof($array_row_paging); |
249 | 249 | if ($pagesfound > 6) { |
250 | 250 | $paging .= $array_row_paging[$current_row - 2]; // ." "; |
@@ -254,11 +254,11 @@ discard block |
||
254 | 254 | $paging .= $array_row_paging[$current_row + 2]; // ." "; |
255 | 255 | } else { |
256 | 256 | for ($i = 0; $i < $pagesfound; $i++) { |
257 | - $paging .= $array_row_paging[$i] . " "; |
|
257 | + $paging .= $array_row_paging[$i]." "; |
|
258 | 258 | } |
259 | 259 | } |
260 | - $paging .= $array_paging['next_link'] . $_lang["paging_next"] . (isset($array_paging['next_link']) ? "</a> " : " ") . " "; |
|
261 | - $paging .= $array_paging['last_link'] . $_lang["paging_last"] . (isset($array_paging['last_link']) ? "</a> " : " ") . " "; |
|
260 | + $paging .= $array_paging['next_link'].$_lang["paging_next"].(isset($array_paging['next_link']) ? "</a> " : " ")." "; |
|
261 | + $paging .= $array_paging['last_link'].$_lang["paging_last"].(isset($array_paging['last_link']) ? "</a> " : " ")." "; |
|
262 | 262 | // The above exemple print somethings like: |
263 | 263 | // Results 1 to 20 of 597 <<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 >>> |
264 | 264 | // Of course you can now play with array_row_paging in order to print |
@@ -294,15 +294,15 @@ discard block |
||
294 | 294 | if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
295 | 295 | $item = '<div style="text-align:center;">-</div>'; |
296 | 296 | } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
297 | - $item = '<a href="index.php?a=3&id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>'; |
|
297 | + $item = '<a href="index.php?a=3&id='.$logentry['itemid'].'">'.$logentry['itemname'].'</a>'; |
|
298 | 298 | } else { |
299 | 299 | $item = $logentry['itemname']; |
300 | 300 | } |
301 | 301 | //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true' |
302 | - $user_drill = 'index.php?a=13&searchuser=' . $logentry['internalKey'] . '&itemname=0&log_submit=true'; ?> |
|
302 | + $user_drill = 'index.php?a=13&searchuser='.$logentry['internalKey'].'&itemname=0&log_submit=true'; ?> |
|
303 | 303 | <tr> |
304 | - <td><?= '<a href="' . $user_drill . '">' . $logentry['username'] . '</a>' ?></td> |
|
305 | - <td class="text-nowrap"><?= '[' . $logentry['action'] . '] ' . $logentry['message'] ?></td> |
|
304 | + <td><?= '<a href="'.$user_drill.'">'.$logentry['username'].'</a>' ?></td> |
|
305 | + <td class="text-nowrap"><?= '['.$logentry['action'].'] '.$logentry['message'] ?></td> |
|
306 | 306 | <td class="text-xs-right"><?= $logentry['itemid'] ?></td> |
307 | 307 | <td><?= $item ?></td> |
308 | 308 | <td class="text-nowrap"><?= $modx->toDateFormat($logentry['timestamp'] + $server_offset_time) ?></td> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if (!$modx->hasPermission('logs')) { |
|
5 | +if (!$modx->hasPermission('logs')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -11,17 +11,17 @@ discard block |
||
11 | 11 | * @param string $checkKey |
12 | 12 | * @return array |
13 | 13 | */ |
14 | -function array_unique_multi($array, $checkKey) |
|
15 | -{ |
|
14 | +function array_unique_multi($array, $checkKey) |
|
15 | +{ |
|
16 | 16 | // Use the builtin if we're not a multi-dimensional array |
17 | - if (!is_array(current($array)) || empty($checkKey)) { |
|
17 | + if (!is_array(current($array)) || empty($checkKey)) { |
|
18 | 18 | return array_unique($array); |
19 | 19 | } |
20 | 20 | |
21 | 21 | $ret = array(); |
22 | 22 | $checkValues = array(); // contains the unique key Values |
23 | - foreach ($array as $key => $current) { |
|
24 | - if (in_array($current[$checkKey], $checkValues)) { |
|
23 | + foreach ($array as $key => $current) { |
|
24 | + if (in_array($current[$checkKey], $checkValues)) { |
|
25 | 25 | continue; |
26 | 26 | } // duplicate |
27 | 27 | |
@@ -36,17 +36,17 @@ discard block |
||
36 | 36 | * @param string $key |
37 | 37 | * @return array |
38 | 38 | */ |
39 | -function record_sort($array, $key) |
|
40 | -{ |
|
39 | +function record_sort($array, $key) |
|
40 | +{ |
|
41 | 41 | $hash = array(); |
42 | - foreach ($array as $k => $v) { |
|
42 | + foreach ($array as $k => $v) { |
|
43 | 43 | $hash[$k] = $v[$key]; |
44 | 44 | } |
45 | 45 | |
46 | 46 | natsort($hash); |
47 | 47 | |
48 | 48 | $records = array(); |
49 | - foreach ($hash as $k => $row) { |
|
49 | + foreach ($hash as $k => $row) { |
|
50 | 50 | $records[$k] = $array[$k]; |
51 | 51 | } |
52 | 52 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | <?php |
74 | 74 | // get all users currently in the log |
75 | 75 | $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username'); |
76 | - foreach ($logs_user as $row) { |
|
76 | + foreach ($logs_user as $row) { |
|
77 | 77 | $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : ''; |
78 | 78 | echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n"; |
79 | 79 | } |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | // get all available actions in the log |
91 | 91 | include_once "actionlist.inc.php"; |
92 | 92 | $logs_actions = record_sort(array_unique_multi($logs, 'action'), 'action'); |
93 | - foreach ($logs_actions as $row) { |
|
93 | + foreach ($logs_actions as $row) { |
|
94 | 94 | $action = getAction($row['action']); |
95 | - if ($action == 'Idle') { |
|
95 | + if ($action == 'Idle') { |
|
96 | 96 | continue; |
97 | 97 | } |
98 | 98 | $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : ''; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | <?php |
111 | 111 | // get all itemid currently in logging |
112 | 112 | $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid'); |
113 | - foreach ($logs_items as $row) { |
|
113 | + foreach ($logs_items as $row) { |
|
114 | 114 | $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : ''; |
115 | 115 | echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n"; |
116 | 116 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | <?php |
127 | 127 | // get all itemname currently in logging |
128 | 128 | $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname'); |
129 | - foreach ($logs_names as $row) { |
|
129 | + foreach ($logs_names as $row) { |
|
130 | 130 | $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : ''; |
131 | 131 | echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n"; |
132 | 132 | } |
@@ -182,36 +182,36 @@ discard block |
||
182 | 182 | <div class="container container-body"> |
183 | 183 | |
184 | 184 | <?php |
185 | -if (isset($_REQUEST['log_submit'])) { |
|
185 | +if (isset($_REQUEST['log_submit'])) { |
|
186 | 186 | // get the selections the user made. |
187 | 187 | $sqladd = array(); |
188 | - if ($_REQUEST['searchuser'] != 0) { |
|
188 | + if ($_REQUEST['searchuser'] != 0) { |
|
189 | 189 | $sqladd[] = "internalKey='" . (int)$_REQUEST['searchuser'] . "'"; |
190 | 190 | } |
191 | - if ($_REQUEST['action'] != 0) { |
|
191 | + if ($_REQUEST['action'] != 0) { |
|
192 | 192 | $sqladd[] = "action=" . (int)$_REQUEST['action']; |
193 | 193 | } |
194 | - if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
|
194 | + if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
|
195 | 195 | $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'"; |
196 | 196 | } |
197 | - if ($_REQUEST['itemname'] != '0') { |
|
197 | + if ($_REQUEST['itemname'] != '0') { |
|
198 | 198 | $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'"; |
199 | 199 | } |
200 | - if ($_REQUEST['message'] != "") { |
|
200 | + if ($_REQUEST['message'] != "") { |
|
201 | 201 | $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'"; |
202 | 202 | } |
203 | 203 | // date stuff |
204 | - if ($_REQUEST['datefrom'] != "") { |
|
204 | + if ($_REQUEST['datefrom'] != "") { |
|
205 | 205 | $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']); |
206 | 206 | } |
207 | - if ($_REQUEST['dateto'] != "") { |
|
207 | + if ($_REQUEST['dateto'] != "") { |
|
208 | 208 | $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']); |
209 | 209 | } |
210 | 210 | |
211 | 211 | // If current position is not set, set it to zero |
212 | - if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) { |
|
212 | + if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) { |
|
213 | 213 | $int_cur_position = 0; |
214 | - } else { |
|
214 | + } else { |
|
215 | 215 | $int_cur_position = $_REQUEST['int_cur_position']; |
216 | 216 | } |
217 | 217 | |
@@ -225,9 +225,9 @@ discard block |
||
225 | 225 | |
226 | 226 | $rs = $modx->db->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}"); |
227 | 227 | |
228 | - if ($limit < 1) { |
|
228 | + if ($limit < 1) { |
|
229 | 229 | echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>'; |
230 | - } else { |
|
230 | + } else { |
|
231 | 231 | echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>'; |
232 | 232 | |
233 | 233 | include_once "paginate.inc.php"; |
@@ -246,14 +246,14 @@ discard block |
||
246 | 246 | $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " "); |
247 | 247 | $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " "); |
248 | 248 | $pagesfound = sizeof($array_row_paging); |
249 | - if ($pagesfound > 6) { |
|
249 | + if ($pagesfound > 6) { |
|
250 | 250 | $paging .= $array_row_paging[$current_row - 2]; // ." "; |
251 | 251 | $paging .= $array_row_paging[$current_row - 1]; // ." "; |
252 | 252 | $paging .= $array_row_paging[$current_row]; // ." "; |
253 | 253 | $paging .= $array_row_paging[$current_row + 1]; // ." "; |
254 | 254 | $paging .= $array_row_paging[$current_row + 2]; // ." "; |
255 | - } else { |
|
256 | - for ($i = 0; $i < $pagesfound; $i++) { |
|
255 | + } else { |
|
256 | + for ($i = 0; $i < $pagesfound; $i++) { |
|
257 | 257 | $paging .= $array_row_paging[$i] . " "; |
258 | 258 | } |
259 | 259 | } |
@@ -290,12 +290,12 @@ discard block |
||
290 | 290 | // grab the entire log file... |
291 | 291 | $logentries = array(); |
292 | 292 | $i = 0; |
293 | - while ($logentry = $modx->db->getRow($rs)) { |
|
294 | - if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
|
293 | + while ($logentry = $modx->db->getRow($rs)) { |
|
294 | + if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
|
295 | 295 | $item = '<div style="text-align:center;">-</div>'; |
296 | - } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
|
296 | + } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
|
297 | 297 | $item = '<a href="index.php?a=3&id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>'; |
298 | - } else { |
|
298 | + } else { |
|
299 | 299 | $item = $logentry['itemname']; |
300 | 300 | } |
301 | 301 | //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true' |
@@ -329,6 +329,6 @@ discard block |
||
329 | 329 | // @see index.php @ 915 |
330 | 330 | global $action; |
331 | 331 | $action = 1; |
332 | - } else { |
|
332 | + } else { |
|
333 | 333 | echo $_lang["mgrlog_noquery"]; |
334 | 334 | } |