@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (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('edit_user')) { |
|
5 | +if (!$modx->hasPermission('edit_user')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $modx->manager->initPageViewState(); |
11 | 11 | |
12 | 12 | // get and save search string |
13 | -if($_REQUEST['op'] == 'reset') { |
|
13 | +if ($_REQUEST['op'] == 'reset') { |
|
14 | 14 | $query = ''; |
15 | 15 | $_PAGE['vs']['search'] = ''; |
16 | 16 | } else { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | // context menu |
28 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
28 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0)); |
31 | 31 | $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0)); |
@@ -121,16 +121,16 @@ discard block |
||
121 | 121 | <div class="table-responsive"> |
122 | 122 | <?php |
123 | 123 | $where = ""; |
124 | - if(!$modx->hasPermission('save_role')) { |
|
125 | - $where .= (empty($where) ? "" : " AND ") . "mua.role != 1"; |
|
124 | + if (!$modx->hasPermission('save_role')) { |
|
125 | + $where .= (empty($where) ? "" : " AND ")."mua.role != 1"; |
|
126 | 126 | } |
127 | - if(!empty($sqlQuery)) { |
|
128 | - $where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))"; |
|
127 | + if (!empty($sqlQuery)) { |
|
128 | + $where .= (empty($where) ? "" : " AND ")."((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))"; |
|
129 | 129 | } |
130 | - $ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu |
|
131 | - INNER JOIN " . $modx->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id |
|
132 | - LEFT JOIN " . $modx->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC'); |
|
133 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
130 | + $ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users')." AS mu |
|
131 | + INNER JOIN " . $modx->getFullTableName('user_attributes')." AS mua ON mua.internalKey=mu.id |
|
132 | + LEFT JOIN " . $modx->getFullTableName('user_roles')." AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC'); |
|
133 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
134 | 134 | $grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items |
135 | 135 | $grd->noRecordMsg = $_lang["no_records_found"]; |
136 | 136 | $grd->cssClass = "table data"; |
@@ -151,19 +151,19 @@ discard block |
||
151 | 151 | $grd->colWidths = "1%,,,,,,1%,1%"; |
152 | 152 | $grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap"; |
153 | 153 | $grd->colTypes = implode('||', array( |
154 | - 'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>', |
|
155 | - 'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>', |
|
154 | + 'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="'.$_lang['click_to_context'].'"><i class="'.$_style['icons_user'].'"></i></a>', |
|
155 | + 'template:<a href="index.php?a=12&id=[+id+]" title="'.$_lang['click_to_edit_title'].'">[+value+]</a>', |
|
156 | 156 | 'template:[+fullname+]', |
157 | 157 | 'template:[+role+]', |
158 | 158 | 'template:[+email+]', |
159 | 159 | 'template:[+gender+]', |
160 | 160 | 'template:[+blocked+]', |
161 | - 'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M' |
|
161 | + 'date: '.$modx->toDateFormat('[+thislogin+]', 'formatOnly').' %H:%M' |
|
162 | 162 | )); |
163 | - if($listmode == '1') { |
|
163 | + if ($listmode == '1') { |
|
164 | 164 | $grd->pageSize = 0; |
165 | 165 | } |
166 | - if($_REQUEST['op'] == 'reset') { |
|
166 | + if ($_REQUEST['op'] == 'reset') { |
|
167 | 167 | $grd->pageNumber = 1; |
168 | 168 | } |
169 | 169 | // render grid |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username'); |
66 | 66 | foreach ($logs_user as $row) { |
67 | 67 | $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : ''; |
68 | - echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n"; |
|
68 | + echo "\t\t".'<option value="'.$row['internalKey'].'"'.$selectedtext.'>'.$row['username']."</option>\n"; |
|
69 | 69 | } |
70 | 70 | ?> |
71 | 71 | </select> |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | continue; |
87 | 87 | } |
88 | 88 | $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : ''; |
89 | - echo "\t\t" . '<option value="' . $row['action'] . '"' . $selectedtext . '>' . $row['action'] . ' - ' . $action . "</option>\n"; |
|
89 | + echo "\t\t".'<option value="'.$row['action'].'"'.$selectedtext.'>'.$row['action'].' - '.$action."</option>\n"; |
|
90 | 90 | } |
91 | 91 | ?> |
92 | 92 | </select> |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid'); |
103 | 103 | foreach ($logs_items as $row) { |
104 | 104 | $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : ''; |
105 | - echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n"; |
|
105 | + echo "\t\t".'<option value="'.$row['itemid'].'"'.$selectedtext.'>'.$row['itemid']."</option>\n"; |
|
106 | 106 | } |
107 | 107 | ?> |
108 | 108 | </select> |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname'); |
119 | 119 | foreach ($logs_names as $row) { |
120 | 120 | $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : ''; |
121 | - echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n"; |
|
121 | + echo "\t\t".'<option value="'.$row['itemname'].'"'.$selectedtext.'>'.$row['itemname']."</option>\n"; |
|
122 | 122 | } |
123 | 123 | ?> |
124 | 124 | </select> |
@@ -176,26 +176,26 @@ discard block |
||
176 | 176 | // get the selections the user made. |
177 | 177 | $sqladd = array(); |
178 | 178 | if ($_REQUEST['searchuser'] != 0) { |
179 | - $sqladd[] = "internalKey='" . intval($_REQUEST['searchuser']) . "'"; |
|
179 | + $sqladd[] = "internalKey='".intval($_REQUEST['searchuser'])."'"; |
|
180 | 180 | } |
181 | 181 | if ($_REQUEST['action'] != 0) { |
182 | - $sqladd[] = "action=" . intval($_REQUEST['action']); |
|
182 | + $sqladd[] = "action=".intval($_REQUEST['action']); |
|
183 | 183 | } |
184 | 184 | if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
185 | - $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'"; |
|
185 | + $sqladd[] = "itemid='".$_REQUEST['itemid']."'"; |
|
186 | 186 | } |
187 | 187 | if ($_REQUEST['itemname'] != '0') { |
188 | - $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'"; |
|
188 | + $sqladd[] = "itemname='".$modx->db->escape($_REQUEST['itemname'])."'"; |
|
189 | 189 | } |
190 | 190 | if ($_REQUEST['message'] != "") { |
191 | - $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'"; |
|
191 | + $sqladd[] = "message LIKE '%".$modx->db->escape($_REQUEST['message'])."%'"; |
|
192 | 192 | } |
193 | 193 | // date stuff |
194 | 194 | if ($_REQUEST['datefrom'] != "") { |
195 | - $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']); |
|
195 | + $sqladd[] = "timestamp>".$modx->toTimeStamp($_REQUEST['datefrom']); |
|
196 | 196 | } |
197 | 197 | if ($_REQUEST['dateto'] != "") { |
198 | - $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']); |
|
198 | + $sqladd[] = "timestamp<".$modx->toTimeStamp($_REQUEST['dateto']); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | // If current position is not set, set it to zero |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | // Number of result to display on the page, will be in the LIMIT of the sql query also |
209 | 209 | $int_num_result = is_numeric($_REQUEST['nrresults']) ? $_REQUEST['nrresults'] : $number_of_logs; |
210 | 210 | |
211 | - $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) |
|
211 | + $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) |
|
212 | 212 | |
213 | 213 | // build the sql |
214 | 214 | $limit = $num_rows = $modx->db->getValue($modx->db->select('COUNT(*)', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''))); |
@@ -216,9 +216,9 @@ discard block |
||
216 | 216 | $rs = $modx->db->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}"); |
217 | 217 | |
218 | 218 | if ($limit < 1) { |
219 | - echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>'; |
|
219 | + echo '<p>'.$_lang["mgrlog_emptysrch"].'</p>'; |
|
220 | 220 | } else { |
221 | - echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>'; |
|
221 | + echo '<p>'.$_lang["mgrlog_sortinst"].'</p>'; |
|
222 | 222 | |
223 | 223 | include_once "paginate.inc.php"; |
224 | 224 | // New instance of the Paging class, you can modify the color and the width of the html table |
@@ -230,11 +230,11 @@ discard block |
||
230 | 230 | $current_row = $int_cur_position / $int_num_result; |
231 | 231 | |
232 | 232 | // Display the result as you like... |
233 | - print "<p>" . $_lang["paging_showing"] . " " . $array_paging['lower']; |
|
234 | - print " " . $_lang["paging_to"] . " " . $array_paging['upper']; |
|
235 | - print " (" . $array_paging['total'] . " " . $_lang["paging_total"] . ")<br />"; |
|
236 | - $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " "); |
|
237 | - $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " "); |
|
233 | + print "<p>".$_lang["paging_showing"]." ".$array_paging['lower']; |
|
234 | + print " ".$_lang["paging_to"]." ".$array_paging['upper']; |
|
235 | + print " (".$array_paging['total']." ".$_lang["paging_total"].")<br />"; |
|
236 | + $paging = $array_paging['first_link'].$_lang["paging_first"].(isset($array_paging['first_link']) ? "</a> " : " "); |
|
237 | + $paging .= $array_paging['previous_link'].$_lang["paging_prev"].(isset($array_paging['previous_link']) ? "</a> " : " "); |
|
238 | 238 | $pagesfound = sizeof($array_row_paging); |
239 | 239 | if ($pagesfound > 6) { |
240 | 240 | $paging .= $array_row_paging[$current_row - 2]; // ." "; |
@@ -244,11 +244,11 @@ discard block |
||
244 | 244 | $paging .= $array_row_paging[$current_row + 2]; // ." "; |
245 | 245 | } else { |
246 | 246 | for ($i = 0; $i < $pagesfound; $i++) { |
247 | - $paging .= $array_row_paging[$i] . " "; |
|
247 | + $paging .= $array_row_paging[$i]." "; |
|
248 | 248 | } |
249 | 249 | } |
250 | - $paging .= $array_paging['next_link'] . $_lang["paging_next"] . (isset($array_paging['next_link']) ? "</a> " : " ") . " "; |
|
251 | - $paging .= $array_paging['last_link'] . $_lang["paging_last"] . (isset($array_paging['last_link']) ? "</a> " : " ") . " "; |
|
250 | + $paging .= $array_paging['next_link'].$_lang["paging_next"].(isset($array_paging['next_link']) ? "</a> " : " ")." "; |
|
251 | + $paging .= $array_paging['last_link'].$_lang["paging_last"].(isset($array_paging['last_link']) ? "</a> " : " ")." "; |
|
252 | 252 | // The above exemple print somethings like: |
253 | 253 | // 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 >>> |
254 | 254 | // Of course you can now play with array_row_paging in order to print |
@@ -282,16 +282,16 @@ discard block |
||
282 | 282 | if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
283 | 283 | $item = '<div style="text-align:center;">-</div>'; |
284 | 284 | } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
285 | - $item = '<a href="index.php?a=3&id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>'; |
|
285 | + $item = '<a href="index.php?a=3&id='.$logentry['itemid'].'">'.$logentry['itemname'].'</a>'; |
|
286 | 286 | } else { |
287 | 287 | $item = $logentry['itemname']; |
288 | 288 | } |
289 | 289 | //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true' |
290 | - $user_drill = 'index.php?a=13&searchuser=' . $logentry['internalKey'] . '&itemname=0&log_submit=true'; |
|
290 | + $user_drill = 'index.php?a=13&searchuser='.$logentry['internalKey'].'&itemname=0&log_submit=true'; |
|
291 | 291 | ?> |
292 | 292 | <tr> |
293 | - <td><?= '<a href="' . $user_drill . '">' . $logentry['username'] . '</a>' ?></td> |
|
294 | - <td class="text-nowrap"><?= '[' . $logentry['action'] . '] ' . $logentry['message'] ?></td> |
|
293 | + <td><?= '<a href="'.$user_drill.'">'.$logentry['username'].'</a>' ?></td> |
|
294 | + <td class="text-nowrap"><?= '['.$logentry['action'].'] '.$logentry['message'] ?></td> |
|
295 | 295 | <td class="text-xs-right"><?= $logentry['itemid'] ?></td> |
296 | 296 | <td><?= $item ?></td> |
297 | 297 | <td class="text-nowrap"><?= $modx->toDateFormat($logentry['timestamp'] + $server_offset_time) ?></td> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | } |
65 | 65 | |
66 | -include_once MODX_MANAGER_PATH . "includes/header.inc.php"; |
|
66 | +include_once MODX_MANAGER_PATH."includes/header.inc.php"; |
|
67 | 67 | ?> |
68 | 68 | <script language="JavaScript" type="text/javascript"> |
69 | 69 | function saveSelection() |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | </script> |
139 | 139 | |
140 | 140 | <h1> |
141 | - <?= $title . " - " . $_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i> |
|
141 | + <?= $title." - ".$_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i> |
|
142 | 142 | </h1> |
143 | 143 | |
144 | 144 | <div id="actions"> |
@@ -177,15 +177,15 @@ discard block |
||
177 | 177 | <div class="row"> |
178 | 178 | <div class="table-responsive"> |
179 | 179 | <?php |
180 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
180 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
181 | 181 | $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
182 | 182 | $grd->noRecordMsg = $_lang["no_records_found"]; |
183 | 183 | $grd->cssClass = "table data nowrap"; |
184 | 184 | $grd->columnHeaderClass = "tableHeader"; |
185 | 185 | $grd->itemClass = "tableItem"; |
186 | 186 | $grd->altItemClass = "tableAltItem"; |
187 | - $grd->columns = $_lang["name"] . " ," . $_lang["description"]; |
|
188 | - $grd->colTypes = "template:<input type='" . ($sm == 'm' ? 'checkbox' : 'radio') . "' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]"; |
|
187 | + $grd->columns = $_lang["name"]." ,".$_lang["description"]; |
|
188 | + $grd->colTypes = "template:<input type='".($sm == 'm' ? 'checkbox' : 'radio')."' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]"; |
|
189 | 189 | $grd->colWidths = "45%"; |
190 | 190 | $grd->fields = "name,description"; |
191 | 191 | if ($_REQUEST['listmode'] == '1') { |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
2 | +if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | 3 | |
4 | -if(!$modx->hasPermission('category_manager')) { |
|
4 | +if (!$modx->hasPermission('category_manager')) { |
|
5 | 5 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
6 | 6 | } |
7 | 7 | |
@@ -13,32 +13,32 @@ discard block |
||
13 | 13 | 'native_language' => 'de', |
14 | 14 | 'name' => 'Categories Manager', |
15 | 15 | 'dirname' => $site_manager_url, |
16 | - 'url' => 'index.php?a=120&id=' . $_GET['id'], |
|
17 | - 'path' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR, |
|
18 | - 'inc_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR, |
|
19 | - 'languages_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR, |
|
20 | - 'views_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR, |
|
16 | + 'url' => 'index.php?a=120&id='.$_GET['id'], |
|
17 | + 'path' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR, |
|
18 | + 'inc_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR, |
|
19 | + 'languages_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR, |
|
20 | + 'views_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR, |
|
21 | 21 | 'request_key' => 'module_categories_manager', |
22 | 22 | 'messages' => array() |
23 | 23 | ); |
24 | 24 | |
25 | -require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php'; |
|
25 | +require_once $_module_params['inc_dir'].'Module_Categories_Manager.php'; |
|
26 | 26 | $cm = new Module_Categories_Manager(); |
27 | 27 | |
28 | 28 | // assign module_params to internal params |
29 | -foreach( $_module_params as $param => $value ) |
|
29 | +foreach ($_module_params as $param => $value) |
|
30 | 30 | { |
31 | - $cm->set( $param, $value ); |
|
31 | + $cm->set($param, $value); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | // catch the request actions |
35 | -include_once $cm->get('inc_dir') . 'request_trigger.inc.php'; |
|
35 | +include_once $cm->get('inc_dir').'request_trigger.inc.php'; |
|
36 | 36 | |
37 | -if( !$categories = $cm->getCategories() ) |
|
37 | +if (!$categories = $cm->getCategories()) |
|
38 | 38 | { |
39 | - setcookie('webfxtab_manage-categories-pane', 0 ); |
|
40 | - $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' ); |
|
39 | + setcookie('webfxtab_manage-categories-pane', 0); |
|
40 | + $cm->addMessage($cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global'); |
|
41 | 41 | } |
42 | 42 | |
43 | -$cm->renderView('main', $categories ); |
|
43 | +$cm->renderView('main', $categories); |
|
44 | 44 | return; |
45 | 45 | \ No newline at end of file |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (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 | -if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) { |
|
7 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
6 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php')) { |
|
7 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php'); |
|
8 | 8 | } else { |
9 | - include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
9 | + include_once(MODX_MANAGER_PATH.'actions/resources/functions.inc.php'); |
|
10 | 10 | } |
11 | -if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) { |
|
12 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
11 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php')) { |
|
12 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php'); |
|
13 | 13 | } else { |
14 | - include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
14 | + include_once(MODX_MANAGER_PATH.'actions/resources/mgrResources.class.php'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $resources = new mgrResources(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'type7' => $_lang["lock_element_type_7"], |
29 | 29 | 'type8' => $_lang["lock_element_type_8"] |
30 | 30 | ); |
31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
31 | +foreach ($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
32 | 32 | |
33 | 33 | // Prepare lang-strings for mgrResAction() |
34 | 34 | $mraTranslations = array( |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
45 | 45 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
46 | 46 | ); |
47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
47 | +foreach ($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
48 | 48 | ?> |
49 | 49 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
50 | 50 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -65,45 +65,45 @@ discard block |
||
65 | 65 | </script> |
66 | 66 | |
67 | 67 | <?php |
68 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
68 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php')) { |
|
69 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php'); |
|
70 | 70 | } else { |
71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
71 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php'); |
|
72 | 72 | } |
73 | 73 | |
74 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
74 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php'); |
|
76 | 76 | } else { |
77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
77 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php'); |
|
78 | 78 | } |
79 | 79 | |
80 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
80 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php')) { |
|
81 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php'); |
|
82 | 82 | } else { |
83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
83 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php'); |
|
84 | 84 | } |
85 | 85 | |
86 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
86 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php')) { |
|
87 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php'); |
|
88 | 88 | } else { |
89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
89 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php'); |
|
90 | 90 | } |
91 | 91 | |
92 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
92 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php')) { |
|
93 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php'); |
|
94 | 94 | } else { |
95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
95 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php'); |
|
96 | 96 | } |
97 | 97 | |
98 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
98 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php'); |
|
100 | 100 | } else { |
101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
101 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | |
105 | - if(is_numeric($_GET['tab'])) { |
|
106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
105 | + if (is_numeric($_GET['tab'])) { |
|
106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
107 | 107 | } |
108 | 108 | ?> |
109 | 109 | </div> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (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('view_eventlog')) { |
|
5 | +if (!$modx->hasPermission('view_eventlog')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | ?> |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | <div class="form-group" id="lyr1"> |
18 | 18 | <b><?= $_lang["publish_events"] ?></b> |
19 | 19 | <?php |
20 | - $rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC'); |
|
20 | + $rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > ".time()."", 'pub_date ASC'); |
|
21 | 21 | $limit = $modx->db->getRecordCount($rs); |
22 | - if($limit < 1) { |
|
22 | + if ($limit < 1) { |
|
23 | 23 | ?> |
24 | 24 | <p><?= $_lang["no_docs_pending_publishing"] ?></p> |
25 | 25 | <?php |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | </thead> |
37 | 37 | <tbody> |
38 | 38 | <?php |
39 | - while($row = $modx->db->getRow($rs)) { |
|
39 | + while ($row = $modx->db->getRow($rs)) { |
|
40 | 40 | ?> |
41 | 41 | <tr> |
42 | 42 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | <div class="form-group" id="lyr2"> |
57 | 57 | <b><?= $_lang["unpublish_events"] ?></b> |
58 | 58 | <?php |
59 | - $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC'); |
|
59 | + $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > ".time()."", 'unpub_date ASC'); |
|
60 | 60 | $limit = $modx->db->getRecordCount($rs); |
61 | - if($limit < 1) { |
|
61 | + if ($limit < 1) { |
|
62 | 62 | ?> |
63 | 63 | <p><?= $_lang["no_docs_pending_unpublishing"] ?></p> |
64 | 64 | <?php |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | </thead> |
76 | 76 | <tbody> |
77 | 77 | <?php |
78 | - while($row = $modx->db->getRow($rs)) { |
|
78 | + while ($row = $modx->db->getRow($rs)) { |
|
79 | 79 | ?> |
80 | 80 | <tr> |
81 | 81 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | <?php |
98 | 98 | $rs = $modx->db->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC"); |
99 | 99 | $limit = $modx->db->getRecordCount($rs); |
100 | - if($limit < 1) { |
|
100 | + if ($limit < 1) { |
|
101 | 101 | ?> |
102 | 102 | <p><?= $_lang["no_docs_pending_pubunpub"] ?></p> |
103 | 103 | <?php |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | </thead> |
116 | 116 | <tbody> |
117 | 117 | <?php |
118 | - while($row = $modx->db->getRow($rs)) { |
|
118 | + while ($row = $modx->db->getRow($rs)) { |
|
119 | 119 | ?> |
120 | 120 | <tr> |
121 | 121 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (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 | -switch($modx->manager->action) { |
|
5 | +switch ($modx->manager->action) { |
|
6 | 6 | case 107: |
7 | - if(!$modx->hasPermission('new_module')) { |
|
7 | + if (!$modx->hasPermission('new_module')) { |
|
8 | 8 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
9 | 9 | } |
10 | 10 | break; |
11 | 11 | case 108: |
12 | - if(!$modx->hasPermission('edit_module')) { |
|
12 | + if (!$modx->hasPermission('edit_module')) { |
|
13 | 13 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
14 | 14 | } |
15 | 15 | break; |
@@ -29,16 +29,16 @@ discard block |
||
29 | 29 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
30 | 30 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars'); |
31 | 31 | // create globally unique identifiers (guid) |
32 | -function createGUID() { |
|
32 | +function createGUID(){ |
|
33 | 33 | srand((double) microtime() * 1000000); |
34 | 34 | $r = rand(); |
35 | - $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
|
35 | + $u = uniqid(getmypid().$r.(double) microtime() * 1000000, 1); |
|
36 | 36 | $m = md5($u); |
37 | 37 | return $m; |
38 | 38 | } |
39 | 39 | |
40 | 40 | // check to see the module editor isn't locked |
41 | -if($lockedEl = $modx->elementIsLocked(6, $id)) { |
|
41 | +if ($lockedEl = $modx->elementIsLocked(6, $id)) { |
|
42 | 42 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
43 | 43 | } |
44 | 44 | // end check for lock |
@@ -46,29 +46,29 @@ discard block |
||
46 | 46 | // Lock snippet for other users to edit |
47 | 47 | $modx->lockElement(6, $id); |
48 | 48 | |
49 | -if(isset($_GET['id'])) { |
|
49 | +if (isset($_GET['id'])) { |
|
50 | 50 | $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'"); |
51 | 51 | $content = $modx->db->getRow($rs); |
52 | - if(!$content) { |
|
52 | + if (!$content) { |
|
53 | 53 | $modx->webAlertAndQuit("Module not found for id '{$id}'."); |
54 | 54 | } |
55 | 55 | $content['properties'] = str_replace("&", "&", $content['properties']); |
56 | 56 | $_SESSION['itemname'] = $content['name']; |
57 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
57 | + if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
58 | 58 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
59 | 59 | } |
60 | 60 | } else { |
61 | 61 | $_SESSION['itemname'] = $_lang["new_module"]; |
62 | 62 | $content['wrap'] = '1'; |
63 | 63 | } |
64 | -if($modx->manager->hasFormValues()) { |
|
64 | +if ($modx->manager->hasFormValues()) { |
|
65 | 65 | $modx->manager->loadFormValues(); |
66 | 66 | } |
67 | 67 | |
68 | 68 | // Add lock-element JS-Script |
69 | 69 | $lockElementId = $id; |
70 | 70 | $lockElementType = 6; |
71 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
71 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
72 | 72 | ?> |
73 | 73 | <script type="text/javascript"> |
74 | 74 | function loadDependencies() { |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | function BrowseServer() { |
416 | 416 | var w = screen.width * 0.7; |
417 | 417 | var h = screen.height * 0.7; |
418 | - OpenServerBrowser("<?= MODX_MANAGER_URL;?>media/browser/<?= $which_browser;?>/browser.php?Type=images", w, h); |
|
418 | + OpenServerBrowser("<?= MODX_MANAGER_URL; ?>media/browser/<?= $which_browser; ?>/browser.php?Type=images", w, h); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | function SetUrl(url, width, height, alt) { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | <?php |
436 | 436 | // invoke OnModFormPrerender event |
437 | 437 | $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id)); |
438 | - if(is_array($evtOut)) { |
|
438 | + if (is_array($evtOut)) { |
|
439 | 439 | echo implode('', $evtOut); |
440 | 440 | } |
441 | 441 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
450 | 450 | |
451 | 451 | <h1> |
452 | - <i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i> |
|
452 | + <i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i> |
|
453 | 453 | </h1> |
454 | 454 | |
455 | 455 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -474,8 +474,8 @@ discard block |
||
474 | 474 | <div class="col-md-9 col-lg-10"> |
475 | 475 | <div class="form-control-name clearfix"> |
476 | 476 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
477 | - <?php if($modx->hasPermission('save_role')): ?> |
|
478 | - <label class="custom-control" title="<?= $_lang['lock_module'] . "\n" . $_lang['lock_module_msg'] ?>" tooltip> |
|
477 | + <?php if ($modx->hasPermission('save_role')): ?> |
|
478 | + <label class="custom-control" title="<?= $_lang['lock_module']."\n".$_lang['lock_module_msg'] ?>" tooltip> |
|
479 | 479 | <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
480 | 480 | <i class="fa fa-lock"></i> |
481 | 481 | </label> |
@@ -497,9 +497,9 @@ discard block |
||
497 | 497 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
498 | 498 | <option> </option> |
499 | 499 | <?php |
500 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
501 | - foreach(getCategories() as $n => $v) { |
|
502 | - echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
500 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
501 | + foreach (getCategories() as $n => $v) { |
|
502 | + echo "\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category'])."</option>\n"; |
|
503 | 503 | } |
504 | 504 | ?> |
505 | 505 | </select> |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | <div class="form-group"> |
532 | 532 | <div class="form-row"> |
533 | 533 | <label for="disabled"><input name="disabled" id="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> |
534 | - <?= ($content['disabled'] == 1 ? '<span class="text-danger">' . $_lang['module_disabled'] . '</span>' : $_lang['module_disabled']) ?></label> |
|
534 | + <?= ($content['disabled'] == 1 ? '<span class="text-danger">'.$_lang['module_disabled'].'</span>' : $_lang['module_disabled']) ?></label> |
|
535 | 535 | </div> |
536 | 536 | <div class="form-row"> |
537 | 537 | <label for="parse_docblock"> |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | </div> |
597 | 597 | <!-- HTML text editor end --> |
598 | 598 | </div> |
599 | - <?php if($modx->manager->action == '108'): ?> |
|
599 | + <?php if ($modx->manager->action == '108'): ?> |
|
600 | 600 | <!-- Dependencies --> |
601 | 601 | <div class="tab-page" id="tabDepend"> |
602 | 602 | <h2 class="tab"><?= $_lang['settings_dependencies'] ?></h2> |
@@ -624,14 +624,14 @@ discard block |
||
624 | 624 | LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50 |
625 | 625 | LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name'); |
626 | 626 | |
627 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
627 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
628 | 628 | $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items |
629 | 629 | $grd->noRecordMsg = $_lang['no_records_found']; |
630 | 630 | $grd->cssClass = 'grid'; |
631 | 631 | $grd->columnHeaderClass = 'gridHeader'; |
632 | 632 | $grd->itemClass = 'gridItem'; |
633 | 633 | $grd->altItemClass = 'gridAltItem'; |
634 | - $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
634 | + $grd->columns = $_lang['element_name']." ,".$_lang['type']; |
|
635 | 635 | $grd->fields = "name,type"; |
636 | 636 | echo $grd->render(); |
637 | 637 | ?> |
@@ -644,13 +644,13 @@ discard block |
||
644 | 644 | <h2 class="tab"><?= $_lang['access_permissions'] ?></h2> |
645 | 645 | <script type="text/javascript">tp.addTabPage(document.getElementById("tabPermissions"));</script> |
646 | 646 | <div class="container container-body"> |
647 | - <?php if($use_udperms == 1) : ?> |
|
647 | + <?php if ($use_udperms == 1) : ?> |
|
648 | 648 | <?php |
649 | 649 | // fetch user access permissions for the module |
650 | 650 | $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'"); |
651 | 651 | $groupsarray = $modx->db->getColumn('usergroup', $rs); |
652 | 652 | |
653 | - if($modx->hasPermission('access_permissions')) { |
|
653 | + if ($modx->hasPermission('access_permissions')) { |
|
654 | 654 | ?> |
655 | 655 | <!-- User Group Access Permissions --> |
656 | 656 | <script type="text/javascript"> |
@@ -678,22 +678,22 @@ discard block |
||
678 | 678 | } |
679 | 679 | $chk = ''; |
680 | 680 | $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name'); |
681 | - while($row = $modx->db->getRow($rs)) { |
|
681 | + while ($row = $modx->db->getRow($rs)) { |
|
682 | 682 | $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
683 | 683 | $checked = in_array($row['id'], $groupsarray); |
684 | - if($modx->hasPermission('access_permissions')) { |
|
685 | - if($checked) { |
|
684 | + if ($modx->hasPermission('access_permissions')) { |
|
685 | + if ($checked) { |
|
686 | 686 | $notPublic = true; |
687 | 687 | } |
688 | - $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
688 | + $chks .= '<label><input type="checkbox" name="usrgroups[]" value="'.$row['id'].'"'.($checked ? ' checked="checked"' : '').' onclick="makePublic(false)" /> '.$row['name']."</label><br />\n"; |
|
689 | 689 | } else { |
690 | - if($checked) { |
|
691 | - $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
690 | + if ($checked) { |
|
691 | + $chks = '<input type="hidden" name="usrgroups[]" value="'.$row['id'].'" />'."\n".$chks; |
|
692 | 692 | } |
693 | 693 | } |
694 | 694 | } |
695 | - if($modx->hasPermission('access_permissions')) { |
|
696 | - $chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks; |
|
695 | + if ($modx->hasPermission('access_permissions')) { |
|
696 | + $chks = '<label><input type="checkbox" name="chkallgroups"'.(!$notPublic ? ' checked="checked"' : '').' onclick="makePublic(true)" /><span class="warning"> '.$_lang['all_usr_groups'].'</span></label><br />'."\n".$chks; |
|
697 | 697 | } |
698 | 698 | echo $chks; |
699 | 699 | ?> |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | <?php |
715 | 715 | // invoke OnModFormRender event |
716 | 716 | $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id)); |
717 | - if(is_array($evtOut)) { |
|
717 | + if (is_array($evtOut)) { |
|
718 | 718 | echo implode('', $evtOut); |
719 | 719 | } |
720 | 720 | ?> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (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('edit_web_user')) { |
|
5 | +if (!$modx->hasPermission('edit_web_user')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $modx->manager->initPageViewState(); |
11 | 11 | |
12 | 12 | // get and save search string |
13 | -if($_REQUEST['op'] == 'reset') { |
|
13 | +if ($_REQUEST['op'] == 'reset') { |
|
14 | 14 | $query = ''; |
15 | 15 | $_PAGE['vs']['search'] = ''; |
16 | 16 | } else { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | // context menu |
28 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
28 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0)); |
31 | 31 | $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0)); |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | <div class="row"> |
121 | 121 | <div class="table-responsive"> |
122 | 122 | <?php |
123 | - $ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu |
|
124 | - INNER JOIN " . $modx->getFullTableName("web_user_attributes") . " wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username'); |
|
125 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
123 | + $ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users")." wu |
|
124 | + INNER JOIN " . $modx->getFullTableName("web_user_attributes")." wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username'); |
|
125 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
126 | 126 | $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
127 | 127 | $grd->noRecordMsg = $_lang["no_records_found"]; |
128 | 128 | $grd->cssClass = "table data"; |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | $grd->itemClass = "tableItem"; |
131 | 131 | $grd->altItemClass = "tableAltItem"; |
132 | 132 | $grd->fields = "id,username,fullname,email,gender,blocked"; |
133 | - $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_gender"] . " ," . $_lang["user_block"]; |
|
133 | + $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["user_full_name"]." ,".$_lang["email"]." ,".$_lang["user_gender"]." ,".$_lang["user_block"]; |
|
134 | 134 | $grd->colWidths = "1%,,,,1%,1%"; |
135 | 135 | $grd->colAligns = "center,,,,center,right' nowrap='nowrap"; |
136 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>"; |
|
137 | - if($listmode == '1') { |
|
136 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='".$_style["icons_user"]."'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='".$_lang["click_to_edit_title"]."'>[+value+]</a>"; |
|
137 | + if ($listmode == '1') { |
|
138 | 138 | $grd->pageSize = 0; |
139 | 139 | } |
140 | - if($_REQUEST['op'] == 'reset') { |
|
140 | + if ($_REQUEST['op'] == 'reset') { |
|
141 | 141 | $grd->pageNumber = 1; |
142 | 142 | } |
143 | 143 | // render grid |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | // Add lock-element JS-Script |
57 | 57 | $lockElementId = $id; |
58 | 58 | $lockElementType = 5; |
59 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
59 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
60 | 60 | |
61 | 61 | function bold($cond = false) |
62 | 62 | { |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
479 | 479 | |
480 | 480 | <h1> |
481 | - <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
481 | + <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
482 | 482 | </h1> |
483 | 483 | |
484 | 484 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | <div class="form-control-name clearfix"> |
505 | 505 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
506 | 506 | <?php if ($modx->hasPermission('save_role')): ?> |
507 | - <label class="custom-control" title="<?= $_lang['lock_plugin'] . "\n" . $_lang['lock_plugin_msg'] ?>" tooltip> |
|
507 | + <label class="custom-control" title="<?= $_lang['lock_plugin']."\n".$_lang['lock_plugin_msg'] ?>" tooltip> |
|
508 | 508 | <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
509 | 509 | <i class="fa fa-lock"></i> |
510 | 510 | </label> |
@@ -528,9 +528,9 @@ discard block |
||
528 | 528 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
529 | 529 | <option> </option> |
530 | 530 | <?php |
531 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
531 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
532 | 532 | foreach (getCategories() as $n => $v) { |
533 | - echo '<option value="' . $v['id'] . '"' . ($content["category"] == $v["id"] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
533 | + echo '<option value="'.$v['id'].'"'.($content["category"] == $v["id"] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v["category"])."</option>"; |
|
534 | 534 | } |
535 | 535 | ?> |
536 | 536 | </select> |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | <?php if ($modx->hasPermission('save_role')): ?> |
547 | 547 | <div class="form-group"> |
548 | 548 | <div class="form-row"> |
549 | - <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['plugin_disabled'] . "</span>" : $_lang['plugin_disabled']) ?></label> |
|
549 | + <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['plugin_disabled']."</span>" : $_lang['plugin_disabled']) ?></label> |
|
550 | 550 | </div> |
551 | 551 | <div class="form-row"> |
552 | 552 | <label> |
@@ -593,11 +593,11 @@ discard block |
||
593 | 593 | <select name="moduleguid" class="form-control" onchange="documentDirty=true;"> |
594 | 594 | <option> </option> |
595 | 595 | <?php |
596 | - $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules") . " sm |
|
597 | - INNER JOIN " . $modx->getFullTableName("site_module_depobj") . " smd ON smd.module=sm.id AND smd.type=30 |
|
598 | - INNER JOIN " . $modx->getFullTableName("site_plugins") . " sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
596 | + $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules")." sm |
|
597 | + INNER JOIN " . $modx->getFullTableName("site_module_depobj")." smd ON smd.module=sm.id AND smd.type=30 |
|
598 | + INNER JOIN " . $modx->getFullTableName("site_plugins")." sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
599 | 599 | while ($row = $modx->db->getRow($ds)) { |
600 | - echo "<option value='" . $row['guid'] . "'" . ($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row["name"]) . "</option>"; |
|
600 | + echo "<option value='".$row['guid']."'".($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row["name"])."</option>"; |
|
601 | 601 | } |
602 | 602 | ?> |
603 | 603 | </select> |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | echoEventRows($evtnames); |
659 | 659 | } |
660 | 660 | echo '<hr class="clear">'; |
661 | - echo '<div class="form-group"><b>' . $services[$srv - 1] . '</b></div>'; |
|
661 | + echo '<div class="form-group"><b>'.$services[$srv - 1].'</b></div>'; |
|
662 | 662 | } |
663 | 663 | // display group name |
664 | 664 | if ($grp != $row['groupname']) { |
@@ -667,9 +667,9 @@ discard block |
||
667 | 667 | echoEventRows($evtnames); |
668 | 668 | } |
669 | 669 | echo '<hr class="clear">'; |
670 | - echo '<div class="form-group"><b>' . $row['groupname'] . '</b></div>'; |
|
670 | + echo '<div class="form-group"><b>'.$row['groupname'].'</b></div>'; |
|
671 | 671 | } |
672 | - $evtnames[] = '<input name="sysevents[]" id="' . $row['name'] . '" type="checkbox" ' . (in_array($row['id'], $evts) ? ' checked="checked" ' : '') . 'class="inputBox" value="' . $row['id'] . '" /> <label for="' . $row['name'] . '" ' . bold(in_array($row['id'], $evts)) . '> ' . $row['name'] . '</label>' . "\n"; |
|
672 | + $evtnames[] = '<input name="sysevents[]" id="'.$row['name'].'" type="checkbox" '.(in_array($row['id'], $evts) ? ' checked="checked" ' : '').'class="inputBox" value="'.$row['id'].'" /> <label for="'.$row['name'].'" '.bold(in_array($row['id'], $evts)).'> '.$row['name'].'</label>'."\n"; |
|
673 | 673 | if (count($evtnames) == 2) { |
674 | 674 | echoEventRows($evtnames); |
675 | 675 | } |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | |
682 | 682 | function echoEventRows(&$evtnames) |
683 | 683 | { |
684 | - echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">' . implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames) . '</div></div>'; |
|
684 | + echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">'.implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames).'</div></div>'; |
|
685 | 685 | $evtnames = array(); |
686 | 686 | } |
687 | 687 |