@@ -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 = new \DocumentParser; |
|
| 145 | + include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
| 146 | + $modx = new \DocumentParser; |
|
| 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 | // Now we decide what to do according to the action request. This is a BIG list :) |
@@ -279,714 +279,714 @@ discard block |
||
| 279 | 279 | /********************************************************************/ |
| 280 | 280 | /* frame management - show the requested frame */ |
| 281 | 281 | /********************************************************************/ |
| 282 | - case 1 : |
|
| 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 |
|
| 287 | - } |
|
| 288 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
| 289 | - break; |
|
| 282 | + case 1 : |
|
| 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 |
|
| 287 | + } |
|
| 288 | + include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
| 289 | + break; |
|
| 290 | 290 | /********************************************************************/ |
| 291 | 291 | /* show the homepage */ |
| 292 | 292 | /********************************************************************/ |
| 293 | - case 2: |
|
| 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)); |
|
| 298 | - break; |
|
| 293 | + case 2: |
|
| 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)); |
|
| 298 | + break; |
|
| 299 | 299 | /********************************************************************/ |
| 300 | 300 | /* document data */ |
| 301 | 301 | /********************************************************************/ |
| 302 | - case 3: |
|
| 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)); |
|
| 307 | - break; |
|
| 302 | + case 3: |
|
| 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)); |
|
| 307 | + break; |
|
| 308 | 308 | /********************************************************************/ |
| 309 | 309 | /* content management */ |
| 310 | 310 | /********************************************************************/ |
| 311 | - case 85: |
|
| 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)); |
|
| 316 | - break; |
|
| 317 | - case 27: |
|
| 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)); |
|
| 322 | - break; |
|
| 323 | - case 4: |
|
| 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)); |
|
| 328 | - break; |
|
| 329 | - case 5: |
|
| 330 | - // get the save processor |
|
| 331 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
| 332 | - break; |
|
| 333 | - case 6: |
|
| 334 | - // get the delete processor |
|
| 335 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
| 336 | - break; |
|
| 337 | - case 63: |
|
| 338 | - // get the undelete processor |
|
| 339 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
| 340 | - break; |
|
| 341 | - case 51: |
|
| 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)); |
|
| 346 | - break; |
|
| 347 | - case 52: |
|
| 348 | - // get the move document processor |
|
| 349 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
| 350 | - break; |
|
| 351 | - case 61: |
|
| 352 | - // get the processor for publishing content |
|
| 353 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
| 354 | - break; |
|
| 355 | - case 62: |
|
| 356 | - // get the processor for publishing content |
|
| 357 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
| 358 | - break; |
|
| 359 | - case 56: |
|
| 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)); |
|
| 364 | - break; |
|
| 311 | + case 85: |
|
| 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)); |
|
| 316 | + break; |
|
| 317 | + case 27: |
|
| 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)); |
|
| 322 | + break; |
|
| 323 | + case 4: |
|
| 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)); |
|
| 328 | + break; |
|
| 329 | + case 5: |
|
| 330 | + // get the save processor |
|
| 331 | + include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
| 332 | + break; |
|
| 333 | + case 6: |
|
| 334 | + // get the delete processor |
|
| 335 | + include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
| 336 | + break; |
|
| 337 | + case 63: |
|
| 338 | + // get the undelete processor |
|
| 339 | + include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
| 340 | + break; |
|
| 341 | + case 51: |
|
| 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)); |
|
| 346 | + break; |
|
| 347 | + case 52: |
|
| 348 | + // get the move document processor |
|
| 349 | + include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
| 350 | + break; |
|
| 351 | + case 61: |
|
| 352 | + // get the processor for publishing content |
|
| 353 | + include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
| 354 | + break; |
|
| 355 | + case 62: |
|
| 356 | + // get the processor for publishing content |
|
| 357 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
| 358 | + break; |
|
| 359 | + case 56: |
|
| 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)); |
|
| 364 | + break; |
|
| 365 | 365 | /********************************************************************/ |
| 366 | 366 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
| 367 | 367 | /********************************************************************/ |
| 368 | - case 7: |
|
| 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)); |
|
| 373 | - break; |
|
| 368 | + case 7: |
|
| 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)); |
|
| 373 | + break; |
|
| 374 | 374 | /********************************************************************/ |
| 375 | 375 | /* let the user log out */ |
| 376 | 376 | /********************************************************************/ |
| 377 | - case 8: |
|
| 378 | - // get the logout processor |
|
| 379 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
| 380 | - break; |
|
| 377 | + case 8: |
|
| 378 | + // get the logout processor |
|
| 379 | + include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
| 380 | + break; |
|
| 381 | 381 | /********************************************************************/ |
| 382 | 382 | /* user management */ |
| 383 | 383 | /********************************************************************/ |
| 384 | - case 87: |
|
| 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)); |
|
| 389 | - break; |
|
| 390 | - case 88: |
|
| 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)); |
|
| 395 | - break; |
|
| 396 | - case 89: |
|
| 397 | - // get the save web user processor |
|
| 398 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
| 399 | - break; |
|
| 400 | - case 90: |
|
| 401 | - // get the delete web user page |
|
| 402 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
| 403 | - break; |
|
| 404 | - case 11: |
|
| 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)); |
|
| 409 | - break; |
|
| 410 | - case 12: |
|
| 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)); |
|
| 415 | - break; |
|
| 416 | - case 32: |
|
| 417 | - // get the save user processor |
|
| 418 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
| 419 | - break; |
|
| 420 | - case 28: |
|
| 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)); |
|
| 425 | - break; |
|
| 426 | - case 34: |
|
| 427 | - // get the save new password page |
|
| 428 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
| 429 | - break; |
|
| 430 | - case 33: |
|
| 431 | - // get the delete user page |
|
| 432 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
| 433 | - break; |
|
| 384 | + case 87: |
|
| 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)); |
|
| 389 | + break; |
|
| 390 | + case 88: |
|
| 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)); |
|
| 395 | + break; |
|
| 396 | + case 89: |
|
| 397 | + // get the save web user processor |
|
| 398 | + include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
| 399 | + break; |
|
| 400 | + case 90: |
|
| 401 | + // get the delete web user page |
|
| 402 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
| 403 | + break; |
|
| 404 | + case 11: |
|
| 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)); |
|
| 409 | + break; |
|
| 410 | + case 12: |
|
| 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)); |
|
| 415 | + break; |
|
| 416 | + case 32: |
|
| 417 | + // get the save user processor |
|
| 418 | + include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
| 419 | + break; |
|
| 420 | + case 28: |
|
| 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)); |
|
| 425 | + break; |
|
| 426 | + case 34: |
|
| 427 | + // get the save new password page |
|
| 428 | + include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
| 429 | + break; |
|
| 430 | + case 33: |
|
| 431 | + // get the delete user page |
|
| 432 | + include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
| 433 | + break; |
|
| 434 | 434 | /********************************************************************/ |
| 435 | 435 | /* role management */ |
| 436 | 436 | /********************************************************************/ |
| 437 | - case 38: |
|
| 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)); |
|
| 442 | - break; |
|
| 443 | - case 35: |
|
| 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)); |
|
| 448 | - break; |
|
| 449 | - case 36: |
|
| 450 | - // get the save role page |
|
| 451 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
| 452 | - break; |
|
| 453 | - case 37: |
|
| 454 | - // get the delete role page |
|
| 455 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
| 456 | - break; |
|
| 437 | + case 38: |
|
| 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)); |
|
| 442 | + break; |
|
| 443 | + case 35: |
|
| 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)); |
|
| 448 | + break; |
|
| 449 | + case 36: |
|
| 450 | + // get the save role page |
|
| 451 | + include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
| 452 | + break; |
|
| 453 | + case 37: |
|
| 454 | + // get the delete role page |
|
| 455 | + include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
| 456 | + break; |
|
| 457 | 457 | /********************************************************************/ |
| 458 | 458 | /* category management */ |
| 459 | 459 | /********************************************************************/ |
| 460 | - case 120: |
|
| 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)); |
|
| 465 | - break; |
|
| 466 | - case 121: |
|
| 467 | - // for ajax-requests |
|
| 468 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
| 469 | - break; |
|
| 460 | + case 120: |
|
| 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)); |
|
| 465 | + break; |
|
| 466 | + case 121: |
|
| 467 | + // for ajax-requests |
|
| 468 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
| 469 | + break; |
|
| 470 | 470 | /********************************************************************/ |
| 471 | 471 | /* template management */ |
| 472 | 472 | /********************************************************************/ |
| 473 | - case 16: |
|
| 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)); |
|
| 478 | - break; |
|
| 479 | - case 19: |
|
| 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)); |
|
| 484 | - break; |
|
| 485 | - case 20: |
|
| 486 | - // get the save processor |
|
| 487 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
| 488 | - break; |
|
| 489 | - case 21: |
|
| 490 | - // get the delete processor |
|
| 491 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
| 492 | - break; |
|
| 493 | - case 96: |
|
| 494 | - // get the duplicate template processor |
|
| 495 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
| 496 | - break; |
|
| 497 | - case 117: |
|
| 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)); |
|
| 502 | - break; |
|
| 473 | + case 16: |
|
| 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)); |
|
| 478 | + break; |
|
| 479 | + case 19: |
|
| 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)); |
|
| 484 | + break; |
|
| 485 | + case 20: |
|
| 486 | + // get the save processor |
|
| 487 | + include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
| 488 | + break; |
|
| 489 | + case 21: |
|
| 490 | + // get the delete processor |
|
| 491 | + include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
| 492 | + break; |
|
| 493 | + case 96: |
|
| 494 | + // get the duplicate template processor |
|
| 495 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
| 496 | + break; |
|
| 497 | + case 117: |
|
| 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)); |
|
| 502 | + break; |
|
| 503 | 503 | /********************************************************************/ |
| 504 | 504 | /* snippet management */ |
| 505 | 505 | /********************************************************************/ |
| 506 | - case 22: |
|
| 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)); |
|
| 511 | - break; |
|
| 512 | - case 23: |
|
| 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)); |
|
| 517 | - break; |
|
| 518 | - case 24: |
|
| 519 | - // get the save processor |
|
| 520 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
| 521 | - break; |
|
| 522 | - case 25: |
|
| 523 | - // get the delete processor |
|
| 524 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
| 525 | - break; |
|
| 526 | - case 98: |
|
| 527 | - // get the duplicate processor |
|
| 528 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
| 529 | - break; |
|
| 506 | + case 22: |
|
| 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)); |
|
| 511 | + break; |
|
| 512 | + case 23: |
|
| 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)); |
|
| 517 | + break; |
|
| 518 | + case 24: |
|
| 519 | + // get the save processor |
|
| 520 | + include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
| 521 | + break; |
|
| 522 | + case 25: |
|
| 523 | + // get the delete processor |
|
| 524 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
| 525 | + break; |
|
| 526 | + case 98: |
|
| 527 | + // get the duplicate processor |
|
| 528 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
| 529 | + break; |
|
| 530 | 530 | /********************************************************************/ |
| 531 | 531 | /* htmlsnippet management */ |
| 532 | 532 | /********************************************************************/ |
| 533 | - case 78: |
|
| 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)); |
|
| 538 | - break; |
|
| 539 | - case 77: |
|
| 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)); |
|
| 544 | - break; |
|
| 545 | - case 79: |
|
| 546 | - // get the save processor |
|
| 547 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
| 548 | - break; |
|
| 549 | - case 80: |
|
| 550 | - // get the delete processor |
|
| 551 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
| 552 | - break; |
|
| 553 | - case 97: |
|
| 554 | - // get the duplicate processor |
|
| 555 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
| 556 | - break; |
|
| 533 | + case 78: |
|
| 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)); |
|
| 538 | + break; |
|
| 539 | + case 77: |
|
| 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)); |
|
| 544 | + break; |
|
| 545 | + case 79: |
|
| 546 | + // get the save processor |
|
| 547 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
| 548 | + break; |
|
| 549 | + case 80: |
|
| 550 | + // get the delete processor |
|
| 551 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
| 552 | + break; |
|
| 553 | + case 97: |
|
| 554 | + // get the duplicate processor |
|
| 555 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
| 556 | + break; |
|
| 557 | 557 | /********************************************************************/ |
| 558 | 558 | /* show the credits page */ |
| 559 | 559 | /********************************************************************/ |
| 560 | - case 18: |
|
| 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)); |
|
| 565 | - break; |
|
| 560 | + case 18: |
|
| 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)); |
|
| 565 | + break; |
|
| 566 | 566 | /********************************************************************/ |
| 567 | 567 | /* empty cache & synchronisation */ |
| 568 | 568 | /********************************************************************/ |
| 569 | - case 26: |
|
| 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)); |
|
| 574 | - break; |
|
| 569 | + case 26: |
|
| 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)); |
|
| 574 | + break; |
|
| 575 | 575 | /********************************************************************/ |
| 576 | 576 | /* Module management */ |
| 577 | 577 | /********************************************************************/ |
| 578 | - case 106: |
|
| 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)); |
|
| 583 | - break; |
|
| 584 | - case 107: |
|
| 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)); |
|
| 589 | - break; |
|
| 590 | - case 108: |
|
| 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)); |
|
| 595 | - break; |
|
| 596 | - case 109: |
|
| 597 | - // get the save processor |
|
| 598 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
| 599 | - break; |
|
| 600 | - case 110: |
|
| 601 | - // get the delete processor |
|
| 602 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
| 603 | - break; |
|
| 604 | - case 111: |
|
| 605 | - // get the duplicate processor |
|
| 606 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
| 607 | - break; |
|
| 608 | - case 112: |
|
| 609 | - // execute/run the module |
|
| 610 | - //include_once "header.inc.php"; |
|
| 611 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
| 612 | - //include_once "footer.inc.php"; |
|
| 613 | - break; |
|
| 614 | - case 113: |
|
| 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)); |
|
| 619 | - break; |
|
| 578 | + case 106: |
|
| 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)); |
|
| 583 | + break; |
|
| 584 | + case 107: |
|
| 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)); |
|
| 589 | + break; |
|
| 590 | + case 108: |
|
| 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)); |
|
| 595 | + break; |
|
| 596 | + case 109: |
|
| 597 | + // get the save processor |
|
| 598 | + include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
| 599 | + break; |
|
| 600 | + case 110: |
|
| 601 | + // get the delete processor |
|
| 602 | + include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
| 603 | + break; |
|
| 604 | + case 111: |
|
| 605 | + // get the duplicate processor |
|
| 606 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
| 607 | + break; |
|
| 608 | + case 112: |
|
| 609 | + // execute/run the module |
|
| 610 | + //include_once "header.inc.php"; |
|
| 611 | + include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
| 612 | + //include_once "footer.inc.php"; |
|
| 613 | + break; |
|
| 614 | + case 113: |
|
| 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)); |
|
| 619 | + break; |
|
| 620 | 620 | /********************************************************************/ |
| 621 | 621 | /* plugin management */ |
| 622 | 622 | /********************************************************************/ |
| 623 | - case 100: |
|
| 624 | - // change the plugin priority |
|
| 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)); |
|
| 628 | - break; |
|
| 629 | - case 101: |
|
| 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)); |
|
| 634 | - break; |
|
| 635 | - case 102: |
|
| 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)); |
|
| 640 | - break; |
|
| 641 | - case 103: |
|
| 642 | - // get the save processor |
|
| 643 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
| 644 | - break; |
|
| 645 | - case 104: |
|
| 646 | - // get the delete processor |
|
| 647 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
| 648 | - break; |
|
| 649 | - case 105: |
|
| 650 | - // get the duplicate processor |
|
| 651 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
| 652 | - break; |
|
| 653 | - case 119: |
|
| 654 | - // get the purge processor |
|
| 655 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
| 656 | - break; |
|
| 623 | + case 100: |
|
| 624 | + // change the plugin priority |
|
| 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)); |
|
| 628 | + break; |
|
| 629 | + case 101: |
|
| 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)); |
|
| 634 | + break; |
|
| 635 | + case 102: |
|
| 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)); |
|
| 640 | + break; |
|
| 641 | + case 103: |
|
| 642 | + // get the save processor |
|
| 643 | + include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
| 644 | + break; |
|
| 645 | + case 104: |
|
| 646 | + // get the delete processor |
|
| 647 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
| 648 | + break; |
|
| 649 | + case 105: |
|
| 650 | + // get the duplicate processor |
|
| 651 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
| 652 | + break; |
|
| 653 | + case 119: |
|
| 654 | + // get the purge processor |
|
| 655 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
| 656 | + break; |
|
| 657 | 657 | /********************************************************************/ |
| 658 | 658 | /* view phpinfo */ |
| 659 | 659 | /********************************************************************/ |
| 660 | - case 200: |
|
| 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)); |
|
| 666 | - } |
|
| 667 | - break; |
|
| 660 | + case 200: |
|
| 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)); |
|
| 666 | + } |
|
| 667 | + break; |
|
| 668 | 668 | /********************************************************************/ |
| 669 | 669 | /* errorpage */ |
| 670 | 670 | /********************************************************************/ |
| 671 | - case 29: |
|
| 672 | - // get the error page |
|
| 673 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
| 674 | - break; |
|
| 671 | + case 29: |
|
| 672 | + // get the error page |
|
| 673 | + include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
| 674 | + break; |
|
| 675 | 675 | /********************************************************************/ |
| 676 | 676 | /* file manager */ |
| 677 | 677 | /********************************************************************/ |
| 678 | - case 31: |
|
| 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)); |
|
| 683 | - break; |
|
| 678 | + case 31: |
|
| 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)); |
|
| 683 | + break; |
|
| 684 | 684 | /********************************************************************/ |
| 685 | 685 | /* access permissions */ |
| 686 | 686 | /********************************************************************/ |
| 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)); |
|
| 691 | - break; |
|
| 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)); |
|
| 696 | - break; |
|
| 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)); |
|
| 691 | + break; |
|
| 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)); |
|
| 696 | + break; |
|
| 697 | 697 | /********************************************************************/ |
| 698 | 698 | /* access groups processor */ |
| 699 | 699 | /********************************************************************/ |
| 700 | - case 41: |
|
| 701 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
| 702 | - break; |
|
| 703 | - case 92: |
|
| 704 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
| 705 | - break; |
|
| 700 | + case 41: |
|
| 701 | + include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
| 702 | + break; |
|
| 703 | + case 92: |
|
| 704 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
| 705 | + break; |
|
| 706 | 706 | /********************************************************************/ |
| 707 | 707 | /* settings editor */ |
| 708 | 708 | /********************************************************************/ |
| 709 | - case 17: |
|
| 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)); |
|
| 714 | - break; |
|
| 715 | - case 118: |
|
| 716 | - // call settings ajax include |
|
| 717 | - ob_clean(); |
|
| 718 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
| 719 | - break; |
|
| 709 | + case 17: |
|
| 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)); |
|
| 714 | + break; |
|
| 715 | + case 118: |
|
| 716 | + // call settings ajax include |
|
| 717 | + ob_clean(); |
|
| 718 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
| 719 | + break; |
|
| 720 | 720 | /********************************************************************/ |
| 721 | 721 | /* save settings */ |
| 722 | 722 | /********************************************************************/ |
| 723 | - case 30: |
|
| 724 | - // get the save settings processor |
|
| 725 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
| 726 | - break; |
|
| 723 | + case 30: |
|
| 724 | + // get the save settings processor |
|
| 725 | + include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
| 726 | + break; |
|
| 727 | 727 | /********************************************************************/ |
| 728 | 728 | /* system information */ |
| 729 | 729 | /********************************************************************/ |
| 730 | - case 53: |
|
| 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)); |
|
| 735 | - break; |
|
| 730 | + case 53: |
|
| 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)); |
|
| 735 | + break; |
|
| 736 | 736 | /********************************************************************/ |
| 737 | 737 | /* optimise table */ |
| 738 | 738 | /********************************************************************/ |
| 739 | - case 54: |
|
| 740 | - // get the table optimizer/truncate processor |
|
| 741 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
| 742 | - break; |
|
| 739 | + case 54: |
|
| 740 | + // get the table optimizer/truncate processor |
|
| 741 | + include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
| 742 | + break; |
|
| 743 | 743 | /********************************************************************/ |
| 744 | 744 | /* view logging */ |
| 745 | 745 | /********************************************************************/ |
| 746 | - case 13: |
|
| 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)); |
|
| 751 | - break; |
|
| 746 | + case 13: |
|
| 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)); |
|
| 751 | + break; |
|
| 752 | 752 | /********************************************************************/ |
| 753 | 753 | /* empty logs */ |
| 754 | 754 | /********************************************************************/ |
| 755 | - case 55: |
|
| 756 | - // get the settings editor |
|
| 757 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
| 758 | - break; |
|
| 755 | + case 55: |
|
| 756 | + // get the settings editor |
|
| 757 | + include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
| 758 | + break; |
|
| 759 | 759 | /********************************************************************/ |
| 760 | 760 | /* calls test page */ |
| 761 | 761 | /********************************************************************/ |
| 762 | - case 999: |
|
| 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)); |
|
| 767 | - break; |
|
| 762 | + case 999: |
|
| 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)); |
|
| 767 | + break; |
|
| 768 | 768 | /********************************************************************/ |
| 769 | 769 | /* Empty recycle bin */ |
| 770 | 770 | /********************************************************************/ |
| 771 | - case 64: |
|
| 772 | - // get the Recycle bin emptier |
|
| 773 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
| 774 | - break; |
|
| 771 | + case 64: |
|
| 772 | + // get the Recycle bin emptier |
|
| 773 | + include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
| 774 | + break; |
|
| 775 | 775 | /********************************************************************/ |
| 776 | 776 | /* Messages */ |
| 777 | 777 | /********************************************************************/ |
| 778 | - case 10: |
|
| 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)); |
|
| 783 | - break; |
|
| 778 | + case 10: |
|
| 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)); |
|
| 783 | + break; |
|
| 784 | 784 | /********************************************************************/ |
| 785 | 785 | /* Delete a message */ |
| 786 | 786 | /********************************************************************/ |
| 787 | - case 65: |
|
| 788 | - // get the message deleter |
|
| 789 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
| 790 | - break; |
|
| 787 | + case 65: |
|
| 788 | + // get the message deleter |
|
| 789 | + include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
| 790 | + break; |
|
| 791 | 791 | /********************************************************************/ |
| 792 | 792 | /* Send a message */ |
| 793 | 793 | /********************************************************************/ |
| 794 | - case 66: |
|
| 795 | - // get the message deleter |
|
| 796 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
| 797 | - break; |
|
| 794 | + case 66: |
|
| 795 | + // get the message deleter |
|
| 796 | + include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
| 797 | + break; |
|
| 798 | 798 | /********************************************************************/ |
| 799 | 799 | /* Remove locks */ |
| 800 | 800 | /********************************************************************/ |
| 801 | - case 67: |
|
| 802 | - // get the lock remover |
|
| 803 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
| 804 | - break; |
|
| 801 | + case 67: |
|
| 802 | + // get the lock remover |
|
| 803 | + include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
| 804 | + break; |
|
| 805 | 805 | /********************************************************************/ |
| 806 | 806 | /* Site schedule */ |
| 807 | 807 | /********************************************************************/ |
| 808 | - case 70: |
|
| 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)); |
|
| 813 | - break; |
|
| 808 | + case 70: |
|
| 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)); |
|
| 813 | + break; |
|
| 814 | 814 | /********************************************************************/ |
| 815 | 815 | /* Search */ |
| 816 | 816 | /********************************************************************/ |
| 817 | - case 71: |
|
| 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)); |
|
| 822 | - break; |
|
| 817 | + case 71: |
|
| 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)); |
|
| 822 | + break; |
|
| 823 | 823 | /********************************************************************/ |
| 824 | 824 | /* About */ |
| 825 | 825 | /********************************************************************/ |
| 826 | - case 59: |
|
| 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)); |
|
| 831 | - break; |
|
| 826 | + case 59: |
|
| 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)); |
|
| 831 | + break; |
|
| 832 | 832 | /********************************************************************/ |
| 833 | 833 | /* Add weblink */ |
| 834 | 834 | /********************************************************************/ |
| 835 | - case 72: |
|
| 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)); |
|
| 840 | - break; |
|
| 835 | + case 72: |
|
| 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)); |
|
| 840 | + break; |
|
| 841 | 841 | /********************************************************************/ |
| 842 | 842 | /* User management */ |
| 843 | 843 | /********************************************************************/ |
| 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)); |
|
| 848 | - break; |
|
| 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)); |
|
| 853 | - break; |
|
| 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)); |
|
| 858 | - break; |
|
| 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)); |
|
| 848 | + break; |
|
| 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)); |
|
| 853 | + break; |
|
| 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)); |
|
| 858 | + break; |
|
| 859 | 859 | /********************************************************************/ |
| 860 | 860 | /* template/ snippet management */ |
| 861 | 861 | /********************************************************************/ |
| 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)); |
|
| 866 | - break; |
|
| 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)); |
|
| 866 | + break; |
|
| 867 | 867 | /********************************************************************/ |
| 868 | 868 | /* Export to file */ |
| 869 | 869 | /********************************************************************/ |
| 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)); |
|
| 874 | - break; |
|
| 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)); |
|
| 874 | + break; |
|
| 875 | 875 | /********************************************************************/ |
| 876 | 876 | /* Resource Selector */ |
| 877 | 877 | /********************************************************************/ |
| 878 | - case 84: |
|
| 879 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
| 880 | - break; |
|
| 878 | + case 84: |
|
| 879 | + include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
| 880 | + break; |
|
| 881 | 881 | /********************************************************************/ |
| 882 | 882 | /* Backup Manager */ |
| 883 | 883 | /********************************************************************/ |
| 884 | - case 93: |
|
| 885 | - # header and footer will be handled interally |
|
| 886 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
| 887 | - break; |
|
| 884 | + case 93: |
|
| 885 | + # header and footer will be handled interally |
|
| 886 | + include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
| 887 | + break; |
|
| 888 | 888 | /********************************************************************/ |
| 889 | 889 | /* Duplicate Document */ |
| 890 | 890 | /********************************************************************/ |
| 891 | - case 94: |
|
| 892 | - // get the duplicate processor |
|
| 893 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
| 894 | - break; |
|
| 891 | + case 94: |
|
| 892 | + // get the duplicate processor |
|
| 893 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
| 894 | + break; |
|
| 895 | 895 | /********************************************************************/ |
| 896 | 896 | /* Import Document from file */ |
| 897 | 897 | /********************************************************************/ |
| 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)); |
|
| 902 | - break; |
|
| 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)); |
|
| 902 | + break; |
|
| 903 | 903 | /********************************************************************/ |
| 904 | 904 | /* Help */ |
| 905 | 905 | /********************************************************************/ |
| 906 | - case 9: |
|
| 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)); |
|
| 911 | - break; |
|
| 906 | + case 9: |
|
| 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)); |
|
| 911 | + break; |
|
| 912 | 912 | /********************************************************************/ |
| 913 | 913 | /* Template Variables - Based on Apodigm's Docvars */ |
| 914 | 914 | /********************************************************************/ |
| 915 | - case 300: |
|
| 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)); |
|
| 920 | - break; |
|
| 921 | - case 301: |
|
| 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)); |
|
| 926 | - break; |
|
| 927 | - case 302: |
|
| 928 | - // get the save processor |
|
| 929 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
| 930 | - break; |
|
| 931 | - case 303: |
|
| 932 | - // get the delete processor |
|
| 933 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
| 934 | - break; |
|
| 935 | - case 304: |
|
| 936 | - // get the duplicate processor |
|
| 937 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
| 938 | - break; |
|
| 939 | - case 305: |
|
| 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)); |
|
| 944 | - break; |
|
| 915 | + case 300: |
|
| 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)); |
|
| 920 | + break; |
|
| 921 | + case 301: |
|
| 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)); |
|
| 926 | + break; |
|
| 927 | + case 302: |
|
| 928 | + // get the save processor |
|
| 929 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
| 930 | + break; |
|
| 931 | + case 303: |
|
| 932 | + // get the delete processor |
|
| 933 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
| 934 | + break; |
|
| 935 | + case 304: |
|
| 936 | + // get the duplicate processor |
|
| 937 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
| 938 | + break; |
|
| 939 | + case 305: |
|
| 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)); |
|
| 944 | + break; |
|
| 945 | 945 | /********************************************************************/ |
| 946 | 946 | /* Event viewer: show event message log */ |
| 947 | 947 | /********************************************************************/ |
| 948 | - case 114: |
|
| 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)); |
|
| 953 | - break; |
|
| 954 | - case 115: |
|
| 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)); |
|
| 959 | - break; |
|
| 960 | - case 116: |
|
| 961 | - // get the event log delete processor |
|
| 962 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
| 963 | - break; |
|
| 964 | - |
|
| 965 | - case 501: |
|
| 966 | - //delete category |
|
| 967 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
| 968 | - break; |
|
| 948 | + case 114: |
|
| 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)); |
|
| 953 | + break; |
|
| 954 | + case 115: |
|
| 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)); |
|
| 959 | + break; |
|
| 960 | + case 116: |
|
| 961 | + // get the event log delete processor |
|
| 962 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
| 963 | + break; |
|
| 964 | + |
|
| 965 | + case 501: |
|
| 966 | + //delete category |
|
| 967 | + include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
| 968 | + break; |
|
| 969 | 969 | /********************************************************************/ |
| 970 | 970 | /* default action: show not implemented message */ |
| 971 | 971 | /********************************************************************/ |
| 972 | - default : |
|
| 973 | - // say that what was requested doesn't do anything yet |
|
| 974 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
| 975 | - echo " |
|
| 972 | + default : |
|
| 973 | + // say that what was requested doesn't do anything yet |
|
| 974 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
| 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 | 986 | if($action!=1 && $action!=7 && $action!=2) { |
| 987 | - include_once "log.class.inc.php"; |
|
| 988 | - $log = new logHandler; |
|
| 989 | - $log->initAndWriteLog(); |
|
| 987 | + include_once "log.class.inc.php"; |
|
| 988 | + $log = new logHandler; |
|
| 989 | + $log->initAndWriteLog(); |
|
| 990 | 990 | } |
| 991 | 991 | /********************************************************************/ |
| 992 | 992 | // show debug |
@@ -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 ********/ |
@@ -32,50 +32,50 @@ discard block |
||
| 32 | 32 | $udperms->role = $_SESSION['mgrRole']; |
| 33 | 33 | |
| 34 | 34 | if(!$udperms->checkPermissions()) { |
| 35 | - $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
| 35 | + $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // get the timestamp on which the document was deleted. |
| 39 | 39 | $rs = $modx->db->select('deletedon', $modx->getFullTableName('site_content'), "id='{$id}' AND deleted=1"); |
| 40 | 40 | $deltime = $modx->db->getValue($rs); |
| 41 | 41 | if(!$deltime) { |
| 42 | - $modx->webAlertAndQuit("Couldn't find document to determine it's date of deletion!"); |
|
| 42 | + $modx->webAlertAndQuit("Couldn't find document to determine it's date of deletion!"); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $children = array(); |
| 46 | 46 | |
| 47 | 47 | function getChildren($parent) { |
| 48 | 48 | |
| 49 | - global $modx; |
|
| 50 | - global $children; |
|
| 51 | - global $deltime; |
|
| 52 | - |
|
| 53 | - $rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "parent='{$parent}' AND deleted=1 AND deletedon='{$deltime}'"); |
|
| 54 | - // the document has children documents, we'll need to delete those too |
|
| 55 | - while ($row=$modx->db->getRow($rs)) { |
|
| 56 | - $children[] = $row['id']; |
|
| 57 | - getChildren($row['id']); |
|
| 58 | - //echo "Found childNode of parentNode $parent: ".$row['id']."<br />"; |
|
| 59 | - } |
|
| 49 | + global $modx; |
|
| 50 | + global $children; |
|
| 51 | + global $deltime; |
|
| 52 | + |
|
| 53 | + $rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "parent='{$parent}' AND deleted=1 AND deletedon='{$deltime}'"); |
|
| 54 | + // the document has children documents, we'll need to delete those too |
|
| 55 | + while ($row=$modx->db->getRow($rs)) { |
|
| 56 | + $children[] = $row['id']; |
|
| 57 | + getChildren($row['id']); |
|
| 58 | + //echo "Found childNode of parentNode $parent: ".$row['id']."<br />"; |
|
| 59 | + } |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | getChildren($id); |
| 63 | 63 | |
| 64 | 64 | if(count($children)>0) { |
| 65 | - $modx->db->update( |
|
| 66 | - array( |
|
| 67 | - 'deleted' => 0, |
|
| 68 | - 'deletedby' => 0, |
|
| 69 | - 'deletedon' => 0, |
|
| 70 | - ), $modx->getFullTableName('site_content'), "id IN(".implode(", ", $children).")"); |
|
| 65 | + $modx->db->update( |
|
| 66 | + array( |
|
| 67 | + 'deleted' => 0, |
|
| 68 | + 'deletedby' => 0, |
|
| 69 | + 'deletedon' => 0, |
|
| 70 | + ), $modx->getFullTableName('site_content'), "id IN(".implode(", ", $children).")"); |
|
| 71 | 71 | } |
| 72 | 72 | //'undelete' the document. |
| 73 | 73 | $modx->db->update( |
| 74 | - array( |
|
| 75 | - 'deleted' => 0, |
|
| 76 | - 'deletedby' => 0, |
|
| 77 | - 'deletedon' => 0, |
|
| 78 | - ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
| 74 | + array( |
|
| 75 | + 'deleted' => 0, |
|
| 76 | + 'deletedby' => 0, |
|
| 77 | + 'deletedon' => 0, |
|
| 78 | + ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
| 79 | 79 | |
| 80 | 80 | $modx->invokeEvent("OnDocFormUnDelete", |
| 81 | 81 | array( |
@@ -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,7 +18,7 @@ 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 | // include the logger |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | // Initialize System Alert Message Queque |
| 28 | 28 | if(!isset($_SESSION['SystemAlertMsgQueque'])) { |
| 29 | - $_SESSION['SystemAlertMsgQueque'] = array(); |
|
| 29 | + $_SESSION['SystemAlertMsgQueque'] = array(); |
|
| 30 | 30 | } |
| 31 | 31 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
| 32 | 32 | |
@@ -41,10 +41,10 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | // invoke OnBeforeManagerLogin event |
| 43 | 43 | $modx->invokeEvent('OnBeforeManagerLogin', array( |
| 44 | - 'username' => $username, |
|
| 45 | - 'userpassword' => $givenPassword, |
|
| 46 | - 'rememberme' => $rememberme |
|
| 47 | - )); |
|
| 44 | + 'username' => $username, |
|
| 45 | + 'userpassword' => $givenPassword, |
|
| 46 | + 'rememberme' => $rememberme |
|
| 47 | + )); |
|
| 48 | 48 | $fields = 'mu.*, ua.*'; |
| 49 | 49 | $from = '[+prefix+]manager_users AS mu, [+prefix+]user_attributes AS ua'; |
| 50 | 50 | $where = "BINARY mu.username='{$username}' and ua.internalKey=mu.id"; |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | $limit = $modx->db->getRecordCount($rs); |
| 53 | 53 | |
| 54 | 54 | if($limit == 0 || $limit > 1) { |
| 55 | - jsAlert($_lang['login_processor_unknown_user']); |
|
| 56 | - return; |
|
| 55 | + jsAlert($_lang['login_processor_unknown_user']); |
|
| 56 | + return; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | $row = $modx->db->getRow($rs); |
@@ -74,127 +74,127 @@ discard block |
||
| 74 | 74 | // get the user settings from the database |
| 75 | 75 | $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]user_settings', "user='{$internalKey}' AND setting_value!=''"); |
| 76 | 76 | while($row = $modx->db->getRow($rs)) { |
| 77 | - extract($row); |
|
| 78 | - ${$setting_name} = $setting_value; |
|
| 77 | + extract($row); |
|
| 78 | + ${$setting_name} = $setting_value; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | // blocked due to number of login errors. |
| 82 | 82 | if($failedlogins >= $failed_allowed && $blockeduntildate > time()) { |
| 83 | - @session_destroy(); |
|
| 84 | - session_unset(); |
|
| 85 | - if($cip = getenv("HTTP_CLIENT_IP")) { |
|
| 86 | - $ip = $cip; |
|
| 87 | - } elseif($cip = getenv("HTTP_X_FORWARDED_FOR")) { |
|
| 88 | - $ip = $cip; |
|
| 89 | - } elseif($cip = getenv("REMOTE_ADDR")) { |
|
| 90 | - $ip = $cip; |
|
| 91 | - } else { |
|
| 92 | - $ip = "UNKNOWN"; |
|
| 93 | - } |
|
| 94 | - $log = new logHandler; |
|
| 95 | - $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip); |
|
| 96 | - jsAlert($_lang['login_processor_many_failed_logins']); |
|
| 97 | - return; |
|
| 83 | + @session_destroy(); |
|
| 84 | + session_unset(); |
|
| 85 | + if($cip = getenv("HTTP_CLIENT_IP")) { |
|
| 86 | + $ip = $cip; |
|
| 87 | + } elseif($cip = getenv("HTTP_X_FORWARDED_FOR")) { |
|
| 88 | + $ip = $cip; |
|
| 89 | + } elseif($cip = getenv("REMOTE_ADDR")) { |
|
| 90 | + $ip = $cip; |
|
| 91 | + } else { |
|
| 92 | + $ip = "UNKNOWN"; |
|
| 93 | + } |
|
| 94 | + $log = new logHandler; |
|
| 95 | + $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip); |
|
| 96 | + jsAlert($_lang['login_processor_many_failed_logins']); |
|
| 97 | + return; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // blocked due to number of login errors, but get to try again |
| 101 | 101 | if($failedlogins >= $failed_allowed && $blockeduntildate < time()) { |
| 102 | - $fields = array(); |
|
| 103 | - $fields['failedlogincount'] = '0'; |
|
| 104 | - $fields['blockeduntil'] = time() - 1; |
|
| 105 | - $modx->db->update($fields, '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
| 102 | + $fields = array(); |
|
| 103 | + $fields['failedlogincount'] = '0'; |
|
| 104 | + $fields['blockeduntil'] = time() - 1; |
|
| 105 | + $modx->db->update($fields, '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | // this user has been blocked by an admin, so no way he's loggin in! |
| 109 | 109 | if($blocked == '1') { |
| 110 | - @session_destroy(); |
|
| 111 | - session_unset(); |
|
| 112 | - jsAlert($_lang['login_processor_blocked1']); |
|
| 113 | - return; |
|
| 110 | + @session_destroy(); |
|
| 111 | + session_unset(); |
|
| 112 | + jsAlert($_lang['login_processor_blocked1']); |
|
| 113 | + return; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // blockuntil: this user has a block until date |
| 117 | 117 | if($blockeduntildate > time()) { |
| 118 | - @session_destroy(); |
|
| 119 | - session_unset(); |
|
| 120 | - jsAlert($_lang['login_processor_blocked2']); |
|
| 121 | - return; |
|
| 118 | + @session_destroy(); |
|
| 119 | + session_unset(); |
|
| 120 | + jsAlert($_lang['login_processor_blocked2']); |
|
| 121 | + return; |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | // blockafter: this user has a block after date |
| 125 | 125 | if($blockedafterdate > 0 && $blockedafterdate < time()) { |
| 126 | - @session_destroy(); |
|
| 127 | - session_unset(); |
|
| 128 | - jsAlert($_lang['login_processor_blocked3']); |
|
| 129 | - return; |
|
| 126 | + @session_destroy(); |
|
| 127 | + session_unset(); |
|
| 128 | + jsAlert($_lang['login_processor_blocked3']); |
|
| 129 | + return; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | // allowed ip |
| 133 | 133 | if($allowed_ip) { |
| 134 | - if(($hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])) && ($hostname != $_SERVER['REMOTE_ADDR'])) { |
|
| 135 | - if(gethostbyname($hostname) != $_SERVER['REMOTE_ADDR']) { |
|
| 136 | - jsAlert($_lang['login_processor_remotehost_ip']); |
|
| 137 | - return; |
|
| 138 | - } |
|
| 139 | - } |
|
| 140 | - if(!in_array($_SERVER['REMOTE_ADDR'], array_filter(array_map('trim', explode(',', $allowed_ip))))) { |
|
| 141 | - jsAlert($_lang['login_processor_remote_ip']); |
|
| 142 | - return; |
|
| 143 | - } |
|
| 134 | + if(($hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])) && ($hostname != $_SERVER['REMOTE_ADDR'])) { |
|
| 135 | + if(gethostbyname($hostname) != $_SERVER['REMOTE_ADDR']) { |
|
| 136 | + jsAlert($_lang['login_processor_remotehost_ip']); |
|
| 137 | + return; |
|
| 138 | + } |
|
| 139 | + } |
|
| 140 | + if(!in_array($_SERVER['REMOTE_ADDR'], array_filter(array_map('trim', explode(',', $allowed_ip))))) { |
|
| 141 | + jsAlert($_lang['login_processor_remote_ip']); |
|
| 142 | + return; |
|
| 143 | + } |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | // allowed days |
| 147 | 147 | if($allowed_days) { |
| 148 | - $date = getdate(); |
|
| 149 | - $day = $date['wday'] + 1; |
|
| 150 | - if(strpos($allowed_days, $day) === false) { |
|
| 151 | - jsAlert($_lang['login_processor_date']); |
|
| 152 | - return; |
|
| 153 | - } |
|
| 148 | + $date = getdate(); |
|
| 149 | + $day = $date['wday'] + 1; |
|
| 150 | + if(strpos($allowed_days, $day) === false) { |
|
| 151 | + jsAlert($_lang['login_processor_date']); |
|
| 152 | + return; |
|
| 153 | + } |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | // invoke OnManagerAuthentication event |
| 157 | 157 | $rt = $modx->invokeEvent('OnManagerAuthentication', array( |
| 158 | - 'userid' => $internalKey, |
|
| 159 | - 'username' => $username, |
|
| 160 | - 'userpassword' => $givenPassword, |
|
| 161 | - 'savedpassword' => $dbasePassword, |
|
| 162 | - 'rememberme' => $rememberme |
|
| 163 | - )); |
|
| 158 | + 'userid' => $internalKey, |
|
| 159 | + 'username' => $username, |
|
| 160 | + 'userpassword' => $givenPassword, |
|
| 161 | + 'savedpassword' => $dbasePassword, |
|
| 162 | + 'rememberme' => $rememberme |
|
| 163 | + )); |
|
| 164 | 164 | |
| 165 | 165 | // check if plugin authenticated the user |
| 166 | 166 | $matchPassword = false; |
| 167 | 167 | if(!isset($rt) || !$rt || (is_array($rt) && !in_array(true, $rt))) { |
| 168 | - // check user password - local authentication |
|
| 169 | - $hashType = $modx->manager->getHashType($dbasePassword); |
|
| 170 | - if($hashType == 'phpass') { |
|
| 171 | - $matchPassword = login($username, $_REQUEST['password'], $dbasePassword); |
|
| 172 | - } elseif($hashType == 'md5') { |
|
| 173 | - $matchPassword = loginMD5($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
| 174 | - } elseif($hashType == 'v1') { |
|
| 175 | - $matchPassword = loginV1($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
| 176 | - } else { |
|
| 177 | - $matchPassword = false; |
|
| 178 | - } |
|
| 168 | + // check user password - local authentication |
|
| 169 | + $hashType = $modx->manager->getHashType($dbasePassword); |
|
| 170 | + if($hashType == 'phpass') { |
|
| 171 | + $matchPassword = login($username, $_REQUEST['password'], $dbasePassword); |
|
| 172 | + } elseif($hashType == 'md5') { |
|
| 173 | + $matchPassword = loginMD5($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
| 174 | + } elseif($hashType == 'v1') { |
|
| 175 | + $matchPassword = loginV1($internalKey, $_REQUEST['password'], $dbasePassword, $username); |
|
| 176 | + } else { |
|
| 177 | + $matchPassword = false; |
|
| 178 | + } |
|
| 179 | 179 | } else if($rt === true || (is_array($rt) && in_array(true, $rt))) { |
| 180 | - $matchPassword = true; |
|
| 180 | + $matchPassword = true; |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | if(!$matchPassword) { |
| 184 | - jsAlert($_lang['login_processor_wrong_password']); |
|
| 185 | - incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
| 186 | - return; |
|
| 184 | + jsAlert($_lang['login_processor_wrong_password']); |
|
| 185 | + incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
| 186 | + return; |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | if($modx->config['use_captcha'] == 1) { |
| 190 | - if(!isset ($_SESSION['veriword'])) { |
|
| 191 | - jsAlert($_lang['login_processor_captcha_config']); |
|
| 192 | - return; |
|
| 193 | - } elseif($_SESSION['veriword'] != $captcha_code) { |
|
| 194 | - jsAlert($_lang['login_processor_bad_code']); |
|
| 195 | - incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
| 196 | - return; |
|
| 197 | - } |
|
| 190 | + if(!isset ($_SESSION['veriword'])) { |
|
| 191 | + jsAlert($_lang['login_processor_captcha_config']); |
|
| 192 | + return; |
|
| 193 | + } elseif($_SESSION['veriword'] != $captcha_code) { |
|
| 194 | + jsAlert($_lang['login_processor_bad_code']); |
|
| 195 | + incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes); |
|
| 196 | + return; |
|
| 197 | + } |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | $modx->cleanupExpiredLocks(); |
@@ -229,36 +229,36 @@ discard block |
||
| 229 | 229 | $_SESSION['mgrToken'] = md5($currentsessionid); |
| 230 | 230 | |
| 231 | 231 | if($rememberme == '1') { |
| 232 | - $_SESSION['modx.mgr.session.cookie.lifetime'] = (int)$modx->config['session.cookie.lifetime']; |
|
| 233 | - |
|
| 234 | - // Set a cookie separate from the session cookie with the username in it. |
|
| 235 | - // Are we using secure connection? If so, make sure the cookie is secure |
|
| 236 | - global $https_port; |
|
| 237 | - |
|
| 238 | - $secure = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port); |
|
| 239 | - if(version_compare(PHP_VERSION, '5.2', '<')) { |
|
| 240 | - setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, '; HttpOnly', $secure); |
|
| 241 | - } else { |
|
| 242 | - setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, NULL, $secure, true); |
|
| 243 | - } |
|
| 232 | + $_SESSION['modx.mgr.session.cookie.lifetime'] = (int)$modx->config['session.cookie.lifetime']; |
|
| 233 | + |
|
| 234 | + // Set a cookie separate from the session cookie with the username in it. |
|
| 235 | + // Are we using secure connection? If so, make sure the cookie is secure |
|
| 236 | + global $https_port; |
|
| 237 | + |
|
| 238 | + $secure = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port); |
|
| 239 | + if(version_compare(PHP_VERSION, '5.2', '<')) { |
|
| 240 | + setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, '; HttpOnly', $secure); |
|
| 241 | + } else { |
|
| 242 | + setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, NULL, $secure, true); |
|
| 243 | + } |
|
| 244 | 244 | } else { |
| 245 | - $_SESSION['modx.mgr.session.cookie.lifetime'] = 0; |
|
| 245 | + $_SESSION['modx.mgr.session.cookie.lifetime'] = 0; |
|
| 246 | 246 | |
| 247 | - // Remove the Remember Me cookie |
|
| 248 | - setcookie('modx_remember_manager', '', time() - 3600, MODX_BASE_URL); |
|
| 247 | + // Remove the Remember Me cookie |
|
| 248 | + setcookie('modx_remember_manager', '', time() - 3600, MODX_BASE_URL); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | // Check if user already has an active session, if not check if user pressed logout end of last session |
| 252 | 252 | $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_user_sessions'), "internalKey='{$internalKey}'"); |
| 253 | 253 | $activeSession = $modx->db->getValue($rs); |
| 254 | 254 | if(!$activeSession) { |
| 255 | - $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_users'), "internalKey='{$internalKey}' AND action != 8"); |
|
| 256 | - if($lastHit = $modx->db->getValue($rs)) { |
|
| 257 | - $_SESSION['show_logout_reminder'] = array( |
|
| 258 | - 'type' => 'logout_reminder', |
|
| 259 | - 'lastHit' => $lastHit |
|
| 260 | - ); |
|
| 261 | - } |
|
| 255 | + $rs = $modx->db->select('lasthit', $modx->getFullTableName('active_users'), "internalKey='{$internalKey}' AND action != 8"); |
|
| 256 | + if($lastHit = $modx->db->getValue($rs)) { |
|
| 257 | + $_SESSION['show_logout_reminder'] = array( |
|
| 258 | + 'type' => 'logout_reminder', |
|
| 259 | + 'lastHit' => $lastHit |
|
| 260 | + ); |
|
| 261 | + } |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | $log = new logHandler; |
@@ -266,109 +266,109 @@ discard block |
||
| 266 | 266 | |
| 267 | 267 | // invoke OnManagerLogin event |
| 268 | 268 | $modx->invokeEvent('OnManagerLogin', array( |
| 269 | - 'userid' => $internalKey, |
|
| 270 | - 'username' => $username, |
|
| 271 | - 'userpassword' => $givenPassword, |
|
| 272 | - 'rememberme' => $rememberme |
|
| 273 | - )); |
|
| 269 | + 'userid' => $internalKey, |
|
| 270 | + 'username' => $username, |
|
| 271 | + 'userpassword' => $givenPassword, |
|
| 272 | + 'rememberme' => $rememberme |
|
| 273 | + )); |
|
| 274 | 274 | |
| 275 | 275 | // check if we should redirect user to a web page |
| 276 | 276 | $rs = $modx->db->select('setting_value', '[+prefix+]user_settings', "user='{$internalKey}' AND setting_name='manager_login_startup'"); |
| 277 | 277 | $id = (int)$modx->db->getValue($rs); |
| 278 | 278 | if($id > 0) { |
| 279 | - $header = 'Location: ' . $modx->makeUrl($id, '', '', 'full'); |
|
| 280 | - if($_POST['ajax'] == 1) { |
|
| 281 | - echo $header; |
|
| 282 | - } else { |
|
| 283 | - header($header); |
|
| 284 | - } |
|
| 279 | + $header = 'Location: ' . $modx->makeUrl($id, '', '', 'full'); |
|
| 280 | + if($_POST['ajax'] == 1) { |
|
| 281 | + echo $header; |
|
| 282 | + } else { |
|
| 283 | + header($header); |
|
| 284 | + } |
|
| 285 | 285 | } else { |
| 286 | - $header = 'Location: ' . MODX_MANAGER_URL; |
|
| 287 | - if($_POST['ajax'] == 1) { |
|
| 288 | - echo $header; |
|
| 289 | - } else { |
|
| 290 | - header($header); |
|
| 291 | - } |
|
| 286 | + $header = 'Location: ' . MODX_MANAGER_URL; |
|
| 287 | + if($_POST['ajax'] == 1) { |
|
| 288 | + echo $header; |
|
| 289 | + } else { |
|
| 290 | + header($header); |
|
| 291 | + } |
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | // show javascript alert |
| 295 | 295 | function jsAlert($msg) { |
| 296 | - global $modx; |
|
| 297 | - if($_POST['ajax'] != 1) { |
|
| 298 | - echo "<script>window.setTimeout(\"alert('" . addslashes($modx->db->escape($msg)) . "')\",10);history.go(-1)</script>"; |
|
| 299 | - } else { |
|
| 300 | - echo $msg . "\n"; |
|
| 301 | - } |
|
| 296 | + global $modx; |
|
| 297 | + if($_POST['ajax'] != 1) { |
|
| 298 | + echo "<script>window.setTimeout(\"alert('" . addslashes($modx->db->escape($msg)) . "')\",10);history.go(-1)</script>"; |
|
| 299 | + } else { |
|
| 300 | + echo $msg . "\n"; |
|
| 301 | + } |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | function login($username, $givenPassword, $dbasePassword) { |
| 305 | - global $modx; |
|
| 306 | - return $modx->phpass->CheckPassword($givenPassword, $dbasePassword); |
|
| 305 | + global $modx; |
|
| 306 | + return $modx->phpass->CheckPassword($givenPassword, $dbasePassword); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | function loginV1($internalKey, $givenPassword, $dbasePassword, $username) { |
| 310 | - global $modx; |
|
| 310 | + global $modx; |
|
| 311 | 311 | |
| 312 | - $user_algo = $modx->manager->getV1UserHashAlgorithm($internalKey); |
|
| 312 | + $user_algo = $modx->manager->getV1UserHashAlgorithm($internalKey); |
|
| 313 | 313 | |
| 314 | - if(!isset($modx->config['pwd_hash_algo']) || empty($modx->config['pwd_hash_algo'])) { |
|
| 315 | - $modx->config['pwd_hash_algo'] = 'UNCRYPT'; |
|
| 316 | - } |
|
| 314 | + if(!isset($modx->config['pwd_hash_algo']) || empty($modx->config['pwd_hash_algo'])) { |
|
| 315 | + $modx->config['pwd_hash_algo'] = 'UNCRYPT'; |
|
| 316 | + } |
|
| 317 | 317 | |
| 318 | - if($user_algo !== $modx->config['pwd_hash_algo']) { |
|
| 319 | - $bk_pwd_hash_algo = $modx->config['pwd_hash_algo']; |
|
| 320 | - $modx->config['pwd_hash_algo'] = $user_algo; |
|
| 321 | - } |
|
| 318 | + if($user_algo !== $modx->config['pwd_hash_algo']) { |
|
| 319 | + $bk_pwd_hash_algo = $modx->config['pwd_hash_algo']; |
|
| 320 | + $modx->config['pwd_hash_algo'] = $user_algo; |
|
| 321 | + } |
|
| 322 | 322 | |
| 323 | - if($dbasePassword != $modx->manager->genV1Hash($givenPassword, $internalKey)) { |
|
| 324 | - return false; |
|
| 325 | - } |
|
| 323 | + if($dbasePassword != $modx->manager->genV1Hash($givenPassword, $internalKey)) { |
|
| 324 | + return false; |
|
| 325 | + } |
|
| 326 | 326 | |
| 327 | - updateNewHash($username, $givenPassword); |
|
| 327 | + updateNewHash($username, $givenPassword); |
|
| 328 | 328 | |
| 329 | - return true; |
|
| 329 | + return true; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | function loginMD5($internalKey, $givenPassword, $dbasePassword, $username) { |
| 333 | - global $modx; |
|
| 333 | + global $modx; |
|
| 334 | 334 | |
| 335 | - if($dbasePassword != md5($givenPassword)) { |
|
| 336 | - return false; |
|
| 337 | - } |
|
| 338 | - updateNewHash($username, $givenPassword); |
|
| 339 | - return true; |
|
| 335 | + if($dbasePassword != md5($givenPassword)) { |
|
| 336 | + return false; |
|
| 337 | + } |
|
| 338 | + updateNewHash($username, $givenPassword); |
|
| 339 | + return true; |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | function updateNewHash($username, $password) { |
| 343 | - global $modx; |
|
| 343 | + global $modx; |
|
| 344 | 344 | |
| 345 | - $field = array(); |
|
| 346 | - $field['password'] = $modx->phpass->HashPassword($password); |
|
| 347 | - $modx->db->update($field, '[+prefix+]manager_users', "username='{$username}'"); |
|
| 345 | + $field = array(); |
|
| 346 | + $field['password'] = $modx->phpass->HashPassword($password); |
|
| 347 | + $modx->db->update($field, '[+prefix+]manager_users', "username='{$username}'"); |
|
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | function incrementFailedLoginCount($internalKey, $failedlogins, $failed_allowed, $blocked_minutes) { |
| 351 | - global $modx; |
|
| 352 | - |
|
| 353 | - $failedlogins += 1; |
|
| 354 | - |
|
| 355 | - $fields = array('failedlogincount' => $failedlogins); |
|
| 356 | - if($failedlogins >= $failed_allowed) //block user for too many fail attempts |
|
| 357 | - { |
|
| 358 | - $fields['blockeduntil'] = time() + ($blocked_minutes * 60); |
|
| 359 | - } |
|
| 360 | - |
|
| 361 | - $modx->db->update($fields, '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
| 362 | - |
|
| 363 | - if($failedlogins < $failed_allowed) { |
|
| 364 | - //sleep to help prevent brute force attacks |
|
| 365 | - $sleep = (int) $failedlogins / 2; |
|
| 366 | - if($sleep > 5) { |
|
| 367 | - $sleep = 5; |
|
| 368 | - } |
|
| 369 | - sleep($sleep); |
|
| 370 | - } |
|
| 371 | - @session_destroy(); |
|
| 372 | - session_unset(); |
|
| 373 | - return; |
|
| 351 | + global $modx; |
|
| 352 | + |
|
| 353 | + $failedlogins += 1; |
|
| 354 | + |
|
| 355 | + $fields = array('failedlogincount' => $failedlogins); |
|
| 356 | + if($failedlogins >= $failed_allowed) //block user for too many fail attempts |
|
| 357 | + { |
|
| 358 | + $fields['blockeduntil'] = time() + ($blocked_minutes * 60); |
|
| 359 | + } |
|
| 360 | + |
|
| 361 | + $modx->db->update($fields, '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
| 362 | + |
|
| 363 | + if($failedlogins < $failed_allowed) { |
|
| 364 | + //sleep to help prevent brute force attacks |
|
| 365 | + $sleep = (int) $failedlogins / 2; |
|
| 366 | + if($sleep > 5) { |
|
| 367 | + $sleep = 5; |
|
| 368 | + } |
|
| 369 | + sleep($sleep); |
|
| 370 | + } |
|
| 371 | + @session_destroy(); |
|
| 372 | + session_unset(); |
|
| 373 | + return; |
|
| 374 | 374 | } |
@@ -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_plugin')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['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 | // Set the item name for logger |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforePluginFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforePluginFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the plugin. |
| 25 | 25 | $modx->db->delete($modx->getFullTableName('site_plugins'), "id='{$id}'"); |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // invoke OnPluginFormDelete event |
| 31 | 31 | $modx->invokeEvent("OnPluginFormDelete", |
| 32 | - array( |
|
| 33 | - "id" => $id |
|
| 34 | - )); |
|
| 32 | + array( |
|
| 33 | + "id" => $id |
|
| 34 | + )); |
|
| 35 | 35 | |
| 36 | 36 | // empty cache |
| 37 | 37 | $modx->clearCache('full'); |
@@ -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_snippet')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['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 | // Set the item name for logger |
@@ -17,18 +17,18 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeChunkFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeChunkFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the chunk. |
| 25 | 25 | $modx->db->delete($modx->getFullTableName('site_htmlsnippets'), "id='{$id}'"); |
| 26 | 26 | |
| 27 | 27 | // invoke OnChunkFormDelete event |
| 28 | 28 | $modx->invokeEvent("OnChunkFormDelete", |
| 29 | - array( |
|
| 30 | - "id" => $id |
|
| 31 | - )); |
|
| 29 | + array( |
|
| 30 | + "id" => $id |
|
| 31 | + )); |
|
| 32 | 32 | |
| 33 | 33 | // empty cache |
| 34 | 34 | $modx->clearCache('full'); |
@@ -3,7 +3,7 @@ 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('access_permissions')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | // access group processor. |
@@ -20,113 +20,113 @@ discard block |
||
| 20 | 20 | $operation = $_REQUEST['operation']; |
| 21 | 21 | |
| 22 | 22 | switch ($operation) { |
| 23 | - case "add_user_group" : |
|
| 24 | - $newgroup = $_REQUEST['newusergroup']; |
|
| 25 | - if(empty($newgroup)) { |
|
| 26 | - $modx->webAlertAndQuit("No group name specified."); |
|
| 27 | - } else { |
|
| 28 | - $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_membergroup_names); |
|
| 23 | + case "add_user_group" : |
|
| 24 | + $newgroup = $_REQUEST['newusergroup']; |
|
| 25 | + if(empty($newgroup)) { |
|
| 26 | + $modx->webAlertAndQuit("No group name specified."); |
|
| 27 | + } else { |
|
| 28 | + $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_membergroup_names); |
|
| 29 | 29 | |
| 30 | - // invoke OnManagerCreateGroup event |
|
| 31 | - $modx->invokeEvent('OnManagerCreateGroup', array( |
|
| 32 | - 'groupid' => $id, |
|
| 33 | - 'groupname' => $newgroup, |
|
| 34 | - )); |
|
| 35 | - } |
|
| 36 | - break; |
|
| 37 | - case "add_document_group" : |
|
| 38 | - $newgroup = $_REQUEST['newdocgroup']; |
|
| 39 | - if(empty($newgroup)) { |
|
| 40 | - $modx->webAlertAndQuit("No group name specified."); |
|
| 41 | - } else { |
|
| 42 | - $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_documentgroup_names); |
|
| 30 | + // invoke OnManagerCreateGroup event |
|
| 31 | + $modx->invokeEvent('OnManagerCreateGroup', array( |
|
| 32 | + 'groupid' => $id, |
|
| 33 | + 'groupname' => $newgroup, |
|
| 34 | + )); |
|
| 35 | + } |
|
| 36 | + break; |
|
| 37 | + case "add_document_group" : |
|
| 38 | + $newgroup = $_REQUEST['newdocgroup']; |
|
| 39 | + if(empty($newgroup)) { |
|
| 40 | + $modx->webAlertAndQuit("No group name specified."); |
|
| 41 | + } else { |
|
| 42 | + $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_documentgroup_names); |
|
| 43 | 43 | |
| 44 | - // invoke OnCreateDocGroup event |
|
| 45 | - $modx->invokeEvent('OnCreateDocGroup', array( |
|
| 46 | - 'groupid' => $id, |
|
| 47 | - 'groupname' => $newgroup, |
|
| 48 | - )); |
|
| 49 | - } |
|
| 50 | - break; |
|
| 51 | - case "delete_user_group" : |
|
| 52 | - $updategroupaccess = true; |
|
| 53 | - $usergroup = (int)$_REQUEST['usergroup']; |
|
| 54 | - if(empty($usergroup)) { |
|
| 55 | - $modx->webAlertAndQuit("No user group id specified for deletion."); |
|
| 56 | - } else { |
|
| 57 | - $modx->db->delete($tbl_membergroup_names, "id='{$usergroup}'"); |
|
| 44 | + // invoke OnCreateDocGroup event |
|
| 45 | + $modx->invokeEvent('OnCreateDocGroup', array( |
|
| 46 | + 'groupid' => $id, |
|
| 47 | + 'groupname' => $newgroup, |
|
| 48 | + )); |
|
| 49 | + } |
|
| 50 | + break; |
|
| 51 | + case "delete_user_group" : |
|
| 52 | + $updategroupaccess = true; |
|
| 53 | + $usergroup = (int)$_REQUEST['usergroup']; |
|
| 54 | + if(empty($usergroup)) { |
|
| 55 | + $modx->webAlertAndQuit("No user group id specified for deletion."); |
|
| 56 | + } else { |
|
| 57 | + $modx->db->delete($tbl_membergroup_names, "id='{$usergroup}'"); |
|
| 58 | 58 | |
| 59 | - $modx->db->delete($tbl_membergroup_access, "membergroup='{$usergroup}'"); |
|
| 59 | + $modx->db->delete($tbl_membergroup_access, "membergroup='{$usergroup}'"); |
|
| 60 | 60 | |
| 61 | - $modx->db->delete($tbl_member_groups, "user_group='{$usergroup}'"); |
|
| 62 | - } |
|
| 63 | - break; |
|
| 64 | - case "delete_document_group" : |
|
| 65 | - $group = (int)$_REQUEST['documentgroup']; |
|
| 66 | - if(empty($group)) { |
|
| 67 | - $modx->webAlertAndQuit("No document group id specified for deletion."); |
|
| 68 | - } else { |
|
| 69 | - $modx->db->delete($tbl_documentgroup_names, "id='{$group}'"); |
|
| 61 | + $modx->db->delete($tbl_member_groups, "user_group='{$usergroup}'"); |
|
| 62 | + } |
|
| 63 | + break; |
|
| 64 | + case "delete_document_group" : |
|
| 65 | + $group = (int)$_REQUEST['documentgroup']; |
|
| 66 | + if(empty($group)) { |
|
| 67 | + $modx->webAlertAndQuit("No document group id specified for deletion."); |
|
| 68 | + } else { |
|
| 69 | + $modx->db->delete($tbl_documentgroup_names, "id='{$group}'"); |
|
| 70 | 70 | |
| 71 | - $modx->db->delete($tbl_membergroup_access, "documentgroup='{$group}'"); |
|
| 71 | + $modx->db->delete($tbl_membergroup_access, "documentgroup='{$group}'"); |
|
| 72 | 72 | |
| 73 | - $modx->db->delete($tbl_document_groups, "document_group='{$group}'"); |
|
| 74 | - } |
|
| 75 | - break; |
|
| 76 | - case "rename_user_group" : |
|
| 77 | - $newgroupname = $_REQUEST['newgroupname']; |
|
| 78 | - if(empty($newgroupname)) { |
|
| 79 | - $modx->webAlertAndQuit("No group name specified."); |
|
| 80 | - } |
|
| 81 | - $groupid = (int)$_REQUEST['groupid']; |
|
| 82 | - if(empty($groupid)) { |
|
| 83 | - $modx->webAlertAndQuit("No group id specified for rename."); |
|
| 84 | - } |
|
| 73 | + $modx->db->delete($tbl_document_groups, "document_group='{$group}'"); |
|
| 74 | + } |
|
| 75 | + break; |
|
| 76 | + case "rename_user_group" : |
|
| 77 | + $newgroupname = $_REQUEST['newgroupname']; |
|
| 78 | + if(empty($newgroupname)) { |
|
| 79 | + $modx->webAlertAndQuit("No group name specified."); |
|
| 80 | + } |
|
| 81 | + $groupid = (int)$_REQUEST['groupid']; |
|
| 82 | + if(empty($groupid)) { |
|
| 83 | + $modx->webAlertAndQuit("No group id specified for rename."); |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | - $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_membergroup_names, "id='{$groupid}'"); |
|
| 87 | - break; |
|
| 88 | - case "rename_document_group" : |
|
| 89 | - $newgroupname = $_REQUEST['newgroupname']; |
|
| 90 | - if(empty($newgroupname)) { |
|
| 91 | - $modx->webAlertAndQuit("No group name specified."); |
|
| 92 | - } |
|
| 93 | - $groupid = (int)$_REQUEST['groupid']; |
|
| 94 | - if(empty($groupid)) { |
|
| 95 | - $modx->webAlertAndQuit("No group id specified for rename."); |
|
| 96 | - } |
|
| 86 | + $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_membergroup_names, "id='{$groupid}'"); |
|
| 87 | + break; |
|
| 88 | + case "rename_document_group" : |
|
| 89 | + $newgroupname = $_REQUEST['newgroupname']; |
|
| 90 | + if(empty($newgroupname)) { |
|
| 91 | + $modx->webAlertAndQuit("No group name specified."); |
|
| 92 | + } |
|
| 93 | + $groupid = (int)$_REQUEST['groupid']; |
|
| 94 | + if(empty($groupid)) { |
|
| 95 | + $modx->webAlertAndQuit("No group id specified for rename."); |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | - $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'"); |
|
| 99 | - break; |
|
| 100 | - case "add_document_group_to_user_group" : |
|
| 101 | - $updategroupaccess = true; |
|
| 102 | - $usergroup = (int)$_REQUEST['usergroup']; |
|
| 103 | - $docgroup = (int)$_REQUEST['docgroup']; |
|
| 104 | - $rs = $modx->db->select('COUNT(*)', $tbl_membergroup_access, "membergroup='{$usergroup}' AND documentgroup='{$docgroup}'"); |
|
| 105 | - $limit = $modx->db->getValue($rs); |
|
| 106 | - if($limit<=0) { |
|
| 107 | - $modx->db->insert(array('membergroup' => $usergroup, 'documentgroup' => $docgroup), $tbl_membergroup_access); |
|
| 108 | - } else { |
|
| 109 | - //alert user that coupling already exists? |
|
| 110 | - } |
|
| 111 | - break; |
|
| 112 | - case "remove_document_group_from_user_group" : |
|
| 113 | - $updategroupaccess = true; |
|
| 114 | - $coupling = (int)$_REQUEST['coupling']; |
|
| 115 | - $modx->db->delete($tbl_membergroup_access, "id='{$coupling}'"); |
|
| 116 | - break; |
|
| 117 | - default : |
|
| 118 | - $modx->webAlertAndQuit("No operation set in request."); |
|
| 98 | + $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'"); |
|
| 99 | + break; |
|
| 100 | + case "add_document_group_to_user_group" : |
|
| 101 | + $updategroupaccess = true; |
|
| 102 | + $usergroup = (int)$_REQUEST['usergroup']; |
|
| 103 | + $docgroup = (int)$_REQUEST['docgroup']; |
|
| 104 | + $rs = $modx->db->select('COUNT(*)', $tbl_membergroup_access, "membergroup='{$usergroup}' AND documentgroup='{$docgroup}'"); |
|
| 105 | + $limit = $modx->db->getValue($rs); |
|
| 106 | + if($limit<=0) { |
|
| 107 | + $modx->db->insert(array('membergroup' => $usergroup, 'documentgroup' => $docgroup), $tbl_membergroup_access); |
|
| 108 | + } else { |
|
| 109 | + //alert user that coupling already exists? |
|
| 110 | + } |
|
| 111 | + break; |
|
| 112 | + case "remove_document_group_from_user_group" : |
|
| 113 | + $updategroupaccess = true; |
|
| 114 | + $coupling = (int)$_REQUEST['coupling']; |
|
| 115 | + $modx->db->delete($tbl_membergroup_access, "id='{$coupling}'"); |
|
| 116 | + break; |
|
| 117 | + default : |
|
| 118 | + $modx->webAlertAndQuit("No operation set in request."); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // secure manager documents - flag as private |
| 122 | 122 | if($updategroupaccess==true){ |
| 123 | - include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php"; |
|
| 124 | - secureMgrDocument(); |
|
| 123 | + include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php"; |
|
| 124 | + secureMgrDocument(); |
|
| 125 | 125 | |
| 126 | - // Update the private group column |
|
| 127 | - $modx->db->update( |
|
| 128 | - 'dgn.private_memgroup = (mga.membergroup IS NOT NULL)', |
|
| 129 | - "{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_membergroup_access} AS mga ON mga.documentgroup = dgn.id"); |
|
| 126 | + // Update the private group column |
|
| 127 | + $modx->db->update( |
|
| 128 | + 'dgn.private_memgroup = (mga.membergroup IS NOT NULL)', |
|
| 129 | + "{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_membergroup_access} AS mga ON mga.documentgroup = dgn.id"); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | $header = "Location: index.php?a=40"; |
@@ -1,22 +1,22 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 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_template')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id']) ? (int)$_GET['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 | // delete the template, but first check it doesn't have any documents using it |
| 15 | 15 | $rs = $modx->db->select('id, pagetitle,introtext', $modx->getFullTableName('site_content'), "template='{$id}' AND deleted=0"); |
| 16 | 16 | $limit = $modx->db->getRecordCount($rs); |
| 17 | 17 | if($limit > 0) { |
| 18 | - include "header.inc.php"; |
|
| 19 | - ?> |
|
| 18 | + include "header.inc.php"; |
|
| 19 | + ?> |
|
| 20 | 20 | |
| 21 | 21 | <h1><?php echo $_lang['manage_templates']; ?></h1> |
| 22 | 22 | |
@@ -28,20 +28,20 @@ discard block |
||
| 28 | 28 | <p>Documents using this template:</p> |
| 29 | 29 | <ul> |
| 30 | 30 | <?php |
| 31 | - while($row = $modx->db->getRow($rs)) { |
|
| 32 | - echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['introtext'] != '' ? ' - ' . $row['introtext'] : '') . '</li>'; |
|
| 33 | - } |
|
| 34 | - ?> |
|
| 31 | + while($row = $modx->db->getRow($rs)) { |
|
| 32 | + echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['introtext'] != '' ? ' - ' . $row['introtext'] : '') . '</li>'; |
|
| 33 | + } |
|
| 34 | + ?> |
|
| 35 | 35 | </ul> |
| 36 | 36 | </div> |
| 37 | 37 | </div> |
| 38 | 38 | <?php |
| 39 | - include_once "footer.inc.php"; |
|
| 40 | - exit; |
|
| 39 | + include_once "footer.inc.php"; |
|
| 40 | + exit; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | if($id == $default_template) { |
| 44 | - $modx->webAlertAndQuit("This template is set as the default template. Please choose a different default template in the MODX configuration before deleting this template."); |
|
| 44 | + $modx->webAlertAndQuit("This template is set as the default template. Please choose a different default template in the MODX configuration before deleting this template."); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // Set the item name for logger |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | // invoke OnBeforeTempFormDelete event |
| 52 | 52 | $modx->invokeEvent("OnBeforeTempFormDelete", array( |
| 53 | - "id" => $id |
|
| 54 | - )); |
|
| 53 | + "id" => $id |
|
| 54 | + )); |
|
| 55 | 55 | |
| 56 | 56 | // delete the document. |
| 57 | 57 | $modx->db->delete($modx->getFullTableName('site_templates'), "id='{$id}'"); |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | // invoke OnTempFormDelete event |
| 62 | 62 | $modx->invokeEvent("OnTempFormDelete", array( |
| 63 | - "id" => $id |
|
| 64 | - )); |
|
| 63 | + "id" => $id |
|
| 64 | + )); |
|
| 65 | 65 | |
| 66 | 66 | // empty cache |
| 67 | 67 | $modx->clearCache('full'); |
@@ -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_snippet')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['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 | // Set the item name for logger |
@@ -17,18 +17,18 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeSnipFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeSnipFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the snippet. |
| 25 | 25 | $modx->db->delete($modx->getFullTableName('site_snippets'), "id='{$id}'"); |
| 26 | 26 | |
| 27 | 27 | // invoke OnSnipFormDelete event |
| 28 | 28 | $modx->invokeEvent("OnSnipFormDelete", |
| 29 | - array( |
|
| 30 | - "id" => $id |
|
| 31 | - )); |
|
| 29 | + array( |
|
| 30 | + "id" => $id |
|
| 31 | + )); |
|
| 32 | 32 | |
| 33 | 33 | // empty cache |
| 34 | 34 | $modx->clearCache('full'); |
@@ -3,33 +3,33 @@ |
||
| 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('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | if (isset($_REQUEST['t'])) { |
| 10 | 10 | |
| 11 | - if (empty($_REQUEST['t'])) { |
|
| 12 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 13 | - } |
|
| 11 | + if (empty($_REQUEST['t'])) { |
|
| 12 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | - // Set the item name for logger |
|
| 16 | - $_SESSION['itemname'] = $_REQUEST['t']; |
|
| 15 | + // Set the item name for logger |
|
| 16 | + $_SESSION['itemname'] = $_REQUEST['t']; |
|
| 17 | 17 | |
| 18 | - $modx->db->optimize($_REQUEST['t']); |
|
| 18 | + $modx->db->optimize($_REQUEST['t']); |
|
| 19 | 19 | |
| 20 | 20 | } elseif (isset($_REQUEST['u'])) { |
| 21 | 21 | |
| 22 | - if (empty($_REQUEST['u'])) { |
|
| 23 | - $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
| 24 | - } |
|
| 22 | + if (empty($_REQUEST['u'])) { |
|
| 23 | + $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - // Set the item name for logger |
|
| 27 | - $_SESSION['itemname'] = $_REQUEST['u']; |
|
| 26 | + // Set the item name for logger |
|
| 27 | + $_SESSION['itemname'] = $_REQUEST['u']; |
|
| 28 | 28 | |
| 29 | - $modx->db->truncate($_REQUEST['u']); |
|
| 29 | + $modx->db->truncate($_REQUEST['u']); |
|
| 30 | 30 | |
| 31 | 31 | } else { |
| 32 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 32 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | $mode = (int)$_REQUEST['mode']; |