@@ -7,7 +7,7 @@ |
||
7 | 7 | $modx->getSettings(); |
8 | 8 | |
9 | 9 | $modx->documentMethod = 'id'; |
10 | -$modx->documentIdentifier = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 1; |
|
10 | +$modx->documentIdentifier = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 1; |
|
11 | 11 | $modx->documentObject = $modx->getDocumentObject('id', $modx->documentIdentifier); |
12 | 12 | |
13 | 13 | $modx->invokeEvent('OnWebPageInit'); |
@@ -54,32 +54,32 @@ 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 | |
80 | 80 | // we use this to make sure files are accessed through |
81 | 81 | // the manager instead of seperately. |
82 | -if ( ! defined('IN_MANAGER_MODE')) { |
|
82 | +if (!defined('IN_MANAGER_MODE')) { |
|
83 | 83 | define('IN_MANAGER_MODE', true); |
84 | 84 | } |
85 | 85 | |
@@ -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')) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $modx->manager->action = $action; |
245 | 245 | |
246 | 246 | // attempt to foil some simple types of CSRF attacks |
247 | -if (isset($modx->config['validate_referer']) && (int)$modx->config['validate_referer']) { |
|
247 | +if (isset($modx->config['validate_referer']) && (int) $modx->config['validate_referer']) { |
|
248 | 248 | if (isset($_SERVER['HTTP_REFERER'])) { |
249 | 249 | $referer = $_SERVER['HTTP_REFERER']; |
250 | 250 | |
@@ -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 | $log = new EvolutionCMS\Legacy\LogHandler; |
988 | 988 | $log->initAndWriteLog(); |
989 | 989 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $autoloader = realpath(__DIR__.'/../vendor/autoload.php'); |
52 | 52 | if (file_exists($autoloader) && is_readable($autoloader)) { |
53 | - include_once($autoloader); |
|
53 | + include_once($autoloader); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // get start time |
@@ -65,22 +65,22 @@ discard block |
||
65 | 65 | $site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
66 | 66 | if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
67 | 67 | if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
68 | - $src = "<?php\n"; |
|
69 | - $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
|
70 | - $rs = file_put_contents($site_mgr_path,$src); |
|
71 | - if(!$rs) { |
|
72 | - echo 'siteManager.php write error'; |
|
73 | - exit; |
|
74 | - } |
|
75 | - sleep(1); |
|
76 | - header('Location:' . $_SERVER['REQUEST_URI']); |
|
77 | - exit; |
|
68 | + $src = "<?php\n"; |
|
69 | + $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
|
70 | + $rs = file_put_contents($site_mgr_path,$src); |
|
71 | + if(!$rs) { |
|
72 | + echo 'siteManager.php write error'; |
|
73 | + exit; |
|
74 | + } |
|
75 | + sleep(1); |
|
76 | + header('Location:' . $_SERVER['REQUEST_URI']); |
|
77 | + exit; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | // we use this to make sure files are accessed through |
81 | 81 | // the manager instead of seperately. |
82 | 82 | if ( ! defined('IN_MANAGER_MODE')) { |
83 | - define('IN_MANAGER_MODE', true); |
|
83 | + define('IN_MANAGER_MODE', true); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | // harden it |
@@ -101,16 +101,16 @@ discard block |
||
101 | 101 | |
102 | 102 | // check PHP version. EVO is compatible with php 5 (5.0.0+) |
103 | 103 | $php_ver_comp = version_compare(phpversion(), "5.0.0"); |
104 | - // -1 if left is less, 0 if equal, +1 if left is higher |
|
104 | + // -1 if left is less, 0 if equal, +1 if left is higher |
|
105 | 105 | if($php_ver_comp < 0) { |
106 | - echo sprintf($_lang['php_version_check'], phpversion()); |
|
107 | - exit; |
|
106 | + echo sprintf($_lang['php_version_check'], phpversion()); |
|
107 | + exit; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | // check if iconv is installed |
111 | 111 | if(!function_exists('iconv')) { |
112 | - echo $_lang['iconv_not_available']; |
|
113 | - exit; |
|
112 | + echo $_lang['iconv_not_available']; |
|
113 | + exit; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | // set some runtime options |
@@ -123,15 +123,15 @@ discard block |
||
123 | 123 | |
124 | 124 | // set the document_root :| |
125 | 125 | if(!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) { |
126 | - $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/"; |
|
126 | + $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/"; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | // include_once config file |
130 | 130 | $config_filename = "./includes/config.inc.php"; |
131 | 131 | if (!file_exists($config_filename)) { |
132 | - echo "<h3>Unable to load configuration settings</h3>"; |
|
133 | - echo "Please run the EVO <a href='../install'>install utility</a>"; |
|
134 | - exit; |
|
132 | + echo "<h3>Unable to load configuration settings</h3>"; |
|
133 | + echo "Please run the EVO <a href='../install'>install utility</a>"; |
|
134 | + exit; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | // include the database configuration file |
@@ -139,11 +139,11 @@ discard block |
||
139 | 139 | |
140 | 140 | // initiate the content manager class |
141 | 141 | if (isset($coreClass) && class_exists($coreClass)) { |
142 | - $modx = new $coreClass; |
|
142 | + $modx = new $coreClass; |
|
143 | 143 | } |
144 | 144 | if (!isset($modx) || !($modx instanceof DocumentParser)) { |
145 | - include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
146 | - $modx = evolutionCMS(); |
|
145 | + include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
146 | + $modx = evolutionCMS(); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | $modx->loadExtension("ManagerAPI"); |
@@ -166,25 +166,25 @@ discard block |
||
166 | 166 | |
167 | 167 | // now include_once different language file as english |
168 | 168 | if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
169 | - $manager_language = "english"; // if not set, get the english language file. |
|
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 | 174 | if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
175 | - include_once "lang/".$manager_language.".inc.php"; |
|
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 | 179 | if(file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
180 | - include_once "lang/override/".$manager_language.".inc.php"; |
|
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 | 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 |
@@ -199,19 +199,19 @@ discard block |
||
199 | 199 | |
200 | 200 | // double check the session |
201 | 201 | if(!isset($_SESSION['mgrValidated'])){ |
202 | - echo "Not Logged In!"; |
|
203 | - exit; |
|
202 | + echo "Not Logged In!"; |
|
203 | + exit; |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | // include_once the style variables file |
207 | 207 | if(isset($manager_theme) && !isset($_style)) { |
208 | - $_style = array(); |
|
209 | - include_once "media/style/".$manager_theme."/style.php"; |
|
208 | + $_style = array(); |
|
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 | 213 | if(isset($allow_manager_access) && $allow_manager_access==0) { |
214 | - include_once "manager.lockout.inc.php"; |
|
214 | + include_once "manager.lockout.inc.php"; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | // Initialize System Alert Message Queque |
@@ -220,13 +220,13 @@ discard block |
||
220 | 220 | |
221 | 221 | // first we check to see if this is a frameset request |
222 | 222 | if(!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
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")) { |
|
225 | - include_once "media/style/".$manager_theme."/frames/1.php"; |
|
226 | - }else{ |
|
227 | - include_once "frames/1.php"; |
|
228 | - } |
|
229 | - exit; |
|
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")) { |
|
225 | + include_once "media/style/".$manager_theme."/frames/1.php"; |
|
226 | + }else{ |
|
227 | + include_once "frames/1.php"; |
|
228 | + } |
|
229 | + exit; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | // OK, let's retrieve the action directive from the request |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | else $action = null; |
238 | 238 | |
239 | 239 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
240 | - include_once 'messageCount.inc.php'; |
|
240 | + include_once 'messageCount.inc.php'; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | // save page to manager object |
@@ -245,19 +245,19 @@ discard block |
||
245 | 245 | |
246 | 246 | // attempt to foil some simple types of CSRF attacks |
247 | 247 | if (isset($modx->config['validate_referer']) && (int)$modx->config['validate_referer']) { |
248 | - if (isset($_SERVER['HTTP_REFERER'])) { |
|
249 | - $referer = $_SERVER['HTTP_REFERER']; |
|
250 | - |
|
251 | - if (!empty($referer)) { |
|
252 | - if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) { |
|
253 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected from referer: {$referer}.", "index.php"); |
|
254 | - } |
|
255 | - } else { |
|
256 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the client.", "index.php"); |
|
257 | - } |
|
258 | - } else { |
|
259 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the server.", "index.php"); |
|
260 | - } |
|
248 | + if (isset($_SERVER['HTTP_REFERER'])) { |
|
249 | + $referer = $_SERVER['HTTP_REFERER']; |
|
250 | + |
|
251 | + if (!empty($referer)) { |
|
252 | + if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) { |
|
253 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected from referer: {$referer}.", "index.php"); |
|
254 | + } |
|
255 | + } else { |
|
256 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the client.", "index.php"); |
|
257 | + } |
|
258 | + } else { |
|
259 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the server.", "index.php"); |
|
260 | + } |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | // invoke OnManagerPageInit event |
@@ -265,13 +265,13 @@ discard block |
||
265 | 265 | |
266 | 266 | // return element filepath |
267 | 267 | function includeFileProcessor ($filepath,$manager_theme) { |
268 | - $element = ""; |
|
269 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | - $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
|
271 | - }else{ |
|
272 | - $element = $filepath; |
|
273 | - } |
|
274 | - return $element; |
|
268 | + $element = ""; |
|
269 | + if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | + $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
|
271 | + }else{ |
|
272 | + $element = $filepath; |
|
273 | + } |
|
274 | + return $element; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | $managerTheme = new EvolutionCMS\ManagerTheme($modx, $manager_theme); |
@@ -281,713 +281,713 @@ discard block |
||
281 | 281 | /********************************************************************/ |
282 | 282 | /* frame management - show the requested frame */ |
283 | 283 | /********************************************************************/ |
284 | - case 1 : |
|
285 | - // get the requested frame |
|
286 | - $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
287 | - if($frame>9) { |
|
288 | - $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
289 | - } |
|
290 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
291 | - break; |
|
284 | + case 1 : |
|
285 | + // get the requested frame |
|
286 | + $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
287 | + if($frame>9) { |
|
288 | + $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
289 | + } |
|
290 | + include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
291 | + break; |
|
292 | 292 | /********************************************************************/ |
293 | 293 | /* show the homepage */ |
294 | 294 | /********************************************************************/ |
295 | - case 2: |
|
296 | - // get the home page |
|
297 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
298 | - include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
299 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
300 | - break; |
|
295 | + case 2: |
|
296 | + // get the home page |
|
297 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
298 | + include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
299 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
300 | + break; |
|
301 | 301 | /********************************************************************/ |
302 | 302 | /* document data */ |
303 | 303 | /********************************************************************/ |
304 | - case 3: |
|
305 | - // get the page to show document's data |
|
306 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
307 | - include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
308 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
309 | - break; |
|
304 | + case 3: |
|
305 | + // get the page to show document's data |
|
306 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
307 | + include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
308 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
309 | + break; |
|
310 | 310 | /********************************************************************/ |
311 | 311 | /* content management */ |
312 | 312 | /********************************************************************/ |
313 | - case 85: |
|
314 | - // get the mutate page for adding a folder |
|
315 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
316 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
317 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
318 | - break; |
|
319 | - case 27: |
|
320 | - // get the mutate page for changing content |
|
321 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
322 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
323 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
324 | - break; |
|
325 | - case 4: |
|
326 | - // get the mutate page for adding content |
|
327 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
328 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
329 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
330 | - break; |
|
331 | - case 5: |
|
332 | - // get the save processor |
|
333 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
334 | - break; |
|
335 | - case 6: |
|
336 | - // get the delete processor |
|
337 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
338 | - break; |
|
339 | - case 63: |
|
340 | - // get the undelete processor |
|
341 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
342 | - break; |
|
343 | - case 51: |
|
344 | - // get the move action |
|
345 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
346 | - include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
347 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
348 | - break; |
|
349 | - case 52: |
|
350 | - // get the move document processor |
|
351 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
352 | - break; |
|
353 | - case 61: |
|
354 | - // get the processor for publishing content |
|
355 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
356 | - break; |
|
357 | - case 62: |
|
358 | - // get the processor for publishing content |
|
359 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
360 | - break; |
|
361 | - case 56: |
|
362 | - // get the sort menuindex action |
|
363 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
364 | - include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
365 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
366 | - break; |
|
313 | + case 85: |
|
314 | + // get the mutate page for adding a folder |
|
315 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
316 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
317 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
318 | + break; |
|
319 | + case 27: |
|
320 | + // get the mutate page for changing content |
|
321 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
322 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
323 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
324 | + break; |
|
325 | + case 4: |
|
326 | + // get the mutate page for adding content |
|
327 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
328 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
329 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
330 | + break; |
|
331 | + case 5: |
|
332 | + // get the save processor |
|
333 | + include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
334 | + break; |
|
335 | + case 6: |
|
336 | + // get the delete processor |
|
337 | + include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
338 | + break; |
|
339 | + case 63: |
|
340 | + // get the undelete processor |
|
341 | + include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
342 | + break; |
|
343 | + case 51: |
|
344 | + // get the move action |
|
345 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
346 | + include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
347 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
348 | + break; |
|
349 | + case 52: |
|
350 | + // get the move document processor |
|
351 | + include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
352 | + break; |
|
353 | + case 61: |
|
354 | + // get the processor for publishing content |
|
355 | + include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
356 | + break; |
|
357 | + case 62: |
|
358 | + // get the processor for publishing content |
|
359 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
360 | + break; |
|
361 | + case 56: |
|
362 | + // get the sort menuindex action |
|
363 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
364 | + include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
365 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
366 | + break; |
|
367 | 367 | /********************************************************************/ |
368 | 368 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
369 | 369 | /********************************************************************/ |
370 | - case 7: |
|
371 | - // get the wait page (so the tree can reload) |
|
372 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
373 | - include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
374 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
375 | - break; |
|
370 | + case 7: |
|
371 | + // get the wait page (so the tree can reload) |
|
372 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
373 | + include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
374 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
375 | + break; |
|
376 | 376 | /********************************************************************/ |
377 | 377 | /* let the user log out */ |
378 | 378 | /********************************************************************/ |
379 | - case 8: |
|
380 | - // get the logout processor |
|
381 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
382 | - break; |
|
379 | + case 8: |
|
380 | + // get the logout processor |
|
381 | + include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
382 | + break; |
|
383 | 383 | /********************************************************************/ |
384 | 384 | /* user management */ |
385 | 385 | /********************************************************************/ |
386 | - case 87: |
|
387 | - // get the new web user page |
|
388 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
389 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
390 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
391 | - break; |
|
392 | - case 88: |
|
393 | - // get the edit web user page |
|
394 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
395 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
396 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
397 | - break; |
|
398 | - case 89: |
|
399 | - // get the save web user processor |
|
400 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
401 | - break; |
|
402 | - case 90: |
|
403 | - // get the delete web user page |
|
404 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
405 | - break; |
|
406 | - case 11: |
|
407 | - // get the new user page |
|
408 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
409 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
410 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
411 | - break; |
|
412 | - case 12: |
|
413 | - // get the edit user page |
|
414 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
415 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
416 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
417 | - break; |
|
418 | - case 32: |
|
419 | - // get the save user processor |
|
420 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
421 | - break; |
|
422 | - case 28: |
|
423 | - // get the change password page |
|
424 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
425 | - include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
426 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
427 | - break; |
|
428 | - case 34: |
|
429 | - // get the save new password page |
|
430 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
431 | - break; |
|
432 | - case 33: |
|
433 | - // get the delete user page |
|
434 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
435 | - break; |
|
386 | + case 87: |
|
387 | + // get the new web user page |
|
388 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
389 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
390 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
391 | + break; |
|
392 | + case 88: |
|
393 | + // get the edit web user page |
|
394 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
395 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
396 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
397 | + break; |
|
398 | + case 89: |
|
399 | + // get the save web user processor |
|
400 | + include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
401 | + break; |
|
402 | + case 90: |
|
403 | + // get the delete web user page |
|
404 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
405 | + break; |
|
406 | + case 11: |
|
407 | + // get the new user page |
|
408 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
409 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
410 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
411 | + break; |
|
412 | + case 12: |
|
413 | + // get the edit user page |
|
414 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
415 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
416 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
417 | + break; |
|
418 | + case 32: |
|
419 | + // get the save user processor |
|
420 | + include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
421 | + break; |
|
422 | + case 28: |
|
423 | + // get the change password page |
|
424 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
425 | + include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
426 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
427 | + break; |
|
428 | + case 34: |
|
429 | + // get the save new password page |
|
430 | + include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
431 | + break; |
|
432 | + case 33: |
|
433 | + // get the delete user page |
|
434 | + include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
435 | + break; |
|
436 | 436 | /********************************************************************/ |
437 | 437 | /* role management */ |
438 | 438 | /********************************************************************/ |
439 | - case 38: |
|
440 | - // get the new role page |
|
441 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
442 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
443 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
444 | - break; |
|
445 | - case 35: |
|
446 | - // get the edit role page |
|
447 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
448 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
449 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
450 | - break; |
|
451 | - case 36: |
|
452 | - // get the save role page |
|
453 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
454 | - break; |
|
455 | - case 37: |
|
456 | - // get the delete role page |
|
457 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
458 | - break; |
|
439 | + case 38: |
|
440 | + // get the new role page |
|
441 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
442 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
443 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
444 | + break; |
|
445 | + case 35: |
|
446 | + // get the edit role page |
|
447 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
448 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
449 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
450 | + break; |
|
451 | + case 36: |
|
452 | + // get the save role page |
|
453 | + include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
454 | + break; |
|
455 | + case 37: |
|
456 | + // get the delete role page |
|
457 | + include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
458 | + break; |
|
459 | 459 | /********************************************************************/ |
460 | 460 | /* category management */ |
461 | 461 | /********************************************************************/ |
462 | - case 120: |
|
463 | - // get the edit category page |
|
464 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
465 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
466 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
467 | - break; |
|
468 | - case 121: |
|
469 | - // for ajax-requests |
|
470 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
471 | - break; |
|
462 | + case 120: |
|
463 | + // get the edit category page |
|
464 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
465 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
466 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
467 | + break; |
|
468 | + case 121: |
|
469 | + // for ajax-requests |
|
470 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
471 | + break; |
|
472 | 472 | /********************************************************************/ |
473 | 473 | /* template management */ |
474 | 474 | /********************************************************************/ |
475 | - case 16: |
|
476 | - // get the edit template action |
|
477 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
478 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
479 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
480 | - break; |
|
481 | - case 19: |
|
482 | - // get the new template action |
|
483 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
484 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
485 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
486 | - break; |
|
487 | - case 20: |
|
488 | - // get the save processor |
|
489 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
490 | - break; |
|
491 | - case 21: |
|
492 | - // get the delete processor |
|
493 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
494 | - break; |
|
495 | - case 96: |
|
496 | - // get the duplicate template processor |
|
497 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
498 | - break; |
|
499 | - case 117: |
|
500 | - // change the tv rank for selected template |
|
501 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
502 | - include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
503 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
504 | - break; |
|
475 | + case 16: |
|
476 | + // get the edit template action |
|
477 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
478 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
479 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
480 | + break; |
|
481 | + case 19: |
|
482 | + // get the new template action |
|
483 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
484 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
485 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
486 | + break; |
|
487 | + case 20: |
|
488 | + // get the save processor |
|
489 | + include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
490 | + break; |
|
491 | + case 21: |
|
492 | + // get the delete processor |
|
493 | + include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
494 | + break; |
|
495 | + case 96: |
|
496 | + // get the duplicate template processor |
|
497 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
498 | + break; |
|
499 | + case 117: |
|
500 | + // change the tv rank for selected template |
|
501 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
502 | + include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
503 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
504 | + break; |
|
505 | 505 | /********************************************************************/ |
506 | 506 | /* snippet management */ |
507 | 507 | /********************************************************************/ |
508 | - case 22: |
|
509 | - // get the edit snippet action |
|
510 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
511 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
512 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
513 | - break; |
|
514 | - case 23: |
|
515 | - // get the new snippet action |
|
516 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
517 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
518 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
519 | - break; |
|
520 | - case 24: |
|
521 | - // get the save processor |
|
522 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
523 | - break; |
|
524 | - case 25: |
|
525 | - // get the delete processor |
|
526 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
527 | - break; |
|
528 | - case 98: |
|
529 | - // get the duplicate processor |
|
530 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
531 | - break; |
|
508 | + case 22: |
|
509 | + // get the edit snippet action |
|
510 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
511 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
512 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
513 | + break; |
|
514 | + case 23: |
|
515 | + // get the new snippet action |
|
516 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
517 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
518 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
519 | + break; |
|
520 | + case 24: |
|
521 | + // get the save processor |
|
522 | + include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
523 | + break; |
|
524 | + case 25: |
|
525 | + // get the delete processor |
|
526 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
527 | + break; |
|
528 | + case 98: |
|
529 | + // get the duplicate processor |
|
530 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
531 | + break; |
|
532 | 532 | /********************************************************************/ |
533 | 533 | /* htmlsnippet management */ |
534 | 534 | /********************************************************************/ |
535 | - case 78: |
|
536 | - // get the edit snippet action |
|
537 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
538 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
539 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
540 | - break; |
|
541 | - case 77: |
|
542 | - // get the new snippet action |
|
543 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
544 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
545 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
546 | - break; |
|
547 | - case 79: |
|
548 | - // get the save processor |
|
549 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
550 | - break; |
|
551 | - case 80: |
|
552 | - // get the delete processor |
|
553 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
554 | - break; |
|
555 | - case 97: |
|
556 | - // get the duplicate processor |
|
557 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
558 | - break; |
|
535 | + case 78: |
|
536 | + // get the edit snippet action |
|
537 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
538 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
539 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
540 | + break; |
|
541 | + case 77: |
|
542 | + // get the new snippet action |
|
543 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
544 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
545 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
546 | + break; |
|
547 | + case 79: |
|
548 | + // get the save processor |
|
549 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
550 | + break; |
|
551 | + case 80: |
|
552 | + // get the delete processor |
|
553 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
554 | + break; |
|
555 | + case 97: |
|
556 | + // get the duplicate processor |
|
557 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
558 | + break; |
|
559 | 559 | /********************************************************************/ |
560 | 560 | /* show the credits page */ |
561 | 561 | /********************************************************************/ |
562 | - case 18: |
|
563 | - // get the credits page |
|
564 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
565 | - include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
566 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
567 | - break; |
|
562 | + case 18: |
|
563 | + // get the credits page |
|
564 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
565 | + include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
566 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
567 | + break; |
|
568 | 568 | /********************************************************************/ |
569 | 569 | /* empty cache & synchronisation */ |
570 | 570 | /********************************************************************/ |
571 | - case 26: |
|
572 | - // get the cache emptying processor |
|
573 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
574 | - include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
575 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
576 | - break; |
|
571 | + case 26: |
|
572 | + // get the cache emptying processor |
|
573 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
574 | + include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
575 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
576 | + break; |
|
577 | 577 | /********************************************************************/ |
578 | 578 | /* Module management */ |
579 | 579 | /********************************************************************/ |
580 | - case 106: |
|
581 | - // get module management |
|
582 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
583 | - include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
584 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
585 | - break; |
|
586 | - case 107: |
|
587 | - // get the new module action |
|
588 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
589 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
590 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
591 | - break; |
|
592 | - case 108: |
|
593 | - // get the edit module action |
|
594 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
595 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
596 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
597 | - break; |
|
598 | - case 109: |
|
599 | - // get the save processor |
|
600 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
601 | - break; |
|
602 | - case 110: |
|
603 | - // get the delete processor |
|
604 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
605 | - break; |
|
606 | - case 111: |
|
607 | - // get the duplicate processor |
|
608 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
609 | - break; |
|
610 | - case 112: |
|
611 | - // execute/run the module |
|
612 | - //include_once "header.inc.php"; |
|
613 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
614 | - //include_once "footer.inc.php"; |
|
615 | - break; |
|
616 | - case 113: |
|
617 | - // get the module resources (dependencies) action |
|
618 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
619 | - include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
620 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
621 | - break; |
|
580 | + case 106: |
|
581 | + // get module management |
|
582 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
583 | + include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
584 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
585 | + break; |
|
586 | + case 107: |
|
587 | + // get the new module action |
|
588 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
589 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
590 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
591 | + break; |
|
592 | + case 108: |
|
593 | + // get the edit module action |
|
594 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
595 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
596 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
597 | + break; |
|
598 | + case 109: |
|
599 | + // get the save processor |
|
600 | + include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
601 | + break; |
|
602 | + case 110: |
|
603 | + // get the delete processor |
|
604 | + include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
605 | + break; |
|
606 | + case 111: |
|
607 | + // get the duplicate processor |
|
608 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
609 | + break; |
|
610 | + case 112: |
|
611 | + // execute/run the module |
|
612 | + //include_once "header.inc.php"; |
|
613 | + include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
614 | + //include_once "footer.inc.php"; |
|
615 | + break; |
|
616 | + case 113: |
|
617 | + // get the module resources (dependencies) action |
|
618 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
619 | + include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
620 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
621 | + break; |
|
622 | 622 | /********************************************************************/ |
623 | 623 | /* plugin management */ |
624 | 624 | /********************************************************************/ |
625 | - case 100: |
|
626 | - // change the plugin priority |
|
627 | - //include_once "header.inc.php"; - in action file |
|
628 | - include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
629 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
630 | - break; |
|
631 | - case 101: |
|
632 | - // get the new plugin action |
|
633 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
634 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
635 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
636 | - break; |
|
637 | - case 102: |
|
638 | - // get the edit plugin action |
|
639 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
640 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
641 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
642 | - break; |
|
643 | - case 103: |
|
644 | - // get the save processor |
|
645 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
646 | - break; |
|
647 | - case 104: |
|
648 | - // get the delete processor |
|
649 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
650 | - break; |
|
651 | - case 105: |
|
652 | - // get the duplicate processor |
|
653 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
654 | - break; |
|
655 | - case 119: |
|
656 | - // get the purge processor |
|
657 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
658 | - break; |
|
625 | + case 100: |
|
626 | + // change the plugin priority |
|
627 | + //include_once "header.inc.php"; - in action file |
|
628 | + include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
629 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
630 | + break; |
|
631 | + case 101: |
|
632 | + // get the new plugin action |
|
633 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
634 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
635 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
636 | + break; |
|
637 | + case 102: |
|
638 | + // get the edit plugin action |
|
639 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
640 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
641 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
642 | + break; |
|
643 | + case 103: |
|
644 | + // get the save processor |
|
645 | + include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
646 | + break; |
|
647 | + case 104: |
|
648 | + // get the delete processor |
|
649 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
650 | + break; |
|
651 | + case 105: |
|
652 | + // get the duplicate processor |
|
653 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
654 | + break; |
|
655 | + case 119: |
|
656 | + // get the purge processor |
|
657 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
658 | + break; |
|
659 | 659 | /********************************************************************/ |
660 | 660 | /* view phpinfo */ |
661 | 661 | /********************************************************************/ |
662 | - case 200: |
|
663 | - // show phpInfo |
|
664 | - if($modx->hasPermission('logs')) { |
|
665 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
666 | - include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
667 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
668 | - } |
|
669 | - break; |
|
662 | + case 200: |
|
663 | + // show phpInfo |
|
664 | + if($modx->hasPermission('logs')) { |
|
665 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
666 | + include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
667 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
668 | + } |
|
669 | + break; |
|
670 | 670 | /********************************************************************/ |
671 | 671 | /* errorpage */ |
672 | 672 | /********************************************************************/ |
673 | - case 29: |
|
674 | - // get the error page |
|
675 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
676 | - break; |
|
673 | + case 29: |
|
674 | + // get the error page |
|
675 | + include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
676 | + break; |
|
677 | 677 | /********************************************************************/ |
678 | 678 | /* file manager */ |
679 | 679 | /********************************************************************/ |
680 | - case 31: |
|
681 | - // get the page to manage files |
|
682 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
683 | - include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
684 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
685 | - break; |
|
680 | + case 31: |
|
681 | + // get the page to manage files |
|
682 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
683 | + include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
684 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
685 | + break; |
|
686 | 686 | /********************************************************************/ |
687 | 687 | /* access permissions */ |
688 | 688 | /********************************************************************/ |
689 | - case 40: |
|
690 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
691 | - include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
692 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
693 | - break; |
|
694 | - case 91: |
|
695 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
696 | - include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
697 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
698 | - break; |
|
689 | + case 40: |
|
690 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
691 | + include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
692 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
693 | + break; |
|
694 | + case 91: |
|
695 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
696 | + include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
697 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
698 | + break; |
|
699 | 699 | /********************************************************************/ |
700 | 700 | /* access groups processor */ |
701 | 701 | /********************************************************************/ |
702 | - case 41: |
|
703 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
704 | - break; |
|
705 | - case 92: |
|
706 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
707 | - break; |
|
702 | + case 41: |
|
703 | + include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
704 | + break; |
|
705 | + case 92: |
|
706 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
707 | + break; |
|
708 | 708 | /********************************************************************/ |
709 | 709 | /* settings editor */ |
710 | 710 | /********************************************************************/ |
711 | - case 17: |
|
712 | - // get the settings editor |
|
713 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
714 | - include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
715 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
716 | - break; |
|
717 | - case 118: |
|
718 | - // call settings ajax include |
|
719 | - ob_clean(); |
|
720 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
721 | - break; |
|
711 | + case 17: |
|
712 | + // get the settings editor |
|
713 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
714 | + include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
715 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
716 | + break; |
|
717 | + case 118: |
|
718 | + // call settings ajax include |
|
719 | + ob_clean(); |
|
720 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
721 | + break; |
|
722 | 722 | /********************************************************************/ |
723 | 723 | /* save settings */ |
724 | 724 | /********************************************************************/ |
725 | - case 30: |
|
726 | - // get the save settings processor |
|
727 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
728 | - break; |
|
725 | + case 30: |
|
726 | + // get the save settings processor |
|
727 | + include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
728 | + break; |
|
729 | 729 | /********************************************************************/ |
730 | 730 | /* system information */ |
731 | 731 | /********************************************************************/ |
732 | - case 53: |
|
733 | - // get the settings editor |
|
734 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
735 | - include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
736 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
737 | - break; |
|
732 | + case 53: |
|
733 | + // get the settings editor |
|
734 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
735 | + include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
736 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
737 | + break; |
|
738 | 738 | /********************************************************************/ |
739 | 739 | /* optimise table */ |
740 | 740 | /********************************************************************/ |
741 | - case 54: |
|
742 | - // get the table optimizer/truncate processor |
|
743 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
744 | - break; |
|
741 | + case 54: |
|
742 | + // get the table optimizer/truncate processor |
|
743 | + include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
744 | + break; |
|
745 | 745 | /********************************************************************/ |
746 | 746 | /* view logging */ |
747 | 747 | /********************************************************************/ |
748 | - case 13: |
|
749 | - // view logging |
|
750 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
751 | - include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
752 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
753 | - break; |
|
748 | + case 13: |
|
749 | + // view logging |
|
750 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
751 | + include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
752 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
753 | + break; |
|
754 | 754 | /********************************************************************/ |
755 | 755 | /* empty logs */ |
756 | 756 | /********************************************************************/ |
757 | - case 55: |
|
758 | - // get the settings editor |
|
759 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
760 | - break; |
|
757 | + case 55: |
|
758 | + // get the settings editor |
|
759 | + include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
760 | + break; |
|
761 | 761 | /********************************************************************/ |
762 | 762 | /* calls test page */ |
763 | 763 | /********************************************************************/ |
764 | - case 999: |
|
765 | - // get the test page |
|
766 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
767 | - include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
768 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
769 | - break; |
|
764 | + case 999: |
|
765 | + // get the test page |
|
766 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
767 | + include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
768 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
769 | + break; |
|
770 | 770 | /********************************************************************/ |
771 | 771 | /* Empty recycle bin */ |
772 | 772 | /********************************************************************/ |
773 | - case 64: |
|
774 | - // get the Recycle bin emptier |
|
775 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
776 | - break; |
|
773 | + case 64: |
|
774 | + // get the Recycle bin emptier |
|
775 | + include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
776 | + break; |
|
777 | 777 | /********************************************************************/ |
778 | 778 | /* Messages */ |
779 | 779 | /********************************************************************/ |
780 | - case 10: |
|
781 | - // get the messages page |
|
782 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
783 | - include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
784 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
785 | - break; |
|
780 | + case 10: |
|
781 | + // get the messages page |
|
782 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
783 | + include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
784 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
785 | + break; |
|
786 | 786 | /********************************************************************/ |
787 | 787 | /* Delete a message */ |
788 | 788 | /********************************************************************/ |
789 | - case 65: |
|
790 | - // get the message deleter |
|
791 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
792 | - break; |
|
789 | + case 65: |
|
790 | + // get the message deleter |
|
791 | + include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
792 | + break; |
|
793 | 793 | /********************************************************************/ |
794 | 794 | /* Send a message */ |
795 | 795 | /********************************************************************/ |
796 | - case 66: |
|
797 | - // get the message deleter |
|
798 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
799 | - break; |
|
796 | + case 66: |
|
797 | + // get the message deleter |
|
798 | + include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
799 | + break; |
|
800 | 800 | /********************************************************************/ |
801 | 801 | /* Remove locks */ |
802 | 802 | /********************************************************************/ |
803 | - case 67: |
|
804 | - // get the lock remover |
|
805 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
806 | - break; |
|
803 | + case 67: |
|
804 | + // get the lock remover |
|
805 | + include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
806 | + break; |
|
807 | 807 | /********************************************************************/ |
808 | 808 | /* Site schedule */ |
809 | 809 | /********************************************************************/ |
810 | - case 70: |
|
811 | - // get the schedule page |
|
812 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
813 | - include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
814 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
815 | - break; |
|
810 | + case 70: |
|
811 | + // get the schedule page |
|
812 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
813 | + include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
814 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
815 | + break; |
|
816 | 816 | /********************************************************************/ |
817 | 817 | /* Search */ |
818 | 818 | /********************************************************************/ |
819 | - case 71: |
|
820 | - // get the search page |
|
821 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
822 | - include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
823 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
824 | - break; |
|
819 | + case 71: |
|
820 | + // get the search page |
|
821 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
822 | + include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
823 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
824 | + break; |
|
825 | 825 | /********************************************************************/ |
826 | 826 | /* About */ |
827 | 827 | /********************************************************************/ |
828 | - case 59: |
|
829 | - // get the about page |
|
830 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
831 | - include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
832 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
833 | - break; |
|
828 | + case 59: |
|
829 | + // get the about page |
|
830 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
831 | + include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
832 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
833 | + break; |
|
834 | 834 | /********************************************************************/ |
835 | 835 | /* Add weblink */ |
836 | 836 | /********************************************************************/ |
837 | - case 72: |
|
838 | - // get the weblink page |
|
839 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
840 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
841 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
842 | - break; |
|
837 | + case 72: |
|
838 | + // get the weblink page |
|
839 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
840 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
841 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
842 | + break; |
|
843 | 843 | /********************************************************************/ |
844 | 844 | /* User management */ |
845 | 845 | /********************************************************************/ |
846 | - case 75: |
|
847 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
848 | - include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
849 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
850 | - break; |
|
851 | - case 99: |
|
852 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
853 | - include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
854 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
855 | - break; |
|
856 | - case 86: |
|
857 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
858 | - include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
859 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
860 | - break; |
|
846 | + case 75: |
|
847 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
848 | + include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
849 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
850 | + break; |
|
851 | + case 99: |
|
852 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
853 | + include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
854 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
855 | + break; |
|
856 | + case 86: |
|
857 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
858 | + include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
859 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
860 | + break; |
|
861 | 861 | /********************************************************************/ |
862 | 862 | /* template/ snippet management */ |
863 | 863 | /********************************************************************/ |
864 | - case 76: |
|
865 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
866 | - include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
867 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
868 | - break; |
|
864 | + case 76: |
|
865 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
866 | + include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
867 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
868 | + break; |
|
869 | 869 | /********************************************************************/ |
870 | 870 | /* Export to file */ |
871 | 871 | /********************************************************************/ |
872 | - case 83: |
|
873 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
874 | - include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
875 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
876 | - break; |
|
872 | + case 83: |
|
873 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
874 | + include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
875 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
876 | + break; |
|
877 | 877 | /********************************************************************/ |
878 | 878 | /* Resource Selector */ |
879 | 879 | /********************************************************************/ |
880 | - case 84: |
|
881 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
882 | - break; |
|
880 | + case 84: |
|
881 | + include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
882 | + break; |
|
883 | 883 | /********************************************************************/ |
884 | 884 | /* Backup Manager */ |
885 | 885 | /********************************************************************/ |
886 | - case 93: |
|
887 | - # header and footer will be handled interally |
|
888 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
889 | - break; |
|
886 | + case 93: |
|
887 | + # header and footer will be handled interally |
|
888 | + include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
889 | + break; |
|
890 | 890 | /********************************************************************/ |
891 | 891 | /* Duplicate Document */ |
892 | 892 | /********************************************************************/ |
893 | - case 94: |
|
894 | - // get the duplicate processor |
|
895 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
896 | - break; |
|
893 | + case 94: |
|
894 | + // get the duplicate processor |
|
895 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
896 | + break; |
|
897 | 897 | /********************************************************************/ |
898 | 898 | /* Import Document from file */ |
899 | 899 | /********************************************************************/ |
900 | - case 95: |
|
901 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
902 | - include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
903 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
904 | - break; |
|
900 | + case 95: |
|
901 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
902 | + include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
903 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
904 | + break; |
|
905 | 905 | /********************************************************************/ |
906 | 906 | /* Help */ |
907 | 907 | /********************************************************************/ |
908 | - case 9: |
|
909 | - // get the help page |
|
910 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
911 | - include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
912 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
913 | - break; |
|
908 | + case 9: |
|
909 | + // get the help page |
|
910 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
911 | + include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
912 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
913 | + break; |
|
914 | 914 | /********************************************************************/ |
915 | 915 | /* Template Variables - Based on Apodigm's Docvars */ |
916 | 916 | /********************************************************************/ |
917 | - case 300: |
|
918 | - // get the new document variable action |
|
919 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
920 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
921 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
922 | - break; |
|
923 | - case 301: |
|
924 | - // get the edit document variable action |
|
925 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
926 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
927 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
928 | - break; |
|
929 | - case 302: |
|
930 | - // get the save processor |
|
931 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
932 | - break; |
|
933 | - case 303: |
|
934 | - // get the delete processor |
|
935 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
936 | - break; |
|
937 | - case 304: |
|
938 | - // get the duplicate processor |
|
939 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
940 | - break; |
|
941 | - case 305: |
|
942 | - // get the tv-rank action |
|
943 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
944 | - include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
945 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
946 | - break; |
|
917 | + case 300: |
|
918 | + // get the new document variable action |
|
919 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
920 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
921 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
922 | + break; |
|
923 | + case 301: |
|
924 | + // get the edit document variable action |
|
925 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
926 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
927 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
928 | + break; |
|
929 | + case 302: |
|
930 | + // get the save processor |
|
931 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
932 | + break; |
|
933 | + case 303: |
|
934 | + // get the delete processor |
|
935 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
936 | + break; |
|
937 | + case 304: |
|
938 | + // get the duplicate processor |
|
939 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
940 | + break; |
|
941 | + case 305: |
|
942 | + // get the tv-rank action |
|
943 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
944 | + include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
945 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
946 | + break; |
|
947 | 947 | /********************************************************************/ |
948 | 948 | /* Event viewer: show event message log */ |
949 | 949 | /********************************************************************/ |
950 | - case 114: |
|
951 | - // get event logs |
|
952 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
953 | - include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
954 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
955 | - break; |
|
956 | - case 115: |
|
957 | - // get event log details viewer |
|
958 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
959 | - include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
960 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
961 | - break; |
|
962 | - case 116: |
|
963 | - // get the event log delete processor |
|
964 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
965 | - break; |
|
966 | - |
|
967 | - case 501: |
|
968 | - //delete category |
|
969 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
970 | - break; |
|
950 | + case 114: |
|
951 | + // get event logs |
|
952 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
953 | + include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
954 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
955 | + break; |
|
956 | + case 115: |
|
957 | + // get event log details viewer |
|
958 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
959 | + include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
960 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
961 | + break; |
|
962 | + case 116: |
|
963 | + // get the event log delete processor |
|
964 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
965 | + break; |
|
966 | + |
|
967 | + case 501: |
|
968 | + //delete category |
|
969 | + include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
970 | + break; |
|
971 | 971 | /********************************************************************/ |
972 | 972 | /* default action: show not implemented message */ |
973 | 973 | /********************************************************************/ |
974 | - default : |
|
975 | - // say that what was requested doesn't do anything yet |
|
976 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
977 | - echo " |
|
974 | + default : |
|
975 | + // say that what was requested doesn't do anything yet |
|
976 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
977 | + echo " |
|
978 | 978 | <div class='sectionHeader'>".$_lang['functionnotimpl']."</div> |
979 | 979 | <div class='sectionBody'> |
980 | 980 | <p>".$_lang['functionnotimpl_message']."</p> |
981 | 981 | </div> |
982 | 982 | "; |
983 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
983 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
984 | 984 | } |
985 | 985 | |
986 | 986 | /********************************************************************/ |
987 | 987 | // log action, unless it's a frame request |
988 | 988 | if($action!=1 && $action!=7 && $action!=2) { |
989 | - $log = new EvolutionCMS\Legacy\LogHandler; |
|
990 | - $log->initAndWriteLog(); |
|
989 | + $log = new EvolutionCMS\Legacy\LogHandler; |
|
990 | + $log->initAndWriteLog(); |
|
991 | 991 | } |
992 | 992 | /********************************************************************/ |
993 | 993 | // show debug |
@@ -10,7 +10,7 @@ |
||
10 | 10 | * @param int $flags |
11 | 11 | * @param string $encode |
12 | 12 | * @param int $safecount |
13 | - * @return string|array |
|
13 | + * @return null|string |
|
14 | 14 | */ |
15 | 15 | public function htmlspecialchars($str = '', $flags = ENT_COMPAT, $encode = '', $safecount = 0) |
16 | 16 | { |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | if(!function_exists('removeLastPath')) { |
746 | 746 | /** |
747 | 747 | * @param string $string |
748 | - * @return bool|string |
|
748 | + * @return string|false |
|
749 | 749 | */ |
750 | 750 | function removeLastPath($string) |
751 | 751 | { |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | if(!function_exists('getExtension')) { |
764 | 764 | /** |
765 | 765 | * @param string $string |
766 | - * @return bool|string |
|
766 | + * @return string|false |
|
767 | 767 | */ |
768 | 768 | function getExtension($string) |
769 | 769 | { |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!function_exists('add_dot')) { |
|
2 | +if (!function_exists('add_dot')) { |
|
3 | 3 | /** |
4 | 4 | * @param array $array |
5 | 5 | * @return array |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | { |
9 | 9 | $count = count($array); |
10 | 10 | for ($i = 0; $i < $count; $i++) { |
11 | - $array[$i] = '.' . strtolower(trim($array[$i])); // add a dot :) |
|
11 | + $array[$i] = '.'.strtolower(trim($array[$i])); // add a dot :) |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | return $array; |
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | -if(!function_exists('determineIcon')) { |
|
18 | +if (!function_exists('determineIcon')) { |
|
19 | 19 | /** |
20 | 20 | * @param string $file |
21 | 21 | * @param string $selFile |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | $icon = isset($icons[$mode]) ? $icons[$mode] : $icons['default']; |
35 | 35 | } |
36 | 36 | |
37 | - return '<i class="' . $icon . ' FilesPage"></i>'; |
|
37 | + return '<i class="'.$icon.' FilesPage"></i>'; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | -if(!function_exists('markRow')) { |
|
41 | +if (!function_exists('markRow')) { |
|
42 | 42 | /** |
43 | 43 | * @param string $file |
44 | 44 | * @param string $selFile |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | if ($file == $selFile) { |
56 | 56 | $class = isset($classNames[$mode]) ? $classNames[$mode] : $classNames['default']; |
57 | 57 | |
58 | - return ' class="' . $class . '"'; |
|
58 | + return ' class="'.$class.'"'; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | return ''; |
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | -if(!function_exists('ls')) { |
|
65 | +if (!function_exists('ls')) { |
|
66 | 66 | /** |
67 | 67 | * @param string $curpath |
68 | 68 | */ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | global $excludes, $protected_path, $editablefiles, $inlineviewablefiles, $viewablefiles, $enablefileunzip, $enablefiledownload, $uploadablefiles, $folders, $files, $filesizes, $len, $dirs_array, $files_array, $webstart_path, $modx; |
73 | 73 | $dircounter = 0; |
74 | 74 | $filecounter = 0; |
75 | - $curpath = str_replace('//', '/', $curpath . '/'); |
|
75 | + $curpath = str_replace('//', '/', $curpath.'/'); |
|
76 | 76 | |
77 | 77 | if (!is_dir($curpath)) { |
78 | 78 | echo 'Invalid path "', $curpath, '"<br />'; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | // first, get info |
85 | 85 | foreach ($dir as $file) { |
86 | - $newpath = $curpath . $file; |
|
86 | + $newpath = $curpath.$file; |
|
87 | 87 | if ($file === '..' || $file === '.') { |
88 | 88 | continue; |
89 | 89 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if ($file === '..' || $file === '.') { |
94 | 94 | continue; |
95 | 95 | } elseif (!in_array($file, $excludes) && !in_array($newpath, $protected_path)) { |
96 | - $dirs_array[$dircounter]['text'] = '<i class="' . $_style['files_folder'] . ' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path=' . urlencode($newpath) . '"><b>' . $file . '</b></a>'; |
|
96 | + $dirs_array[$dircounter]['text'] = '<i class="'.$_style['files_folder'].' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path='.urlencode($newpath).'"><b>'.$file.'</b></a>'; |
|
97 | 97 | |
98 | 98 | $dfiles = scandir($newpath); |
99 | 99 | foreach ($dfiles as $i => $infile) { |
@@ -106,13 +106,13 @@ discard block |
||
106 | 106 | } |
107 | 107 | $file_exists = (0 < count($dfiles)) ? 'file_exists' : ''; |
108 | 108 | |
109 | - $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\'' . urlencode($file) . '\',\'' . $file_exists . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></a>' : ''; |
|
109 | + $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\''.urlencode($file).'\',\''.$file_exists.'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></a>' : ''; |
|
110 | 110 | } else { |
111 | - $dirs_array[$dircounter]['text'] = '<span><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> ' . $file . '</span>'; |
|
112 | - $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></span>' : ''; |
|
111 | + $dirs_array[$dircounter]['text'] = '<span><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> '.$file.'</span>'; |
|
112 | + $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></span>' : ''; |
|
113 | 113 | } |
114 | 114 | |
115 | - $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" title="' . $_lang['rename'] . '"></i></a> ' : ''; |
|
115 | + $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" title="'.$_lang['rename'].'"></i></a> ' : ''; |
|
116 | 116 | |
117 | 117 | // increment the counter |
118 | 118 | $dircounter++; |
@@ -121,24 +121,24 @@ discard block |
||
121 | 121 | $files_array[$filecounter]['file'] = $newpath; |
122 | 122 | $files_array[$filecounter]['stats'] = lstat($newpath); |
123 | 123 | $files_array[$filecounter]['text'] = determineIcon($newpath, $_REQUEST['path'], |
124 | - $_REQUEST['mode']) . ' ' . $file; |
|
124 | + $_REQUEST['mode']).' '.$file; |
|
125 | 125 | $files_array[$filecounter]['view'] = (in_array($type, |
126 | - $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\'' . $webstart_path . substr($newpath, |
|
126 | + $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\''.$webstart_path.substr($newpath, |
|
127 | 127 | $len, |
128 | - strlen($newpath)) . '\');"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : (($enablefiledownload && in_array($type, |
|
129 | - $uploadablefiles)) ? '<a href="' . $webstart_path . implode('/', array_map('rawurlencode', |
|
128 | + strlen($newpath)).'\');"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : (($enablefiledownload && in_array($type, |
|
129 | + $uploadablefiles)) ? '<a href="'.$webstart_path.implode('/', array_map('rawurlencode', |
|
130 | 130 | explode('/', substr($newpath, $len, |
131 | - strlen($newpath))))) . '" style="cursor:pointer;"><i class="' . $_style['files_download'] . '" title="' . $_lang['file_download_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></span>'); |
|
131 | + strlen($newpath))))).'" style="cursor:pointer;"><i class="'.$_style['files_download'].'" title="'.$_lang['file_download_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></span>'); |
|
132 | 132 | $files_array[$filecounter]['view'] = (in_array($type, |
133 | - $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path=' . urlencode($newpath) . '"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : $files_array[$filecounter]['view']; |
|
134 | - $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_unzip'] . '" title="' . $_lang['file_download_unzip'] . '"></i></a>' : ''; |
|
133 | + $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path='.urlencode($newpath).'"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : $files_array[$filecounter]['view']; |
|
134 | + $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\''.urlencode($file).'\');"><i class="'.$_style['files_unzip'].'" title="'.$_lang['file_download_unzip'].'"></i></a>' : ''; |
|
135 | 135 | $files_array[$filecounter]['edit'] = (in_array($type, |
136 | - $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path=' . urlencode($newpath) . '#file_editfile"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></span>'; |
|
136 | + $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path='.urlencode($newpath).'#file_editfile"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></span>'; |
|
137 | 137 | $files_array[$filecounter]['duplicate'] = (in_array($type, |
138 | - $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_duplicate'] . '" title="' . $_lang['duplicate'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_duplicate'] . '" align="absmiddle" title="' . $_lang['duplicate'] . '"></i></span>'; |
|
138 | + $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\''.urlencode($file).'\');"><i class="'.$_style['files_duplicate'].'" title="'.$_lang['duplicate'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_duplicate'].'" align="absmiddle" title="'.$_lang['duplicate'].'"></i></span>'; |
|
139 | 139 | $files_array[$filecounter]['rename'] = (in_array($type, |
140 | - $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></span>'; |
|
141 | - $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></span>'; |
|
140 | + $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></span>'; |
|
141 | + $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\''.urlencode($file).'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></span>'; |
|
142 | 142 | |
143 | 143 | // increment the counter |
144 | 144 | $filecounter++; |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | for ($i = 0; $i < $folders; $i++) { |
152 | 152 | $filesizes += $dirs_array[$i]['stats']['7']; |
153 | 153 | echo '<tr>'; |
154 | - echo '<td>' . $dirs_array[$i]['text'] . '</td>'; |
|
155 | - echo '<td class="text-nowrap">' . $modx->toDateFormat($dirs_array[$i]['stats']['9']) . '</td>'; |
|
156 | - echo '<td class="text-right">' . $modx->nicesize($dirs_array[$i]['stats']['7']) . '</td>'; |
|
154 | + echo '<td>'.$dirs_array[$i]['text'].'</td>'; |
|
155 | + echo '<td class="text-nowrap">'.$modx->toDateFormat($dirs_array[$i]['stats']['9']).'</td>'; |
|
156 | + echo '<td class="text-right">'.$modx->nicesize($dirs_array[$i]['stats']['7']).'</td>'; |
|
157 | 157 | echo '<td class="actions text-right">'; |
158 | 158 | echo $dirs_array[$i]['rename']; |
159 | 159 | echo $dirs_array[$i]['delete']; |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | sort($files_array); // sorting the array alphabetically (Thanks pxl8r!) |
167 | 167 | for ($i = 0; $i < $files; $i++) { |
168 | 168 | $filesizes += $files_array[$i]['stats']['7']; |
169 | - echo '<tr ' . markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']) . '>'; |
|
170 | - echo '<td>' . $files_array[$i]['text'] . '</td>'; |
|
171 | - echo '<td class="text-nowrap">' . $modx->toDateFormat($files_array[$i]['stats']['9']) . '</td>'; |
|
172 | - echo '<td class="text-right">' . $modx->nicesize($files_array[$i]['stats']['7']) . '</td>'; |
|
169 | + echo '<tr '.markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']).'>'; |
|
170 | + echo '<td>'.$files_array[$i]['text'].'</td>'; |
|
171 | + echo '<td class="text-nowrap">'.$modx->toDateFormat($files_array[$i]['stats']['9']).'</td>'; |
|
172 | + echo '<td class="text-right">'.$modx->nicesize($files_array[$i]['stats']['7']).'</td>'; |
|
173 | 173 | echo '<td class="actions text-right">'; |
174 | 174 | echo $files_array[$i]['unzip']; |
175 | 175 | echo $files_array[$i]['view']; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | } |
187 | 187 | |
188 | -if(!function_exists('removeLastPath')) { |
|
188 | +if (!function_exists('removeLastPath')) { |
|
189 | 189 | /** |
190 | 190 | * @param string $string |
191 | 191 | * @return bool|string |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | } |
205 | 205 | |
206 | -if(!function_exists('getExtension')) { |
|
206 | +if (!function_exists('getExtension')) { |
|
207 | 207 | /** |
208 | 208 | * @param string $string |
209 | 209 | * @return bool|string |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
225 | -if(!function_exists('checkExtension')) { |
|
225 | +if (!function_exists('checkExtension')) { |
|
226 | 226 | /** |
227 | 227 | * @param string $path |
228 | 228 | * @return bool |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | } |
241 | 241 | |
242 | -if(!function_exists('mkdirs')) { |
|
242 | +if (!function_exists('mkdirs')) { |
|
243 | 243 | /** |
244 | 244 | * recursive mkdir function |
245 | 245 | * |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | } |
262 | 262 | } |
263 | 263 | |
264 | -if(!function_exists('logFileChange')) { |
|
264 | +if (!function_exists('logFileChange')) { |
|
265 | 265 | /** |
266 | 266 | * @param string $type |
267 | 267 | * @param string $filename |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } |
298 | 298 | } |
299 | 299 | |
300 | -if(!function_exists('unzip')) { |
|
300 | +if (!function_exists('unzip')) { |
|
301 | 301 | /** |
302 | 302 | * by patrick_allaert - php user notes |
303 | 303 | * |
@@ -321,17 +321,17 @@ discard block |
||
321 | 321 | $zip = zip_open($file); |
322 | 322 | if ($zip) { |
323 | 323 | $old_umask = umask(0); |
324 | - $path = rtrim($path, '/') . '/'; |
|
324 | + $path = rtrim($path, '/').'/'; |
|
325 | 325 | while ($zip_entry = zip_read($zip)) { |
326 | 326 | if (zip_entry_filesize($zip_entry) > 0) { |
327 | 327 | // str_replace must be used under windows to convert "/" into "\" |
328 | 328 | $zip_entry_name = zip_entry_name($zip_entry); |
329 | - $complete_path = $path . str_replace('\\', '/', dirname($zip_entry_name)); |
|
330 | - $complete_name = $path . str_replace('\\', '/', $zip_entry_name); |
|
329 | + $complete_path = $path.str_replace('\\', '/', dirname($zip_entry_name)); |
|
330 | + $complete_name = $path.str_replace('\\', '/', $zip_entry_name); |
|
331 | 331 | if (!file_exists($complete_path)) { |
332 | 332 | $tmp = ''; |
333 | 333 | foreach (explode('/', $complete_path) AS $k) { |
334 | - $tmp .= $k . '/'; |
|
334 | + $tmp .= $k.'/'; |
|
335 | 335 | if (!is_dir($tmp)) { |
336 | 336 | mkdir($tmp, 0777); |
337 | 337 | } |
@@ -352,14 +352,14 @@ discard block |
||
352 | 352 | } |
353 | 353 | } |
354 | 354 | |
355 | -if(!function_exists('rrmdir')) { |
|
355 | +if (!function_exists('rrmdir')) { |
|
356 | 356 | /** |
357 | 357 | * @param string $dir |
358 | 358 | * @return bool |
359 | 359 | */ |
360 | 360 | function rrmdir($dir) |
361 | 361 | { |
362 | - foreach (glob($dir . '/*') as $file) { |
|
362 | + foreach (glob($dir.'/*') as $file) { |
|
363 | 363 | if (is_dir($file)) { |
364 | 364 | rrmdir($file); |
365 | 365 | } else { |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | } |
372 | 372 | } |
373 | 373 | |
374 | -if(!function_exists('fileupload')) { |
|
374 | +if (!function_exists('fileupload')) { |
|
375 | 375 | /** |
376 | 376 | * @return string |
377 | 377 | */ |
@@ -401,13 +401,13 @@ discard block |
||
401 | 401 | $userfile['type'] = $_FILES['userfile']['type'][$i]; |
402 | 402 | |
403 | 403 | // this seems to be an upload action. |
404 | - $path = $modx->config['site_url'] . substr($startpath, strlen($filemanager_path), strlen($startpath)); |
|
405 | - $path = rtrim($path, '/') . '/' . $userfile['name']; |
|
404 | + $path = $modx->config['site_url'].substr($startpath, strlen($filemanager_path), strlen($startpath)); |
|
405 | + $path = rtrim($path, '/').'/'.$userfile['name']; |
|
406 | 406 | $msg .= $path; |
407 | 407 | if ($userfile['error'] == 0) { |
408 | 408 | $img = (strpos($userfile['type'], |
409 | - 'image') !== false) ? '<br /><img src="' . $path . '" height="75" />' : ''; |
|
410 | - $msg .= "<p>" . $_lang['files_file_type'] . $userfile['type'] . ", " . $modx->nicesize(filesize($userfile['tmp_name'])) . $img . '</p>'; |
|
409 | + 'image') !== false) ? '<br /><img src="'.$path.'" height="75" />' : ''; |
|
410 | + $msg .= "<p>".$_lang['files_file_type'].$userfile['type'].", ".$modx->nicesize(filesize($userfile['tmp_name'])).$img.'</p>'; |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | $userfilename = $userfile['tmp_name']; |
@@ -415,15 +415,15 @@ discard block |
||
415 | 415 | if (is_uploaded_file($userfilename)) { |
416 | 416 | // file is uploaded file, process it! |
417 | 417 | if (!checkExtension($userfile['name'])) { |
418 | - $msg .= '<p><span class="warning">' . $_lang['files_filetype_notok'] . '</span></p>'; |
|
418 | + $msg .= '<p><span class="warning">'.$_lang['files_filetype_notok'].'</span></p>'; |
|
419 | 419 | } else { |
420 | - if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'] . '/' . $userfile['name'])) { |
|
420 | + if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'].'/'.$userfile['name'])) { |
|
421 | 421 | // Ryan: Repair broken permissions issue with file manager |
422 | 422 | if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { |
423 | - @chmod($_POST['path'] . "/" . $userfile['name'], $new_file_permissions); |
|
423 | + @chmod($_POST['path']."/".$userfile['name'], $new_file_permissions); |
|
424 | 424 | } |
425 | 425 | // Ryan: End |
426 | - $msg .= '<p><span class="success">' . $_lang['files_upload_ok'] . '</span></p><hr/>'; |
|
426 | + $msg .= '<p><span class="success">'.$_lang['files_upload_ok'].'</span></p><hr/>'; |
|
427 | 427 | |
428 | 428 | // invoke OnFileManagerUpload event |
429 | 429 | $modx->invokeEvent('OnFileManagerUpload', array( |
@@ -431,13 +431,13 @@ discard block |
||
431 | 431 | 'filename' => $userfile['name'] |
432 | 432 | )); |
433 | 433 | // Log the change |
434 | - logFileChange('upload', $_POST['path'] . '/' . $userfile['name']); |
|
434 | + logFileChange('upload', $_POST['path'].'/'.$userfile['name']); |
|
435 | 435 | } else { |
436 | - $msg .= '<p><span class="warning">' . $_lang['files_upload_copyfailed'] . '</span> ' . $_lang["files_upload_permissions_error"] . '</p>'; |
|
436 | + $msg .= '<p><span class="warning">'.$_lang['files_upload_copyfailed'].'</span> '.$_lang["files_upload_permissions_error"].'</p>'; |
|
437 | 437 | } |
438 | 438 | } |
439 | 439 | } else { |
440 | - $msg .= '<br /><span class="warning"><b>' . $_lang['files_upload_error'] . ':</b>'; |
|
440 | + $msg .= '<br /><span class="warning"><b>'.$_lang['files_upload_error'].':</b>'; |
|
441 | 441 | switch ($userfile['error']) { |
442 | 442 | case 0: //no error; possible file attack! |
443 | 443 | $msg .= $_lang['files_upload_error0']; |
@@ -462,11 +462,11 @@ discard block |
||
462 | 462 | } |
463 | 463 | } |
464 | 464 | |
465 | - return $msg . '<br/>'; |
|
465 | + return $msg.'<br/>'; |
|
466 | 466 | } |
467 | 467 | } |
468 | 468 | |
469 | -if(!function_exists('textsave')) { |
|
469 | +if (!function_exists('textsave')) { |
|
470 | 470 | /** |
471 | 471 | * @return string |
472 | 472 | */ |
@@ -480,9 +480,9 @@ discard block |
||
480 | 480 | |
481 | 481 | // Write $content to our opened file. |
482 | 482 | if (file_put_contents($filename, $content) === false) { |
483 | - $msg .= '<span class="warning"><b>' . $_lang['file_not_saved'] . '</b></span><br /><br />'; |
|
483 | + $msg .= '<span class="warning"><b>'.$_lang['file_not_saved'].'</b></span><br /><br />'; |
|
484 | 484 | } else { |
485 | - $msg .= '<span class="success"><b>' . $_lang['file_saved'] . '</b></span><br /><br />'; |
|
485 | + $msg .= '<span class="success"><b>'.$_lang['file_saved'].'</b></span><br /><br />'; |
|
486 | 486 | $_REQUEST['mode'] = 'edit'; |
487 | 487 | } |
488 | 488 | // Log the change |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | } |
493 | 493 | } |
494 | 494 | |
495 | -if(!function_exists('delete_file')) { |
|
495 | +if (!function_exists('delete_file')) { |
|
496 | 496 | /** |
497 | 497 | * @return string |
498 | 498 | */ |
@@ -504,9 +504,9 @@ discard block |
||
504 | 504 | |
505 | 505 | $file = $_REQUEST['path']; |
506 | 506 | if (!$token_check || !@unlink($file)) { |
507 | - $msg .= '<span class="warning"><b>' . $_lang['file_not_deleted'] . '</b></span><br /><br />'; |
|
507 | + $msg .= '<span class="warning"><b>'.$_lang['file_not_deleted'].'</b></span><br /><br />'; |
|
508 | 508 | } else { |
509 | - $msg .= '<span class="success"><b>' . $_lang['file_deleted'] . '</b></span><br /><br />'; |
|
509 | + $msg .= '<span class="success"><b>'.$_lang['file_deleted'].'</b></span><br /><br />'; |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | // Log the change |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | } |
517 | 517 | } |
518 | 518 | |
519 | -if(!function_exists('parsePlaceholder')) { |
|
519 | +if (!function_exists('parsePlaceholder')) { |
|
520 | 520 | /** |
521 | 521 | * @param string $tpl |
522 | 522 | * @param array $ph |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | } |
534 | 534 | } |
535 | 535 | |
536 | -if(!function_exists('checkToken')) { |
|
536 | +if (!function_exists('checkToken')) { |
|
537 | 537 | /** |
538 | 538 | * @return bool |
539 | 539 | */ |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | } |
559 | 559 | } |
560 | 560 | |
561 | -if(!function_exists('makeToken')) { |
|
561 | +if (!function_exists('makeToken')) { |
|
562 | 562 | /** |
563 | 563 | * @return string |
564 | 564 | */ |
@@ -887,7 +887,7 @@ |
||
887 | 887 | $complete_name = $path . str_replace('\\', '/', $zip_entry_name); |
888 | 888 | if (!file_exists($complete_path)) { |
889 | 889 | $tmp = ''; |
890 | - foreach (explode('/', $complete_path) AS $k) { |
|
890 | + foreach (explode('/', $complete_path) as $k) { |
|
891 | 891 | $tmp .= $k . '/'; |
892 | 892 | if (!is_dir($tmp)) { |
893 | 893 | mkdir($tmp, 0777); |
@@ -357,7 +357,7 @@ |
||
357 | 357 | if(!function_exists('getFileContent')) { |
358 | 358 | /** |
359 | 359 | * @param string $filepath |
360 | - * @return bool|string |
|
360 | + * @return null|string |
|
361 | 361 | */ |
362 | 362 | function getFileContent($filepath) |
363 | 363 | { |
@@ -114,9 +114,9 @@ |
||
114 | 114 | $field['menuindex'] = 1; |
115 | 115 | $find = false; |
116 | 116 | foreach (array( |
117 | - 'index.html', |
|
118 | - 'index.htm' |
|
119 | - ) as $filename) { |
|
117 | + 'index.html', |
|
118 | + 'index.htm' |
|
119 | + ) as $filename) { |
|
120 | 120 | $filepath = $filedir . $alias . '/' . $filename; |
121 | 121 | if ($find === false && file_exists($filepath)) { |
122 | 122 | $file = getFileContent($filepath); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!function_exists('run')) { |
|
2 | +if (!function_exists('run')) { |
|
3 | 3 | /** |
4 | 4 | * @return string |
5 | 5 | */ |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | $modx->db->query("ALTER TABLE {$tbl_site_content} AUTO_INCREMENT = 1"); |
29 | 29 | } |
30 | 30 | |
31 | - $parent = (int)$_POST['parent']; |
|
31 | + $parent = (int) $_POST['parent']; |
|
32 | 32 | |
33 | - if (is_dir(MODX_BASE_PATH . 'temp/import')) { |
|
34 | - $filedir = MODX_BASE_PATH . 'temp/import/'; |
|
35 | - } elseif (is_dir(MODX_BASE_PATH . 'assets/import')) { |
|
36 | - $filedir = MODX_BASE_PATH . 'assets/import/'; |
|
33 | + if (is_dir(MODX_BASE_PATH.'temp/import')) { |
|
34 | + $filedir = MODX_BASE_PATH.'temp/import/'; |
|
35 | + } elseif (is_dir(MODX_BASE_PATH.'assets/import')) { |
|
36 | + $filedir = MODX_BASE_PATH.'assets/import/'; |
|
37 | 37 | } else { |
38 | 38 | $filedir = ''; |
39 | 39 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $files = pop_index($files); |
45 | 45 | |
46 | 46 | // no. of files to import |
47 | - $output .= sprintf('<p>' . $_lang['import_files_found'] . '</p>', $filesfound); |
|
47 | + $output .= sprintf('<p>'.$_lang['import_files_found'].'</p>', $filesfound); |
|
48 | 48 | |
49 | 49 | // import files |
50 | 50 | if (0 < count($files)) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $mtime = $mtime[1] + $mtime[0]; |
58 | 58 | $importend = $mtime; |
59 | 59 | $totaltime = ($importend - $importstart); |
60 | - $output .= sprintf('<p>' . $_lang['import_site_time'] . '</p>', round($totaltime, 3)); |
|
60 | + $output .= sprintf('<p>'.$_lang['import_site_time'].'</p>', round($totaltime, 3)); |
|
61 | 61 | |
62 | 62 | if ($_POST['convert_link'] == 'on') { |
63 | 63 | convertLink(); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | -if(!function_exists('importFiles')) { |
|
70 | +if (!function_exists('importFiles')) { |
|
71 | 71 | /** |
72 | 72 | * @param int $parent |
73 | 73 | * @param string $filedir |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | if (is_array($value)) { |
99 | 99 | // create folder |
100 | 100 | $alias = $id; |
101 | - printf('<span>' . $_lang['import_site_importing_document'] . '</span>', $alias); |
|
101 | + printf('<span>'.$_lang['import_site_importing_document'].'</span>', $alias); |
|
102 | 102 | $field = array(); |
103 | 103 | $field['type'] = 'document'; |
104 | 104 | $field['contentType'] = 'text/html'; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | 'index.html', |
118 | 118 | 'index.htm' |
119 | 119 | ) as $filename) { |
120 | - $filepath = $filedir . $alias . '/' . $filename; |
|
120 | + $filepath = $filedir.$alias.'/'.$filename; |
|
121 | 121 | if ($find === false && file_exists($filepath)) { |
122 | 122 | $file = getFileContent($filepath); |
123 | 123 | list($pagetitle, $content, $description) = treatContent($file, $filename, $alias); |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | $newid = $modx->db->insert($field, $tbl_site_content); |
133 | 133 | if ($newid) { |
134 | 134 | $find = true; |
135 | - echo ' - <span class="success">' . $_lang['import_site_success'] . '</span><br />' . "\n"; |
|
136 | - importFiles($newid, $filedir . $alias . '/', $value, 'sub'); |
|
135 | + echo ' - <span class="success">'.$_lang['import_site_success'].'</span><br />'."\n"; |
|
136 | + importFiles($newid, $filedir.$alias.'/', $value, 'sub'); |
|
137 | 137 | } else { |
138 | - echo '<span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_db_error"] . $modx->db->getLastError(); |
|
138 | + echo '<span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_db_error"].$modx->db->getLastError(); |
|
139 | 139 | exit; |
140 | 140 | } |
141 | 141 | } |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | $newid = $modx->db->insert($field, $tbl_site_content); |
151 | 151 | if ($newid) { |
152 | 152 | $find = true; |
153 | - echo ' - <span class="success">' . $_lang['import_site_success'] . '</span><br />' . "\n"; |
|
154 | - importFiles($newid, $filedir . $alias . '/', $value, 'sub'); |
|
153 | + echo ' - <span class="success">'.$_lang['import_site_success'].'</span><br />'."\n"; |
|
154 | + importFiles($newid, $filedir.$alias.'/', $value, 'sub'); |
|
155 | 155 | } else { |
156 | - echo '<span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_db_error"] . $modx->db->getLastError(); |
|
156 | + echo '<span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_db_error"].$modx->db->getLastError(); |
|
157 | 157 | exit; |
158 | 158 | } |
159 | 159 | } |
@@ -166,12 +166,12 @@ discard block |
||
166 | 166 | $fparts = explode('.', $value); |
167 | 167 | $alias = $fparts[0]; |
168 | 168 | $ext = (count($fparts) > 1) ? $fparts[count($fparts) - 1] : ""; |
169 | - printf("<span>" . $_lang['import_site_importing_document'] . "</span>", $filename); |
|
169 | + printf("<span>".$_lang['import_site_importing_document']."</span>", $filename); |
|
170 | 170 | |
171 | 171 | if (!in_array($ext, $allowedfiles)) { |
172 | - echo ' - <span class="fail">' . $_lang["import_site_skip"] . '</span><br />' . "\n"; |
|
172 | + echo ' - <span class="fail">'.$_lang["import_site_skip"].'</span><br />'."\n"; |
|
173 | 173 | } else { |
174 | - $filepath = $filedir . $filename; |
|
174 | + $filepath = $filedir.$filename; |
|
175 | 175 | $file = getFileContent($filepath); |
176 | 176 | list($pagetitle, $content, $description) = treatContent($file, $filename, $alias); |
177 | 177 | |
@@ -197,9 +197,9 @@ discard block |
||
197 | 197 | $field['menuindex'] = ($alias == 'index') ? 0 : 2; |
198 | 198 | $newid = $modx->db->insert($field, $tbl_site_content); |
199 | 199 | if ($newid) { |
200 | - echo ' - <span class="success">' . $_lang['import_site_success'] . '</span><br />' . "\n"; |
|
200 | + echo ' - <span class="success">'.$_lang['import_site_success'].'</span><br />'."\n"; |
|
201 | 201 | } else { |
202 | - echo '<span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_db_error"] . $modx->db->getLastError(); |
|
202 | + echo '<span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_db_error"].$modx->db->getLastError(); |
|
203 | 203 | exit; |
204 | 204 | } |
205 | 205 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } |
219 | 219 | } |
220 | 220 | |
221 | -if(!function_exists('getFiles')) { |
|
221 | +if (!function_exists('getFiles')) { |
|
222 | 222 | /** |
223 | 223 | * @param string $directory |
224 | 224 | * @param array $listing |
@@ -234,10 +234,10 @@ discard block |
||
234 | 234 | foreach ($files as $file) { |
235 | 235 | if ($file == '.' || $file == '..') { |
236 | 236 | continue; |
237 | - } elseif ($h = @opendir($directory . $file . "/")) { |
|
237 | + } elseif ($h = @opendir($directory.$file."/")) { |
|
238 | 238 | closedir($h); |
239 | 239 | $count = -1; |
240 | - $listing[$file] = getFiles($directory . $file . "/", array(), $count + 1); |
|
240 | + $listing[$file] = getFiles($directory.$file."/", array(), $count + 1); |
|
241 | 241 | } elseif (strpos($file, '.htm') !== false) { |
242 | 242 | $listing[$dummy] = $file; |
243 | 243 | $dummy = $dummy + 1; |
@@ -245,14 +245,14 @@ discard block |
||
245 | 245 | } |
246 | 246 | } |
247 | 247 | } else { |
248 | - echo '<p><span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_no_open_dir"] . $directory . ".</p>"; |
|
248 | + echo '<p><span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_no_open_dir"].$directory.".</p>"; |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | return ($listing); |
252 | 252 | } |
253 | 253 | } |
254 | 254 | |
255 | -if(!function_exists('getFileContent')) { |
|
255 | +if (!function_exists('getFileContent')) { |
|
256 | 256 | /** |
257 | 257 | * @param string $filepath |
258 | 258 | * @return bool|string |
@@ -262,14 +262,14 @@ discard block |
||
262 | 262 | global $_lang; |
263 | 263 | // get the file |
264 | 264 | if (!$buffer = file_get_contents($filepath)) { |
265 | - echo '<p><span class="fail">' . $_lang['import_site_failed'] . "</span> " . $_lang["import_site_failed_no_retrieve_file"] . $filepath . ".</p>"; |
|
265 | + echo '<p><span class="fail">'.$_lang['import_site_failed']."</span> ".$_lang["import_site_failed_no_retrieve_file"].$filepath.".</p>"; |
|
266 | 266 | } else { |
267 | 267 | return $buffer; |
268 | 268 | } |
269 | 269 | } |
270 | 270 | } |
271 | 271 | |
272 | -if(!function_exists('pop_index')) { |
|
272 | +if (!function_exists('pop_index')) { |
|
273 | 273 | /** |
274 | 274 | * @param array $array |
275 | 275 | * @return array |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | } |
295 | 295 | } |
296 | 296 | |
297 | -if(!function_exists('treatContent')) { |
|
297 | +if (!function_exists('treatContent')) { |
|
298 | 298 | /** |
299 | 299 | * @param string $src |
300 | 300 | * @param string $filename |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } else { |
330 | 330 | $content = $src; |
331 | 331 | $s = '/(<meta[^>]+charset\s*=)[^>"\'=]+(.+>)/i'; |
332 | - $r = '$1' . $modx->config['modx_charset'] . '$2'; |
|
332 | + $r = '$1'.$modx->config['modx_charset'].'$2'; |
|
333 | 333 | $content = preg_replace($s, $r, $content); |
334 | 334 | $content = preg_replace('@<title>.*</title>@i', "<title>[*pagetitle*]</title>", $content); |
335 | 335 | } |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
348 | -if(!function_exists('convertLink')) { |
|
348 | +if (!function_exists('convertLink')) { |
|
349 | 349 | /** |
350 | 350 | * @return void |
351 | 351 | */ |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | list($href, $v) = explode('"', $v, 2); |
369 | 369 | $_ = $href; |
370 | 370 | if (strpos($_, $modx->config['site_url']) !== false) { |
371 | - $_ = $modx->config['base_url'] . str_replace($modx->config['site_url'], '', $_); |
|
371 | + $_ = $modx->config['base_url'].str_replace($modx->config['site_url'], '', $_); |
|
372 | 372 | } |
373 | 373 | if ($_[0] === '/') { |
374 | 374 | $_ = substr($_, 1); |
@@ -395,15 +395,15 @@ discard block |
||
395 | 395 | if (strpos($_, '/') !== false) { |
396 | 396 | $_ = substr($_, strrpos($_, '/')); |
397 | 397 | } |
398 | - $_ = $dir . str_replace('.html', '', $_); |
|
398 | + $_ = $dir.str_replace('.html', '', $_); |
|
399 | 399 | if (!isset($target[$_])) { |
400 | 400 | $target[$_] = $modx->getIdFromAlias($_); |
401 | 401 | } |
402 | 402 | $target[$_] = trim($target[$_]); |
403 | 403 | if (!empty($target[$_])) { |
404 | - $href = '[~' . $target[$_] . '~]'; |
|
404 | + $href = '[~'.$target[$_].'~]'; |
|
405 | 405 | } |
406 | - $array[$c] = '<a href="' . $href . '"' . $v; |
|
406 | + $array[$c] = '<a href="'.$href.'"'.$v; |
|
407 | 407 | } |
408 | 408 | $c++; |
409 | 409 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
3 | - header('HTTP/1.0 404 Not Found'); |
|
4 | - exit('error'); |
|
3 | + header('HTTP/1.0 404 Not Found'); |
|
4 | + exit('error'); |
|
5 | 5 | } |
6 | 6 | define('IN_MANAGER_MODE', true); // we use this to make sure files are accessed through |
7 | 7 | define('MODX_API_MODE', true); |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | include_once("{$core_path}lang/english.inc.php"); |
19 | 19 | |
20 | 20 | if($manager_language !== 'english' && is_file("{$core_path}lang/{$manager_language}.inc.php")) { |
21 | - include_once("{$core_path}lang/{$manager_language}.inc.php"); |
|
21 | + include_once("{$core_path}lang/{$manager_language}.inc.php"); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | // Initialize System Alert Message Queque |
25 | 25 | if(!isset($_SESSION['SystemAlertMsgQueque'])) { |
26 | - $_SESSION['SystemAlertMsgQueque'] = array(); |
|
26 | + $_SESSION['SystemAlertMsgQueque'] = array(); |
|
27 | 27 | } |
28 | 28 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
29 | 29 | |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | |
39 | 39 | // invoke OnBeforeManagerLogin event |
40 | 40 | $modx->invokeEvent('OnBeforeManagerLogin', array( |
41 | - 'username' => $username, |
|
42 | - 'userpassword' => $givenPassword, |
|
43 | - 'rememberme' => $rememberme |
|
44 | - )); |
|
41 | + 'username' => $username, |
|
42 | + 'userpassword' => $givenPassword, |
|
43 | + 'rememberme' => $rememberme |
|
44 | + )); |
|
45 | 45 | $fields = 'mu.*, ua.*'; |
46 | 46 | $from = '[+prefix+]manager_users AS mu, [+prefix+]user_attributes AS ua'; |
47 | 47 | $where = "BINARY mu.username='{$username}' and ua.internalKey=mu.id"; |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | $limit = $modx->db->getRecordCount($rs); |
50 | 50 | |
51 | 51 | if($limit == 0 || $limit > 1) { |
52 | - jsAlert($_lang['login_processor_unknown_user']); |
|
53 | - return; |
|
52 | + jsAlert($_lang['login_processor_unknown_user']); |
|
53 | + return; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | $row = $modx->db->getRow($rs); |
@@ -71,127 +71,127 @@ discard block |
||
71 | 71 | // get the user settings from the database |
72 | 72 | $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]user_settings', "user='{$internalKey}' AND setting_value!=''"); |
73 | 73 | while($row = $modx->db->getRow($rs)) { |
74 | - extract($row); |
|
75 | - ${$setting_name} = $setting_value; |
|
74 | + extract($row); |
|
75 | + ${$setting_name} = $setting_value; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | // blocked due to number of login errors. |
79 | 79 | if($failedlogins >= $failed_allowed && $blockeduntildate > time()) { |
80 | - @session_destroy(); |
|
81 | - session_unset(); |
|
82 | - if($cip = getenv("HTTP_CLIENT_IP")) { |
|
83 | - $ip = $cip; |
|
84 | - } elseif($cip = getenv("HTTP_X_FORWARDED_FOR")) { |
|
85 | - $ip = $cip; |
|
86 | - } elseif($cip = getenv("REMOTE_ADDR")) { |
|
87 | - $ip = $cip; |
|
88 | - } else { |
|
89 | - $ip = "UNKNOWN"; |
|
90 | - } |
|
91 | - $log = new EvolutionCMS\Legacy\LogHandler(); |
|
92 | - $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip); |
|
93 | - jsAlert($_lang['login_processor_many_failed_logins']); |
|
94 | - return; |
|
80 | + @session_destroy(); |
|
81 | + session_unset(); |
|
82 | + if($cip = getenv("HTTP_CLIENT_IP")) { |
|
83 | + $ip = $cip; |
|
84 | + } elseif($cip = getenv("HTTP_X_FORWARDED_FOR")) { |
|
85 | + $ip = $cip; |
|
86 | + } elseif($cip = getenv("REMOTE_ADDR")) { |
|
87 | + $ip = $cip; |
|
88 | + } else { |
|
89 | + $ip = "UNKNOWN"; |
|
90 | + } |
|
91 | + $log = new EvolutionCMS\Legacy\LogHandler(); |
|
92 | + $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip); |
|
93 | + jsAlert($_lang['login_processor_many_failed_logins']); |
|
94 | + return; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | // blocked due to number of login errors, but get to try again |
98 | 98 | if($failedlogins >= $failed_allowed && $blockeduntildate < time()) { |
99 | - $fields = array(); |
|
100 | - $fields['failedlogincount'] = '0'; |
|
101 | - $fields['blockeduntil'] = time() - 1; |
|
102 | - $modx->db->update($fields, '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
99 | + $fields = array(); |
|
100 | + $fields['failedlogincount'] = '0'; |
|
101 | + $fields['blockeduntil'] = time() - 1; |
|
102 | + $modx->db->update($fields, '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // this user has been blocked by an admin, so no way he's loggin in! |
106 | 106 | if($blocked == '1') { |
107 | - @session_destroy(); |
|
108 | - session_unset(); |
|
109 | - jsAlert($_lang['login_processor_blocked1']); |
|
110 | - return; |
|
107 | + @session_destroy(); |
|
108 | + session_unset(); |
|
109 | + jsAlert($_lang['login_processor_blocked1']); |
|
110 | + return; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | // blockuntil: this user has a block until date |
114 | 114 | if($blockeduntildate > time()) { |
115 | - @session_destroy(); |
|
116 | - session_unset(); |
|
117 | - jsAlert($_lang['login_processor_blocked2']); |
|
118 | - return; |
|
115 | + @session_destroy(); |
|
116 | + session_unset(); |
|
117 | + jsAlert($_lang['login_processor_blocked2']); |
|
118 | + return; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | // blockafter: this user has a block after date |
122 | 122 | if($blockedafterdate > 0 && $blockedafterdate < time()) { |
123 | - @session_destroy(); |
|
124 | - session_unset(); |
|
125 | - jsAlert($_lang['login_processor_blocked3']); |
|
126 | - return; |
|
123 | + @session_destroy(); |
|
124 | + session_unset(); |
|
125 | + jsAlert($_lang['login_processor_blocked3']); |
|
126 | + return; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | // allowed ip |
130 | 130 | if($allowed_ip) { |
131 | - if(($hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])) && ($hostname != $_SERVER['REMOTE_ADDR'])) { |
|
132 | - if(gethostbyname($hostname) != $_SERVER['REMOTE_ADDR']) { |
|
133 | - jsAlert($_lang['login_processor_remotehost_ip']); |
|
134 | - return; |
|
135 | - } |
|
136 | - } |
|
137 | - if(!in_array($_SERVER['REMOTE_ADDR'], array_filter(array_map('trim', explode(',', $allowed_ip))))) { |
|
138 | - jsAlert($_lang['login_processor_remote_ip']); |
|
139 | - return; |
|
140 | - } |
|
131 | + if(($hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])) && ($hostname != $_SERVER['REMOTE_ADDR'])) { |
|
132 | + if(gethostbyname($hostname) != $_SERVER['REMOTE_ADDR']) { |
|
133 | + jsAlert($_lang['login_processor_remotehost_ip']); |
|
134 | + return; |
|
135 | + } |
|
136 | + } |
|
137 | + if(!in_array($_SERVER['REMOTE_ADDR'], array_filter(array_map('trim', explode(',', $allowed_ip))))) { |
|
138 | + jsAlert($_lang['login_processor_remote_ip']); |
|
139 | + return; |
|
140 | + } |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | // allowed days |
144 | 144 | if($allowed_days) { |
145 | - $date = getdate(); |
|
146 | - $day = $date['wday'] + 1; |
|
147 | - if(!in_array($day,explode(',',$allowed_days))) { |
|
148 | - jsAlert($_lang['login_processor_date']); |
|
149 | - return; |
|
150 | - } |
|
145 | + $date = getdate(); |
|
146 | + $day = $date['wday'] + 1; |
|
147 | + if(!in_array($day,explode(',',$allowed_days))) { |
|
148 | + jsAlert($_lang['login_processor_date']); |
|
149 | + return; |
|
150 | + } |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | // invoke OnManagerAuthentication event |
154 | 154 | $rt = $modx->invokeEvent('OnManagerAuthentication', array( |
155 | - 'userid' => $internalKey, |
|
156 | - 'username' => $username, |
|
157 | - 'userpassword' => $givenPassword, |
|
158 | - 'savedpassword' => $dbasePassword, |
|
159 | - 'rememberme' => $rememberme |
|
160 | - )); |
|
155 | + 'userid' => $internalKey, |
|
156 | + 'username' => $username, |
|
157 | + 'userpassword' => $givenPassword, |
|
158 | + 'savedpassword' => $dbasePassword, |
|
159 | + 'rememberme' => $rememberme |
|
160 | + )); |
|
161 | 161 | |
162 | 162 | // check if plugin authenticated the user |
163 | 163 | $matchPassword = false; |
164 | 164 | if(!isset($rt) || !$rt || (is_array($rt) && !in_array(true, $rt))) { |
165 | - // check user password - local authentication |
|
166 | - $hashType = $modx->manager->getHashType($dbasePassword); |
|
167 | - if($hashType == 'phpass') { |
|
168 | - $matchPassword = login($username, $_REQUEST['password'], $dbasePassword); |
|
169 | - } elseif($hashType == 'md5') { |
|
170 | - $matchPassword = loginMD5($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
171 | - } elseif($hashType == 'v1') { |
|
172 | - $matchPassword = loginV1($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
173 | - } else { |
|
174 | - $matchPassword = false; |
|
175 | - } |
|
165 | + // check user password - local authentication |
|
166 | + $hashType = $modx->manager->getHashType($dbasePassword); |
|
167 | + if($hashType == 'phpass') { |
|
168 | + $matchPassword = login($username, $_REQUEST['password'], $dbasePassword); |
|
169 | + } elseif($hashType == 'md5') { |
|
170 | + $matchPassword = loginMD5($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
171 | + } elseif($hashType == 'v1') { |
|
172 | + $matchPassword = loginV1($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
173 | + } else { |
|
174 | + $matchPassword = false; |
|
175 | + } |
|
176 | 176 | } else if($rt === true || (is_array($rt) && in_array(true, $rt))) { |
177 | - $matchPassword = true; |
|
177 | + $matchPassword = true; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | if(!$matchPassword) { |
181 | - jsAlert($_lang['login_processor_wrong_password']); |
|
182 | - incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
183 | - return; |
|
181 | + jsAlert($_lang['login_processor_wrong_password']); |
|
182 | + incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
183 | + return; |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | if($modx->config['use_captcha'] == 1) { |
187 | - if(!isset ($_SESSION['veriword'])) { |
|
188 | - jsAlert($_lang['login_processor_captcha_config']); |
|
189 | - return; |
|
190 | - } elseif($_SESSION['veriword'] != $captcha_code) { |
|
191 | - jsAlert($_lang['login_processor_bad_code']); |
|
192 | - incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
193 | - return; |
|
194 | - } |
|
187 | + if(!isset ($_SESSION['veriword'])) { |
|
188 | + jsAlert($_lang['login_processor_captcha_config']); |
|
189 | + return; |
|
190 | + } elseif($_SESSION['veriword'] != $captcha_code) { |
|
191 | + jsAlert($_lang['login_processor_bad_code']); |
|
192 | + incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
193 | + return; |
|
194 | + } |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | $modx->cleanupExpiredLocks(); |
@@ -226,36 +226,36 @@ discard block |
||
226 | 226 | $_SESSION['mgrToken'] = md5($currentsessionid); |
227 | 227 | |
228 | 228 | if($rememberme == '1') { |
229 | - $_SESSION['modx.mgr.session.cookie.lifetime'] = (int)$modx->config['session.cookie.lifetime']; |
|
230 | - |
|
231 | - // Set a cookie separate from the session cookie with the username in it. |
|
232 | - // Are we using secure connection? If so, make sure the cookie is secure |
|
233 | - global $https_port; |
|
234 | - |
|
235 | - $secure = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port); |
|
236 | - if(version_compare(PHP_VERSION, '5.2', '<')) { |
|
237 | - setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, '; HttpOnly', $secure); |
|
238 | - } else { |
|
239 | - setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, NULL, $secure, true); |
|
240 | - } |
|
229 | + $_SESSION['modx.mgr.session.cookie.lifetime'] = (int)$modx->config['session.cookie.lifetime']; |
|
230 | + |
|
231 | + // Set a cookie separate from the session cookie with the username in it. |
|
232 | + // Are we using secure connection? If so, make sure the cookie is secure |
|
233 | + global $https_port; |
|
234 | + |
|
235 | + $secure = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port); |
|
236 | + if(version_compare(PHP_VERSION, '5.2', '<')) { |
|
237 | + setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, '; HttpOnly', $secure); |
|
238 | + } else { |
|
239 | + setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, NULL, $secure, true); |
|
240 | + } |
|
241 | 241 | } else { |
242 | - $_SESSION['modx.mgr.session.cookie.lifetime'] = 0; |
|
242 | + $_SESSION['modx.mgr.session.cookie.lifetime'] = 0; |
|
243 | 243 | |
244 | - // Remove the Remember Me cookie |
|
245 | - setcookie('modx_remember_manager', '', time() - 3600, MODX_BASE_URL); |
|
244 | + // Remove the Remember Me cookie |
|
245 | + setcookie('modx_remember_manager', '', time() - 3600, MODX_BASE_URL); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | // Check if user already has an active session, if not check if user pressed logout end of last session |
249 | 249 | $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_user_sessions'), "internalKey='{$internalKey}'"); |
250 | 250 | $activeSession = $modx->db->getValue($rs); |
251 | 251 | if(!$activeSession) { |
252 | - $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_users'), "internalKey='{$internalKey}' AND action != 8"); |
|
253 | - if($lastHit = $modx->db->getValue($rs)) { |
|
254 | - $_SESSION['show_logout_reminder'] = array( |
|
255 | - 'type' => 'logout_reminder', |
|
256 | - 'lastHit' => $lastHit |
|
257 | - ); |
|
258 | - } |
|
252 | + $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_users'), "internalKey='{$internalKey}' AND action != 8"); |
|
253 | + if($lastHit = $modx->db->getValue($rs)) { |
|
254 | + $_SESSION['show_logout_reminder'] = array( |
|
255 | + 'type' => 'logout_reminder', |
|
256 | + 'lastHit' => $lastHit |
|
257 | + ); |
|
258 | + } |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | $log = new EvolutionCMS\Legacy\LogHandler(); |
@@ -263,27 +263,27 @@ discard block |
||
263 | 263 | |
264 | 264 | // invoke OnManagerLogin event |
265 | 265 | $modx->invokeEvent('OnManagerLogin', array( |
266 | - 'userid' => $internalKey, |
|
267 | - 'username' => $username, |
|
268 | - 'userpassword' => $givenPassword, |
|
269 | - 'rememberme' => $rememberme |
|
270 | - )); |
|
266 | + 'userid' => $internalKey, |
|
267 | + 'username' => $username, |
|
268 | + 'userpassword' => $givenPassword, |
|
269 | + 'rememberme' => $rememberme |
|
270 | + )); |
|
271 | 271 | |
272 | 272 | // check if we should redirect user to a web page |
273 | 273 | $rs = $modx->db->select('setting_value', '[+prefix+]user_settings', "user='{$internalKey}' AND setting_name='manager_login_startup'"); |
274 | 274 | $id = (int)$modx->db->getValue($rs); |
275 | 275 | if($id > 0) { |
276 | - $header = 'Location: ' . $modx->makeUrl($id, '', '', 'full'); |
|
277 | - if($_POST['ajax'] == 1) { |
|
278 | - echo $header; |
|
279 | - } else { |
|
280 | - header($header); |
|
281 | - } |
|
276 | + $header = 'Location: ' . $modx->makeUrl($id, '', '', 'full'); |
|
277 | + if($_POST['ajax'] == 1) { |
|
278 | + echo $header; |
|
279 | + } else { |
|
280 | + header($header); |
|
281 | + } |
|
282 | 282 | } else { |
283 | - $header = 'Location: ' . MODX_MANAGER_URL; |
|
284 | - if($_POST['ajax'] == 1) { |
|
285 | - echo $header; |
|
286 | - } else { |
|
287 | - header($header); |
|
288 | - } |
|
283 | + $header = 'Location: ' . MODX_MANAGER_URL; |
|
284 | + if($_POST['ajax'] == 1) { |
|
285 | + echo $header; |
|
286 | + } else { |
|
287 | + header($header); |
|
288 | + } |
|
289 | 289 | } |
@@ -1,28 +1,28 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
2 | +if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
3 | 3 | header('HTTP/1.0 404 Not Found'); |
4 | 4 | exit('error'); |
5 | 5 | } |
6 | -define('IN_MANAGER_MODE', true); // we use this to make sure files are accessed through |
|
6 | +define('IN_MANAGER_MODE', true); // we use this to make sure files are accessed through |
|
7 | 7 | define('MODX_API_MODE', true); |
8 | -include_once(__DIR__ . '/../../index.php'); |
|
8 | +include_once(__DIR__.'/../../index.php'); |
|
9 | 9 | $modx->db->connect(); |
10 | 10 | $modx->getSettings(); |
11 | 11 | $modx->invokeEvent('OnManagerPageInit'); |
12 | 12 | $modx->loadExtension('ManagerAPI'); |
13 | 13 | $modx->loadExtension('phpass'); |
14 | 14 | |
15 | -$core_path = MODX_MANAGER_PATH . 'includes/'; |
|
15 | +$core_path = MODX_MANAGER_PATH.'includes/'; |
|
16 | 16 | // include_once the language file |
17 | 17 | $_lang = array(); |
18 | 18 | include_once("{$core_path}lang/english.inc.php"); |
19 | 19 | |
20 | -if($manager_language !== 'english' && is_file("{$core_path}lang/{$manager_language}.inc.php")) { |
|
20 | +if ($manager_language !== 'english' && is_file("{$core_path}lang/{$manager_language}.inc.php")) { |
|
21 | 21 | include_once("{$core_path}lang/{$manager_language}.inc.php"); |
22 | 22 | } |
23 | 23 | |
24 | 24 | // Initialize System Alert Message Queque |
25 | -if(!isset($_SESSION['SystemAlertMsgQueque'])) { |
|
25 | +if (!isset($_SESSION['SystemAlertMsgQueque'])) { |
|
26 | 26 | $_SESSION['SystemAlertMsgQueque'] = array(); |
27 | 27 | } |
28 | 28 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $rs = $modx->db->select($fields, $from, $where); |
49 | 49 | $limit = $modx->db->getRecordCount($rs); |
50 | 50 | |
51 | -if($limit == 0 || $limit > 1) { |
|
51 | +if ($limit == 0 || $limit > 1) { |
|
52 | 52 | jsAlert($_lang['login_processor_unknown_user']); |
53 | 53 | return; |
54 | 54 | } |
@@ -70,32 +70,32 @@ discard block |
||
70 | 70 | |
71 | 71 | // get the user settings from the database |
72 | 72 | $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]user_settings', "user='{$internalKey}' AND setting_value!=''"); |
73 | -while($row = $modx->db->getRow($rs)) { |
|
73 | +while ($row = $modx->db->getRow($rs)) { |
|
74 | 74 | extract($row); |
75 | 75 | ${$setting_name} = $setting_value; |
76 | 76 | } |
77 | 77 | |
78 | 78 | // blocked due to number of login errors. |
79 | -if($failedlogins >= $failed_allowed && $blockeduntildate > time()) { |
|
79 | +if ($failedlogins >= $failed_allowed && $blockeduntildate > time()) { |
|
80 | 80 | @session_destroy(); |
81 | 81 | session_unset(); |
82 | - if($cip = getenv("HTTP_CLIENT_IP")) { |
|
82 | + if ($cip = getenv("HTTP_CLIENT_IP")) { |
|
83 | 83 | $ip = $cip; |
84 | - } elseif($cip = getenv("HTTP_X_FORWARDED_FOR")) { |
|
84 | + } elseif ($cip = getenv("HTTP_X_FORWARDED_FOR")) { |
|
85 | 85 | $ip = $cip; |
86 | - } elseif($cip = getenv("REMOTE_ADDR")) { |
|
86 | + } elseif ($cip = getenv("REMOTE_ADDR")) { |
|
87 | 87 | $ip = $cip; |
88 | 88 | } else { |
89 | 89 | $ip = "UNKNOWN"; |
90 | 90 | } |
91 | 91 | $log = new EvolutionCMS\Legacy\LogHandler(); |
92 | - $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip); |
|
92 | + $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: ".$ip); |
|
93 | 93 | jsAlert($_lang['login_processor_many_failed_logins']); |
94 | 94 | return; |
95 | 95 | } |
96 | 96 | |
97 | 97 | // blocked due to number of login errors, but get to try again |
98 | -if($failedlogins >= $failed_allowed && $blockeduntildate < time()) { |
|
98 | +if ($failedlogins >= $failed_allowed && $blockeduntildate < time()) { |
|
99 | 99 | $fields = array(); |
100 | 100 | $fields['failedlogincount'] = '0'; |
101 | 101 | $fields['blockeduntil'] = time() - 1; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | // this user has been blocked by an admin, so no way he's loggin in! |
106 | -if($blocked == '1') { |
|
106 | +if ($blocked == '1') { |
|
107 | 107 | @session_destroy(); |
108 | 108 | session_unset(); |
109 | 109 | jsAlert($_lang['login_processor_blocked1']); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | // blockuntil: this user has a block until date |
114 | -if($blockeduntildate > time()) { |
|
114 | +if ($blockeduntildate > time()) { |
|
115 | 115 | @session_destroy(); |
116 | 116 | session_unset(); |
117 | 117 | jsAlert($_lang['login_processor_blocked2']); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | // blockafter: this user has a block after date |
122 | -if($blockedafterdate > 0 && $blockedafterdate < time()) { |
|
122 | +if ($blockedafterdate > 0 && $blockedafterdate < time()) { |
|
123 | 123 | @session_destroy(); |
124 | 124 | session_unset(); |
125 | 125 | jsAlert($_lang['login_processor_blocked3']); |
@@ -127,24 +127,24 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | // allowed ip |
130 | -if($allowed_ip) { |
|
131 | - if(($hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])) && ($hostname != $_SERVER['REMOTE_ADDR'])) { |
|
132 | - if(gethostbyname($hostname) != $_SERVER['REMOTE_ADDR']) { |
|
130 | +if ($allowed_ip) { |
|
131 | + if (($hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])) && ($hostname != $_SERVER['REMOTE_ADDR'])) { |
|
132 | + if (gethostbyname($hostname) != $_SERVER['REMOTE_ADDR']) { |
|
133 | 133 | jsAlert($_lang['login_processor_remotehost_ip']); |
134 | 134 | return; |
135 | 135 | } |
136 | 136 | } |
137 | - if(!in_array($_SERVER['REMOTE_ADDR'], array_filter(array_map('trim', explode(',', $allowed_ip))))) { |
|
137 | + if (!in_array($_SERVER['REMOTE_ADDR'], array_filter(array_map('trim', explode(',', $allowed_ip))))) { |
|
138 | 138 | jsAlert($_lang['login_processor_remote_ip']); |
139 | 139 | return; |
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
143 | 143 | // allowed days |
144 | -if($allowed_days) { |
|
144 | +if ($allowed_days) { |
|
145 | 145 | $date = getdate(); |
146 | 146 | $day = $date['wday'] + 1; |
147 | - if(!in_array($day,explode(',',$allowed_days))) { |
|
147 | + if (!in_array($day, explode(',', $allowed_days))) { |
|
148 | 148 | jsAlert($_lang['login_processor_date']); |
149 | 149 | return; |
150 | 150 | } |
@@ -161,33 +161,33 @@ discard block |
||
161 | 161 | |
162 | 162 | // check if plugin authenticated the user |
163 | 163 | $matchPassword = false; |
164 | -if(!isset($rt) || !$rt || (is_array($rt) && !in_array(true, $rt))) { |
|
164 | +if (!isset($rt) || !$rt || (is_array($rt) && !in_array(true, $rt))) { |
|
165 | 165 | // check user password - local authentication |
166 | 166 | $hashType = $modx->manager->getHashType($dbasePassword); |
167 | - if($hashType == 'phpass') { |
|
167 | + if ($hashType == 'phpass') { |
|
168 | 168 | $matchPassword = login($username, $_REQUEST['password'], $dbasePassword); |
169 | - } elseif($hashType == 'md5') { |
|
169 | + } elseif ($hashType == 'md5') { |
|
170 | 170 | $matchPassword = loginMD5($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
171 | - } elseif($hashType == 'v1') { |
|
171 | + } elseif ($hashType == 'v1') { |
|
172 | 172 | $matchPassword = loginV1($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
173 | 173 | } else { |
174 | 174 | $matchPassword = false; |
175 | 175 | } |
176 | -} else if($rt === true || (is_array($rt) && in_array(true, $rt))) { |
|
176 | +} else if ($rt === true || (is_array($rt) && in_array(true, $rt))) { |
|
177 | 177 | $matchPassword = true; |
178 | 178 | } |
179 | 179 | |
180 | -if(!$matchPassword) { |
|
180 | +if (!$matchPassword) { |
|
181 | 181 | jsAlert($_lang['login_processor_wrong_password']); |
182 | 182 | incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
183 | 183 | return; |
184 | 184 | } |
185 | 185 | |
186 | -if($modx->config['use_captcha'] == 1) { |
|
187 | - if(!isset ($_SESSION['veriword'])) { |
|
186 | +if ($modx->config['use_captcha'] == 1) { |
|
187 | + if (!isset ($_SESSION['veriword'])) { |
|
188 | 188 | jsAlert($_lang['login_processor_captcha_config']); |
189 | 189 | return; |
190 | - } elseif($_SESSION['veriword'] != $captcha_code) { |
|
190 | + } elseif ($_SESSION['veriword'] != $captcha_code) { |
|
191 | 191 | jsAlert($_lang['login_processor_bad_code']); |
192 | 192 | incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
193 | 193 | return; |
@@ -215,25 +215,25 @@ discard block |
||
215 | 215 | $_SESSION['mgrPermissions'] = $modx->db->getRow($rs); |
216 | 216 | |
217 | 217 | // successful login so reset fail count and update key values |
218 | -$modx->db->update('failedlogincount=0, ' . 'logincount=logincount+1, ' . 'lastlogin=thislogin, ' . 'thislogin=' . time() . ', ' . "sessionid='{$currentsessionid}'", '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
218 | +$modx->db->update('failedlogincount=0, '.'logincount=logincount+1, '.'lastlogin=thislogin, '.'thislogin='.time().', '."sessionid='{$currentsessionid}'", '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
219 | 219 | |
220 | 220 | // get user's document groups |
221 | 221 | $i = 0; |
222 | -$rs = $modx->db->select('uga.documentgroup', $modx->getFullTableName('member_groups') . ' ug |
|
223 | - INNER JOIN ' . $modx->getFullTableName('membergroup_access') . ' uga ON uga.membergroup=ug.user_group', "ug.member='{$internalKey}'"); |
|
222 | +$rs = $modx->db->select('uga.documentgroup', $modx->getFullTableName('member_groups').' ug |
|
223 | + INNER JOIN ' . $modx->getFullTableName('membergroup_access').' uga ON uga.membergroup=ug.user_group', "ug.member='{$internalKey}'"); |
|
224 | 224 | $_SESSION['mgrDocgroups'] = $modx->db->getColumn('documentgroup', $rs); |
225 | 225 | |
226 | 226 | $_SESSION['mgrToken'] = md5($currentsessionid); |
227 | 227 | |
228 | -if($rememberme == '1') { |
|
229 | - $_SESSION['modx.mgr.session.cookie.lifetime'] = (int)$modx->config['session.cookie.lifetime']; |
|
228 | +if ($rememberme == '1') { |
|
229 | + $_SESSION['modx.mgr.session.cookie.lifetime'] = (int) $modx->config['session.cookie.lifetime']; |
|
230 | 230 | |
231 | 231 | // Set a cookie separate from the session cookie with the username in it. |
232 | 232 | // Are we using secure connection? If so, make sure the cookie is secure |
233 | 233 | global $https_port; |
234 | 234 | |
235 | 235 | $secure = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port); |
236 | - if(version_compare(PHP_VERSION, '5.2', '<')) { |
|
236 | + if (version_compare(PHP_VERSION, '5.2', '<')) { |
|
237 | 237 | setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, '; HttpOnly', $secure); |
238 | 238 | } else { |
239 | 239 | setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, NULL, $secure, true); |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | // Check if user already has an active session, if not check if user pressed logout end of last session |
249 | 249 | $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_user_sessions'), "internalKey='{$internalKey}'"); |
250 | 250 | $activeSession = $modx->db->getValue($rs); |
251 | -if(!$activeSession) { |
|
251 | +if (!$activeSession) { |
|
252 | 252 | $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_users'), "internalKey='{$internalKey}' AND action != 8"); |
253 | - if($lastHit = $modx->db->getValue($rs)) { |
|
253 | + if ($lastHit = $modx->db->getValue($rs)) { |
|
254 | 254 | $_SESSION['show_logout_reminder'] = array( |
255 | 255 | 'type' => 'logout_reminder', |
256 | 256 | 'lastHit' => $lastHit |
@@ -271,17 +271,17 @@ discard block |
||
271 | 271 | |
272 | 272 | // check if we should redirect user to a web page |
273 | 273 | $rs = $modx->db->select('setting_value', '[+prefix+]user_settings', "user='{$internalKey}' AND setting_name='manager_login_startup'"); |
274 | -$id = (int)$modx->db->getValue($rs); |
|
275 | -if($id > 0) { |
|
276 | - $header = 'Location: ' . $modx->makeUrl($id, '', '', 'full'); |
|
277 | - if($_POST['ajax'] == 1) { |
|
274 | +$id = (int) $modx->db->getValue($rs); |
|
275 | +if ($id > 0) { |
|
276 | + $header = 'Location: '.$modx->makeUrl($id, '', '', 'full'); |
|
277 | + if ($_POST['ajax'] == 1) { |
|
278 | 278 | echo $header; |
279 | 279 | } else { |
280 | 280 | header($header); |
281 | 281 | } |
282 | 282 | } else { |
283 | - $header = 'Location: ' . MODX_MANAGER_URL; |
|
284 | - if($_POST['ajax'] == 1) { |
|
283 | + $header = 'Location: '.MODX_MANAGER_URL; |
|
284 | + if ($_POST['ajax'] == 1) { |
|
285 | 285 | echo $header; |
286 | 286 | } else { |
287 | 287 | header($header); |
@@ -33,113 +33,113 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | switch ($_POST['mode']) { |
36 | - case '19': |
|
37 | - |
|
38 | - // invoke OnBeforeTempFormSave event |
|
39 | - $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
40 | - "mode" => "new", |
|
41 | - "id" => $id |
|
42 | - )); |
|
43 | - |
|
44 | - // disallow duplicate names for new templates |
|
45 | - $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}'"); |
|
46 | - $count = $modx->db->getValue($rs); |
|
47 | - if ($count > 0) { |
|
48 | - $modx->manager->saveFormValues(19); |
|
49 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=19"); |
|
50 | - } |
|
51 | - |
|
52 | - //do stuff to save the new doc |
|
53 | - $newid = $modx->db->insert(array( |
|
54 | - 'templatename' => $templatename, |
|
55 | - 'description' => $description, |
|
56 | - 'content' => $template, |
|
57 | - 'locked' => $locked, |
|
58 | - 'selectable' => $selectable, |
|
59 | - 'category' => $categoryid, |
|
60 | - 'createdon' => $currentdate, |
|
61 | - 'editedon' => $currentdate |
|
62 | - ), $modx->getFullTableName('site_templates')); |
|
63 | - |
|
64 | - // invoke OnTempFormSave event |
|
65 | - $modx->invokeEvent("OnTempFormSave", array( |
|
66 | - "mode" => "new", |
|
67 | - "id" => $newid |
|
68 | - )); |
|
69 | - // Set new assigned Tvs |
|
70 | - saveTemplateAccess($newid); |
|
71 | - |
|
72 | - // Set the item name for logger |
|
73 | - $_SESSION['itemname'] = $templatename; |
|
74 | - |
|
75 | - // empty cache |
|
76 | - $modx->clearCache('full'); |
|
77 | - |
|
78 | - // finished emptying cache - redirect |
|
79 | - if ($_POST['stay'] != '') { |
|
80 | - $a = ($_POST['stay'] == '2') ? "16&id=$newid" : "19"; |
|
81 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
82 | - header($header); |
|
83 | - } else { |
|
84 | - $header = "Location: index.php?a=76&r=2"; |
|
85 | - header($header); |
|
86 | - } |
|
87 | - |
|
88 | - break; |
|
89 | - case '16': |
|
90 | - |
|
91 | - // invoke OnBeforeTempFormSave event |
|
92 | - $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
93 | - "mode" => "upd", |
|
94 | - "id" => $id |
|
95 | - )); |
|
96 | - |
|
97 | - // disallow duplicate names for templates |
|
98 | - $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}' AND id!='{$id}'"); |
|
99 | - $count = $modx->db->getValue($rs); |
|
100 | - if ($count > 0) { |
|
101 | - $modx->manager->saveFormValues(16); |
|
102 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=16&id={$id}"); |
|
103 | - } |
|
104 | - |
|
105 | - //do stuff to save the edited doc |
|
106 | - $modx->db->update(array( |
|
107 | - 'templatename' => $templatename, |
|
108 | - 'description' => $description, |
|
109 | - 'content' => $template, |
|
110 | - 'locked' => $locked, |
|
111 | - 'selectable' => $selectable, |
|
112 | - 'category' => $categoryid, |
|
113 | - 'editedon' => $currentdate |
|
114 | - ), $modx->getFullTableName('site_templates'), "id='{$id}'"); |
|
115 | - // Set new assigned Tvs |
|
116 | - saveTemplateAccess($id); |
|
117 | - |
|
118 | - // invoke OnTempFormSave event |
|
119 | - $modx->invokeEvent("OnTempFormSave", array( |
|
120 | - "mode" => "upd", |
|
121 | - "id" => $id |
|
122 | - )); |
|
123 | - |
|
124 | - // Set the item name for logger |
|
125 | - $_SESSION['itemname'] = $templatename; |
|
126 | - |
|
127 | - // first empty the cache |
|
128 | - $modx->clearCache('full'); |
|
129 | - |
|
130 | - // finished emptying cache - redirect |
|
131 | - if ($_POST['stay'] != '') { |
|
132 | - $a = ($_POST['stay'] == '2') ? "16&id=$id" : "19"; |
|
133 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
134 | - header($header); |
|
135 | - } else { |
|
136 | - $modx->unlockElement(1, $id); |
|
137 | - $header = "Location: index.php?a=76&r=2"; |
|
138 | - header($header); |
|
139 | - } |
|
140 | - |
|
141 | - |
|
142 | - break; |
|
143 | - default: |
|
144 | - $modx->webAlertAndQuit("No operation set in request."); |
|
36 | + case '19': |
|
37 | + |
|
38 | + // invoke OnBeforeTempFormSave event |
|
39 | + $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
40 | + "mode" => "new", |
|
41 | + "id" => $id |
|
42 | + )); |
|
43 | + |
|
44 | + // disallow duplicate names for new templates |
|
45 | + $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}'"); |
|
46 | + $count = $modx->db->getValue($rs); |
|
47 | + if ($count > 0) { |
|
48 | + $modx->manager->saveFormValues(19); |
|
49 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=19"); |
|
50 | + } |
|
51 | + |
|
52 | + //do stuff to save the new doc |
|
53 | + $newid = $modx->db->insert(array( |
|
54 | + 'templatename' => $templatename, |
|
55 | + 'description' => $description, |
|
56 | + 'content' => $template, |
|
57 | + 'locked' => $locked, |
|
58 | + 'selectable' => $selectable, |
|
59 | + 'category' => $categoryid, |
|
60 | + 'createdon' => $currentdate, |
|
61 | + 'editedon' => $currentdate |
|
62 | + ), $modx->getFullTableName('site_templates')); |
|
63 | + |
|
64 | + // invoke OnTempFormSave event |
|
65 | + $modx->invokeEvent("OnTempFormSave", array( |
|
66 | + "mode" => "new", |
|
67 | + "id" => $newid |
|
68 | + )); |
|
69 | + // Set new assigned Tvs |
|
70 | + saveTemplateAccess($newid); |
|
71 | + |
|
72 | + // Set the item name for logger |
|
73 | + $_SESSION['itemname'] = $templatename; |
|
74 | + |
|
75 | + // empty cache |
|
76 | + $modx->clearCache('full'); |
|
77 | + |
|
78 | + // finished emptying cache - redirect |
|
79 | + if ($_POST['stay'] != '') { |
|
80 | + $a = ($_POST['stay'] == '2') ? "16&id=$newid" : "19"; |
|
81 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
82 | + header($header); |
|
83 | + } else { |
|
84 | + $header = "Location: index.php?a=76&r=2"; |
|
85 | + header($header); |
|
86 | + } |
|
87 | + |
|
88 | + break; |
|
89 | + case '16': |
|
90 | + |
|
91 | + // invoke OnBeforeTempFormSave event |
|
92 | + $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
93 | + "mode" => "upd", |
|
94 | + "id" => $id |
|
95 | + )); |
|
96 | + |
|
97 | + // disallow duplicate names for templates |
|
98 | + $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}' AND id!='{$id}'"); |
|
99 | + $count = $modx->db->getValue($rs); |
|
100 | + if ($count > 0) { |
|
101 | + $modx->manager->saveFormValues(16); |
|
102 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=16&id={$id}"); |
|
103 | + } |
|
104 | + |
|
105 | + //do stuff to save the edited doc |
|
106 | + $modx->db->update(array( |
|
107 | + 'templatename' => $templatename, |
|
108 | + 'description' => $description, |
|
109 | + 'content' => $template, |
|
110 | + 'locked' => $locked, |
|
111 | + 'selectable' => $selectable, |
|
112 | + 'category' => $categoryid, |
|
113 | + 'editedon' => $currentdate |
|
114 | + ), $modx->getFullTableName('site_templates'), "id='{$id}'"); |
|
115 | + // Set new assigned Tvs |
|
116 | + saveTemplateAccess($id); |
|
117 | + |
|
118 | + // invoke OnTempFormSave event |
|
119 | + $modx->invokeEvent("OnTempFormSave", array( |
|
120 | + "mode" => "upd", |
|
121 | + "id" => $id |
|
122 | + )); |
|
123 | + |
|
124 | + // Set the item name for logger |
|
125 | + $_SESSION['itemname'] = $templatename; |
|
126 | + |
|
127 | + // first empty the cache |
|
128 | + $modx->clearCache('full'); |
|
129 | + |
|
130 | + // finished emptying cache - redirect |
|
131 | + if ($_POST['stay'] != '') { |
|
132 | + $a = ($_POST['stay'] == '2') ? "16&id=$id" : "19"; |
|
133 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
134 | + header($header); |
|
135 | + } else { |
|
136 | + $modx->unlockElement(1, $id); |
|
137 | + $header = "Location: index.php?a=76&r=2"; |
|
138 | + header($header); |
|
139 | + } |
|
140 | + |
|
141 | + |
|
142 | + break; |
|
143 | + default: |
|
144 | + $modx->webAlertAndQuit("No operation set in request."); |
|
145 | 145 | } |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.'); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('save_plugin')) { |
6 | 6 | $modx->webAlertAndQuit($_lang['error_no_privileges']); |
7 | 7 | } |
8 | 8 | |
9 | -$id = (int)$_POST['id']; |
|
9 | +$id = (int) $_POST['id']; |
|
10 | 10 | $name = $modx->db->escape(trim($_POST['name'])); |
11 | 11 | $description = $modx->db->escape($_POST['description']); |
12 | 12 | $locked = $_POST['locked'] == 'on' ? '1' : '0'; |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | |
21 | 21 | //Kyle Jaebker - added category support |
22 | 22 | if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) { |
23 | - $categoryid = (int)$_POST['categoryid']; |
|
23 | + $categoryid = (int) $_POST['categoryid']; |
|
24 | 24 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
25 | 25 | $categoryid = 0; |
26 | 26 | } else { |
27 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
27 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
28 | 28 | $categoryid = getCategory($_POST['newcategory']); |
29 | 29 | } |
30 | 30 | |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | $moduleguid = isset($parsed['guid']) ? $parsed['guid'] : $moduleguid; |
41 | 41 | |
42 | 42 | $description = isset($parsed['description']) ? $parsed['description'] : $description; |
43 | - $version = isset($parsed['version']) ? '<b>' . $parsed['version'] . '</b> ' : ''; |
|
43 | + $version = isset($parsed['version']) ? '<b>'.$parsed['version'].'</b> ' : ''; |
|
44 | 44 | if ($version) { |
45 | - $description = $version . trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
45 | + $description = $version.trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
46 | 46 | } |
47 | 47 | if (isset($parsed['modx_category'])) { |
48 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
48 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
49 | 49 | $categoryid = getCategory($parsed['modx_category']); |
50 | 50 | } |
51 | 51 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | // finished emptying cache - redirect |
104 | 104 | if ($_POST['stay'] != '') { |
105 | 105 | $a = ($_POST['stay'] == '2') ? "102&id=$newid" : '101'; |
106 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
106 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
107 | 107 | header($header); |
108 | 108 | } else { |
109 | 109 | $header = 'Location: index.php?a=76&r=2'; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // finished emptying cache - redirect |
159 | 159 | if ($_POST['stay'] != '') { |
160 | 160 | $a = ($_POST['stay'] == '2') ? "102&id=$id" : '101'; |
161 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
161 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
162 | 162 | header($header); |
163 | 163 | } else { |
164 | 164 | $modx->unlockElement(5, $id); |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('delete_document')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_REQUEST['id'])? (int)$_REQUEST['id'] : 0; |
10 | 10 | if($id==0) { |
11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | /************ webber ********/ |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | $udperms->role = $_SESSION['mgrRole']; |
32 | 32 | |
33 | 33 | if(!$udperms->checkPermissions()) { |
34 | - $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
34 | + $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | // get the timestamp on which the document was deleted. |
38 | 38 | $rs = $modx->db->select('deletedon', $modx->getFullTableName('site_content'), "id='{$id}' AND deleted=1"); |
39 | 39 | $deltime = $modx->db->getValue($rs); |
40 | 40 | if(!$deltime) { |
41 | - $modx->webAlertAndQuit("Couldn't find document to determine it's date of deletion!"); |
|
41 | + $modx->webAlertAndQuit("Couldn't find document to determine it's date of deletion!"); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $children = array(); |
@@ -46,20 +46,20 @@ discard block |
||
46 | 46 | getChildrenForUnDelete($id); |
47 | 47 | |
48 | 48 | if(count($children)>0) { |
49 | - $modx->db->update( |
|
50 | - array( |
|
51 | - 'deleted' => 0, |
|
52 | - 'deletedby' => 0, |
|
53 | - 'deletedon' => 0, |
|
54 | - ), $modx->getFullTableName('site_content'), "id IN(".implode(", ", $children).")"); |
|
49 | + $modx->db->update( |
|
50 | + array( |
|
51 | + 'deleted' => 0, |
|
52 | + 'deletedby' => 0, |
|
53 | + 'deletedon' => 0, |
|
54 | + ), $modx->getFullTableName('site_content'), "id IN(".implode(", ", $children).")"); |
|
55 | 55 | } |
56 | 56 | //'undelete' the document. |
57 | 57 | $modx->db->update( |
58 | - array( |
|
59 | - 'deleted' => 0, |
|
60 | - 'deletedby' => 0, |
|
61 | - 'deletedon' => 0, |
|
62 | - ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
58 | + array( |
|
59 | + 'deleted' => 0, |
|
60 | + 'deletedby' => 0, |
|
61 | + 'deletedon' => 0, |
|
62 | + ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
63 | 63 | |
64 | 64 | $modx->invokeEvent("OnDocFormUnDelete", |
65 | 65 | array( |
@@ -1,25 +1,25 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('delete_document')) { |
|
5 | +if (!$modx->hasPermission('delete_document')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_REQUEST['id'])? (int)$_REQUEST['id'] : 0; |
|
10 | -if($id==0) { |
|
9 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
14 | 14 | /************ webber ********/ |
15 | -$content=$modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'")); |
|
16 | -$pid=($content['parent']==0?$id:$content['parent']); |
|
15 | +$content = $modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'")); |
|
16 | +$pid = ($content['parent'] == 0 ? $id : $content['parent']); |
|
17 | 17 | |
18 | 18 | /************** webber *************/ |
19 | -$sd=isset($_REQUEST['dir'])?'&dir='.$_REQUEST['dir']:'&dir=DESC'; |
|
20 | -$sb=isset($_REQUEST['sort'])?'&sort='.$_REQUEST['sort']:'&sort=createdon'; |
|
21 | -$pg=isset($_REQUEST['page'])?'&page='.(int)$_REQUEST['page']:''; |
|
22 | -$add_path=$sd.$sb.$pg; |
|
19 | +$sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC'; |
|
20 | +$sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon'; |
|
21 | +$pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : ''; |
|
22 | +$add_path = $sd.$sb.$pg; |
|
23 | 23 | |
24 | 24 | /***********************************/ |
25 | 25 | |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | $udperms->document = $id; |
31 | 31 | $udperms->role = $_SESSION['mgrRole']; |
32 | 32 | |
33 | -if(!$udperms->checkPermissions()) { |
|
33 | +if (!$udperms->checkPermissions()) { |
|
34 | 34 | $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
35 | 35 | } |
36 | 36 | |
37 | 37 | // get the timestamp on which the document was deleted. |
38 | 38 | $rs = $modx->db->select('deletedon', $modx->getFullTableName('site_content'), "id='{$id}' AND deleted=1"); |
39 | 39 | $deltime = $modx->db->getValue($rs); |
40 | -if(!$deltime) { |
|
40 | +if (!$deltime) { |
|
41 | 41 | $modx->webAlertAndQuit("Couldn't find document to determine it's date of deletion!"); |
42 | 42 | } |
43 | 43 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | getChildrenForUnDelete($id); |
47 | 47 | |
48 | -if(count($children)>0) { |
|
48 | +if (count($children) > 0) { |
|
49 | 49 | $modx->db->update( |
50 | 50 | array( |
51 | 51 | 'deleted' => 0, |
@@ -74,5 +74,5 @@ discard block |
||
74 | 74 | $modx->clearCache('full'); |
75 | 75 | |
76 | 76 | // finished emptying cache - redirect |
77 | -$header="Location: index.php?a=3&id=$pid&r=1".$add_path; |
|
77 | +$header = "Location: index.php?a=3&id=$pid&r=1".$add_path; |
|
78 | 78 | header($header); |