@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | $modx->loadExtension("ManagerAPI"); |
20 | 20 | |
21 | 21 | $_lang = array(); |
22 | -include_once MODX_MANAGER_PATH . '/includes/lang/english.inc.php'; |
|
22 | +include_once MODX_MANAGER_PATH.'/includes/lang/english.inc.php'; |
|
23 | 23 | if ($modx->config['manager_language'] != 'english') { |
24 | - include_once MODX_MANAGER_PATH . '/includes/lang/' . $modx->config['manager_language'] . '.inc.php'; |
|
24 | + include_once MODX_MANAGER_PATH.'/includes/lang/'.$modx->config['manager_language'].'.inc.php'; |
|
25 | 25 | } |
26 | -include_once MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/style.php'; |
|
26 | +include_once MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/style.php'; |
|
27 | 27 | |
28 | 28 | $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : ''; |
29 | 29 | $frame = isset($_REQUEST['f']) ? $_REQUEST['f'] : ''; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | switch ($frame) { |
42 | 42 | case 'nodes': |
43 | - include_once MODX_MANAGER_PATH . '/frames/nodes.php'; |
|
43 | + include_once MODX_MANAGER_PATH.'/frames/nodes.php'; |
|
44 | 44 | |
45 | 45 | break; |
46 | 46 | } |
@@ -58,21 +58,21 @@ discard block |
||
58 | 58 | $sql = ''; |
59 | 59 | $a = ''; |
60 | 60 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '%*_') : ''; |
61 | - $sqlLike = $filter ? 'WHERE t1.name LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
62 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
61 | + $sqlLike = $filter ? 'WHERE t1.name LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
62 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
63 | 63 | |
64 | 64 | switch ($elements) { |
65 | 65 | case 'element_templates': |
66 | 66 | $a = 16; |
67 | - $sqlLike = $filter ? 'WHERE t1.templatename LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
67 | + $sqlLike = $filter ? 'WHERE t1.templatename LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
68 | 68 | $sql = $modx->db->query('SELECT t1.*, t1.templatename AS name |
69 | - FROM ' . $modx->getFullTableName('site_templates') . ' AS t1 |
|
70 | - ' . $sqlLike . ' |
|
69 | + FROM ' . $modx->getFullTableName('site_templates').' AS t1 |
|
70 | + ' . $sqlLike.' |
|
71 | 71 | ORDER BY t1.templatename ASC |
72 | 72 | ' . $sqlLimit); |
73 | 73 | |
74 | 74 | if ($modx->hasPermission('new_template')) { |
75 | - $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>' . $_lang['new_template'] . '</a></li>'; |
|
75 | + $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>'.$_lang['new_template'].'</a></li>'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | break; |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | case 'element_tplvars': |
81 | 81 | $a = 301; |
82 | 82 | $sql = $modx->db->query('SELECT t1.*, IF(t2.templateid,0,1) AS disabled |
83 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' AS t1 |
|
84 | - LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates') . ' AS t2 ON t1.id=t2.tmplvarid |
|
85 | - ' . $sqlLike . ' |
|
83 | + FROM ' . $modx->getFullTableName('site_tmplvars').' AS t1 |
|
84 | + LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates').' AS t2 ON t1.id=t2.tmplvarid |
|
85 | + ' . $sqlLike.' |
|
86 | 86 | GROUP BY t1.id |
87 | 87 | ORDER BY t1.name ASC |
88 | 88 | ' . $sqlLimit); |
89 | 89 | |
90 | 90 | if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
91 | - $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>' . $_lang['new_tmplvars'] . '</a></li>'; |
|
91 | + $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>'.$_lang['new_tmplvars'].'</a></li>'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | break; |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | case 'element_htmlsnippets': |
97 | 97 | $a = 78; |
98 | 98 | $sql = $modx->db->query('SELECT t1.* |
99 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' AS t1 |
|
100 | - ' . $sqlLike . ' |
|
99 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' AS t1 |
|
100 | + ' . $sqlLike.' |
|
101 | 101 | ORDER BY t1.name ASC |
102 | 102 | ' . $sqlLimit); |
103 | 103 | |
104 | 104 | if ($modx->hasPermission('new_chunk')) { |
105 | - $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>' . $_lang['new_htmlsnippet'] . '</a></li>'; |
|
105 | + $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>'.$_lang['new_htmlsnippet'].'</a></li>'; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | break; |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | case 'element_snippets': |
111 | 111 | $a = 22; |
112 | 112 | $sql = $modx->db->query('SELECT t1.* |
113 | - FROM ' . $modx->getFullTableName('site_snippets') . ' AS t1 |
|
114 | - ' . $sqlLike . ' |
|
113 | + FROM ' . $modx->getFullTableName('site_snippets').' AS t1 |
|
114 | + ' . $sqlLike.' |
|
115 | 115 | ORDER BY t1.name ASC |
116 | 116 | ' . $sqlLimit); |
117 | 117 | |
118 | 118 | if ($modx->hasPermission('new_snippet')) { |
119 | - $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>' . $_lang['new_snippet'] . '</a></li>'; |
|
119 | + $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>'.$_lang['new_snippet'].'</a></li>'; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | break; |
@@ -124,13 +124,13 @@ discard block |
||
124 | 124 | case 'element_plugins': |
125 | 125 | $a = 102; |
126 | 126 | $sql = $modx->db->query('SELECT t1.* |
127 | - FROM ' . $modx->getFullTableName('site_plugins') . ' AS t1 |
|
128 | - ' . $sqlLike . ' |
|
127 | + FROM ' . $modx->getFullTableName('site_plugins').' AS t1 |
|
128 | + ' . $sqlLike.' |
|
129 | 129 | ORDER BY t1.name ASC |
130 | 130 | ' . $sqlLimit); |
131 | 131 | |
132 | 132 | if ($modx->hasPermission('new_plugin')) { |
133 | - $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>' . $_lang['new_plugin'] . '</a></li>'; |
|
133 | + $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>'.$_lang['new_plugin'].'</a></li>'; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | break; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | continue; |
146 | 146 | } |
147 | 147 | |
148 | - $items .= '<li class="item ' . ($row['disabled'] ? 'disabled' : '') . ($row['locked'] ? ' locked' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main" data-parent-id="a_76__elements_' . $elements . '">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>' . "\n"; |
|
148 | + $items .= '<li class="item '.($row['disabled'] ? 'disabled' : '').($row['locked'] ? ' locked' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main" data-parent-id="a_76__elements_'.$elements.'">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'."\n"; |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
@@ -166,18 +166,18 @@ discard block |
||
166 | 166 | $output = ''; |
167 | 167 | $items = ''; |
168 | 168 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
169 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
170 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
169 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
170 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
171 | 171 | |
172 | 172 | $sql = $modx->db->query('SELECT t1.*, t1.username AS name, t2.blocked |
173 | - FROM ' . $modx->getFullTableName('manager_users') . ' AS t1 |
|
174 | - LEFT JOIN ' . $modx->getFullTableName('user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
175 | - ' . $sqlLike . ' |
|
173 | + FROM ' . $modx->getFullTableName('manager_users').' AS t1 |
|
174 | + LEFT JOIN ' . $modx->getFullTableName('user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
175 | + ' . $sqlLike.' |
|
176 | 176 | ORDER BY t1.username ASC |
177 | 177 | ' . $sqlLimit); |
178 | 178 | |
179 | 179 | if ($modx->hasPermission('new_user')) { |
180 | - $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>' . $_lang['new_user'] . '</a></li>'; |
|
180 | + $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>'.$_lang['new_user'].'</a></li>'; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | if ($count = $modx->db->getRecordCount($sql)) { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
186 | 186 | } |
187 | 187 | while ($row = $modx->db->getRow($sql)) { |
188 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
188 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'; |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
@@ -205,18 +205,18 @@ discard block |
||
205 | 205 | $output = ''; |
206 | 206 | $items = ''; |
207 | 207 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
208 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
209 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
208 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
209 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
210 | 210 | |
211 | 211 | $sql = $modx->db->query('SELECT t1.*, t1.username AS name, t2.blocked |
212 | - FROM ' . $modx->getFullTableName('web_users') . ' AS t1 |
|
213 | - LEFT JOIN ' . $modx->getFullTableName('web_user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
214 | - ' . $sqlLike . ' |
|
212 | + FROM ' . $modx->getFullTableName('web_users').' AS t1 |
|
213 | + LEFT JOIN ' . $modx->getFullTableName('web_user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
214 | + ' . $sqlLike.' |
|
215 | 215 | ORDER BY t1.username ASC |
216 | 216 | ' . $sqlLimit); |
217 | 217 | |
218 | 218 | if ($modx->hasPermission('new_web_user')) { |
219 | - $output .= '<li><a id="a_87" href="index.php?a=87" target="main"><i class="fa fa-plus"></i>' . $_lang['new_web_user'] . '</a></li>'; |
|
219 | + $output .= '<li><a id="a_87" href="index.php?a=87" target="main"><i class="fa fa-plus"></i>'.$_lang['new_web_user'].'</a></li>'; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | if ($count = $modx->db->getRecordCount($sql)) { |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
225 | 225 | } |
226 | 226 | while ($row = $modx->db->getRow($sql)) { |
227 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
227 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'; |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 | |
@@ -250,35 +250,35 @@ discard block |
||
250 | 250 | case 'SnippetNoCache': { |
251 | 251 | |
252 | 252 | $sql = $modx->db->query('SELECT * |
253 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
254 | - WHERE name="' . $name . '" |
|
253 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
254 | + WHERE name="' . $name.'" |
|
255 | 255 | LIMIT 1'); |
256 | 256 | |
257 | 257 | if ($modx->db->getRecordCount($sql)) { |
258 | 258 | $row = $modx->db->getRow($sql); |
259 | 259 | $contextmenu = array( |
260 | 260 | 'header' => array( |
261 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $row['name'] |
|
261 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$row['name'] |
|
262 | 262 | ), |
263 | 263 | 'item' => array( |
264 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
265 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
264 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
265 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
266 | 266 | ) |
267 | 267 | ); |
268 | 268 | if (!empty($row['description'])) { |
269 | 269 | $contextmenu['seperator'] = ''; |
270 | 270 | $contextmenu['description'] = array( |
271 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
271 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
272 | 272 | ); |
273 | 273 | } |
274 | 274 | } else { |
275 | 275 | $contextmenu = array( |
276 | 276 | 'header' => array( |
277 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
|
277 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$name |
|
278 | 278 | ), |
279 | 279 | 'item' => array( |
280 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
281 | - 'url' => "index.php?a=23&itemname=" . $name |
|
280 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
281 | + 'url' => "index.php?a=23&itemname=".$name |
|
282 | 282 | ) |
283 | 283 | ); |
284 | 284 | } |
@@ -288,35 +288,35 @@ discard block |
||
288 | 288 | case 'Chunk' : { |
289 | 289 | |
290 | 290 | $sql = $modx->db->query('SELECT * |
291 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
292 | - WHERE name="' . $name . '" |
|
291 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
292 | + WHERE name="' . $name.'" |
|
293 | 293 | LIMIT 1'); |
294 | 294 | |
295 | 295 | if ($modx->db->getRecordCount($sql)) { |
296 | 296 | $row = $modx->db->getRow($sql); |
297 | 297 | $contextmenu = array( |
298 | 298 | 'header' => array( |
299 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . $row['name'] |
|
299 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.$row['name'] |
|
300 | 300 | ), |
301 | 301 | 'item' => array( |
302 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
303 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
302 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
303 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
304 | 304 | ) |
305 | 305 | ); |
306 | 306 | if (!empty($row['description'])) { |
307 | 307 | $contextmenu['seperator'] = ''; |
308 | 308 | $contextmenu['description'] = array( |
309 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
309 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
310 | 310 | ); |
311 | 311 | } |
312 | 312 | } else { |
313 | 313 | $contextmenu = array( |
314 | 314 | 'header' => array( |
315 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . $name |
|
315 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.$name |
|
316 | 316 | ), |
317 | 317 | 'item' => array( |
318 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
319 | - 'url' => "index.php?a=77&itemname=" . $name |
|
318 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
319 | + 'url' => "index.php?a=77&itemname=".$name |
|
320 | 320 | ) |
321 | 321 | ); |
322 | 322 | } |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | } |
326 | 326 | case 'AttributeValue': { |
327 | 327 | $sql = $modx->db->query('SELECT * |
328 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
329 | - WHERE name="' . $name . '" |
|
328 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
329 | + WHERE name="' . $name.'" |
|
330 | 330 | LIMIT 1'); |
331 | 331 | |
332 | 332 | if ($modx->db->getRecordCount($sql)) { |
@@ -336,52 +336,52 @@ discard block |
||
336 | 336 | 'innerText' => $row['name'] |
337 | 337 | ), |
338 | 338 | 'item' => array( |
339 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
340 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
339 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
340 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
341 | 341 | ) |
342 | 342 | ); |
343 | 343 | if (!empty($row['description'])) { |
344 | 344 | $contextmenu['seperator'] = ''; |
345 | 345 | $contextmenu['description'] = array( |
346 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
346 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
347 | 347 | ); |
348 | 348 | } |
349 | 349 | } else { |
350 | 350 | |
351 | 351 | $sql = $modx->db->query('SELECT * |
352 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
353 | - WHERE name="' . $name . '" |
|
352 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
353 | + WHERE name="' . $name.'" |
|
354 | 354 | LIMIT 1'); |
355 | 355 | |
356 | 356 | if ($modx->db->getRecordCount($sql)) { |
357 | 357 | $row = $modx->db->getRow($sql); |
358 | 358 | $contextmenu = array( |
359 | 359 | 'header' => array( |
360 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $row['name'] |
|
360 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$row['name'] |
|
361 | 361 | ), |
362 | 362 | 'item' => array( |
363 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
364 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
363 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
364 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
365 | 365 | ) |
366 | 366 | ); |
367 | 367 | if (!empty($row['description'])) { |
368 | 368 | $contextmenu['seperator'] = ''; |
369 | 369 | $contextmenu['description'] = array( |
370 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
370 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
371 | 371 | ); |
372 | 372 | } |
373 | 373 | } else { |
374 | 374 | $contextmenu = array( |
375 | 375 | 'header' => array( |
376 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
|
376 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$name |
|
377 | 377 | ), |
378 | 378 | 'item' => array( |
379 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
380 | - 'url' => "index.php?a=77&itemname=" . $name |
|
379 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
380 | + 'url' => "index.php?a=77&itemname=".$name |
|
381 | 381 | ), |
382 | 382 | 'item2' => array( |
383 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
384 | - 'url' => "index.php?a=23&itemname=" . $name |
|
383 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
384 | + 'url' => "index.php?a=23&itemname=".$name |
|
385 | 385 | ) |
386 | 386 | ); |
387 | 387 | } |
@@ -437,35 +437,35 @@ discard block |
||
437 | 437 | } |
438 | 438 | |
439 | 439 | $sql = $modx->db->query('SELECT * |
440 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' |
|
441 | - WHERE name="' . $name . '" |
|
440 | + FROM ' . $modx->getFullTableName('site_tmplvars').' |
|
441 | + WHERE name="' . $name.'" |
|
442 | 442 | LIMIT 1'); |
443 | 443 | |
444 | 444 | if ($modx->db->getRecordCount($sql)) { |
445 | 445 | $row = $modx->db->getRow($sql); |
446 | 446 | $contextmenu = array( |
447 | 447 | 'header' => array( |
448 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . $row['name'] |
|
448 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.$row['name'] |
|
449 | 449 | ), |
450 | 450 | 'item' => array( |
451 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
452 | - 'url' => "index.php?a=301&id=" . $row['id'] |
|
451 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
452 | + 'url' => "index.php?a=301&id=".$row['id'] |
|
453 | 453 | ) |
454 | 454 | ); |
455 | 455 | if (!empty($row['description'])) { |
456 | 456 | $contextmenu['seperator'] = ''; |
457 | 457 | $contextmenu['description'] = array( |
458 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
458 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
459 | 459 | ); |
460 | 460 | } |
461 | 461 | } else { |
462 | 462 | $contextmenu = array( |
463 | 463 | 'header' => array( |
464 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . $name |
|
464 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.$name |
|
465 | 465 | ), |
466 | 466 | 'item' => array( |
467 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_tmplvars'], |
|
468 | - 'url' => "index.php?a=300&itemname=" . $name |
|
467 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_tmplvars'], |
|
468 | + 'url' => "index.php?a=300&itemname=".$name |
|
469 | 469 | ) |
470 | 470 | ); |
471 | 471 | } |
@@ -484,15 +484,15 @@ discard block |
||
484 | 484 | $json = array(); |
485 | 485 | |
486 | 486 | if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
487 | - $id = !empty($_REQUEST['id']) ? (int)$_REQUEST['id'] : ''; |
|
488 | - $parent = isset($_REQUEST['parent']) ? (int)$_REQUEST['parent'] : 0; |
|
487 | + $id = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
488 | + $parent = isset($_REQUEST['parent']) ? (int) $_REQUEST['parent'] : 0; |
|
489 | 489 | $menuindex = isset($_REQUEST['menuindex']) && is_scalar($_REQUEST['menuindex']) ? $_REQUEST['menuindex'] : 0; |
490 | 490 | |
491 | 491 | // set parent |
492 | 492 | if ($id && $parent >= 0) { |
493 | 493 | |
494 | 494 | // find older parent |
495 | - $parentOld = $modx->db->getValue($modx->db->select('parent', $modx->getFullTableName('site_content'), 'id=' . $id)); |
|
495 | + $parentOld = $modx->db->getValue($modx->db->select('parent', $modx->getFullTableName('site_content'), 'id='.$id)); |
|
496 | 496 | |
497 | 497 | $eventOut = $modx->invokeEvent('onBeforeMoveDocument', [ |
498 | 498 | 'id_document' => $id, |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | if (empty($json['errors'])) { |
514 | 514 | // check privileges user for move docs |
515 | 515 | if (!empty($modx->config['tree_show_protected']) && $role != 1) { |
516 | - $sql = $modx->db->select('*', $modx->getFullTableName('document_groups'), 'document IN(' . $id . ',' . $parent . ',' . $parentOld . ')'); |
|
516 | + $sql = $modx->db->select('*', $modx->getFullTableName('document_groups'), 'document IN('.$id.','.$parent.','.$parentOld.')'); |
|
517 | 517 | if ($modx->db->getRecordCount($sql)) { |
518 | 518 | $document_groups = array(); |
519 | 519 | while ($row = $modx->db->getRow($sql)) { |
@@ -538,22 +538,22 @@ discard block |
||
538 | 538 | // set new parent |
539 | 539 | $modx->db->update(array( |
540 | 540 | 'parent' => $parent |
541 | - ), $modx->getFullTableName('site_content'), 'id=' . $id); |
|
541 | + ), $modx->getFullTableName('site_content'), 'id='.$id); |
|
542 | 542 | // set parent isfolder = 1 |
543 | 543 | $modx->db->update(array( |
544 | 544 | 'isfolder' => 1 |
545 | - ), $modx->getFullTableName('site_content'), 'id=' . $parent); |
|
545 | + ), $modx->getFullTableName('site_content'), 'id='.$parent); |
|
546 | 546 | |
547 | 547 | if ($parent != $parentOld) { |
548 | 548 | // check children docs and set parent isfolder |
549 | - if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent=' . $parentOld))) { |
|
549 | + if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent='.$parentOld))) { |
|
550 | 550 | $modx->db->update(array( |
551 | 551 | 'isfolder' => 1 |
552 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
552 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
553 | 553 | } else { |
554 | 554 | $modx->db->update(array( |
555 | 555 | 'isfolder' => 0 |
556 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
556 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
557 | 557 | } |
558 | 558 | } |
559 | 559 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | if (!empty($menuindex)) { |
562 | 562 | $menuindex = explode(',', $menuindex); |
563 | 563 | foreach ($menuindex as $key => $value) { |
564 | - $modx->db->query('UPDATE ' . $modx->getFullTableName('site_content') . ' SET menuindex=' . $key . ' WHERE id=' . $value); |
|
564 | + $modx->db->query('UPDATE '.$modx->getFullTableName('site_content').' SET menuindex='.$key.' WHERE id='.$value); |
|
565 | 565 | } |
566 | 566 | } else { |
567 | 567 | // TODO: max(*) menuindex |
@@ -590,19 +590,19 @@ discard block |
||
590 | 590 | } |
591 | 591 | |
592 | 592 | case 'getLockedElements': { |
593 | - $type = isset($_REQUEST['type']) ? (int)$_REQUEST['type'] : 0; |
|
594 | - $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
593 | + $type = isset($_REQUEST['type']) ? (int) $_REQUEST['type'] : 0; |
|
594 | + $id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
595 | 595 | |
596 | 596 | $output = !!$modx->elementIsLocked($type, $id, true); |
597 | 597 | |
598 | 598 | if (!$output) { |
599 | 599 | $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
600 | - $docgrp_cond = $docgrp ? ' OR dg.document_group IN (' . $docgrp . ')' : ''; |
|
600 | + $docgrp_cond = $docgrp ? ' OR dg.document_group IN ('.$docgrp.')' : ''; |
|
601 | 601 | $sql = ' |
602 | - SELECT MAX(IF(1=' . $role . ' OR sc.privatemgr=0' . $docgrp_cond . ', 0, 1)) AS locked |
|
603 | - FROM ' . $modx->getFullTableName('site_content') . ' AS sc |
|
604 | - LEFT JOIN ' . $modx->getFullTableName('document_groups') . ' dg ON dg.document=sc.id |
|
605 | - WHERE sc.id=' . $id . ' GROUP BY sc.id'; |
|
602 | + SELECT MAX(IF(1=' . $role.' OR sc.privatemgr=0'.$docgrp_cond.', 0, 1)) AS locked |
|
603 | + FROM ' . $modx->getFullTableName('site_content').' AS sc |
|
604 | + LEFT JOIN ' . $modx->getFullTableName('document_groups').' dg ON dg.document=sc.id |
|
605 | + WHERE sc.id=' . $id.' GROUP BY sc.id'; |
|
606 | 606 | $sql = $modx->db->query($sql); |
607 | 607 | if ($modx->db->getRecordCount($sql)) { |
608 | 608 | $row = $modx->db->getRow($sql); |
@@ -8,19 +8,19 @@ discard block |
||
8 | 8 | * Version: 1.1 |
9 | 9 | * MODX version: 1.0.3 |
10 | 10 | */ |
11 | -$style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
|
11 | +$style_path = 'media/style/'.$modx->config['manager_theme'].'/images/'; |
|
12 | 12 | $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php'; |
13 | -if(!$modx->config['lang_code']) { |
|
13 | +if (!$modx->config['lang_code']) { |
|
14 | 14 | global $modx_lang_attribute; |
15 | 15 | $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
16 | 16 | } |
17 | 17 | |
18 | -if($_GET['a'] == 2) { |
|
18 | +if ($_GET['a'] == 2) { |
|
19 | 19 | include_once('welcome.php'); |
20 | 20 | } |
21 | 21 | |
22 | 22 | // Favicon |
23 | -$_style['favicon'] = (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico'); |
|
23 | +$_style['favicon'] = (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico'); |
|
24 | 24 | |
25 | 25 | //Main Menu |
26 | 26 | $_style['menu_search'] = '<i class="fa fa-search"></i>'; |
@@ -99,10 +99,10 @@ discard block |
||
99 | 99 | $_style['tree_page_word'] = "<i class='fa fa-file-word-o'></i>"; |
100 | 100 | $_style['tree_page_excel'] = "<i class='fa fa-file-excel-o'></i>"; |
101 | 101 | |
102 | -$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>";//$style_path.'tree/angle-down.png'; |
|
103 | -$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>";//$style_path.'tree/angle-right.png'; |
|
102 | +$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>"; //$style_path.'tree/angle-down.png'; |
|
103 | +$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>"; //$style_path.'tree/angle-right.png'; |
|
104 | 104 | $_style['tree_weblink'] = $style_path.'tree/link.png'; |
105 | -$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>";//$style_path.'icons/eye.png'; |
|
105 | +$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>"; //$style_path.'icons/eye.png'; |
|
106 | 106 | |
107 | 107 | $_style['tree_showtree'] = '<i class="fa fa-sitemap"></i>'; |
108 | 108 | $_style['tree_working'] = '<i class="fa fa-warning"></i>'; |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | $_style['icons_edit_document'] = $style_path.'icons/save.png'; |
138 | 138 | $_style['icons_delete_document'] = $style_path.'icons/trash.png'; |
139 | 139 | //locks |
140 | -$_style['icons_preview_resource'] = $style_path.'icons/eye.png';//$style_path.'icons/eye.png'; |
|
141 | -$_style['icons_secured'] = "<i class='fa fa-lock'></i>";//$style_path.'icons/lock.png'; |
|
140 | +$_style['icons_preview_resource'] = $style_path.'icons/eye.png'; //$style_path.'icons/eye.png'; |
|
141 | +$_style['icons_secured'] = "<i class='fa fa-lock'></i>"; //$style_path.'icons/lock.png'; |
|
142 | 142 | |
143 | 143 | //file manager icons |
144 | 144 | $_style['files_save'] = 'fa fa-floppy-o'; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $_style['icons_set_parent'] = $style_path.'icons/folder-open.png'; |
214 | 214 | |
215 | 215 | //modules |
216 | -$_style['icons_module'] = 'fa fa-cube'; |
|
216 | +$_style['icons_module'] = 'fa fa-cube'; |
|
217 | 217 | $_style['icons_modules'] = 'fa fa-cubes'; //$style_path.'icons/modules.png'; |
218 | 218 | $_style['icons_run'] = $style_path.'icons/play.png'; |
219 | 219 | |
@@ -273,57 +273,57 @@ discard block |
||
273 | 273 | $stay = isset($_REQUEST['stay']) ? $_REQUEST['stay'] : ''; |
274 | 274 | $addnew = 0; |
275 | 275 | $run = 0; |
276 | -switch($action) { |
|
276 | +switch ($action) { |
|
277 | 277 | case '3': |
278 | 278 | case '4': |
279 | 279 | case '27': |
280 | 280 | case '72': |
281 | - if($modx->hasPermission('new_document')) { |
|
281 | + if ($modx->hasPermission('new_document')) { |
|
282 | 282 | $addnew = 1; |
283 | 283 | } |
284 | 284 | break; |
285 | 285 | case '16': |
286 | 286 | case '19': |
287 | - if($modx->hasPermission('new_template')) { |
|
287 | + if ($modx->hasPermission('new_template')) { |
|
288 | 288 | $addnew = 1; |
289 | 289 | } |
290 | 290 | break; |
291 | 291 | case '300': |
292 | 292 | case '301': |
293 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
293 | + if ($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | 294 | $addnew = 1; |
295 | 295 | } |
296 | 296 | break; |
297 | 297 | case '77': |
298 | 298 | case '78': |
299 | - if($modx->hasPermission('new_chunk')) { |
|
299 | + if ($modx->hasPermission('new_chunk')) { |
|
300 | 300 | $addnew = 1; |
301 | 301 | } |
302 | 302 | break; |
303 | 303 | case '22': |
304 | 304 | case '23': |
305 | - if($modx->hasPermission('new_snippet')) { |
|
305 | + if ($modx->hasPermission('new_snippet')) { |
|
306 | 306 | $addnew = 1; |
307 | 307 | } |
308 | 308 | break; |
309 | 309 | case '101': |
310 | 310 | case '102': |
311 | - if($modx->hasPermission('new_plugin')) { |
|
311 | + if ($modx->hasPermission('new_plugin')) { |
|
312 | 312 | $addnew = 1; |
313 | 313 | } |
314 | 314 | break; |
315 | 315 | case '106': |
316 | 316 | case '107': |
317 | 317 | case '108': |
318 | - if($modx->hasPermission('new_module')) { |
|
318 | + if ($modx->hasPermission('new_module')) { |
|
319 | 319 | $addnew = 1; |
320 | 320 | } |
321 | - if($modx->hasPermission('exec_module')) { |
|
321 | + if ($modx->hasPermission('exec_module')) { |
|
322 | 322 | $run = 1; |
323 | 323 | } |
324 | 324 | break; |
325 | 325 | case '88': |
326 | - if($modx->hasPermission('new_web_user')) { |
|
326 | + if ($modx->hasPermission('new_web_user')) { |
|
327 | 327 | $addnew = 1; |
328 | 328 | } |
329 | 329 | break; |
@@ -337,30 +337,30 @@ discard block |
||
337 | 337 | <div class="btn-group"> |
338 | 338 | <div class="btn-group"> |
339 | 339 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
340 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
340 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
341 | 341 | </a> |
342 | 342 | <span class="btn btn-success plus dropdown-toggle"></span> |
343 | 343 | <select id="stay" name="stay"> |
344 | 344 | ' . ($addnew ? ' |
345 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
346 | - ' : '') . ' |
|
347 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
348 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
345 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
346 | + ' : '').' |
|
347 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
348 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
349 | 349 | </select> |
350 | 350 | </div>' . |
351 | 351 | ($addnew ? ' |
352 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
352 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
354 | 354 | </a> |
355 | - ' : '') . ' |
|
356 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
357 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
355 | + ' : '').' |
|
356 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
357 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
358 | 358 | </a> |
359 | 359 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
360 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
360 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
361 | 361 | </a> |
362 | 362 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
363 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
363 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
364 | 364 | </a> |
365 | 365 | </div> |
366 | 366 | </div>', |
@@ -368,22 +368,22 @@ discard block |
||
368 | 368 | <div class="btn-group"> |
369 | 369 | <div class="btn-group"> |
370 | 370 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
371 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
371 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
372 | 372 | </a> |
373 | 373 | <span class="btn btn-success plus dropdown-toggle"></span> |
374 | 374 | <select id="stay" name="stay"> |
375 | 375 | ' . ($addnew ? ' |
376 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
377 | - ' : '') . ' |
|
378 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
379 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
376 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
377 | + ' : '').' |
|
378 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
379 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
380 | 380 | </select> |
381 | 381 | </div> |
382 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
383 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
382 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
383 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
384 | 384 | </a> |
385 | 385 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
386 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
386 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
387 | 387 | </a> |
388 | 388 | </div> |
389 | 389 | </div>', |
@@ -391,86 +391,86 @@ discard block |
||
391 | 391 | <div class="btn-group"> |
392 | 392 | <div class="btn-group"> |
393 | 393 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
394 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
394 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
395 | 395 | </a> |
396 | 396 | <span class="btn btn-success plus dropdown-toggle"></span> |
397 | 397 | <select id="stay" name="stay"> |
398 | 398 | ' . ($addnew ? ' |
399 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
400 | - ' : '') . ' |
|
401 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
402 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
399 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
400 | + ' : '').' |
|
401 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
402 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
403 | 403 | </select> |
404 | 404 | </div> |
405 | 405 | ' . ($addnew ? ' |
406 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
406 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
408 | 408 | </a> |
409 | - ' : '') . ' |
|
410 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
411 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
409 | + ' : '').' |
|
410 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
411 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
412 | 412 | </a> |
413 | 413 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
414 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
414 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
415 | 415 | </a> |
416 | 416 | ' . ($run ? ' |
417 | - <a id="Button4" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.run();"> |
|
418 | - <i class="' . $_style["actions_run"] . '"></i><span>' . $_lang['run_module'] . '</span> |
|
417 | + <a id="Button4" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.run();"> |
|
418 | + <i class="' . $_style["actions_run"].'"></i><span>'.$_lang['run_module'].'</span> |
|
419 | 419 | </a> |
420 | - ' : '') . ' |
|
420 | + ' : '').' |
|
421 | 421 | </div> |
422 | 422 | </div>', |
423 | 423 | 'newmodule' => ($addnew ? '<div id="actions"> |
424 | 424 | <div class="btn-group"> |
425 | 425 | <a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
426 | - <i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span> |
|
426 | + <i class="' . $_style["actions_new"].'"></i><span>'.$_lang['new_module'].'</span> |
|
427 | 427 | </a> |
428 | 428 | </div> |
429 | 429 | </div>' : ''), |
430 | 430 | 'close' => '<div id="actions"> |
431 | 431 | <div class="btn-group"> |
432 | 432 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();"> |
433 | - <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
|
433 | + <i class="' . $_style["actions_close"].'"></i><span>'.$_lang['close'].'</span> |
|
434 | 434 | </a> |
435 | 435 | </div> |
436 | 436 | </div>', |
437 | 437 | 'save' => '<div id="actions"> |
438 | 438 | <div class="btn-group"> |
439 | 439 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
440 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
440 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
441 | 441 | </a> |
442 | 442 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
443 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
443 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
444 | 444 | </a> |
445 | 445 | </div> |
446 | 446 | </div>', |
447 | 447 | 'savedelete' => '<div id="actions"> |
448 | 448 | <div class="btn-group"> |
449 | 449 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
450 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
450 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
451 | 451 | </a> |
452 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
453 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
452 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
453 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
454 | 454 | </a> |
455 | 455 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
456 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
456 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
457 | 457 | </a> |
458 | 458 | </div> |
459 | 459 | </div>', |
460 | 460 | 'cancel' => '<div id="actions"> |
461 | 461 | <div class="btn-group"> |
462 | 462 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
463 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
463 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
464 | 464 | </a> |
465 | 465 | </div> |
466 | 466 | </div>', |
467 | 467 | 'canceldelete' => '<div id="actions"> |
468 | 468 | <div class="btn-group"> |
469 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
470 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
469 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
470 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
471 | 471 | </a> |
472 | 472 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
473 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
473 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
474 | 474 | </a> |
475 | 475 | </div> |
476 | 476 | </div>', |
@@ -480,33 +480,33 @@ discard block |
||
480 | 480 | <div class="btn-group">' . |
481 | 481 | ($addnew ? ' |
482 | 482 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
483 | - <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
|
483 | + <i class="' . $_style["icons_new_document"].'"></i><span>'.$_lang['create_resource_here'].'</span> |
|
484 | 484 | </a> |
485 | 485 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.newlink();"> |
486 | - <i class="' . $_style["icons_new_weblink"] . '"></i><span>' . $_lang['create_weblink_here'] . '</span> |
|
486 | + <i class="' . $_style["icons_new_weblink"].'"></i><span>'.$_lang['create_weblink_here'].'</span> |
|
487 | 487 | </a> |
488 | - ' : '') . ' |
|
488 | + ' : '').' |
|
489 | 489 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.edit();"> |
490 | - <i class="' . $_style["actions_edit"] . '"></i><span>' . $_lang['edit'] . '</span> |
|
490 | + <i class="' . $_style["actions_edit"].'"></i><span>'.$_lang['edit'].'</span> |
|
491 | 491 | </a> |
492 | 492 | <a id="Button2" class="btn btn-secondary" href="javascript:;" onclick="actions.move();"> |
493 | - <i class="' . $_style["actions_move"] . '"></i><span>' . $_lang['move'] . '</span> |
|
493 | + <i class="' . $_style["actions_move"].'"></i><span>'.$_lang['move'].'</span> |
|
494 | 494 | </a> |
495 | 495 | <a id="Button6" class="btn btn-secondary" href="javascript:;" onclick="actions.duplicate();"> |
496 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
496 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
497 | 497 | </a> |
498 | 498 | <a id="Button3" class="btn btn-secondary" href="javascript:;" onclick="actions.delete();"> |
499 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
499 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
500 | 500 | </a> |
501 | 501 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
502 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
502 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
503 | 503 | </a> |
504 | 504 | </div> |
505 | 505 | </div>', |
506 | 506 | 'cancel' => '<div id="actions"> |
507 | 507 | <div class="btn-group"> |
508 | 508 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
509 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
509 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
510 | 510 | </a> |
511 | 511 | </div> |
512 | 512 | </div>', |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | -class DATEPICKER { |
|
3 | - function __construct() { |
|
2 | +class DATEPICKER{ |
|
3 | + function __construct(){ |
|
4 | 4 | } |
5 | - function getDP() { |
|
6 | - global $modx,$_lang; |
|
5 | + function getDP(){ |
|
6 | + global $modx, $_lang; |
|
7 | 7 | |
8 | 8 | $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
9 | - return $modx->parseText($tpl,$_lang,'[%','%]'); |
|
9 | + return $modx->parseText($tpl, $_lang, '[%', '%]'); |
|
10 | 10 | } |
11 | 11 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | // using proxy, send entire URI |
150 | 150 | $this->_httprequest($URI, $fp, $URI, $this->_httpmethod); |
151 | 151 | } else { |
152 | - $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : ""); |
|
152 | + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); |
|
153 | 153 | // no proxy, send only the path |
154 | 154 | $this->_httprequest($path, $fp, $URI, $this->_httpmethod); |
155 | 155 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | /* url was redirected, check if we've hit the max depth */ |
161 | 161 | if ($this->maxredirs > $this->_redirectdepth) { |
162 | 162 | // only follow redirect if it's on this site, or offsiteok is true |
163 | - if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) { |
|
163 | + if (preg_match("|^https?://".preg_quote($this->host)."|i", $this->_redirectaddr) || $this->offsiteok) { |
|
164 | 164 | /* follow the redirect */ |
165 | 165 | $this->_redirectdepth++; |
166 | 166 | $this->lastredirectaddr = $this->_redirectaddr; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | break; |
189 | 189 | default: |
190 | 190 | // not a valid protocol |
191 | - $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n'; |
|
191 | + $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; |
|
192 | 192 | return false; |
193 | 193 | break; |
194 | 194 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | // using proxy, send entire URI |
240 | 240 | $this->_httprequest($URI, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata); |
241 | 241 | } else { |
242 | - $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : ""); |
|
242 | + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); |
|
243 | 243 | // no proxy, send only the path |
244 | 244 | $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata); |
245 | 245 | } |
@@ -249,11 +249,11 @@ discard block |
||
249 | 249 | if ($this->_redirectaddr) { |
250 | 250 | /* url was redirected, check if we've hit the max depth */ |
251 | 251 | if ($this->maxredirs > $this->_redirectdepth) { |
252 | - if (!preg_match("|^" . $URI_PARTS["scheme"] . "://|", $this->_redirectaddr)) |
|
253 | - $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr, $URI_PARTS["scheme"] . "://" . $URI_PARTS["host"]); |
|
252 | + if (!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr)) |
|
253 | + $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr, $URI_PARTS["scheme"]."://".$URI_PARTS["host"]); |
|
254 | 254 | |
255 | 255 | // only follow redirect if it's on this site, or offsiteok is true |
256 | - if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) { |
|
256 | + if (preg_match("|^https?://".preg_quote($this->host)."|i", $this->_redirectaddr) || $this->offsiteok) { |
|
257 | 257 | /* follow the redirect */ |
258 | 258 | $this->_redirectdepth++; |
259 | 259 | $this->lastredirectaddr = $this->_redirectaddr; |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | break; |
286 | 286 | default: |
287 | 287 | // not a valid protocol |
288 | - $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n'; |
|
288 | + $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; |
|
289 | 289 | return false; |
290 | 290 | break; |
291 | 291 | } |
@@ -585,9 +585,9 @@ discard block |
||
585 | 585 | $match = preg_replace("|/$|", "", $match); |
586 | 586 | $match_part = parse_url($match); |
587 | 587 | $match_root = |
588 | - $match_part["scheme"] . "://" . $match_part["host"]; |
|
588 | + $match_part["scheme"]."://".$match_part["host"]; |
|
589 | 589 | |
590 | - $search = array("|^http://" . preg_quote($this->host) . "|i", |
|
590 | + $search = array("|^http://".preg_quote($this->host)."|i", |
|
591 | 591 | "|^(\/)|i", |
592 | 592 | "|^(?!http://)(?!mailto:)|i", |
593 | 593 | "|/\./|", |
@@ -595,8 +595,8 @@ discard block |
||
595 | 595 | ); |
596 | 596 | |
597 | 597 | $replace = array("", |
598 | - $match_root . "/", |
|
599 | - $match . "/", |
|
598 | + $match_root."/", |
|
599 | + $match."/", |
|
600 | 600 | "/", |
601 | 601 | "/" |
602 | 602 | ); |
@@ -625,17 +625,17 @@ discard block |
||
625 | 625 | $URI_PARTS = parse_url($URI); |
626 | 626 | if (empty($url)) |
627 | 627 | $url = "/"; |
628 | - $headers = $http_method . " " . $url . " " . $this->_httpversion . "\r\n"; |
|
628 | + $headers = $http_method." ".$url." ".$this->_httpversion."\r\n"; |
|
629 | 629 | if (!empty($this->host) && !isset($this->rawheaders['Host'])) { |
630 | - $headers .= "Host: " . $this->host; |
|
630 | + $headers .= "Host: ".$this->host; |
|
631 | 631 | if (!empty($this->port) && $this->port != '80') |
632 | - $headers .= ":" . $this->port; |
|
632 | + $headers .= ":".$this->port; |
|
633 | 633 | $headers .= "\r\n"; |
634 | 634 | } |
635 | 635 | if (!empty($this->agent)) |
636 | - $headers .= "User-Agent: " . $this->agent . "\r\n"; |
|
636 | + $headers .= "User-Agent: ".$this->agent."\r\n"; |
|
637 | 637 | if (!empty($this->accept)) |
638 | - $headers .= "Accept: " . $this->accept . "\r\n"; |
|
638 | + $headers .= "Accept: ".$this->accept."\r\n"; |
|
639 | 639 | if ($this->use_gzip) { |
640 | 640 | // make sure PHP was built with --with-zlib |
641 | 641 | // and we can handle gzipp'ed data |
@@ -643,46 +643,46 @@ discard block |
||
643 | 643 | $headers .= "Accept-encoding: gzip\r\n"; |
644 | 644 | } else { |
645 | 645 | trigger_error( |
646 | - "use_gzip is on, but PHP was built without zlib support." . |
|
646 | + "use_gzip is on, but PHP was built without zlib support.". |
|
647 | 647 | " Requesting file(s) without gzip encoding.", |
648 | 648 | E_USER_NOTICE); |
649 | 649 | } |
650 | 650 | } |
651 | 651 | if (!empty($this->referer)) |
652 | - $headers .= "Referer: " . $this->referer . "\r\n"; |
|
652 | + $headers .= "Referer: ".$this->referer."\r\n"; |
|
653 | 653 | if (!empty($this->cookies)) { |
654 | 654 | if (!is_array($this->cookies)) |
655 | - $this->cookies = (array)$this->cookies; |
|
655 | + $this->cookies = (array) $this->cookies; |
|
656 | 656 | |
657 | 657 | reset($this->cookies); |
658 | 658 | if (count($this->cookies) > 0) { |
659 | 659 | $cookie_headers .= 'Cookie: '; |
660 | 660 | foreach ($this->cookies as $cookieKey => $cookieVal) { |
661 | - $cookie_headers .= $cookieKey . "=" . urlencode($cookieVal) . "; "; |
|
661 | + $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; "; |
|
662 | 662 | } |
663 | - $headers .= substr($cookie_headers, 0, -2) . "\r\n"; |
|
663 | + $headers .= substr($cookie_headers, 0, -2)."\r\n"; |
|
664 | 664 | } |
665 | 665 | } |
666 | 666 | if (!empty($this->rawheaders)) { |
667 | 667 | if (!is_array($this->rawheaders)) |
668 | - $this->rawheaders = (array)$this->rawheaders; |
|
668 | + $this->rawheaders = (array) $this->rawheaders; |
|
669 | 669 | while (list($headerKey, $headerVal) = each($this->rawheaders)) |
670 | - $headers .= $headerKey . ": " . $headerVal . "\r\n"; |
|
670 | + $headers .= $headerKey.": ".$headerVal."\r\n"; |
|
671 | 671 | } |
672 | 672 | if (!empty($content_type)) { |
673 | 673 | $headers .= "Content-type: $content_type"; |
674 | 674 | if ($content_type == "multipart/form-data") |
675 | - $headers .= "; boundary=" . $this->_mime_boundary; |
|
675 | + $headers .= "; boundary=".$this->_mime_boundary; |
|
676 | 676 | $headers .= "\r\n"; |
677 | 677 | } |
678 | 678 | if (!empty($body)) |
679 | - $headers .= "Content-length: " . strlen($body) . "\r\n"; |
|
679 | + $headers .= "Content-length: ".strlen($body)."\r\n"; |
|
680 | 680 | if (!empty($this->user) || !empty($this->pass)) |
681 | - $headers .= "Authorization: Basic " . base64_encode($this->user . ":" . $this->pass) . "\r\n"; |
|
681 | + $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n"; |
|
682 | 682 | |
683 | 683 | //add proxy auth headers |
684 | 684 | if (!empty($this->proxy_user)) |
685 | - $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass) . "\r\n"; |
|
685 | + $headers .= 'Proxy-Authorization: '.'Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass)."\r\n"; |
|
686 | 686 | |
687 | 687 | |
688 | 688 | $headers .= "\r\n"; |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | socket_set_timeout($fp, $this->read_timeout); |
693 | 693 | $this->timed_out = false; |
694 | 694 | |
695 | - fwrite($fp, $headers . $body, strlen($headers . $body)); |
|
695 | + fwrite($fp, $headers.$body, strlen($headers.$body)); |
|
696 | 696 | |
697 | 697 | $this->_redirectaddr = false; |
698 | 698 | unset($this->headers); |
@@ -716,10 +716,10 @@ discard block |
||
716 | 716 | // look for :// in the Location header to see if hostname is included |
717 | 717 | if (!preg_match("|\:\/\/|", $matches[2])) { |
718 | 718 | // no host in the path, so prepend |
719 | - $this->_redirectaddr = $URI_PARTS["scheme"] . "://" . $this->host . ":" . $this->port; |
|
719 | + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; |
|
720 | 720 | // eliminate double slash |
721 | 721 | if (!preg_match("|^/|", $matches[2])) |
722 | - $this->_redirectaddr .= "/" . $matches[2]; |
|
722 | + $this->_redirectaddr .= "/".$matches[2]; |
|
723 | 723 | else |
724 | 724 | $this->_redirectaddr .= $matches[2]; |
725 | 725 | } else |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | if (($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i", $results, $match)) { |
772 | 772 | $this->results[] = $results; |
773 | 773 | for ($x = 0; $x < count($match[1]); $x++) |
774 | - $this->_frameurls[] = $this->_expandlinks($match[1][$x], $URI_PARTS["scheme"] . "://" . $this->host); |
|
774 | + $this->_frameurls[] = $this->_expandlinks($match[1][$x], $URI_PARTS["scheme"]."://".$this->host); |
|
775 | 775 | } // have we already fetched framed content? |
776 | 776 | elseif (is_array($this->results)) |
777 | 777 | $this->results[] = $results; |
@@ -858,14 +858,14 @@ discard block |
||
858 | 858 | $context_opts['ssl']['capath'] = $this->capath; |
859 | 859 | } |
860 | 860 | |
861 | - $host = 'ssl://' . $host; |
|
861 | + $host = 'ssl://'.$host; |
|
862 | 862 | } |
863 | 863 | |
864 | 864 | $context = stream_context_create($context_opts); |
865 | 865 | |
866 | 866 | if (version_compare(PHP_VERSION, '5.0.0', '>')) { |
867 | - if($this->scheme == 'http') |
|
868 | - $host = "tcp://" . $host; |
|
867 | + if ($this->scheme == 'http') |
|
868 | + $host = "tcp://".$host; |
|
869 | 869 | $fp = stream_socket_client( |
870 | 870 | "$host:$port", |
871 | 871 | $errno, |
@@ -897,7 +897,7 @@ discard block |
||
897 | 897 | case -5: |
898 | 898 | $this->error = "connection refused or timed out (-5)"; |
899 | 899 | default: |
900 | - $this->error = "connection failed (" . $errno . ")"; |
|
900 | + $this->error = "connection failed (".$errno.")"; |
|
901 | 901 | } |
902 | 902 | return false; |
903 | 903 | } |
@@ -938,26 +938,26 @@ discard block |
||
938 | 938 | while (list($key, $val) = each($formvars)) { |
939 | 939 | if (is_array($val) || is_object($val)) { |
940 | 940 | while (list($cur_key, $cur_val) = each($val)) { |
941 | - $postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&"; |
|
941 | + $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&"; |
|
942 | 942 | } |
943 | 943 | } else |
944 | - $postdata .= urlencode($key) . "=" . urlencode($val) . "&"; |
|
944 | + $postdata .= urlencode($key)."=".urlencode($val)."&"; |
|
945 | 945 | } |
946 | 946 | break; |
947 | 947 | |
948 | 948 | case "multipart/form-data": |
949 | - $this->_mime_boundary = "Snoopy" . md5(uniqid(microtime())); |
|
949 | + $this->_mime_boundary = "Snoopy".md5(uniqid(microtime())); |
|
950 | 950 | |
951 | 951 | reset($formvars); |
952 | 952 | while (list($key, $val) = each($formvars)) { |
953 | 953 | if (is_array($val) || is_object($val)) { |
954 | 954 | while (list($cur_key, $cur_val) = each($val)) { |
955 | - $postdata .= "--" . $this->_mime_boundary . "\r\n"; |
|
955 | + $postdata .= "--".$this->_mime_boundary."\r\n"; |
|
956 | 956 | $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n"; |
957 | 957 | $postdata .= "$cur_val\r\n"; |
958 | 958 | } |
959 | 959 | } else { |
960 | - $postdata .= "--" . $this->_mime_boundary . "\r\n"; |
|
960 | + $postdata .= "--".$this->_mime_boundary."\r\n"; |
|
961 | 961 | $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n"; |
962 | 962 | $postdata .= "$val\r\n"; |
963 | 963 | } |
@@ -974,12 +974,12 @@ discard block |
||
974 | 974 | fclose($fp); |
975 | 975 | $base_name = basename($file_name); |
976 | 976 | |
977 | - $postdata .= "--" . $this->_mime_boundary . "\r\n"; |
|
977 | + $postdata .= "--".$this->_mime_boundary."\r\n"; |
|
978 | 978 | $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n"; |
979 | 979 | $postdata .= "$file_content\r\n"; |
980 | 980 | } |
981 | 981 | } |
982 | - $postdata .= "--" . $this->_mime_boundary . "--\r\n"; |
|
982 | + $postdata .= "--".$this->_mime_boundary."--\r\n"; |
|
983 | 983 | break; |
984 | 984 | } |
985 | 985 |
@@ -54,26 +54,26 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | // get start time |
57 | -$mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime; |
|
57 | +$mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime; |
|
58 | 58 | $mstart = memory_get_usage(); |
59 | -$self = str_replace('\\','/',__FILE__); |
|
60 | -$self_dir = str_replace('/index.php','',$self); |
|
61 | -$mgr_dir = substr($self_dir,strrpos($self_dir,'/')+1); |
|
62 | -$base_path = str_replace($mgr_dir . '/index.php','',$self); |
|
63 | -$site_mgr_path = $base_path . 'assets/cache/siteManager.php'; |
|
64 | -if(is_file($site_mgr_path)) include_once($site_mgr_path); |
|
65 | -$site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
|
66 | -if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
67 | -if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
|
59 | +$self = str_replace('\\', '/', __FILE__); |
|
60 | +$self_dir = str_replace('/index.php', '', $self); |
|
61 | +$mgr_dir = substr($self_dir, strrpos($self_dir, '/') + 1); |
|
62 | +$base_path = str_replace($mgr_dir.'/index.php', '', $self); |
|
63 | +$site_mgr_path = $base_path.'assets/cache/siteManager.php'; |
|
64 | +if (is_file($site_mgr_path)) include_once($site_mgr_path); |
|
65 | +$site_hostnames_path = $base_path.'assets/cache/siteHostnames.php'; |
|
66 | +if (is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
67 | +if (!defined('MGR_DIR') || MGR_DIR !== $mgr_dir) { |
|
68 | 68 | $src = "<?php\n"; |
69 | 69 | $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
70 | - $rs = file_put_contents($site_mgr_path,$src); |
|
71 | - if(!$rs) { |
|
70 | + $rs = file_put_contents($site_mgr_path, $src); |
|
71 | + if (!$rs) { |
|
72 | 72 | echo 'siteManager.php write error'; |
73 | 73 | exit; |
74 | 74 | } |
75 | 75 | sleep(1); |
76 | - header('Location:' . $_SERVER['REQUEST_URI']); |
|
76 | + header('Location:'.$_SERVER['REQUEST_URI']); |
|
77 | 77 | exit; |
78 | 78 | } |
79 | 79 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | // send anti caching headers |
90 | 90 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
91 | -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
91 | +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
92 | 92 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
93 | 93 | header("Cache-Control: post-check=0, pre-check=0", false); |
94 | 94 | header("Pragma: no-cache"); |
@@ -100,29 +100,29 @@ discard block |
||
100 | 100 | include_once "includes/lang/english.inc.php"; |
101 | 101 | |
102 | 102 | // check PHP version. EVO is compatible with php 5 (5.0.0+) |
103 | -$php_ver_comp = version_compare(phpversion(), "5.0.0"); |
|
103 | +$php_ver_comp = version_compare(phpversion(), "5.0.0"); |
|
104 | 104 | // -1 if left is less, 0 if equal, +1 if left is higher |
105 | -if($php_ver_comp < 0) { |
|
105 | +if ($php_ver_comp < 0) { |
|
106 | 106 | echo sprintf($_lang['php_version_check'], phpversion()); |
107 | 107 | exit; |
108 | 108 | } |
109 | 109 | |
110 | 110 | // check if iconv is installed |
111 | -if(!function_exists('iconv')) { |
|
111 | +if (!function_exists('iconv')) { |
|
112 | 112 | echo $_lang['iconv_not_available']; |
113 | 113 | exit; |
114 | 114 | } |
115 | 115 | |
116 | 116 | // set some runtime options |
117 | -$incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond |
|
118 | -set_include_path(get_include_path() . PATH_SEPARATOR . $incPath); |
|
117 | +$incPath = str_replace("\\", "/", dirname(__FILE__)."/includes/"); // Mod by Raymond |
|
118 | +set_include_path(get_include_path().PATH_SEPARATOR.$incPath); |
|
119 | 119 | |
120 | 120 | if (!defined("ENT_COMPAT")) define("ENT_COMPAT", 2); |
121 | 121 | if (!defined("ENT_NOQUOTES")) define("ENT_NOQUOTES", 0); |
122 | 122 | if (!defined("ENT_QUOTES")) define("ENT_QUOTES", 3); |
123 | 123 | |
124 | 124 | // set the document_root :| |
125 | -if(!isset($_SERVER["DOCUMENT_ROOT"]) || empty($_SERVER["DOCUMENT_ROOT"])) { |
|
125 | +if (!isset($_SERVER["DOCUMENT_ROOT"]) || empty($_SERVER["DOCUMENT_ROOT"])) { |
|
126 | 126 | $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PATH_INFO"], "", preg_replace("/\\\\/", "/", $_SERVER["PATH_TRANSLATED"]))."/"; |
127 | 127 | } |
128 | 128 | |
@@ -161,30 +161,30 @@ discard block |
||
161 | 161 | // Now that session is given get user settings and merge into $modx->config |
162 | 162 | $usersettings = $modx->getUserSettings(); |
163 | 163 | |
164 | -$settings =& $modx->config; |
|
164 | +$settings = & $modx->config; |
|
165 | 165 | extract($modx->config, EXTR_OVERWRITE); |
166 | 166 | |
167 | 167 | // now include_once different language file as english |
168 | -if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
168 | +if (!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
169 | 169 | $manager_language = "english"; // if not set, get the english language file. |
170 | 170 | } |
171 | 171 | |
172 | 172 | // $length_eng_lang = count($_lang); // Not used for now, required for difference-check with other languages than english (i.e. inside installer) |
173 | 173 | |
174 | -if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
174 | +if ($manager_language != "english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
175 | 175 | include_once "lang/".$manager_language.".inc.php"; |
176 | 176 | } |
177 | 177 | |
178 | 178 | // allow custom language overrides not altered by future EVO-updates |
179 | -if(file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
|
179 | +if (file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
|
180 | 180 | include_once "lang/override/".$manager_language.".inc.php"; |
181 | 181 | } |
182 | 182 | |
183 | 183 | $s = array('[+MGR_DIR+]'); |
184 | 184 | $r = array(MGR_DIR); |
185 | -foreach($_lang as $k=>$v) |
|
185 | +foreach ($_lang as $k=>$v) |
|
186 | 186 | { |
187 | - if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
187 | + if (strpos($v, '[+') !== false) $_lang[$k] = str_replace($s, $r, $v); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | // send the charset header |
@@ -198,19 +198,19 @@ discard block |
||
198 | 198 | include_once "accesscontrol.inc.php"; |
199 | 199 | |
200 | 200 | // double check the session |
201 | -if(!isset($_SESSION['mgrValidated'])){ |
|
201 | +if (!isset($_SESSION['mgrValidated'])) { |
|
202 | 202 | echo "Not Logged In!"; |
203 | 203 | exit; |
204 | 204 | } |
205 | 205 | |
206 | 206 | // include_once the style variables file |
207 | -if(isset($manager_theme) && !isset($_style)) { |
|
207 | +if (isset($manager_theme) && !isset($_style)) { |
|
208 | 208 | $_style = array(); |
209 | 209 | include_once "media/style/".$manager_theme."/style.php"; |
210 | 210 | } |
211 | 211 | |
212 | 212 | // check if user is allowed to access manager interface |
213 | -if(isset($allow_manager_access) && $allow_manager_access==0) { |
|
213 | +if (isset($allow_manager_access) && $allow_manager_access == 0) { |
|
214 | 214 | include_once "manager.lockout.inc.php"; |
215 | 215 | } |
216 | 216 | |
@@ -219,21 +219,21 @@ discard block |
||
219 | 219 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
220 | 220 | |
221 | 221 | // first we check to see if this is a frameset request |
222 | -if(!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
|
222 | +if (!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
|
223 | 223 | // this looks to be a top-level frameset request, so let's serve up a frameset |
224 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
224 | + if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
225 | 225 | include_once "media/style/".$manager_theme."/frames/1.php"; |
226 | - }else{ |
|
226 | + } else { |
|
227 | 227 | include_once "frames/1.php"; |
228 | 228 | } |
229 | 229 | exit; |
230 | 230 | } |
231 | 231 | |
232 | 232 | // OK, let's retrieve the action directive from the request |
233 | -$option = array('min_range'=>1,'max_range'=>2000); |
|
234 | -if(isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | -elseif(isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option); |
|
236 | -elseif(isset($_POST['a'])) $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option); |
|
233 | +$option = array('min_range'=>1, 'max_range'=>2000); |
|
234 | +if (isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | +elseif (isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a', FILTER_VALIDATE_INT, $option); |
|
236 | +elseif (isset($_POST['a'])) $action = filter_input(INPUT_POST, 'a', FILTER_VALIDATE_INT, $option); |
|
237 | 237 | else $action = null; |
238 | 238 | |
239 | 239 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
@@ -264,11 +264,11 @@ discard block |
||
264 | 264 | $modx->invokeEvent("OnManagerPageInit", array("action" => $action)); |
265 | 265 | |
266 | 266 | // return element filepath |
267 | -function includeFileProcessor ($filepath,$manager_theme) { |
|
267 | +function includeFileProcessor($filepath, $manager_theme){ |
|
268 | 268 | $element = ""; |
269 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
269 | + if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | 270 | $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
271 | - }else{ |
|
271 | + } else { |
|
272 | 272 | $element = $filepath; |
273 | 273 | } |
274 | 274 | return $element; |
@@ -281,341 +281,341 @@ discard block |
||
281 | 281 | /********************************************************************/ |
282 | 282 | case 1 : |
283 | 283 | // get the requested frame |
284 | - $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
285 | - if($frame>9) { |
|
286 | - $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
284 | + $frame = preg_replace('/[^a-z0-9]/i', '', $_REQUEST['f']); |
|
285 | + if ($frame > 9) { |
|
286 | + $enable_debug = false; // this is to stop the debug thingy being attached to the framesets |
|
287 | 287 | } |
288 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
288 | + include_once(includeFileProcessor("frames/".$frame.".php", $manager_theme)); |
|
289 | 289 | break; |
290 | 290 | /********************************************************************/ |
291 | 291 | /* show the homepage */ |
292 | 292 | /********************************************************************/ |
293 | 293 | case 2: |
294 | 294 | // get the home page |
295 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
296 | - include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
297 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
295 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
296 | + include_once(includeFileProcessor("actions/welcome.static.php", $manager_theme)); |
|
297 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
298 | 298 | break; |
299 | 299 | /********************************************************************/ |
300 | 300 | /* document data */ |
301 | 301 | /********************************************************************/ |
302 | 302 | case 3: |
303 | 303 | // get the page to show document's data |
304 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
305 | - include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
306 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
304 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
305 | + include_once(includeFileProcessor("actions/document_data.static.php", $manager_theme)); |
|
306 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
307 | 307 | break; |
308 | 308 | /********************************************************************/ |
309 | 309 | /* content management */ |
310 | 310 | /********************************************************************/ |
311 | 311 | case 85: |
312 | 312 | // get the mutate page for adding a folder |
313 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
314 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
315 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
313 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
314 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
315 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
316 | 316 | break; |
317 | 317 | case 27: |
318 | 318 | // get the mutate page for changing content |
319 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
320 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
321 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
319 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
320 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
321 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
322 | 322 | break; |
323 | 323 | case 4: |
324 | 324 | // get the mutate page for adding content |
325 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
326 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
327 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
325 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
326 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
327 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
328 | 328 | break; |
329 | 329 | case 5: |
330 | 330 | // get the save processor |
331 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
331 | + include_once(includeFileProcessor("processors/save_content.processor.php", $manager_theme)); |
|
332 | 332 | break; |
333 | 333 | case 6: |
334 | 334 | // get the delete processor |
335 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
335 | + include_once(includeFileProcessor("processors/delete_content.processor.php", $manager_theme)); |
|
336 | 336 | break; |
337 | 337 | case 63: |
338 | 338 | // get the undelete processor |
339 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
339 | + include_once(includeFileProcessor("processors/undelete_content.processor.php", $manager_theme)); |
|
340 | 340 | break; |
341 | 341 | case 51: |
342 | 342 | // get the move action |
343 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
344 | - include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
345 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
343 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
344 | + include_once(includeFileProcessor("actions/move_document.dynamic.php", $manager_theme)); |
|
345 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
346 | 346 | break; |
347 | 347 | case 52: |
348 | 348 | // get the move document processor |
349 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
349 | + include_once(includeFileProcessor("processors/move_document.processor.php", $manager_theme)); |
|
350 | 350 | break; |
351 | 351 | case 61: |
352 | 352 | // get the processor for publishing content |
353 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
353 | + include_once(includeFileProcessor("processors/publish_content.processor.php", $manager_theme)); |
|
354 | 354 | break; |
355 | 355 | case 62: |
356 | 356 | // get the processor for publishing content |
357 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
357 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php", $manager_theme)); |
|
358 | 358 | break; |
359 | 359 | case 56: |
360 | 360 | // get the sort menuindex action |
361 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
362 | - include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
363 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
361 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
362 | + include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php", $manager_theme)); |
|
363 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
364 | 364 | break; |
365 | 365 | /********************************************************************/ |
366 | 366 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
367 | 367 | /********************************************************************/ |
368 | 368 | case 7: |
369 | 369 | // get the wait page (so the tree can reload) |
370 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
371 | - include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
372 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
370 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
371 | + include_once(includeFileProcessor("actions/wait.static.php", $manager_theme)); |
|
372 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
373 | 373 | break; |
374 | 374 | /********************************************************************/ |
375 | 375 | /* let the user log out */ |
376 | 376 | /********************************************************************/ |
377 | 377 | case 8: |
378 | 378 | // get the logout processor |
379 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
379 | + include_once(includeFileProcessor("processors/logout.processor.php", $manager_theme)); |
|
380 | 380 | break; |
381 | 381 | /********************************************************************/ |
382 | 382 | /* user management */ |
383 | 383 | /********************************************************************/ |
384 | 384 | case 87: |
385 | 385 | // get the new web user page |
386 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
387 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
388 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
386 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
387 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme)); |
|
388 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
389 | 389 | break; |
390 | 390 | case 88: |
391 | 391 | // get the edit web user page |
392 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
393 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
394 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
392 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
393 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme)); |
|
394 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
395 | 395 | break; |
396 | 396 | case 89: |
397 | 397 | // get the save web user processor |
398 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
398 | + include_once(includeFileProcessor("processors/save_web_user.processor.php", $manager_theme)); |
|
399 | 399 | break; |
400 | 400 | case 90: |
401 | 401 | // get the delete web user page |
402 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
402 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php", $manager_theme)); |
|
403 | 403 | break; |
404 | 404 | case 11: |
405 | 405 | // get the new user page |
406 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
407 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
408 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
406 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
407 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme)); |
|
408 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
409 | 409 | break; |
410 | 410 | case 12: |
411 | 411 | // get the edit user page |
412 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
413 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
414 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
412 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
413 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme)); |
|
414 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
415 | 415 | break; |
416 | 416 | case 32: |
417 | 417 | // get the save user processor |
418 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
418 | + include_once(includeFileProcessor("processors/save_user.processor.php", $manager_theme)); |
|
419 | 419 | break; |
420 | 420 | case 28: |
421 | 421 | // get the change password page |
422 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
423 | - include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
424 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
422 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
423 | + include_once(includeFileProcessor("actions/mutate_password.dynamic.php", $manager_theme)); |
|
424 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
425 | 425 | break; |
426 | 426 | case 34: |
427 | 427 | // get the save new password page |
428 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
428 | + include_once(includeFileProcessor("processors/save_password.processor.php", $manager_theme)); |
|
429 | 429 | break; |
430 | 430 | case 33: |
431 | 431 | // get the delete user page |
432 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
432 | + include_once(includeFileProcessor("processors/delete_user.processor.php", $manager_theme)); |
|
433 | 433 | break; |
434 | 434 | /********************************************************************/ |
435 | 435 | /* role management */ |
436 | 436 | /********************************************************************/ |
437 | 437 | case 38: |
438 | 438 | // get the new role page |
439 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
440 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
441 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
439 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
440 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme)); |
|
441 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
442 | 442 | break; |
443 | 443 | case 35: |
444 | 444 | // get the edit role page |
445 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
446 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
447 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
445 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
446 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme)); |
|
447 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
448 | 448 | break; |
449 | 449 | case 36: |
450 | 450 | // get the save role page |
451 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
451 | + include_once(includeFileProcessor("processors/save_role.processor.php", $manager_theme)); |
|
452 | 452 | break; |
453 | 453 | case 37: |
454 | 454 | // get the delete role page |
455 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
455 | + include_once(includeFileProcessor("processors/delete_role.processor.php", $manager_theme)); |
|
456 | 456 | break; |
457 | 457 | /********************************************************************/ |
458 | 458 | /* category management */ |
459 | 459 | /********************************************************************/ |
460 | 460 | case 120: |
461 | 461 | // get the edit category page |
462 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
463 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
464 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
462 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
463 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme)); |
|
464 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
465 | 465 | break; |
466 | 466 | case 121: |
467 | 467 | // for ajax-requests |
468 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
468 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme)); |
|
469 | 469 | break; |
470 | 470 | /********************************************************************/ |
471 | 471 | /* template management */ |
472 | 472 | /********************************************************************/ |
473 | 473 | case 16: |
474 | 474 | // get the edit template action |
475 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
476 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
477 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
475 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
476 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme)); |
|
477 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
478 | 478 | break; |
479 | 479 | case 19: |
480 | 480 | // get the new template action |
481 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
482 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
483 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
481 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
482 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme)); |
|
483 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
484 | 484 | break; |
485 | 485 | case 20: |
486 | 486 | // get the save processor |
487 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
487 | + include_once(includeFileProcessor("processors/save_template.processor.php", $manager_theme)); |
|
488 | 488 | break; |
489 | 489 | case 21: |
490 | 490 | // get the delete processor |
491 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
491 | + include_once(includeFileProcessor("processors/delete_template.processor.php", $manager_theme)); |
|
492 | 492 | break; |
493 | 493 | case 96: |
494 | 494 | // get the duplicate template processor |
495 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
495 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php", $manager_theme)); |
|
496 | 496 | break; |
497 | 497 | case 117: |
498 | 498 | // change the tv rank for selected template |
499 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
500 | - include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
501 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
499 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
500 | + include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php", $manager_theme)); |
|
501 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
502 | 502 | break; |
503 | 503 | /********************************************************************/ |
504 | 504 | /* snippet management */ |
505 | 505 | /********************************************************************/ |
506 | 506 | case 22: |
507 | 507 | // get the edit snippet action |
508 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
509 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
510 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
508 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
509 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme)); |
|
510 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
511 | 511 | break; |
512 | 512 | case 23: |
513 | 513 | // get the new snippet action |
514 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
515 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
516 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
514 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
515 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme)); |
|
516 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
517 | 517 | break; |
518 | 518 | case 24: |
519 | 519 | // get the save processor |
520 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
520 | + include_once(includeFileProcessor("processors/save_snippet.processor.php", $manager_theme)); |
|
521 | 521 | break; |
522 | 522 | case 25: |
523 | 523 | // get the delete processor |
524 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
524 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php", $manager_theme)); |
|
525 | 525 | break; |
526 | 526 | case 98: |
527 | 527 | // get the duplicate processor |
528 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
528 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php", $manager_theme)); |
|
529 | 529 | break; |
530 | 530 | /********************************************************************/ |
531 | 531 | /* htmlsnippet management */ |
532 | 532 | /********************************************************************/ |
533 | 533 | case 78: |
534 | 534 | // get the edit snippet action |
535 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
536 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
537 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
535 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
536 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme)); |
|
537 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
538 | 538 | break; |
539 | 539 | case 77: |
540 | 540 | // get the new snippet action |
541 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
542 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
543 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
541 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
542 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme)); |
|
543 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
544 | 544 | break; |
545 | 545 | case 79: |
546 | 546 | // get the save processor |
547 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
547 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php", $manager_theme)); |
|
548 | 548 | break; |
549 | 549 | case 80: |
550 | 550 | // get the delete processor |
551 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
551 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php", $manager_theme)); |
|
552 | 552 | break; |
553 | 553 | case 97: |
554 | 554 | // get the duplicate processor |
555 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
555 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php", $manager_theme)); |
|
556 | 556 | break; |
557 | 557 | /********************************************************************/ |
558 | 558 | /* show the credits page */ |
559 | 559 | /********************************************************************/ |
560 | 560 | case 18: |
561 | 561 | // get the credits page |
562 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
563 | - include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
564 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
562 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
563 | + include_once(includeFileProcessor("actions/credits.static.php", $manager_theme)); |
|
564 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
565 | 565 | break; |
566 | 566 | /********************************************************************/ |
567 | 567 | /* empty cache & synchronisation */ |
568 | 568 | /********************************************************************/ |
569 | 569 | case 26: |
570 | 570 | // get the cache emptying processor |
571 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
572 | - include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
573 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
571 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
572 | + include_once(includeFileProcessor("actions/refresh_site.dynamic.php", $manager_theme)); |
|
573 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
574 | 574 | break; |
575 | 575 | /********************************************************************/ |
576 | 576 | /* Module management */ |
577 | 577 | /********************************************************************/ |
578 | 578 | case 106: |
579 | 579 | // get module management |
580 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
581 | - include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
582 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
580 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
581 | + include_once(includeFileProcessor("actions/modules.static.php", $manager_theme)); |
|
582 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
583 | 583 | break; |
584 | 584 | case 107: |
585 | 585 | // get the new module action |
586 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
587 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
588 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
586 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
587 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme)); |
|
588 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
589 | 589 | break; |
590 | 590 | case 108: |
591 | 591 | // get the edit module action |
592 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
593 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
594 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
592 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
593 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme)); |
|
594 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
595 | 595 | break; |
596 | 596 | case 109: |
597 | 597 | // get the save processor |
598 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
598 | + include_once(includeFileProcessor("processors/save_module.processor.php", $manager_theme)); |
|
599 | 599 | break; |
600 | 600 | case 110: |
601 | 601 | // get the delete processor |
602 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
602 | + include_once(includeFileProcessor("processors/delete_module.processor.php", $manager_theme)); |
|
603 | 603 | break; |
604 | 604 | case 111: |
605 | 605 | // get the duplicate processor |
606 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
606 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php", $manager_theme)); |
|
607 | 607 | break; |
608 | 608 | case 112: |
609 | 609 | // execute/run the module |
610 | 610 | //include_once "header.inc.php"; |
611 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
611 | + include_once(includeFileProcessor("processors/execute_module.processor.php", $manager_theme)); |
|
612 | 612 | //include_once "footer.inc.php"; |
613 | 613 | break; |
614 | 614 | case 113: |
615 | 615 | // get the module resources (dependencies) action |
616 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
617 | - include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
618 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
616 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
617 | + include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php", $manager_theme)); |
|
618 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
619 | 619 | break; |
620 | 620 | /********************************************************************/ |
621 | 621 | /* plugin management */ |
@@ -623,46 +623,46 @@ discard block |
||
623 | 623 | case 100: |
624 | 624 | // change the plugin priority |
625 | 625 | //include_once "header.inc.php"; - in action file |
626 | - include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
627 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
626 | + include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php", $manager_theme)); |
|
627 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
628 | 628 | break; |
629 | 629 | case 101: |
630 | 630 | // get the new plugin action |
631 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
632 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
633 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
631 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
632 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme)); |
|
633 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
634 | 634 | break; |
635 | 635 | case 102: |
636 | 636 | // get the edit plugin action |
637 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
638 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
639 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
637 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
638 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme)); |
|
639 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
640 | 640 | break; |
641 | 641 | case 103: |
642 | 642 | // get the save processor |
643 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
643 | + include_once(includeFileProcessor("processors/save_plugin.processor.php", $manager_theme)); |
|
644 | 644 | break; |
645 | 645 | case 104: |
646 | 646 | // get the delete processor |
647 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
647 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php", $manager_theme)); |
|
648 | 648 | break; |
649 | 649 | case 105: |
650 | 650 | // get the duplicate processor |
651 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
651 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php", $manager_theme)); |
|
652 | 652 | break; |
653 | 653 | case 119: |
654 | 654 | // get the purge processor |
655 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
655 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php", $manager_theme)); |
|
656 | 656 | break; |
657 | 657 | /********************************************************************/ |
658 | 658 | /* view phpinfo */ |
659 | 659 | /********************************************************************/ |
660 | 660 | case 200: |
661 | 661 | // show phpInfo |
662 | - if($modx->hasPermission('logs')) { |
|
663 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
664 | - include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
665 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
662 | + if ($modx->hasPermission('logs')) { |
|
663 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
664 | + include_once(includeFileProcessor("actions/phpinfo.static.php", $manager_theme)); |
|
665 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
666 | 666 | } |
667 | 667 | break; |
668 | 668 | /********************************************************************/ |
@@ -670,320 +670,320 @@ discard block |
||
670 | 670 | /********************************************************************/ |
671 | 671 | case 29: |
672 | 672 | // get the error page |
673 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
673 | + include_once(includeFileProcessor("actions/error_dialog.static.php", $manager_theme)); |
|
674 | 674 | break; |
675 | 675 | /********************************************************************/ |
676 | 676 | /* file manager */ |
677 | 677 | /********************************************************************/ |
678 | 678 | case 31: |
679 | 679 | // get the page to manage files |
680 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
681 | - include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
682 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
680 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
681 | + include_once(includeFileProcessor("actions/files.dynamic.php", $manager_theme)); |
|
682 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
683 | 683 | break; |
684 | 684 | /********************************************************************/ |
685 | 685 | /* access permissions */ |
686 | 686 | /********************************************************************/ |
687 | 687 | case 40: |
688 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
689 | - include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
690 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
688 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
689 | + include_once(includeFileProcessor("actions/access_permissions.dynamic.php", $manager_theme)); |
|
690 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
691 | 691 | break; |
692 | 692 | case 91: |
693 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
694 | - include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
695 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
693 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
694 | + include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php", $manager_theme)); |
|
695 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
696 | 696 | break; |
697 | 697 | /********************************************************************/ |
698 | 698 | /* access groups processor */ |
699 | 699 | /********************************************************************/ |
700 | 700 | case 41: |
701 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
701 | + include_once(includeFileProcessor("processors/access_groups.processor.php", $manager_theme)); |
|
702 | 702 | break; |
703 | 703 | case 92: |
704 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
704 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php", $manager_theme)); |
|
705 | 705 | break; |
706 | 706 | /********************************************************************/ |
707 | 707 | /* settings editor */ |
708 | 708 | /********************************************************************/ |
709 | 709 | case 17: |
710 | 710 | // get the settings editor |
711 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
712 | - include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
713 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
711 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
712 | + include_once(includeFileProcessor("actions/mutate_settings.dynamic.php", $manager_theme)); |
|
713 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
714 | 714 | break; |
715 | 715 | case 118: |
716 | 716 | // call settings ajax include |
717 | 717 | ob_clean(); |
718 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
718 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php", $manager_theme)); |
|
719 | 719 | break; |
720 | 720 | /********************************************************************/ |
721 | 721 | /* save settings */ |
722 | 722 | /********************************************************************/ |
723 | 723 | case 30: |
724 | 724 | // get the save settings processor |
725 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
725 | + include_once(includeFileProcessor("processors/save_settings.processor.php", $manager_theme)); |
|
726 | 726 | break; |
727 | 727 | /********************************************************************/ |
728 | 728 | /* system information */ |
729 | 729 | /********************************************************************/ |
730 | 730 | case 53: |
731 | 731 | // get the settings editor |
732 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
733 | - include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
734 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
732 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
733 | + include_once(includeFileProcessor("actions/sysinfo.static.php", $manager_theme)); |
|
734 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
735 | 735 | break; |
736 | 736 | /********************************************************************/ |
737 | 737 | /* optimise table */ |
738 | 738 | /********************************************************************/ |
739 | 739 | case 54: |
740 | 740 | // get the table optimizer/truncate processor |
741 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
741 | + include_once(includeFileProcessor("processors/optimize_table.processor.php", $manager_theme)); |
|
742 | 742 | break; |
743 | 743 | /********************************************************************/ |
744 | 744 | /* view logging */ |
745 | 745 | /********************************************************************/ |
746 | 746 | case 13: |
747 | 747 | // view logging |
748 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
749 | - include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
750 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
748 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
749 | + include_once(includeFileProcessor("actions/logging.static.php", $manager_theme)); |
|
750 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
751 | 751 | break; |
752 | 752 | /********************************************************************/ |
753 | 753 | /* empty logs */ |
754 | 754 | /********************************************************************/ |
755 | 755 | case 55: |
756 | 756 | // get the settings editor |
757 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
757 | + include_once(includeFileProcessor("processors/empty_table.processor.php", $manager_theme)); |
|
758 | 758 | break; |
759 | 759 | /********************************************************************/ |
760 | 760 | /* calls test page */ |
761 | 761 | /********************************************************************/ |
762 | 762 | case 999: |
763 | 763 | // get the test page |
764 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
765 | - include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
766 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
764 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
765 | + include_once(includeFileProcessor("test_page.php", $manager_theme)); |
|
766 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
767 | 767 | break; |
768 | 768 | /********************************************************************/ |
769 | 769 | /* Empty recycle bin */ |
770 | 770 | /********************************************************************/ |
771 | 771 | case 64: |
772 | 772 | // get the Recycle bin emptier |
773 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
773 | + include_once(includeFileProcessor("processors/remove_content.processor.php", $manager_theme)); |
|
774 | 774 | break; |
775 | 775 | /********************************************************************/ |
776 | 776 | /* Messages */ |
777 | 777 | /********************************************************************/ |
778 | 778 | case 10: |
779 | 779 | // get the messages page |
780 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
781 | - include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
782 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
780 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
781 | + include_once(includeFileProcessor("actions/messages.static.php", $manager_theme)); |
|
782 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
783 | 783 | break; |
784 | 784 | /********************************************************************/ |
785 | 785 | /* Delete a message */ |
786 | 786 | /********************************************************************/ |
787 | 787 | case 65: |
788 | 788 | // get the message deleter |
789 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
789 | + include_once(includeFileProcessor("processors/delete_message.processor.php", $manager_theme)); |
|
790 | 790 | break; |
791 | 791 | /********************************************************************/ |
792 | 792 | /* Send a message */ |
793 | 793 | /********************************************************************/ |
794 | 794 | case 66: |
795 | 795 | // get the message deleter |
796 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
796 | + include_once(includeFileProcessor("processors/send_message.processor.php", $manager_theme)); |
|
797 | 797 | break; |
798 | 798 | /********************************************************************/ |
799 | 799 | /* Remove locks */ |
800 | 800 | /********************************************************************/ |
801 | 801 | case 67: |
802 | 802 | // get the lock remover |
803 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
803 | + include_once(includeFileProcessor("processors/remove_locks.processor.php", $manager_theme)); |
|
804 | 804 | break; |
805 | 805 | /********************************************************************/ |
806 | 806 | /* Site schedule */ |
807 | 807 | /********************************************************************/ |
808 | 808 | case 70: |
809 | 809 | // get the schedule page |
810 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
811 | - include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
812 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
810 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
811 | + include_once(includeFileProcessor("actions/site_schedule.static.php", $manager_theme)); |
|
812 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
813 | 813 | break; |
814 | 814 | /********************************************************************/ |
815 | 815 | /* Search */ |
816 | 816 | /********************************************************************/ |
817 | 817 | case 71: |
818 | 818 | // get the search page |
819 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
820 | - include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
821 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
819 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
820 | + include_once(includeFileProcessor("actions/search.static.php", $manager_theme)); |
|
821 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
822 | 822 | break; |
823 | 823 | /********************************************************************/ |
824 | 824 | /* About */ |
825 | 825 | /********************************************************************/ |
826 | 826 | case 59: |
827 | 827 | // get the about page |
828 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
829 | - include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
830 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
828 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
829 | + include_once(includeFileProcessor("actions/about.static.php", $manager_theme)); |
|
830 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
831 | 831 | break; |
832 | 832 | /********************************************************************/ |
833 | 833 | /* Add weblink */ |
834 | 834 | /********************************************************************/ |
835 | 835 | case 72: |
836 | 836 | // get the weblink page |
837 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
838 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
839 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
837 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
838 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
839 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
840 | 840 | break; |
841 | 841 | /********************************************************************/ |
842 | 842 | /* User management */ |
843 | 843 | /********************************************************************/ |
844 | 844 | case 75: |
845 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
846 | - include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
847 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
845 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
846 | + include_once(includeFileProcessor("actions/user_management.static.php", $manager_theme)); |
|
847 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
848 | 848 | break; |
849 | 849 | case 99: |
850 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
851 | - include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
852 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
850 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
851 | + include_once(includeFileProcessor("actions/web_user_management.static.php", $manager_theme)); |
|
852 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
853 | 853 | break; |
854 | 854 | case 86: |
855 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
856 | - include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
857 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
855 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
856 | + include_once(includeFileProcessor("actions/role_management.static.php", $manager_theme)); |
|
857 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
858 | 858 | break; |
859 | 859 | /********************************************************************/ |
860 | 860 | /* template/ snippet management */ |
861 | 861 | /********************************************************************/ |
862 | 862 | case 76: |
863 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
864 | - include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
865 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
863 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
864 | + include_once(includeFileProcessor("actions/resources.static.php", $manager_theme)); |
|
865 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
866 | 866 | break; |
867 | 867 | /********************************************************************/ |
868 | 868 | /* Export to file */ |
869 | 869 | /********************************************************************/ |
870 | 870 | case 83: |
871 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
872 | - include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
873 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
871 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
872 | + include_once(includeFileProcessor("actions/export_site.static.php", $manager_theme)); |
|
873 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
874 | 874 | break; |
875 | 875 | /********************************************************************/ |
876 | 876 | /* Resource Selector */ |
877 | 877 | /********************************************************************/ |
878 | 878 | case 84: |
879 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
879 | + include_once(includeFileProcessor("actions/resource_selector.static.php", $manager_theme)); |
|
880 | 880 | break; |
881 | 881 | /********************************************************************/ |
882 | 882 | /* Backup Manager */ |
883 | 883 | /********************************************************************/ |
884 | 884 | case 93: |
885 | 885 | # header and footer will be handled interally |
886 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
886 | + include_once(includeFileProcessor("actions/bkmanager.static.php", $manager_theme)); |
|
887 | 887 | break; |
888 | 888 | /********************************************************************/ |
889 | 889 | /* Duplicate Document */ |
890 | 890 | /********************************************************************/ |
891 | 891 | case 94: |
892 | 892 | // get the duplicate processor |
893 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
893 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php", $manager_theme)); |
|
894 | 894 | break; |
895 | 895 | /********************************************************************/ |
896 | 896 | /* Import Document from file */ |
897 | 897 | /********************************************************************/ |
898 | 898 | case 95: |
899 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
900 | - include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
901 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
899 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
900 | + include_once(includeFileProcessor("actions/import_site.static.php", $manager_theme)); |
|
901 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
902 | 902 | break; |
903 | 903 | /********************************************************************/ |
904 | 904 | /* Help */ |
905 | 905 | /********************************************************************/ |
906 | 906 | case 9: |
907 | 907 | // get the help page |
908 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
909 | - include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
910 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
908 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
909 | + include_once(includeFileProcessor("actions/help.static.php", $manager_theme)); |
|
910 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
911 | 911 | break; |
912 | 912 | /********************************************************************/ |
913 | 913 | /* Template Variables - Based on Apodigm's Docvars */ |
914 | 914 | /********************************************************************/ |
915 | 915 | case 300: |
916 | 916 | // get the new document variable action |
917 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
918 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
919 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
917 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
918 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme)); |
|
919 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
920 | 920 | break; |
921 | 921 | case 301: |
922 | 922 | // get the edit document variable action |
923 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
924 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
925 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
923 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
924 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme)); |
|
925 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
926 | 926 | break; |
927 | 927 | case 302: |
928 | 928 | // get the save processor |
929 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
929 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php", $manager_theme)); |
|
930 | 930 | break; |
931 | 931 | case 303: |
932 | 932 | // get the delete processor |
933 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
933 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php", $manager_theme)); |
|
934 | 934 | break; |
935 | 935 | case 304: |
936 | 936 | // get the duplicate processor |
937 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
937 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php", $manager_theme)); |
|
938 | 938 | break; |
939 | 939 | case 305: |
940 | 940 | // get the tv-rank action |
941 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
942 | - include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
943 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
941 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
942 | + include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php", $manager_theme)); |
|
943 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
944 | 944 | break; |
945 | 945 | /********************************************************************/ |
946 | 946 | /* Event viewer: show event message log */ |
947 | 947 | /********************************************************************/ |
948 | 948 | case 114: |
949 | 949 | // get event logs |
950 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
951 | - include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
952 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
950 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
951 | + include_once(includeFileProcessor("actions/eventlog.dynamic.php", $manager_theme)); |
|
952 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
953 | 953 | break; |
954 | 954 | case 115: |
955 | 955 | // get event log details viewer |
956 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
957 | - include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
958 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
956 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
957 | + include_once(includeFileProcessor("actions/eventlog_details.dynamic.php", $manager_theme)); |
|
958 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
959 | 959 | break; |
960 | 960 | case 116: |
961 | 961 | // get the event log delete processor |
962 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
962 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php", $manager_theme)); |
|
963 | 963 | break; |
964 | 964 | |
965 | 965 | case 501: |
966 | 966 | //delete category |
967 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
967 | + include_once(includeFileProcessor("processors/delete_category.processor.php", $manager_theme)); |
|
968 | 968 | break; |
969 | 969 | /********************************************************************/ |
970 | 970 | /* default action: show not implemented message */ |
971 | 971 | /********************************************************************/ |
972 | 972 | default : |
973 | 973 | // say that what was requested doesn't do anything yet |
974 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
974 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
975 | 975 | echo " |
976 | 976 | <div class='sectionHeader'>".$_lang['functionnotimpl']."</div> |
977 | 977 | <div class='sectionBody'> |
978 | 978 | <p>".$_lang['functionnotimpl_message']."</p> |
979 | 979 | </div> |
980 | 980 | "; |
981 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
981 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
982 | 982 | } |
983 | 983 | |
984 | 984 | /********************************************************************/ |
985 | 985 | // log action, unless it's a frame request |
986 | -if($action!=1 && $action!=7 && $action!=2) { |
|
986 | +if ($action != 1 && $action != 7 && $action != 2) { |
|
987 | 987 | include_once "log.class.inc.php"; |
988 | 988 | $log = new logHandler; |
989 | 989 | $log->initAndWriteLog(); |
@@ -1,14 +1,14 @@ 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(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
6 | +if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
7 | 7 | header('HTTP/1.0 404 Not Found'); |
8 | 8 | exit; |
9 | 9 | } |
10 | 10 | |
11 | -if(isset($_SESSION['mgrValidated']) && $_SESSION['usertype'] != 'manager') { |
|
11 | +if (isset($_SESSION['mgrValidated']) && $_SESSION['usertype'] != 'manager') { |
|
12 | 12 | // if (isset($_COOKIE[session_name()])) { |
13 | 13 | // setcookie(session_name(), '', 0, MODX_BASE_URL); |
14 | 14 | // } |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | // andrazk 20070416 - if installer is running, destroy active sessions |
21 | -if(file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) { |
|
22 | - include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
23 | - if(isset($installStartTime)) { |
|
24 | - if((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
21 | +if (file_exists(MODX_BASE_PATH.'assets/cache/installProc.inc.php')) { |
|
22 | + include_once(MODX_BASE_PATH.'assets/cache/installProc.inc.php'); |
|
23 | + if (isset($installStartTime)) { |
|
24 | + if ((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
25 | 25 | unset($installStartTime); |
26 | - @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
|
27 | - unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
26 | + @ chmod(MODX_BASE_PATH.'assets/cache/installProc.inc.php', 0755); |
|
27 | + unlink(MODX_BASE_PATH.'assets/cache/installProc.inc.php'); |
|
28 | 28 | } else { |
29 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | - if(isset($_COOKIE[session_name()])) { |
|
29 | + if ($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | + if (isset($_COOKIE[session_name()])) { |
|
31 | 31 | session_unset(); |
32 | 32 | @session_destroy(); |
33 | 33 | // setcookie(session_name(), '', 0, MODX_BASE_URL); |
@@ -39,37 +39,37 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | // andrazk 20070416 - if session started before install and was not destroyed yet |
42 | -if(isset($lastInstallTime)) { |
|
43 | - if(isset($_SESSION['mgrValidated'])) { |
|
44 | - if(isset($_SESSION['modx.session.created.time'])) { |
|
45 | - if($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | - if(isset($_COOKIE[session_name()])) { |
|
42 | +if (isset($lastInstallTime)) { |
|
43 | + if (isset($_SESSION['mgrValidated'])) { |
|
44 | + if (isset($_SESSION['modx.session.created.time'])) { |
|
45 | + if ($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | + if ($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | + if (isset($_COOKIE[session_name()])) { |
|
48 | 48 | session_unset(); |
49 | 49 | @session_destroy(); |
50 | 50 | // setcookie(session_name(), '', 0, MODX_BASE_URL); |
51 | 51 | } |
52 | 52 | header('HTTP/1.0 307 Redirect'); |
53 | - header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2'); |
|
53 | + header('Location: '.MODX_MANAGER_URL.'index.php?installGoingOn=2'); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | -if(!isset($_SESSION['mgrValidated'])) { |
|
61 | - if(isset($manager_language)) { |
|
60 | +if (!isset($_SESSION['mgrValidated'])) { |
|
61 | + if (isset($manager_language)) { |
|
62 | 62 | // establish fallback to English default |
63 | 63 | include_once "lang/english.inc.php"; |
64 | 64 | // include localized overrides |
65 | - include_once "lang/" . $manager_language . ".inc.php"; |
|
65 | + include_once "lang/".$manager_language.".inc.php"; |
|
66 | 66 | } else { |
67 | 67 | include_once "lang/english.inc.php"; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
71 | 71 | $modx->setPlaceholder('theme', $manager_theme); |
72 | - $modx->setPlaceholder('favicon', (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico')); |
|
72 | + $modx->setPlaceholder('favicon', (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico')); |
|
73 | 73 | |
74 | 74 | // invoke OnManagerLoginFormPrerender event |
75 | 75 | $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender'); |
@@ -80,29 +80,29 @@ discard block |
||
80 | 80 | $modx->setPlaceholder('manager_path', MGR_DIR); |
81 | 81 | $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
82 | 82 | $modx->setPlaceholder('login_message', $_lang["login_message"]); |
83 | - $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
83 | + $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/'); |
|
84 | 84 | $modx->setPlaceholder('year', date('Y')); |
85 | 85 | $modx->setPlaceholder('manager_theme_style', (isset($_COOKIE['MODX_themeColor']) ? $_COOKIE['MODX_themeColor'] : '')); |
86 | 86 | |
87 | 87 | // andrazk 20070416 - notify user of install/update |
88 | - if(isset($_GET['installGoingOn'])) { |
|
88 | + if (isset($_GET['installGoingOn'])) { |
|
89 | 89 | $installGoingOn = $_GET['installGoingOn']; |
90 | 90 | } |
91 | - if(isset($installGoingOn)) { |
|
92 | - switch($installGoingOn) { |
|
91 | + if (isset($installGoingOn)) { |
|
92 | + switch ($installGoingOn) { |
|
93 | 93 | case 1 : |
94 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
94 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">".$_lang["login_cancelled_install_in_progress"]."</p><p>".$_lang["login_message"]."</p>"); |
|
95 | 95 | break; |
96 | 96 | case 2 : |
97 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
97 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">".$_lang["login_cancelled_site_was_updated"]."</p><p>".$_lang["login_message"]."</p>"); |
|
98 | 98 | break; |
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - if($modx->config['use_captcha'] == 1) { |
|
102 | + if ($modx->config['use_captcha'] == 1) { |
|
103 | 103 | $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]); |
104 | - $modx->setPlaceholder('captcha_image', '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'includes/veriword.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>'); |
|
105 | - $modx->setPlaceholder('captcha_input', '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
104 | + $modx->setPlaceholder('captcha_image', '<a href="'.MODX_MANAGER_URL.'" class="loginCaptcha"><img id="captcha_image" src="'.MODX_MANAGER_URL.'includes/veriword.php?rand='.rand().'" alt="'.$_lang["login_captcha_message"].'" /></a>'); |
|
105 | + $modx->setPlaceholder('captcha_input', '<label>'.$_lang["captcha_code"].'</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | // login info |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | // invoke OnManagerLoginFormRender event |
121 | 121 | $evtOut = $modx->invokeEvent('OnManagerLoginFormRender'); |
122 | - $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : ''; |
|
122 | + $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">'.implode('', $evtOut).'</div>' : ''; |
|
123 | 123 | $modx->setPlaceholder('OnManagerLoginFormRender', $html); |
124 | 124 | |
125 | 125 | // load template |
@@ -128,38 +128,38 @@ discard block |
||
128 | 128 | $target = $modx->mergeSettingsContent($target); |
129 | 129 | |
130 | 130 | $login_tpl = null; |
131 | - if(substr($target, 0, 1) === '@') { |
|
132 | - if(substr($target, 0, 6) === '@CHUNK') { |
|
131 | + if (substr($target, 0, 1) === '@') { |
|
132 | + if (substr($target, 0, 6) === '@CHUNK') { |
|
133 | 133 | $target = trim(substr($target, 7)); |
134 | 134 | $login_tpl = $modx->getChunk($target); |
135 | - } elseif(substr($target, 0, 5) === '@FILE') { |
|
135 | + } elseif (substr($target, 0, 5) === '@FILE') { |
|
136 | 136 | $target = trim(substr($target, 6)); |
137 | 137 | $login_tpl = file_get_contents($target); |
138 | 138 | } |
139 | 139 | } else { |
140 | - $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/'; |
|
141 | - if(is_file($theme_path . 'style.php')) { |
|
142 | - include($theme_path . 'style.php'); |
|
140 | + $theme_path = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/'; |
|
141 | + if (is_file($theme_path.'style.php')) { |
|
142 | + include($theme_path.'style.php'); |
|
143 | 143 | } |
144 | 144 | $chunk = $modx->getChunk($target); |
145 | - if($chunk !== false && !empty($chunk)) { |
|
145 | + if ($chunk !== false && !empty($chunk)) { |
|
146 | 146 | $login_tpl = $chunk; |
147 | - } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
148 | - $target = MODX_BASE_PATH . $target; |
|
147 | + } elseif (is_file(MODX_BASE_PATH.$target)) { |
|
148 | + $target = MODX_BASE_PATH.$target; |
|
149 | 149 | $login_tpl = file_get_contents($target); |
150 | - } elseif(is_file($target)) { |
|
150 | + } elseif (is_file($target)) { |
|
151 | 151 | $login_tpl = file_get_contents($target); |
152 | - } elseif(is_file($theme_path . 'login.tpl')) { |
|
153 | - $target = $theme_path . 'login.tpl'; |
|
152 | + } elseif (is_file($theme_path.'login.tpl')) { |
|
153 | + $target = $theme_path.'login.tpl'; |
|
154 | 154 | $login_tpl = file_get_contents($target); |
155 | - } elseif(is_file($theme_path . 'templates/actions/login.tpl')) { |
|
156 | - $target = $theme_path . 'templates/actions/login.tpl'; |
|
155 | + } elseif (is_file($theme_path.'templates/actions/login.tpl')) { |
|
156 | + $target = $theme_path.'templates/actions/login.tpl'; |
|
157 | 157 | $login_tpl = file_get_contents($target); |
158 | - } elseif(is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
159 | - $target = $theme_path . 'html/login.html'; |
|
158 | + } elseif (is_file($theme_path.'html/login.html')) { // ClipperCMS compatible |
|
159 | + $target = $theme_path.'html/login.html'; |
|
160 | 160 | $login_tpl = file_get_contents($target); |
161 | 161 | } else { |
162 | - $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl'; |
|
162 | + $target = MODX_MANAGER_PATH.'media/style/common/login.tpl'; |
|
163 | 163 | $login_tpl = file_get_contents($target); |
164 | 164 | } |
165 | 165 | } |
@@ -182,8 +182,8 @@ discard block |
||
182 | 182 | $lasthittime = time(); |
183 | 183 | $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
184 | 184 | |
185 | - if($action !== 1) { |
|
186 | - if(!intval($itemid)) { |
|
185 | + if ($action !== 1) { |
|
186 | + if (!intval($itemid)) { |
|
187 | 187 | $itemid = null; |
188 | 188 | } |
189 | 189 | $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)", $modx->getFullTableName('active_users') // Table |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | */ |
6 | 6 | |
7 | 7 | // Added by Raymond 20-Jan-2005 |
8 | -function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = '') { |
|
8 | +function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = ''){ |
|
9 | 9 | |
10 | 10 | global $modx; |
11 | 11 | |
@@ -14,29 +14,29 @@ discard block |
||
14 | 14 | $value = ProcessTVCommand($value, $name, $docid); |
15 | 15 | |
16 | 16 | $params = array(); |
17 | - if($paramstring) { |
|
17 | + if ($paramstring) { |
|
18 | 18 | $cp = explode("&", $paramstring); |
19 | - foreach($cp as $p => $v) { |
|
19 | + foreach ($cp as $p => $v) { |
|
20 | 20 | $v = trim($v); // trim |
21 | 21 | $ar = explode("=", $v); |
22 | - if(is_array($ar) && count($ar) == 2) { |
|
22 | + if (is_array($ar) && count($ar) == 2) { |
|
23 | 23 | $params[$ar[0]] = decodeParamValue($ar[1]); |
24 | 24 | } |
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | 28 | $id = "tv$name"; |
29 | - switch($format) { |
|
29 | + switch ($format) { |
|
30 | 30 | case 'image': |
31 | 31 | $images = parseInput($value, '||', 'array'); |
32 | 32 | $o = ''; |
33 | - foreach($images as $image) { |
|
34 | - if(!is_array($image)) { |
|
33 | + foreach ($images as $image) { |
|
34 | + if (!is_array($image)) { |
|
35 | 35 | $image = explode('==', $image); |
36 | 36 | } |
37 | 37 | $src = $image[0]; |
38 | 38 | |
39 | - if($src) { |
|
39 | + if ($src) { |
|
40 | 40 | // We have a valid source |
41 | 41 | $attributes = ''; |
42 | 42 | $attr = array( |
@@ -46,14 +46,14 @@ discard block |
||
46 | 46 | 'alt' => $modx->htmlspecialchars($params['alttext']), |
47 | 47 | 'style' => $params['style'] |
48 | 48 | ); |
49 | - if(isset($params['align']) && $params['align'] != 'none') { |
|
49 | + if (isset($params['align']) && $params['align'] != 'none') { |
|
50 | 50 | $attr['align'] = $params['align']; |
51 | 51 | } |
52 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
53 | - $attributes .= ' ' . $params['attrib']; |
|
52 | + foreach ($attr as $k => $v) $attributes .= ($v ? ' '.$k.'="'.$v.'"' : ''); |
|
53 | + $attributes .= ' '.$params['attrib']; |
|
54 | 54 | |
55 | 55 | // Output the image with attributes |
56 | - $o .= '<img' . rtrim($attributes) . ' />'; |
|
56 | + $o .= '<img'.rtrim($attributes).' />'; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | break; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | case "delim": // display as delimitted list |
62 | 62 | $value = parseInput($value, "||"); |
63 | 63 | $p = $params['format'] ? $params['format'] : " "; |
64 | - if($p == "\\n") { |
|
64 | + if ($p == "\\n") { |
|
65 | 65 | $p = "\n"; |
66 | 66 | } |
67 | 67 | $o = str_replace("||", $p, $value); |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | case "string": |
71 | 71 | $value = parseInput($value); |
72 | 72 | $format = strtolower($params['format']); |
73 | - if($format == 'upper case') { |
|
73 | + if ($format == 'upper case') { |
|
74 | 74 | $o = strtoupper($value); |
75 | - } else if($format == 'lower case') { |
|
75 | + } else if ($format == 'lower case') { |
|
76 | 76 | $o = strtolower($value); |
77 | - } else if($format == 'sentence case') { |
|
77 | + } else if ($format == 'sentence case') { |
|
78 | 78 | $o = ucfirst($value); |
79 | - } else if($format == 'capitalize') { |
|
79 | + } else if ($format == 'capitalize') { |
|
80 | 80 | $o = ucwords($value); |
81 | 81 | } else { |
82 | 82 | $o = $value; |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | break; |
85 | 85 | |
86 | 86 | case "date": |
87 | - if($value != '' || $params['default'] == 'Yes') { |
|
88 | - if(empty($value)) { |
|
87 | + if ($value != '' || $params['default'] == 'Yes') { |
|
88 | + if (empty($value)) { |
|
89 | 89 | $value = 'now'; |
90 | 90 | } |
91 | 91 | $timestamp = getUnixtimeFromDateString($value); |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | case "hyperlink": |
100 | 100 | $value = parseInput($value, "||", "array"); |
101 | 101 | $o = ''; |
102 | - for($i = 0; $i < count($value); $i++) { |
|
102 | + for ($i = 0; $i < count($value); $i++) { |
|
103 | 103 | list($name, $url) = is_array($value[$i]) ? $value[$i] : explode("==", $value[$i]); |
104 | - if(!$url) { |
|
104 | + if (!$url) { |
|
105 | 105 | $url = $name; |
106 | 106 | } |
107 | - if($url) { |
|
108 | - if($o) { |
|
107 | + if ($url) { |
|
108 | + if ($o) { |
|
109 | 109 | $o .= '<br />'; |
110 | 110 | } |
111 | 111 | $attributes = ''; |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | 'style' => $params['style'], |
118 | 118 | 'target' => $params['target'], |
119 | 119 | ); |
120 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
121 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
120 | + foreach ($attr as $k => $v) $attributes .= ($v ? ' '.$k.'="'.$v.'"' : ''); |
|
121 | + $attributes .= ' '.$params['attrib']; // add extra |
|
122 | 122 | |
123 | 123 | // Output the link |
124 | - $o .= '<a' . rtrim($attributes) . '>' . ($params['text'] ? $modx->htmlspecialchars($params['text']) : $name) . '</a>'; |
|
124 | + $o .= '<a'.rtrim($attributes).'>'.($params['text'] ? $modx->htmlspecialchars($params['text']) : $name).'</a>'; |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 | break; |
@@ -132,9 +132,9 @@ discard block |
||
132 | 132 | $tagname = ($params['tagname']) ? $params['tagname'] : 'div'; |
133 | 133 | $o = ''; |
134 | 134 | // Loop through a list of tags |
135 | - for($i = 0; $i < count($value); $i++) { |
|
135 | + for ($i = 0; $i < count($value); $i++) { |
|
136 | 136 | $tagvalue = is_array($value[$i]) ? implode(' ', $value[$i]) : $value[$i]; |
137 | - if(!$tagvalue) { |
|
137 | + if (!$tagvalue) { |
|
138 | 138 | continue; |
139 | 139 | } |
140 | 140 | |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | 'class' => $params['class'], |
146 | 146 | 'style' => $params['style'], |
147 | 147 | ); |
148 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
149 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
148 | + foreach ($attr as $k => $v) $attributes .= ($v ? ' '.$k.'="'.$v.'"' : ''); |
|
149 | + $attributes .= ' '.$params['attrib']; // add extra |
|
150 | 150 | |
151 | 151 | // Output the HTML Tag |
152 | - $o .= '<' . $tagname . rtrim($attributes) . '>' . $tagvalue . '</' . $tagname . '>'; |
|
152 | + $o .= '<'.$tagname.rtrim($attributes).'>'.$tagvalue.'</'.$tagname.'>'; |
|
153 | 153 | } |
154 | 154 | break; |
155 | 155 | |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | $w = $params['w'] ? $params['w'] : '100%'; |
159 | 159 | $h = $params['h'] ? $params['h'] : '400px'; |
160 | 160 | $richtexteditor = $params['edt'] ? $params['edt'] : ""; |
161 | - $o = '<div class="MODX_RichTextWidget"><textarea id="' . $id . '" name="' . $id . '" style="width:' . $w . '; height:' . $h . ';">'; |
|
161 | + $o = '<div class="MODX_RichTextWidget"><textarea id="'.$id.'" name="'.$id.'" style="width:'.$w.'; height:'.$h.';">'; |
|
162 | 162 | $o .= $modx->htmlspecialchars($value); |
163 | 163 | $o .= '</textarea></div>'; |
164 | 164 | $replace_richtext = array($id); |
165 | 165 | // setup editors |
166 | - if(!empty($replace_richtext) && !empty($richtexteditor)) { |
|
166 | + if (!empty($replace_richtext) && !empty($richtexteditor)) { |
|
167 | 167 | // invoke OnRichTextEditorInit event |
168 | 168 | $evtOut = $modx->invokeEvent("OnRichTextEditorInit", array( |
169 | 169 | 'editor' => $richtexteditor, |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | 'width' => $w, |
173 | 173 | 'height' => $h |
174 | 174 | )); |
175 | - if(is_array($evtOut)) { |
|
175 | + if (is_array($evtOut)) { |
|
176 | 176 | $o .= implode("", $evtOut); |
177 | 177 | } |
178 | 178 | } |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | |
186 | 186 | case "viewport": |
187 | 187 | $value = parseInput($value); |
188 | - $id = '_' . time(); |
|
189 | - if(!$params['vpid']) { |
|
188 | + $id = '_'.time(); |
|
189 | + if (!$params['vpid']) { |
|
190 | 190 | $params['vpid'] = $id; |
191 | 191 | } |
192 | 192 | $sTag = "<iframe"; |
@@ -194,42 +194,42 @@ discard block |
||
194 | 194 | $autoMode = "0"; |
195 | 195 | $w = $params['width']; |
196 | 196 | $h = $params['height']; |
197 | - if($params['stretch'] == 'Yes') { |
|
197 | + if ($params['stretch'] == 'Yes') { |
|
198 | 198 | $w = "100%"; |
199 | 199 | $h = "100%"; |
200 | 200 | } |
201 | - if($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | - $autoMode = "3"; //both |
|
203 | - } else if($params['awidth'] == 'Yes') { |
|
201 | + if ($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | + $autoMode = "3"; //both |
|
203 | + } else if ($params['awidth'] == 'Yes') { |
|
204 | 204 | $autoMode = "1"; //width only |
205 | - } else if($params['aheight'] == 'Yes') { |
|
206 | - $autoMode = "2"; //height only |
|
205 | + } else if ($params['aheight'] == 'Yes') { |
|
206 | + $autoMode = "2"; //height only |
|
207 | 207 | } |
208 | 208 | |
209 | - $modx->regClientStartupScript(MODX_MANAGER_URL . "media/script/bin/viewport.js", array( |
|
209 | + $modx->regClientStartupScript(MODX_MANAGER_URL."media/script/bin/viewport.js", array( |
|
210 | 210 | 'name' => 'viewport', |
211 | 211 | 'version' => '0', |
212 | 212 | 'plaintext' => false |
213 | 213 | )); |
214 | - $o = $sTag . " id='" . $params['vpid'] . "' name='" . $params['vpid'] . "' "; |
|
215 | - if($params['class']) { |
|
216 | - $o .= " class='" . $params['class'] . "' "; |
|
214 | + $o = $sTag." id='".$params['vpid']."' name='".$params['vpid']."' "; |
|
215 | + if ($params['class']) { |
|
216 | + $o .= " class='".$params['class']."' "; |
|
217 | 217 | } |
218 | - if($params['style']) { |
|
219 | - $o .= " style='" . $params['style'] . "' "; |
|
218 | + if ($params['style']) { |
|
219 | + $o .= " style='".$params['style']."' "; |
|
220 | 220 | } |
221 | - if($params['attrib']) { |
|
222 | - $o .= $params['attrib'] . " "; |
|
221 | + if ($params['attrib']) { |
|
222 | + $o .= $params['attrib']." "; |
|
223 | 223 | } |
224 | - $o .= "scrolling='" . ($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto")) . "' "; |
|
225 | - $o .= "src='" . $value . "' frameborder='" . $params['borsize'] . "' "; |
|
226 | - $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'" . $params['vpid'] . "\\'," . $autoMode . ")',100);\" width='" . $w . "' height='" . $h . "' "; |
|
224 | + $o .= "scrolling='".($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto"))."' "; |
|
225 | + $o .= "src='".$value."' frameborder='".$params['borsize']."' "; |
|
226 | + $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'".$params['vpid']."\\',".$autoMode.")',100);\" width='".$w."' height='".$h."' "; |
|
227 | 227 | $o .= ">"; |
228 | 228 | $o .= $eTag; |
229 | 229 | break; |
230 | 230 | |
231 | 231 | case "datagrid": |
232 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
232 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
233 | 233 | $grd = new DataGrid('', $value); |
234 | 234 | |
235 | 235 | $grd->noRecordMsg = $params['egmsg']; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | |
265 | 265 | case 'htmlentities': |
266 | 266 | $value = parseInput($value); |
267 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
267 | + if ($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
268 | 268 | // remove delimiter from checkbox and listbox-multiple TVs |
269 | 269 | $value = str_replace('||', '', $value); |
270 | 270 | } |
@@ -275,33 +275,33 @@ discard block |
||
275 | 275 | $widget_output = ''; |
276 | 276 | $o = ''; |
277 | 277 | /* If we are loading a file */ |
278 | - if(substr($params['output'], 0, 5) == "@FILE") { |
|
279 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 6)); |
|
280 | - if(!file_exists($file_name)) { |
|
281 | - $widget_output = $file_name . ' does not exist'; |
|
278 | + if (substr($params['output'], 0, 5) == "@FILE") { |
|
279 | + $file_name = MODX_BASE_PATH.trim(substr($params['output'], 6)); |
|
280 | + if (!file_exists($file_name)) { |
|
281 | + $widget_output = $file_name.' does not exist'; |
|
282 | 282 | } else { |
283 | 283 | $widget_output = file_get_contents($file_name); |
284 | 284 | } |
285 | - } elseif(substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 9)); |
|
287 | - if(!file_exists($file_name)) { |
|
288 | - $widget_output = $file_name . ' does not exist'; |
|
285 | + } elseif (substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | + $file_name = MODX_BASE_PATH.trim(substr($params['output'], 9)); |
|
287 | + if (!file_exists($file_name)) { |
|
288 | + $widget_output = $file_name.' does not exist'; |
|
289 | 289 | } else { |
290 | 290 | /* The included file needs to set $widget_output. Can be string, array, object */ |
291 | 291 | include $file_name; |
292 | 292 | } |
293 | - } elseif(substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
293 | + } elseif (substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
294 | 294 | $chunk_name = trim(substr($params['output'], 7)); |
295 | 295 | $widget_output = $modx->getChunk($chunk_name); |
296 | - } elseif(substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
296 | + } elseif (substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
297 | 297 | $eval_str = trim(substr($params['output'], 6)); |
298 | 298 | $widget_output = eval($eval_str); |
299 | - } elseif($value !== '') { |
|
299 | + } elseif ($value !== '') { |
|
300 | 300 | $widget_output = $params['output']; |
301 | 301 | } else { |
302 | 302 | $widget_output = ''; |
303 | 303 | } |
304 | - if(is_string($widget_output)) { |
|
304 | + if (is_string($widget_output)) { |
|
305 | 305 | $_ = $modx->config['enable_filter']; |
306 | 306 | $modx->config['enable_filter'] = 1; |
307 | 307 | $widget_output = $modx->parseText($widget_output, array('value' => $value)); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | default: |
316 | 316 | $value = parseInput($value); |
317 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
317 | + if ($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
318 | 318 | // add separator |
319 | 319 | $value = explode('||', $value); |
320 | 320 | $value = implode($sep, $value); |
@@ -325,23 +325,23 @@ discard block |
||
325 | 325 | return $o; |
326 | 326 | } |
327 | 327 | |
328 | -function decodeParamValue($s) { |
|
328 | +function decodeParamValue($s){ |
|
329 | 329 | $s = str_replace("%3D", '=', $s); // = |
330 | 330 | $s = str_replace("%26", '&', $s); // & |
331 | 331 | return $s; |
332 | 332 | } |
333 | 333 | |
334 | 334 | // returns an array if a delimiter is present. returns array is a recordset is present |
335 | -function parseInput($src, $delim = "||", $type = "string", $columns = true) { // type can be: string, array |
|
335 | +function parseInput($src, $delim = "||", $type = "string", $columns = true){ // type can be: string, array |
|
336 | 336 | global $modx; |
337 | - if($modx->db->isResult($src)) { |
|
337 | + if ($modx->db->isResult($src)) { |
|
338 | 338 | // must be a recordset |
339 | 339 | $rows = array(); |
340 | - while($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
340 | + while ($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
341 | 341 | return ($type == "array") ? $rows : implode($delim, $rows); |
342 | 342 | } else { |
343 | 343 | // must be a text |
344 | - if($type == "array") { |
|
344 | + if ($type == "array") { |
|
345 | 345 | return explode($delim, $src); |
346 | 346 | } else { |
347 | 347 | return $src; |
@@ -349,21 +349,21 @@ discard block |
||
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
352 | -function getUnixtimeFromDateString($value) { |
|
352 | +function getUnixtimeFromDateString($value){ |
|
353 | 353 | $timestamp = false; |
354 | 354 | // Check for MySQL or legacy style date |
355 | 355 | $date_match_1 = '/^([0-9]{2})-([0-9]{2})-([0-9]{4})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
356 | 356 | $date_match_2 = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
357 | 357 | $matches = array(); |
358 | - if(strpos($value, '-') !== false) { |
|
359 | - if(preg_match($date_match_1, $value, $matches)) { |
|
358 | + if (strpos($value, '-') !== false) { |
|
359 | + if (preg_match($date_match_1, $value, $matches)) { |
|
360 | 360 | $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); |
361 | - } elseif(preg_match($date_match_2, $value, $matches)) { |
|
361 | + } elseif (preg_match($date_match_2, $value, $matches)) { |
|
362 | 362 | $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
363 | 363 | } |
364 | 364 | } |
365 | 365 | // If those didn't work, use strtotime to figure out the date |
366 | - if($timestamp === false || $timestamp === -1) { |
|
366 | + if ($timestamp === false || $timestamp === -1) { |
|
367 | 367 | $timestamp = strtotime($value); |
368 | 368 | } |
369 | 369 | return $timestamp; |
@@ -29,33 +29,33 @@ discard block |
||
29 | 29 | // include MagPieRSS |
30 | 30 | require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc'); |
31 | 31 | // Convert relative path into absolute url |
32 | -function rel2abs( $rel, $base ) { |
|
32 | +function rel2abs($rel, $base){ |
|
33 | 33 | // parse base URL and convert to local variables: $scheme, $host, $path |
34 | - extract( parse_url( $base ) ); |
|
35 | - if ( strpos( $rel,"//" ) === 0 ) { |
|
36 | - return $scheme . ':' . $rel; |
|
34 | + extract(parse_url($base)); |
|
35 | + if (strpos($rel, "//") === 0) { |
|
36 | + return $scheme.':'.$rel; |
|
37 | 37 | } |
38 | 38 | // return if already absolute URL |
39 | - if ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) { |
|
39 | + if (parse_url($rel, PHP_URL_SCHEME) != '') { |
|
40 | 40 | return $rel; |
41 | 41 | } |
42 | 42 | // queries and anchors |
43 | - if ( $rel[0] == '#' || $rel[0] == '?' ) { |
|
44 | - return $base . $rel; |
|
43 | + if ($rel[0] == '#' || $rel[0] == '?') { |
|
44 | + return $base.$rel; |
|
45 | 45 | } |
46 | 46 | // remove non-directory element from path |
47 | - $path = preg_replace( '#/[^/]*$#', '', $path ); |
|
47 | + $path = preg_replace('#/[^/]*$#', '', $path); |
|
48 | 48 | // destroy path if relative url points to root |
49 | - if ( $rel[0] == '/' ) { |
|
49 | + if ($rel[0] == '/') { |
|
50 | 50 | $path = ''; |
51 | 51 | } |
52 | 52 | // dirty absolute URL |
53 | - $abs = $host . $path . "/" . $rel; |
|
53 | + $abs = $host.$path."/".$rel; |
|
54 | 54 | // replace '//' or '/./' or '/foo/../' with '/' |
55 | - $abs = preg_replace( "/(\/\.?\/)/", "/", $abs ); |
|
56 | - $abs = preg_replace( "/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs ); |
|
55 | + $abs = preg_replace("/(\/\.?\/)/", "/", $abs); |
|
56 | + $abs = preg_replace("/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs); |
|
57 | 57 | // absolute URL is ready! |
58 | - return $scheme . '://' . $abs; |
|
58 | + return $scheme.'://'.$abs; |
|
59 | 59 | } |
60 | 60 | $feedData = array(); |
61 | 61 | |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | foreach ($urls as $section=>$url) { |
64 | 64 | $output = ''; |
65 | 65 | $rss = @fetch_rss($url); |
66 | - if( !$rss ){ |
|
67 | - $feedData[$section] = 'Failed to retrieve ' . $url; |
|
66 | + if (!$rss) { |
|
67 | + $feedData[$section] = 'Failed to retrieve '.$url; |
|
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | $output .= '<ul>'; |
71 | 71 | |
72 | 72 | $items = array_slice($rss->items, 0, $itemsNumber); |
73 | 73 | foreach ($items as $item) { |
74 | - $href = rel2abs($item['link'],'https://github.com'); |
|
74 | + $href = rel2abs($item['link'], 'https://github.com'); |
|
75 | 75 | $title = $item['title']; |
76 | 76 | $pubdate = $item['pubdate']; |
77 | 77 | $pubdate = $modx->toDateFormat(strtotime($pubdate)); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$c = &$settings; |
|
3 | +$c = &$settings; |
|
4 | 4 | |
5 | 5 | $c['site_name'] = 'My MODX Site'; |
6 | 6 | $c['site_start'] = 1; |