@@ -1,14 +1,14 @@ 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 | 6 | $tpl = array( |
7 | - 'viewForm' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_viewForm.tpl'), |
|
8 | - 'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'), |
|
9 | - 'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'), |
|
10 | - 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'), |
|
11 | - 'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl') |
|
7 | + 'viewForm' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_viewForm.tpl'), |
|
8 | + 'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'), |
|
9 | + 'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'), |
|
10 | + 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'), |
|
11 | + 'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl') |
|
12 | 12 | ); |
13 | 13 | |
14 | 14 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false; |
52 | 52 | |
53 | - if (! is_array($items) || empty($items)) { |
|
53 | + if (!is_array($items) || empty($items)) { |
|
54 | 54 | return $_lang['no_results']; |
55 | 55 | } |
56 | 56 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
71 | 71 | 'tab' => $resourceTable, |
72 | 72 | 'category' => $categories[$catid]['name'], |
73 | - 'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '', |
|
73 | + 'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '', |
|
74 | 74 | 'catid' => $catid, |
75 | 75 | )); |
76 | 76 | |
@@ -112,10 +112,10 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | $tpl = array( |
115 | - 'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'), |
|
116 | - 'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'), |
|
117 | - 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'), |
|
118 | - 'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl'), |
|
115 | + 'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'), |
|
116 | + 'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'), |
|
117 | + 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'), |
|
118 | + 'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl'), |
|
119 | 119 | ); |
120 | 120 | |
121 | 121 | // Easily loop through $itemsPerCategory-Array |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
134 | 134 | 'tab' => 'categories_list', |
135 | 135 | 'category' => $categories[$catid], |
136 | - 'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '', |
|
136 | + 'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '', |
|
137 | 137 | 'catid' => $catid, |
138 | 138 | )); |
139 | 139 | |
@@ -206,32 +206,32 @@ discard block |
||
206 | 206 | if ($rowLock && $modx->hasPermission('display_locks')) { |
207 | 207 | if ($rowLock['sid'] == $modx->sid) { |
208 | 208 | $title = $modx->parseText($_lang["lock_element_editing"], array( |
209 | - 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
|
209 | + 'element_type' => $_lang["lock_element_type_".$lockElementType], |
|
210 | 210 | 'lasthit_df' => $rowLock['lasthit_df'] |
211 | 211 | )); |
212 | - $lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span> '; |
|
212 | + $lockedByUser = '<span title="'.$title.'" class="editResource" style="cursor:context-menu;">'.$_style['tree_preview_resource'].'</span> '; |
|
213 | 213 | } else { |
214 | 214 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
215 | - 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
|
215 | + 'element_type' => $_lang["lock_element_type_".$lockElementType], |
|
216 | 216 | 'username' => $rowLock['username'], |
217 | 217 | 'lasthit_df' => $rowLock['lasthit_df'] |
218 | 218 | )); |
219 | 219 | if ($modx->hasPermission('remove_locks')) { |
220 | - $lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>'; |
|
220 | + $lockedByUser = '<a href="javascript:;" onclick="unlockElement('.$lockElementType.', '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource"><i class="'.$_style['icons_secured'].'"></i></a>'; |
|
221 | 221 | } else { |
222 | - $lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>'; |
|
222 | + $lockedByUser = '<span title="'.$title.'" class="lockedResource" style="cursor:context-menu;"><i class="'.$_style['icons_secured'].'"></i></span>'; |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
226 | 226 | if ($lockedByUser) { |
227 | - $lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>'; |
|
227 | + $lockedByUser = '<div class="lockCell">'.$lockedByUser.'</div>'; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | // Caption |
231 | 231 | if ($resourceTable == 'site_tmplvars') { |
232 | - $caption = !empty($row['description']) ? ' ' . $row['caption'] . ' <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption']; |
|
232 | + $caption = !empty($row['description']) ? ' '.$row['caption'].' <small>('.$row['description'].')</small>' : ' '.$row['caption']; |
|
233 | 233 | } else { |
234 | - $caption = !empty($row['description']) ? ' ' . $row['description'] : ''; |
|
234 | + $caption = !empty($row['description']) ? ' '.$row['description'] : ''; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | // Special marks |
@@ -242,26 +242,26 @@ discard block |
||
242 | 242 | if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
243 | 243 | $tplInfo[] = $_lang['defaulttemplate_title']; |
244 | 244 | } |
245 | - $marks = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : ''; |
|
245 | + $marks = !empty($tplInfo) ? ' <em>('.implode(', ', $tplInfo).')</em>' : ''; |
|
246 | 246 | |
247 | 247 | /* row buttons */ |
248 | 248 | $buttons = ''; |
249 | 249 | if ($modx->hasPermission($types['actions']['edit'][1])) { |
250 | - $buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>'; |
|
250 | + $buttons .= '<li><a title="'.$_lang["edit_resource"].'" href="index.php?a='.$types['actions']['edit'][0].'&id='.$row['id'].'"><i class="fa fa-edit fa-fw"></i></a></li>'; |
|
251 | 251 | } |
252 | 252 | if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
253 | - $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>'; |
|
253 | + $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_duplicate_record"].'\')" title="'.$_lang["resource_duplicate"].'" href="index.php?a='.$types['actions']['duplicate'][0].'&id='.$row['id'].'"><i class="fa fa-clone fa-fw"></i></a></li>'; |
|
254 | 254 | } |
255 | 255 | if ($modx->hasPermission($types['actions']['remove'][1])) { |
256 | - $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>'; |
|
256 | + $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_delete"].'\')" title="'.$_lang["delete"].'" href="index.php?a='.$types['actions']['remove'][0].'&id='.$row['id'].'"><i class="fa fa-trash fa-fw"></i></a></li>'; |
|
257 | 257 | } |
258 | - $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : ''; |
|
258 | + $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">'.$buttons.'</ul></div>' : ''; |
|
259 | 259 | |
260 | 260 | $catid = $row['catid'] ? $row['catid'] : 0; |
261 | 261 | |
262 | 262 | // Placeholders for elements-row |
263 | 263 | return array( |
264 | - 'class' => $class ? ' class="' . $class . '"' : '', |
|
264 | + 'class' => $class ? ' class="'.$class.'"' : '', |
|
265 | 265 | 'lockedByUser' => $lockedByUser, |
266 | 266 | 'name' => $row['name'], |
267 | 267 | 'caption' => $caption, |
@@ -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 | |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | * @param array $ph |
17 | 17 | * @return string |
18 | 18 | */ |
19 | -function parsePh($tpl, $ph) |
|
20 | -{ |
|
19 | +function parsePh($tpl, $ph) |
|
20 | +{ |
|
21 | 21 | $modx = evolutionCMS(); |
22 | 22 | global $_lang; |
23 | 23 | $tpl = $modx->parseText($tpl, $_lang, '[%', '%]'); |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | * @param string|int $cssId |
29 | 29 | * @return string |
30 | 30 | */ |
31 | -function renderViewSwitchButtons($cssId) |
|
32 | -{ |
|
31 | +function renderViewSwitchButtons($cssId) |
|
32 | +{ |
|
33 | 33 | $modx = evolutionCMS(); |
34 | 34 | global $_lang, $tpl; |
35 | 35 | |
@@ -43,21 +43,21 @@ discard block |
||
43 | 43 | * @param mgrResources $resources |
44 | 44 | * @return string |
45 | 45 | */ |
46 | -function createResourceList($resourceTable, $resources) |
|
47 | -{ |
|
46 | +function createResourceList($resourceTable, $resources) |
|
47 | +{ |
|
48 | 48 | $modx = evolutionCMS(); |
49 | 49 | global $_lang, $_style, $modx_textdir, $tpl; |
50 | 50 | |
51 | 51 | $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false; |
52 | 52 | |
53 | - if (! is_array($items) || empty($items)) { |
|
53 | + if (! is_array($items) || empty($items)) { |
|
54 | 54 | return $_lang['no_results']; |
55 | 55 | } |
56 | 56 | |
57 | 57 | // Prepare elements- and categories-list |
58 | 58 | $elements = array(); |
59 | 59 | $categories = array(); |
60 | - foreach ($items as $row) { |
|
60 | + foreach ($items as $row) { |
|
61 | 61 | $catid = $row['catid'] ? $row['catid'] : 0; |
62 | 62 | $categories[$catid] = array('name' => stripslashes($row['category'])); |
63 | 63 | $elements[$catid][] = prepareElementRowPh($row, $resourceTable, $resources); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | // Now render categories / panel-collapse |
67 | 67 | $panelGroup = ''; |
68 | - foreach ($elements as $catid => $elList) { |
|
68 | + foreach ($elements as $catid => $elList) { |
|
69 | 69 | // Add panel-heading / category-collapse to output |
70 | 70 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
71 | 71 | 'tab' => $resourceTable, |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | // Prepare content for panel-collapse |
78 | 78 | $panelCollapse = ''; |
79 | - foreach ($elList as $el) { |
|
79 | + foreach ($elList as $el) { |
|
80 | 80 | $panelCollapse .= parsePh($tpl['elementsRow'], $el); |
81 | 81 | } |
82 | 82 | |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | * @param mgrResources $resources |
99 | 99 | * @return string |
100 | 100 | */ |
101 | -function createCombinedView($resources) |
|
102 | -{ |
|
101 | +function createCombinedView($resources) |
|
102 | +{ |
|
103 | 103 | $modx = evolutionCMS(); |
104 | 104 | global $_lang, $_style, $modx_textdir; |
105 | 105 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $types = isset($resources->types) ? $resources->types : false; |
108 | 108 | $categories = isset($resources->categories) ? $resources->categories : false; |
109 | 109 | |
110 | - if (!$itemsPerCategory) { |
|
110 | + if (!$itemsPerCategory) { |
|
111 | 111 | return $_lang['no_results']; |
112 | 112 | } |
113 | 113 | |
@@ -120,10 +120,10 @@ discard block |
||
120 | 120 | |
121 | 121 | // Easily loop through $itemsPerCategory-Array |
122 | 122 | $panelGroup = ''; |
123 | - foreach ($categories as $catid => $category) { |
|
123 | + foreach ($categories as $catid => $category) { |
|
124 | 124 | // Prepare collapse content / elements-list |
125 | 125 | $panelCollapse = ''; |
126 | - foreach ($itemsPerCategory[$catid] as $el) { |
|
126 | + foreach ($itemsPerCategory[$catid] as $el) { |
|
127 | 127 | $resourceTable = $el['type']; |
128 | 128 | $ph = prepareElementRowPh($el, $resourceTable, $resources); |
129 | 129 | $panelCollapse .= parsePh($tpl['elementsRow'], $ph); |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | * @param mgrResources $resources |
158 | 158 | * @return array |
159 | 159 | */ |
160 | -function prepareElementRowPh($row, $resourceTable, $resources) |
|
161 | -{ |
|
160 | +function prepareElementRowPh($row, $resourceTable, $resources) |
|
161 | +{ |
|
162 | 162 | $modx = evolutionCMS(); |
163 | 163 | global $modx_textdir, $_style, $_lang; |
164 | 164 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | $_lang["confirm_delete"] = $_lang["delete"]; |
168 | 168 | |
169 | - switch ($resourceTable) { |
|
169 | + switch ($resourceTable) { |
|
170 | 170 | case 'site_templates': |
171 | 171 | $class = $row['selectable'] ? '' : 'disabledPlugin'; |
172 | 172 | $lockElementType = 1; |
@@ -203,56 +203,56 @@ discard block |
||
203 | 203 | // Prepare displaying user-locks |
204 | 204 | $lockedByUser = ''; |
205 | 205 | $rowLock = $modx->elementIsLocked($lockElementType, $row['id'], true); |
206 | - if ($rowLock && $modx->hasPermission('display_locks')) { |
|
207 | - if ($rowLock['sid'] == $modx->sid) { |
|
206 | + if ($rowLock && $modx->hasPermission('display_locks')) { |
|
207 | + if ($rowLock['sid'] == $modx->sid) { |
|
208 | 208 | $title = $modx->parseText($_lang["lock_element_editing"], array( |
209 | 209 | 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
210 | 210 | 'lasthit_df' => $rowLock['lasthit_df'] |
211 | 211 | )); |
212 | 212 | $lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span> '; |
213 | - } else { |
|
213 | + } else { |
|
214 | 214 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
215 | 215 | 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
216 | 216 | 'username' => $rowLock['username'], |
217 | 217 | 'lasthit_df' => $rowLock['lasthit_df'] |
218 | 218 | )); |
219 | - if ($modx->hasPermission('remove_locks')) { |
|
219 | + if ($modx->hasPermission('remove_locks')) { |
|
220 | 220 | $lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>'; |
221 | - } else { |
|
221 | + } else { |
|
222 | 222 | $lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>'; |
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
226 | - if ($lockedByUser) { |
|
226 | + if ($lockedByUser) { |
|
227 | 227 | $lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>'; |
228 | 228 | } |
229 | 229 | |
230 | 230 | // Caption |
231 | - if ($resourceTable == 'site_tmplvars') { |
|
231 | + if ($resourceTable == 'site_tmplvars') { |
|
232 | 232 | $caption = !empty($row['description']) ? ' ' . $row['caption'] . ' <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption']; |
233 | - } else { |
|
233 | + } else { |
|
234 | 234 | $caption = !empty($row['description']) ? ' ' . $row['description'] : ''; |
235 | 235 | } |
236 | 236 | |
237 | 237 | // Special marks |
238 | 238 | $tplInfo = array(); |
239 | - if ($row['locked']) { |
|
239 | + if ($row['locked']) { |
|
240 | 240 | $tplInfo[] = $_lang['locked']; |
241 | 241 | } |
242 | - if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
|
242 | + if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
|
243 | 243 | $tplInfo[] = $_lang['defaulttemplate_title']; |
244 | 244 | } |
245 | 245 | $marks = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : ''; |
246 | 246 | |
247 | 247 | /* row buttons */ |
248 | 248 | $buttons = ''; |
249 | - if ($modx->hasPermission($types['actions']['edit'][1])) { |
|
249 | + if ($modx->hasPermission($types['actions']['edit'][1])) { |
|
250 | 250 | $buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>'; |
251 | 251 | } |
252 | - if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
|
252 | + if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
|
253 | 253 | $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>'; |
254 | 254 | } |
255 | - if ($modx->hasPermission($types['actions']['remove'][1])) { |
|
255 | + if ($modx->hasPermission($types['actions']['remove'][1])) { |
|
256 | 256 | $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>'; |
257 | 257 | } |
258 | 258 | $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : ''; |
@@ -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('edit_web_user')) { |
@@ -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,10 +130,10 @@ 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>"; |
|
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 | 137 | if ($listmode == '1') { |
138 | 138 | $grd->pageSize = 0; |
139 | 139 | } |
@@ -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 | |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | if ($_SESSION['mgrDocgroups']) { |
26 | 26 | $docgrp = implode(",", $_SESSION['mgrDocgroups']); |
27 | 27 | } |
28 | -$access = "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0" . (!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
|
28 | +$access = "1='".$_SESSION['mgrRole']."' OR sc.privatemgr=0".(!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
|
29 | 29 | |
30 | 30 | // |
31 | 31 | if ($_SESSION['tree_show_only_folders']) { |
32 | - $parent = $id ? ($modx->db->getValue("SELECT parent FROM " . $tbl_site_content . " WHERE id=$id LIMIT 1")) : 0; |
|
33 | - $isfolder = $modx->db->getValue("SELECT isfolder FROM " . $tbl_site_content . " WHERE id=$id LIMIT 1"); |
|
32 | + $parent = $id ? ($modx->db->getValue("SELECT parent FROM ".$tbl_site_content." WHERE id=$id LIMIT 1")) : 0; |
|
33 | + $isfolder = $modx->db->getValue("SELECT isfolder FROM ".$tbl_site_content." WHERE id=$id LIMIT 1"); |
|
34 | 34 | if (!$isfolder && $parent != 0) { |
35 | 35 | $id = $_REQUEST['id'] = $parent; |
36 | 36 | } |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | $filter_sort = ''; |
86 | 86 | $filter_dir = ''; |
87 | 87 | if ($numRecords > 0) { |
88 | - $filter_sort = '<select size="1" name="sort" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id=' . $id . '&dir=' . $dir . '&sort=\'+this.options[this.selectedIndex].value">' . '<option value="createdon"' . (($sort == 'createdon') ? ' selected' : '') . '>' . $_lang['createdon'] . '</option>' . '<option value="pub_date"' . (($sort == 'pub_date') ? ' selected' : '') . '>' . $_lang["page_data_publishdate"] . '</option>' . '<option value="pagetitle"' . (($sort == 'pagetitle') ? ' selected' : '') . '>' . $_lang['pagetitle'] . '</option>' . '<option value="menuindex"' . (($sort == 'menuindex') ? ' selected' : '') . '>' . $_lang['resource_opt_menu_index'] . '</option>' . //******** resource_opt_is_published - // |
|
89 | - '<option value="published"' . (($sort == 'published') ? ' selected' : '') . '>' . $_lang['resource_opt_is_published'] . '</option>' . //********// |
|
88 | + $filter_sort = '<select size="1" name="sort" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id='.$id.'&dir='.$dir.'&sort=\'+this.options[this.selectedIndex].value">'.'<option value="createdon"'.(($sort == 'createdon') ? ' selected' : '').'>'.$_lang['createdon'].'</option>'.'<option value="pub_date"'.(($sort == 'pub_date') ? ' selected' : '').'>'.$_lang["page_data_publishdate"].'</option>'.'<option value="pagetitle"'.(($sort == 'pagetitle') ? ' selected' : '').'>'.$_lang['pagetitle'].'</option>'.'<option value="menuindex"'.(($sort == 'menuindex') ? ' selected' : '').'>'.$_lang['resource_opt_menu_index'].'</option>'.//******** resource_opt_is_published - // |
|
89 | + '<option value="published"'.(($sort == 'published') ? ' selected' : '').'>'.$_lang['resource_opt_is_published'].'</option>'.//********// |
|
90 | 90 | '</select>'; |
91 | - $filter_dir = '<select size="1" name="dir" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id=' . $id . '&sort=' . $sort . '&dir=\'+this.options[this.selectedIndex].value">' . '<option value="DESC"' . (($dir == 'DESC') ? ' selected' : '') . '>' . $_lang['sort_desc'] . '</option>' . '<option value="ASC"' . (($dir == 'ASC') ? ' selected' : '') . '>' . $_lang['sort_asc'] . '</option>' . '</select>'; |
|
91 | + $filter_dir = '<select size="1" name="dir" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id='.$id.'&sort='.$sort.'&dir=\'+this.options[this.selectedIndex].value">'.'<option value="DESC"'.(($dir == 'DESC') ? ' selected' : '').'>'.$_lang['sort_desc'].'</option>'.'<option value="ASC"'.(($dir == 'ASC') ? ' selected' : '').'>'.$_lang['sort_asc'].'</option>'.'</select>'; |
|
92 | 92 | $resource = $modx->db->makeArray($rs); |
93 | 93 | |
94 | 94 | // CSS style for table |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | ); |
133 | 133 | $modx->table->setColumnWidths($tbWidth); |
134 | 134 | |
135 | - $sd = isset($_REQUEST['dir']) ? '&dir=' . $_REQUEST['dir'] : '&dir=DESC'; |
|
136 | - $sb = isset($_REQUEST['sort']) ? '&sort=' . $_REQUEST['sort'] : '&sort=createdon'; |
|
137 | - $pg = isset($_REQUEST['page']) ? '&page=' . (int) $_REQUEST['page'] : ''; |
|
138 | - $add_path = $sd . $sb . $pg; |
|
135 | + $sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC'; |
|
136 | + $sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon'; |
|
137 | + $pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : ''; |
|
138 | + $add_path = $sd.$sb.$pg; |
|
139 | 139 | |
140 | 140 | $icons = array( |
141 | 141 | 'text/html' => $_style['tree_page_html'], |
@@ -187,31 +187,31 @@ discard block |
||
187 | 187 | //$class .= ($children['hidemenu'] ? ' text-muted' : ' text-primary'); |
188 | 188 | //$class .= ($children['isfolder'] ? ' font-weight-bold' : ''); |
189 | 189 | if ($modx->hasPermission('edit_document')) { |
190 | - $title = '<span class="doc-item' . $private . '">' . $icon . '<a href="index.php?a=27&id=' . $children['id'] . $add_path . '">' . '<span class="' . $class . '">' . $children['pagetitle'] . '</span></a></span>'; |
|
190 | + $title = '<span class="doc-item'.$private.'">'.$icon.'<a href="index.php?a=27&id='.$children['id'].$add_path.'">'.'<span class="'.$class.'">'.$children['pagetitle'].'</span></a></span>'; |
|
191 | 191 | } else { |
192 | - $title = '<span class="doc-item' . $private . '">' . $icon . '<span class="' . $class . '">' . $children['pagetitle'] . '</span></span>'; |
|
192 | + $title = '<span class="doc-item'.$private.'">'.$icon.'<span class="'.$class.'">'.$children['pagetitle'].'</span></span>'; |
|
193 | 193 | } |
194 | 194 | |
195 | - $icon_pub_unpub = (!$children['published']) ? '<a href="index.php?a=61&id=' . $children['id'] . $add_path . '" title="' . $_lang["publish_resource"] . '"><i class="' . $_style["icons_publish_document"] . '"></i></a>' : '<a href="index.php?a=62&id=' . $children['id'] . $add_path . '" title="' . $_lang["unpublish_resource"] . '"><i class="' . $_style["icons_unpublish_resource"] . '" ></i></a>'; |
|
195 | + $icon_pub_unpub = (!$children['published']) ? '<a href="index.php?a=61&id='.$children['id'].$add_path.'" title="'.$_lang["publish_resource"].'"><i class="'.$_style["icons_publish_document"].'"></i></a>' : '<a href="index.php?a=62&id='.$children['id'].$add_path.'" title="'.$_lang["unpublish_resource"].'"><i class="'.$_style["icons_unpublish_resource"].'" ></i></a>'; |
|
196 | 196 | |
197 | - $icon_del_undel = (!$children['deleted']) ? '<a onclick="return confirm(\'' . $_lang["confirm_delete_resource"] . '\')" href="index.php?a=6&id=' . $children['id'] . $add_path . '" title="' . $_lang['delete_resource'] . '"><i class="' . $_style["icons_delete_resource"] . '"></i></a>' : '<a onclick="return confirm(\'' . $_lang["confirm_undelete"] . '\')" href="index.php?a=63&id=' . $children['id'] . $add_path . '" title="' . $_lang['undelete_resource'] . '"><i class="' . $_style["icons_undelete_resource"] . '"></i></a>'; |
|
197 | + $icon_del_undel = (!$children['deleted']) ? '<a onclick="return confirm(\''.$_lang["confirm_delete_resource"].'\')" href="index.php?a=6&id='.$children['id'].$add_path.'" title="'.$_lang['delete_resource'].'"><i class="'.$_style["icons_delete_resource"].'"></i></a>' : '<a onclick="return confirm(\''.$_lang["confirm_undelete"].'\')" href="index.php?a=63&id='.$children['id'].$add_path.'" title="'.$_lang['undelete_resource'].'"><i class="'.$_style["icons_undelete_resource"].'"></i></a>'; |
|
198 | 198 | |
199 | 199 | $listDocs[] = array( |
200 | - 'docid' => '<div class="text-right">' . $children['id'] . '</div>', |
|
200 | + 'docid' => '<div class="text-right">'.$children['id'].'</div>', |
|
201 | 201 | 'title' => $title, |
202 | - 'createdon' => '<div class="text-right">' . ($modx->toDateFormat($children['createdon'] + $server_offset_time, 'dateOnly')) . '</div>', |
|
203 | - 'pub_date' => '<div class="text-right">' . ($children['pub_date'] ? ($modx->toDateFormat($children['pub_date'] + $server_offset_time, 'dateOnly')) : '') . '</div>', |
|
204 | - 'status' => '<div class="text-nowrap">' . ($children['published'] == 0 ? '<span class="unpublishedDoc">' . $_lang['page_data_unpublished'] . '</span>' : '<span class="publishedDoc">' . $_lang['page_data_published'] . '</span>') . '</div>', |
|
205 | - 'edit' => '<div class="actions text-center text-nowrap">' . ($modx->hasPermission('edit_document') ? '<a href="index.php?a=27&id=' . $children['id'] . $add_path . '" title="' . $_lang['edit'] . '"><i class="' . $_style["icons_edit_resource"] . '"></i></a><a href="index.php?a=51&id=' . $children['id'] . $add_path . '" title="' . $_lang['move'] . '"><i |
|
206 | - class="' . $_style["icons_move_document"] . '"></i></a>' . $icon_pub_unpub : '') . ($modx->hasPermission('delete_document') ? $icon_del_undel : '') . '</div>' |
|
202 | + 'createdon' => '<div class="text-right">'.($modx->toDateFormat($children['createdon'] + $server_offset_time, 'dateOnly')).'</div>', |
|
203 | + 'pub_date' => '<div class="text-right">'.($children['pub_date'] ? ($modx->toDateFormat($children['pub_date'] + $server_offset_time, 'dateOnly')) : '').'</div>', |
|
204 | + 'status' => '<div class="text-nowrap">'.($children['published'] == 0 ? '<span class="unpublishedDoc">'.$_lang['page_data_unpublished'].'</span>' : '<span class="publishedDoc">'.$_lang['page_data_published'].'</span>').'</div>', |
|
205 | + 'edit' => '<div class="actions text-center text-nowrap">'.($modx->hasPermission('edit_document') ? '<a href="index.php?a=27&id='.$children['id'].$add_path.'" title="'.$_lang['edit'].'"><i class="'.$_style["icons_edit_resource"].'"></i></a><a href="index.php?a=51&id='.$children['id'].$add_path.'" title="'.$_lang['move'].'"><i |
|
206 | + class="' . $_style["icons_move_document"].'"></i></a>'.$icon_pub_unpub : '').($modx->hasPermission('delete_document') ? $icon_del_undel : '').'</div>' |
|
207 | 207 | ); |
208 | 208 | } |
209 | 209 | |
210 | - $modx->table->createPagingNavigation($numRecords, 'a=3&id=' . $content['id'] . '&dir=' . $dir . '&sort=' . $sort); |
|
211 | - $children_output = $modx->table->create($listDocs, $listTableHeader, 'index.php?a=3&id=' . $content['id']); |
|
210 | + $modx->table->createPagingNavigation($numRecords, 'a=3&id='.$content['id'].'&dir='.$dir.'&sort='.$sort); |
|
211 | + $children_output = $modx->table->create($listDocs, $listTableHeader, 'index.php?a=3&id='.$content['id']); |
|
212 | 212 | } else { |
213 | 213 | // No Child documents |
214 | - $children_output = '<div class="container"><p>' . $_lang['resources_in_container_no'] . '</p></div>'; |
|
214 | + $children_output = '<div class="container"><p>'.$_lang['resources_in_container_no'].'</p></div>'; |
|
215 | 215 | } |
216 | 216 | ?> |
217 | 217 | <script type="text/javascript"> |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | }, |
238 | 238 | cancel: function() { |
239 | 239 | documentDirty = false; |
240 | - document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id=' . $id . $add_path) ?>'; |
|
240 | + document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id='.$id.$add_path) ?>'; |
|
241 | 241 | }, |
242 | 242 | move: function() { |
243 | 243 | document.location.href = "index.php?id=<?= $_REQUEST['id'] ?>&a=51"; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } |
249 | 249 | }, |
250 | 250 | view: function() { |
251 | - window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'] . 'index.php?id=' . $id ?>', 'previeWin'); |
|
251 | + window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'].'index.php?id='.$id ?>', 'previeWin'); |
|
252 | 252 | } |
253 | 253 | }; |
254 | 254 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | <script type="text/javascript" src="media/script/tablesort.js"></script> |
257 | 257 | |
258 | 258 | <h1> |
259 | - <i class="fa fa-info"></i><?= iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']) . (iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '') . ' <small>(' . $_REQUEST['id'] . ')</small>' ?> |
|
259 | + <i class="fa fa-info"></i><?= iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']).(iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '').' <small>('.$_REQUEST['id'].')</small>' ?> |
|
260 | 260 | </h1> |
261 | 261 | |
262 | 262 | <?= $_style['actionbuttons']['static']['document'] ?> |
@@ -283,16 +283,16 @@ discard block |
||
283 | 283 | <tr> |
284 | 284 | <td width="200" valign="top"><?= $_lang['long_title'] ?>:</td> |
285 | 285 | <td> |
286 | - <small><?= $content['longtitle'] != '' ? $content['longtitle'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></small> |
|
286 | + <small><?= $content['longtitle'] != '' ? $content['longtitle'] : "(<i>".$_lang['not_set']."</i>)" ?></small> |
|
287 | 287 | </td> |
288 | 288 | </tr> |
289 | 289 | <tr> |
290 | 290 | <td valign="top"><?= $_lang['resource_description'] ?>:</td> |
291 | - <td><?= $content['description'] != '' ? $content['description'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
291 | + <td><?= $content['description'] != '' ? $content['description'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
292 | 292 | </tr> |
293 | 293 | <tr> |
294 | 294 | <td valign="top"><?= $_lang['resource_summary'] ?>:</td> |
295 | - <td><?= $content['introtext'] != '' ? $content['introtext'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
295 | + <td><?= $content['introtext'] != '' ? $content['introtext'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
296 | 296 | </tr> |
297 | 297 | <tr> |
298 | 298 | <td valign="top"><?= $_lang['type'] ?>:</td> |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | </tr> |
301 | 301 | <tr> |
302 | 302 | <td valign="top"><?= $_lang['resource_alias'] ?>:</td> |
303 | - <td><?= $content['alias'] != '' ? $content['alias'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
303 | + <td><?= $content['alias'] != '' ? $content['alias'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
304 | 304 | </tr> |
305 | 305 | <tr> |
306 | 306 | <td colspan="2"> </td> |
@@ -330,15 +330,15 @@ discard block |
||
330 | 330 | </tr> |
331 | 331 | <tr> |
332 | 332 | <td><?= $_lang['page_data_status'] ?>:</td> |
333 | - <td><?= $content['published'] == 0 ? '<span class="unpublishedDoc">' . $_lang['page_data_unpublished'] . '</span>' : '<span class="publisheddoc">' . $_lang['page_data_published'] . '</span>' ?></td> |
|
333 | + <td><?= $content['published'] == 0 ? '<span class="unpublishedDoc">'.$_lang['page_data_unpublished'].'</span>' : '<span class="publisheddoc">'.$_lang['page_data_published'].'</span>' ?></td> |
|
334 | 334 | </tr> |
335 | 335 | <tr> |
336 | 336 | <td><?= $_lang['page_data_publishdate'] ?>:</td> |
337 | - <td><?= $content['pub_date'] == 0 ? "(<i>" . $_lang['not_set'] . "</i>)" : $modx->toDateFormat($content['pub_date']) ?></td> |
|
337 | + <td><?= $content['pub_date'] == 0 ? "(<i>".$_lang['not_set']."</i>)" : $modx->toDateFormat($content['pub_date']) ?></td> |
|
338 | 338 | </tr> |
339 | 339 | <tr> |
340 | 340 | <td><?= $_lang['page_data_unpublishdate'] ?>:</td> |
341 | - <td><?= $content['unpub_date'] == 0 ? "(<i>" . $_lang['not_set'] . "</i>)" : $modx->toDateFormat($content['unpub_date']) ?></td> |
|
341 | + <td><?= $content['unpub_date'] == 0 ? "(<i>".$_lang['not_set']."</i>)" : $modx->toDateFormat($content['unpub_date']) ?></td> |
|
342 | 342 | </tr> |
343 | 343 | <tr> |
344 | 344 | <td><?= $_lang['page_data_cacheable'] ?>:</td> |
@@ -358,11 +358,11 @@ discard block |
||
358 | 358 | </tr> |
359 | 359 | <tr> |
360 | 360 | <td><?= $_lang['page_data_web_access'] ?>:</td> |
361 | - <td><?= $content['privateweb'] == 0 ? $_lang['public'] : '<b style="color: #821517">' . $_lang['private'] . '</b> ' . $_style["icons_secured"] ?></td> |
|
361 | + <td><?= $content['privateweb'] == 0 ? $_lang['public'] : '<b style="color: #821517">'.$_lang['private'].'</b> '.$_style["icons_secured"] ?></td> |
|
362 | 362 | </tr> |
363 | 363 | <tr> |
364 | 364 | <td><?= $_lang['page_data_mgr_access'] ?>:</td> |
365 | - <td><?= $content['privatemgr'] == 0 ? $_lang['public'] : '<b style="color: #821517">' . $_lang['private'] . '</b> ' . $_style["icons_secured"] ?></td> |
|
365 | + <td><?= $content['privatemgr'] == 0 ? $_lang['public'] : '<b style="color: #821517">'.$_lang['private'].'</b> '.$_style["icons_secured"] ?></td> |
|
366 | 366 | </tr> |
367 | 367 | <tr> |
368 | 368 | <td colspan="2"> </td> |
@@ -394,11 +394,11 @@ discard block |
||
394 | 394 | <div class="form-group clearfix"> |
395 | 395 | <?php if ($numRecords > 0) : ?> |
396 | 396 | <div class="float-xs-left"> |
397 | - <span class="publishedDoc"><?= $numRecords . ' ' . $_lang['resources_in_container'] ?> (<strong><?= $content['pagetitle'] ?></strong>)</span> |
|
397 | + <span class="publishedDoc"><?= $numRecords.' '.$_lang['resources_in_container'] ?> (<strong><?= $content['pagetitle'] ?></strong>)</span> |
|
398 | 398 | </div> |
399 | 399 | <?php endif; ?> |
400 | 400 | <div class="float-xs-right"> |
401 | - <?= $filter_sort . ' ' . $filter_dir ?> |
|
401 | + <?= $filter_sort.' '.$filter_dir ?> |
|
402 | 402 | </div> |
403 | 403 | |
404 | 404 | </div> |
@@ -416,16 +416,16 @@ discard block |
||
416 | 416 | <script type="text/javascript">docSettings.addTabPage(document.getElementById("tabSource"));</script> |
417 | 417 | <?php |
418 | 418 | $buffer = ""; |
419 | - $filename = $modx->config['base_path'] . "assets/cache/docid_" . $id . ".pageCache.php"; |
|
419 | + $filename = $modx->config['base_path']."assets/cache/docid_".$id.".pageCache.php"; |
|
420 | 420 | $handle = @fopen($filename, "r"); |
421 | 421 | if (!$handle) { |
422 | - $buffer = '<div class="container container-body">' . $_lang['page_data_notcached'] . '</div>'; |
|
422 | + $buffer = '<div class="container container-body">'.$_lang['page_data_notcached'].'</div>'; |
|
423 | 423 | } else { |
424 | 424 | while (!feof($handle)) { |
425 | 425 | $buffer .= fgets($handle, 4096); |
426 | 426 | } |
427 | 427 | fclose($handle); |
428 | - $buffer = '<div class="navbar navbar-editor">' . $_lang['page_data_cached'] . '</div><div class="section-editor clearfix"><textarea rows="20" wrap="soft">' . $modx->htmlspecialchars($buffer) . "</textarea></div>\n"; |
|
428 | + $buffer = '<div class="navbar navbar-editor">'.$_lang['page_data_cached'].'</div><div class="section-editor clearfix"><textarea rows="20" wrap="soft">'.$modx->htmlspecialchars($buffer)."</textarea></div>\n"; |
|
429 | 429 | } |
430 | 430 | echo $buffer; ?> |
431 | 431 | </div><!-- end tab-page --> |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | |
437 | 437 | <?php |
438 | 438 | if (isset($_GET['tab']) && is_numeric($_GET['tab'])) { |
439 | - echo '<script type="text/javascript"> docSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
439 | + echo '<script type="text/javascript"> docSettings.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
440 | 440 | } |
441 | 441 | ?> |
442 | 442 |
@@ -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('access_permissions')) { |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | if ($modx->db->getRecordCount($rs) < 1) { |
21 | 21 | $docgroupselector = '[no groups to add]'; |
22 | 22 | } else { |
23 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
23 | + $docgroupselector = '<select name="docgroup">'."\n"; |
|
24 | 24 | while ($row = $modx->db->getRow($rs)) { |
25 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
25 | + $docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
26 | 26 | } |
27 | 27 | $docgroupselector .= "</select>\n"; |
28 | 28 | } |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | if ($modx->db->getRecordCount($rs) < 1) { |
32 | 32 | $usrgroupselector = '[no user groups]'; |
33 | 33 | } else { |
34 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
34 | + $usrgroupselector = '<select name="usergroup">'."\n"; |
|
35 | 35 | while ($row = $modx->db->getRow($rs)) { |
36 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
36 | + $usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
37 | 37 | } |
38 | 38 | $usrgroupselector .= "</select>\n"; |
39 | 39 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | <div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div> |
70 | 70 | </div> |
71 | 71 | |
72 | -<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div> |
|
72 | +<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div> |
|
73 | 73 | |
74 | 74 | <div class="tab-pane" id="uapPane"> |
75 | 75 | <script type="text/javascript"> |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | </form> |
97 | 97 | </div> |
98 | 98 | <?php |
99 | - $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames |
|
100 | - LEFT JOIN ' . $tbl_member_groups . ' AS groups ON groups.user_group = groupnames.id |
|
101 | - LEFT JOIN ' . $tbl_manager_users . ' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
99 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names.' AS groupnames |
|
100 | + LEFT JOIN ' . $tbl_member_groups.' AS groups ON groups.user_group = groupnames.id |
|
101 | + LEFT JOIN ' . $tbl_manager_users.' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
102 | 102 | if ($modx->db->getRecordCount($rs) < 1) { |
103 | 103 | ?> |
104 | 104 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | </form> |
166 | 166 | </div> |
167 | 167 | <?php |
168 | - $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames |
|
169 | - LEFT JOIN ' . $tbl_document_groups . ' AS dg ON dg.document_group = dgnames.id |
|
170 | - LEFT JOIN ' . $tbl_site_content . ' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
168 | + $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names.' AS dgnames |
|
169 | + LEFT JOIN ' . $tbl_document_groups.' AS dg ON dg.document_group = dgnames.id |
|
170 | + LEFT JOIN ' . $tbl_site_content.' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
171 | 171 | if ($modx->db->getRecordCount($rs) < 1) { |
172 | 172 | ?> |
173 | 173 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -222,9 +222,9 @@ discard block |
||
222 | 222 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
223 | 223 | <?php |
224 | 224 | // User/Document Group Links |
225 | - $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames |
|
226 | - LEFT JOIN ' . $tbl_membergroup_access . ' AS groupacc ON groupacc.membergroup = groupnames.id |
|
227 | - LEFT JOIN ' . $tbl_documentgroup_names . ' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
225 | + $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names.' AS groupnames |
|
226 | + LEFT JOIN ' . $tbl_membergroup_access.' AS groupacc ON groupacc.membergroup = groupnames.id |
|
227 | + LEFT JOIN ' . $tbl_documentgroup_names.' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
228 | 228 | if ($modx->db->getRecordCount($rs) < 1) { |
229 | 229 | ?> |
230 | 230 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | <li><b><?= $row['name'] ?></b></li> |
256 | 256 | <?php |
257 | 257 | if (!$row['dg_id']) { |
258 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
258 | + echo '<i>'.$_lang['no_groups_found'].'</i></li>'; |
|
259 | 259 | $pid = ''; |
260 | 260 | continue; |
261 | 261 | } else { |
@@ -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 | |
@@ -15,16 +15,16 @@ discard block |
||
15 | 15 | 'native_language' => 'de', |
16 | 16 | 'name' => 'Categories Manager', |
17 | 17 | 'dirname' => $site_manager_url, |
18 | - 'url' => 'index.php?a=120&id=' . $_GET['id'], |
|
19 | - 'path' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR, |
|
20 | - 'inc_dir' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR, |
|
21 | - 'languages_dir' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR, |
|
22 | - 'views_dir' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR, |
|
18 | + 'url' => 'index.php?a=120&id='.$_GET['id'], |
|
19 | + 'path' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR, |
|
20 | + 'inc_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR, |
|
21 | + 'languages_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR, |
|
22 | + 'views_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR, |
|
23 | 23 | 'request_key' => 'module_categories_manager', |
24 | 24 | 'messages' => array() |
25 | 25 | ); |
26 | 26 | |
27 | -require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php'; |
|
27 | +require_once $_module_params['inc_dir'].'Module_Categories_Manager.php'; |
|
28 | 28 | $cm = new Module_Categories_Manager(); |
29 | 29 | |
30 | 30 | // assign module_params to internal params |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | // catch the request actions |
36 | -include_once $cm->get('inc_dir') . 'request_trigger.inc.php'; |
|
36 | +include_once $cm->get('inc_dir').'request_trigger.inc.php'; |
|
37 | 37 | |
38 | 38 | if (!$categories = $cm->getCategories()) { |
39 | 39 | setcookie('webfxtab_manage-categories-pane', 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 | if (!$modx->hasPermission('web_access_permissions')) { |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | if ($modx->db->getRecordCount($rs) < 1) { |
12 | 12 | $docgroupselector = "[no groups to add]"; |
13 | 13 | } else { |
14 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
14 | + $docgroupselector = '<select name="docgroup">'."\n"; |
|
15 | 15 | while ($row = $modx->db->getRow($rs)) { |
16 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
16 | + $docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
17 | 17 | } |
18 | 18 | $docgroupselector .= "</select>\n"; |
19 | 19 | } |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | if ($modx->db->getRecordCount($rs) < 1) { |
23 | 23 | $usrgroupselector = '[no user groups]'; |
24 | 24 | } else { |
25 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
25 | + $usrgroupselector = '<select name="usergroup">'."\n"; |
|
26 | 26 | while ($row = $modx->db->getRow($rs)) { |
27 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
27 | + $usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
28 | 28 | } |
29 | 29 | $usrgroupselector .= "</select>\n"; |
30 | 30 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div> |
61 | 61 | </div> |
62 | 62 | |
63 | -<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div> |
|
63 | +<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div> |
|
64 | 64 | |
65 | 65 | |
66 | 66 | <div class="tab-pane" id="wuapPane"> |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | </form> |
89 | 89 | </div> |
90 | 90 | <?php |
91 | - $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name ', $modx->getFullTableName('webgroup_names') . " AS groupnames |
|
92 | - LEFT JOIN " . $modx->getFullTableName('web_groups') . " AS groups ON groups.webgroup = groupnames.id |
|
93 | - LEFT JOIN " . $modx->getFullTableName('web_users') . " AS users ON users.id = groups.webuser", '', 'groupnames.name, user_name'); |
|
91 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name ', $modx->getFullTableName('webgroup_names')." AS groupnames |
|
92 | + LEFT JOIN " . $modx->getFullTableName('web_groups')." AS groups ON groups.webgroup = groupnames.id |
|
93 | + LEFT JOIN " . $modx->getFullTableName('web_users')." AS users ON users.id = groups.webuser", '', 'groupnames.name, user_name'); |
|
94 | 94 | if ($modx->db->getRecordCount($rs) < 1) { |
95 | 95 | ?> |
96 | 96 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | </form> |
158 | 158 | </div> |
159 | 159 | <?php |
160 | - $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $modx->getFullTableName('documentgroup_names') . " AS dgnames |
|
161 | - LEFT JOIN " . $modx->getFullTableName('document_groups') . " AS dg ON dg.document_group = dgnames.id |
|
162 | - LEFT JOIN " . $modx->getFullTableName('site_content') . " AS sc ON sc.id = dg.document", '', 'dgnames.name, sc.id'); |
|
160 | + $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $modx->getFullTableName('documentgroup_names')." AS dgnames |
|
161 | + LEFT JOIN " . $modx->getFullTableName('document_groups')." AS dg ON dg.document_group = dgnames.id |
|
162 | + LEFT JOIN " . $modx->getFullTableName('site_content')." AS sc ON sc.id = dg.document", '', 'dgnames.name, sc.id'); |
|
163 | 163 | if ($modx->db->getRecordCount($rs) < 1) { |
164 | 164 | ?> |
165 | 165 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -213,9 +213,9 @@ discard block |
||
213 | 213 | <div class="container container-body"> |
214 | 214 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
215 | 215 | <?php |
216 | - $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $modx->getFullTableName('webgroup_names') . " AS groupnames |
|
217 | - LEFT JOIN " . $modx->getFullTableName('webgroup_access') . " AS groupacc ON groupacc.webgroup = groupnames.id |
|
218 | - LEFT JOIN " . $modx->getFullTableName('documentgroup_names') . " AS dgnames ON dgnames.id = groupacc.documentgroup", '', 'name, dg_name'); |
|
216 | + $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $modx->getFullTableName('webgroup_names')." AS groupnames |
|
217 | + LEFT JOIN " . $modx->getFullTableName('webgroup_access')." AS groupacc ON groupacc.webgroup = groupnames.id |
|
218 | + LEFT JOIN " . $modx->getFullTableName('documentgroup_names')." AS dgnames ON dgnames.id = groupacc.documentgroup", '', 'name, dg_name'); |
|
219 | 219 | if ($modx->db->getRecordCount($rs) < 1) { |
220 | 220 | ?> |
221 | 221 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | <li><b><?= $row['name'] ?></b></li> |
247 | 247 | <?php |
248 | 248 | if (!$row['dg_id']) { |
249 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
249 | + echo '<i>'.$_lang['no_groups_found'].'</i></li>'; |
|
250 | 250 | $pid = ''; |
251 | 251 | continue; |
252 | 252 | } else { |
@@ -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_plugin')) { |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $updateMsg = ''; |
12 | 12 | |
13 | 13 | if (isset($_POST['listSubmitted'])) { |
14 | - $updateMsg .= '<span class="text-success" id="updated">' . $_lang['sort_updated'] . '</span>'; |
|
14 | + $updateMsg .= '<span class="text-success" id="updated">'.$_lang['sort_updated'].'</span>'; |
|
15 | 15 | $tbl = $modx->getFullTableName('site_plugin_events'); |
16 | 16 | |
17 | 17 | foreach ($_POST as $listName => $listValue) { |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | $modx->clearCache('full'); |
35 | 35 | } |
36 | 36 | |
37 | -$rs = $modx->db->select("sysevt.name as evtname, sysevt.id as evtid, pe.pluginid, plugs.name, pe.priority, plugs.disabled", $modx->getFullTableName('system_eventnames') . " sysevt |
|
38 | - INNER JOIN " . $modx->getFullTableName('site_plugin_events') . " pe ON pe.evtid = sysevt.id |
|
39 | - INNER JOIN " . $modx->getFullTableName('site_plugins') . " plugs ON plugs.id = pe.pluginid", '', 'sysevt.name,pe.priority'); |
|
37 | +$rs = $modx->db->select("sysevt.name as evtname, sysevt.id as evtid, pe.pluginid, plugs.name, pe.priority, plugs.disabled", $modx->getFullTableName('system_eventnames')." sysevt |
|
38 | + INNER JOIN " . $modx->getFullTableName('site_plugin_events')." pe ON pe.evtid = sysevt.id |
|
39 | + INNER JOIN " . $modx->getFullTableName('site_plugins')." plugs ON plugs.id = pe.pluginid", '', 'sysevt.name,pe.priority'); |
|
40 | 40 | |
41 | 41 | $insideUl = 0; |
42 | 42 | $preEvt = ''; |
@@ -47,17 +47,17 @@ discard block |
||
47 | 47 | if ($preEvt !== $plugins['evtid']) { |
48 | 48 | $sortables[] = $plugins['evtid']; |
49 | 49 | $sortableList .= $insideUl ? '</ul></div>' : ''; |
50 | - $sortableList .= '<div class="form-group clearfix"><strong>' . $plugins['evtname'] . '</strong><ul id="' . $plugins['evtid'] . '" class="sortableList">'; |
|
50 | + $sortableList .= '<div class="form-group clearfix"><strong>'.$plugins['evtname'].'</strong><ul id="'.$plugins['evtid'].'" class="sortableList">'; |
|
51 | 51 | $insideUl = 1; |
52 | 52 | } |
53 | - $sortableList .= '<li id="item_' . $plugins['pluginid'] . '"' . ($plugins['disabled'] ? ' class="disabledPlugin"' : '') . '><i class="fa fa-plug"></i> ' . $plugins['name'] . ($plugins['disabled'] ? ' (hide)' : '') . '</li>'; |
|
53 | + $sortableList .= '<li id="item_'.$plugins['pluginid'].'"'.($plugins['disabled'] ? ' class="disabledPlugin"' : '').'><i class="fa fa-plug"></i> '.$plugins['name'].($plugins['disabled'] ? ' (hide)' : '').'</li>'; |
|
54 | 54 | $preEvt = $plugins['evtid']; |
55 | 55 | } |
56 | 56 | if ($insideUl) { |
57 | 57 | $sortableList .= '</ul></div>'; |
58 | 58 | } |
59 | 59 | |
60 | -require_once(MODX_MANAGER_PATH . 'includes/header.inc.php'); |
|
60 | +require_once(MODX_MANAGER_PATH.'includes/header.inc.php'); |
|
61 | 61 | ?> |
62 | 62 | |
63 | 63 | <script type="text/javascript"> |
@@ -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('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
@@ -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["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0)); |
31 | 31 | if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
@@ -108,24 +108,24 @@ discard block |
||
108 | 108 | <div class="table-responsive"> |
109 | 109 | <?php |
110 | 110 | if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
111 | - $rs = $modx->db->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon |
|
112 | - FROM ' . $modx->getFullTableName('site_modules') . ' AS sm |
|
113 | - LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id |
|
114 | - LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group |
|
115 | - WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
|
111 | + $rs = $modx->db->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"'.$_lang['yes'].'","-") as disabled, IF(sm.icon<>"",sm.icon,"'.$_style['icons_modules'].'") as icon |
|
112 | + FROM ' . $modx->getFullTableName('site_modules').' AS sm |
|
113 | + LEFT JOIN ' . $modx->getFullTableName('site_module_access').' AS sma ON sma.module = sm.id |
|
114 | + LEFT JOIN ' . $modx->getFullTableName('member_groups').' AS mg ON sma.usergroup = mg.user_group |
|
115 | + WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID().') AND sm.disabled != 1 AND sm.locked != 1 |
|
116 | 116 | ORDER BY sm.name'); |
117 | 117 | if ($modx->hasPermission('edit_module')) { |
118 | - $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
|
118 | + $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>"; |
|
119 | 119 | } elseif ($modx->hasPermission('exec_module')) { |
120 | - $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
|
120 | + $title = "<a href='index.php?a=112&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>"; |
|
121 | 121 | } else { |
122 | 122 | $title = '[+value+]'; |
123 | 123 | } |
124 | 124 | } else { |
125 | 125 | $rs = $modx->db->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name"); |
126 | - $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
|
126 | + $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>"; |
|
127 | 127 | } |
128 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
128 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
129 | 129 | $grd = new DataGrid('', $rs, $number_of_results); // set page size to 0 t show all items |
130 | 130 | $grd->noRecordMsg = $_lang["no_records_found"]; |
131 | 131 | $grd->cssClass = "table data"; |
@@ -133,10 +133,10 @@ discard block |
||
133 | 133 | $grd->itemClass = "tableItem"; |
134 | 134 | $grd->altItemClass = "tableAltItem"; |
135 | 135 | $grd->fields = "icon,name,description,locked,disabled"; |
136 | - $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["description"] . " ," . $_lang["locked"] . " ," . $_lang["disabled"]; |
|
136 | + $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["description"]." ,".$_lang["locked"]." ,".$_lang["disabled"]; |
|
137 | 137 | $grd->colWidths = "34,,,60,60"; |
138 | 138 | $grd->colAligns = "center,,,center,center"; |
139 | - $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title; |
|
139 | + $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='[+value+]'></i></a>||template:".$title; |
|
140 | 140 | if ($listmode == '1') { |
141 | 141 | $grd->pageSize = 0; |
142 | 142 | } |
@@ -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('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
|
5 | +if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -10,10 +10,10 @@ 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 | -} else { |
|
16 | +} else { |
|
17 | 17 | $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
18 | 18 | $sqlQuery = $modx->db->escape($query); |
19 | 19 | $_PAGE['vs']['search'] = $query; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0)); |
31 | -if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
31 | +if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
32 | 32 | $cm->addSeparator(); |
33 | 33 | } |
34 | 34 | $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['actions_edit'], (!$modx->hasPermission('edit_module') ? 1 : 0)); |
@@ -107,21 +107,21 @@ discard block |
||
107 | 107 | <div class="tab-page"> |
108 | 108 | <div class="table-responsive"> |
109 | 109 | <?php |
110 | - if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
110 | + if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
111 | 111 | $rs = $modx->db->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon |
112 | 112 | FROM ' . $modx->getFullTableName('site_modules') . ' AS sm |
113 | 113 | LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id |
114 | 114 | LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group |
115 | 115 | WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
116 | 116 | ORDER BY sm.name'); |
117 | - if ($modx->hasPermission('edit_module')) { |
|
117 | + if ($modx->hasPermission('edit_module')) { |
|
118 | 118 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
119 | - } elseif ($modx->hasPermission('exec_module')) { |
|
119 | + } elseif ($modx->hasPermission('exec_module')) { |
|
120 | 120 | $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
121 | - } else { |
|
121 | + } else { |
|
122 | 122 | $title = '[+value+]'; |
123 | 123 | } |
124 | - } else { |
|
124 | + } else { |
|
125 | 125 | $rs = $modx->db->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name"); |
126 | 126 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
127 | 127 | } |
@@ -137,10 +137,10 @@ discard block |
||
137 | 137 | $grd->colWidths = "34,,,60,60"; |
138 | 138 | $grd->colAligns = "center,,,center,center"; |
139 | 139 | $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title; |
140 | - if ($listmode == '1') { |
|
140 | + if ($listmode == '1') { |
|
141 | 141 | $grd->pageSize = 0; |
142 | 142 | } |
143 | - if ($_REQUEST['op'] == 'reset') { |
|
143 | + if ($_REQUEST['op'] == 'reset') { |
|
144 | 144 | $grd->pageNumber = 1; |
145 | 145 | } |
146 | 146 | // render grid |
@@ -4,18 +4,18 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | switch ((int) $modx->manager->action) { |
7 | - case 35: |
|
8 | - if (!$modx->hasPermission('edit_role')) { |
|
7 | + case 35: |
|
8 | + if (!$modx->hasPermission('edit_role')) { |
|
9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
10 | + } |
|
11 | + break; |
|
12 | + case 38: |
|
13 | + if (!$modx->hasPermission('new_role')) { |
|
14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
15 | + } |
|
16 | + break; |
|
17 | + default: |
|
9 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
10 | - } |
|
11 | - break; |
|
12 | - case 38: |
|
13 | - if (!$modx->hasPermission('new_role')) { |
|
14 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
15 | - } |
|
16 | - break; |
|
17 | - default: |
|
18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | $role = 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 | -$role = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$role = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | $tbl_user_roles = $modx->getFullTableName('user_roles'); |
24 | 24 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | // Add lock-element JS-Script |
47 | 47 | $lockElementId = $role; |
48 | 48 | $lockElementType = 8; |
49 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
49 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
50 | 50 | ?> |
51 | 51 | <script type="text/javascript"> |
52 | 52 | function changestate(element) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | <input type="hidden" name="id" value="<?= $_GET['id'] ?>"> |
83 | 83 | |
84 | 84 | <h1> |
85 | - <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'] . '<small>(' . $roledata['id'] . ')</small>' : $_lang['role_title']) ?> |
|
85 | + <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'].'<small>('.$roledata['id'].')</small>' : $_lang['role_title']) ?> |
|
86 | 86 | </h1> |
87 | 87 | |
88 | 88 | <?= $_style['actionbuttons']['dynamic']['savedelete'] ?> |