@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | # |
99 | 99 | if (!function_exists('xml_parser_create')) { |
100 | 100 | $this->error( "Failed to load PHP's XML Extension. " . |
101 | - "http://www.php.net/manual/en/ref.xml.php", |
|
102 | - E_USER_ERROR ); |
|
101 | + "http://www.php.net/manual/en/ref.xml.php", |
|
102 | + E_USER_ERROR ); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | list($parser, $source) = $this->create_parser($source, |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | |
109 | 109 | if (!is_resource($parser)) { |
110 | 110 | $this->error( "Failed to create an instance of PHP's XML parser. " . |
111 | - "http://www.php.net/manual/en/ref.xml.php", |
|
112 | - E_USER_ERROR ); |
|
111 | + "http://www.php.net/manual/en/ref.xml.php", |
|
112 | + E_USER_ERROR ); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | |
@@ -445,9 +445,9 @@ discard block |
||
445 | 445 | } |
446 | 446 | |
447 | 447 | /** |
448 | - * return XML parser, and possibly re-encoded source |
|
449 | - * |
|
450 | - */ |
|
448 | + * return XML parser, and possibly re-encoded source |
|
449 | + * |
|
450 | + */ |
|
451 | 451 | function create_parser($source, $out_enc, $in_enc, $detect) { |
452 | 452 | if ( substr(phpversion(),0,1) == 5) { |
453 | 453 | $parser = $this->php5_create_parser($in_enc, $detect); |
@@ -464,14 +464,14 @@ discard block |
||
464 | 464 | } |
465 | 465 | |
466 | 466 | /** |
467 | - * Instantiate an XML parser under PHP5 |
|
468 | - * |
|
469 | - * PHP5 will do a fine job of detecting input encoding |
|
470 | - * if passed an empty string as the encoding. |
|
471 | - * |
|
472 | - * All hail libxml2! |
|
473 | - * |
|
474 | - */ |
|
467 | + * Instantiate an XML parser under PHP5 |
|
468 | + * |
|
469 | + * PHP5 will do a fine job of detecting input encoding |
|
470 | + * if passed an empty string as the encoding. |
|
471 | + * |
|
472 | + * All hail libxml2! |
|
473 | + * |
|
474 | + */ |
|
475 | 475 | function php5_create_parser($in_enc, $detect) { |
476 | 476 | // by default php5 does a fine job of detecting input encodings |
477 | 477 | if(!$detect && $in_enc) { |
@@ -483,20 +483,20 @@ discard block |
||
483 | 483 | } |
484 | 484 | |
485 | 485 | /** |
486 | - * Instaniate an XML parser under PHP4 |
|
487 | - * |
|
488 | - * Unfortunately PHP4's support for character encodings |
|
489 | - * and especially XML and character encodings sucks. As |
|
490 | - * long as the documents you parse only contain characters |
|
491 | - * from the ISO-8859-1 character set (a superset of ASCII, |
|
492 | - * and a subset of UTF-8) you're fine. However once you |
|
493 | - * step out of that comfy little world things get mad, bad, |
|
494 | - * and dangerous to know. |
|
495 | - * |
|
496 | - * The following code is based on SJM's work with FoF |
|
497 | - * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss |
|
498 | - * |
|
499 | - */ |
|
486 | + * Instaniate an XML parser under PHP4 |
|
487 | + * |
|
488 | + * Unfortunately PHP4's support for character encodings |
|
489 | + * and especially XML and character encodings sucks. As |
|
490 | + * long as the documents you parse only contain characters |
|
491 | + * from the ISO-8859-1 character set (a superset of ASCII, |
|
492 | + * and a subset of UTF-8) you're fine. However once you |
|
493 | + * step out of that comfy little world things get mad, bad, |
|
494 | + * and dangerous to know. |
|
495 | + * |
|
496 | + * The following code is based on SJM's work with FoF |
|
497 | + * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss |
|
498 | + * |
|
499 | + */ |
|
500 | 500 | function php4_create_parser($source, $in_enc, $detect) { |
501 | 501 | if ( !$detect ) { |
502 | 502 | return array(xml_parser_create($in_enc), $source); |
@@ -540,8 +540,8 @@ discard block |
||
540 | 540 | |
541 | 541 | // else |
542 | 542 | $this->error("Feed is in an unsupported character encoding. ($in_enc) " . |
543 | - "You may see strange artifacts, and mangled characters.", |
|
544 | - E_USER_NOTICE); |
|
543 | + "You may see strange artifacts, and mangled characters.", |
|
544 | + E_USER_NOTICE); |
|
545 | 545 | |
546 | 546 | return array(xml_parser_create(), $source); |
547 | 547 | } |
@@ -587,18 +587,18 @@ discard block |
||
587 | 587 | // courtesy, Ryan Currie, [email protected] |
588 | 588 | |
589 | 589 | if (!function_exists('array_change_key_case')) { |
590 | - define("CASE_UPPER",1); |
|
591 | - define("CASE_LOWER",0); |
|
590 | + define("CASE_UPPER",1); |
|
591 | + define("CASE_LOWER",0); |
|
592 | 592 | |
593 | 593 | |
594 | - function array_change_key_case($array,$case=CASE_LOWER) { |
|
595 | - if ($case=CASE_LOWER) $cmd=strtolower; |
|
596 | - elseif ($case=CASE_UPPER) $cmd=strtoupper; |
|
597 | - foreach($array as $key=>$value) { |
|
598 | - $output[$cmd($key)]=$value; |
|
599 | - } |
|
600 | - return $output; |
|
601 | - } |
|
594 | + function array_change_key_case($array,$case=CASE_LOWER) { |
|
595 | + if ($case=CASE_LOWER) $cmd=strtolower; |
|
596 | + elseif ($case=CASE_UPPER) $cmd=strtoupper; |
|
597 | + foreach($array as $key=>$value) { |
|
598 | + $output[$cmd($key)]=$value; |
|
599 | + } |
|
600 | + return $output; |
|
601 | + } |
|
602 | 602 | |
603 | 603 | } |
604 | 604 | ?> |
605 | 605 | \ No newline at end of file |
@@ -166,7 +166,7 @@ |
||
166 | 166 | $resp = _fetch_remote_file( $url, $request_headers ); |
167 | 167 | |
168 | 168 | if (isset($resp) and $resp) { |
169 | - if ($resp->status == '304' ) { |
|
169 | + if ($resp->status == '304' ) { |
|
170 | 170 | // we have the most current copy |
171 | 171 | if ( MAGPIE_DEBUG > 1) { |
172 | 172 | debug("Got 304 for $url"); |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | if ($filesize = filesize($cache_file) ) { |
97 | - $data = fread( $fp, filesize($cache_file) ); |
|
98 | - $rss = $this->unserialize( $data ); |
|
97 | + $data = fread( $fp, filesize($cache_file) ); |
|
98 | + $rss = $this->unserialize( $data ); |
|
99 | 99 | |
100 | - return $rss; |
|
101 | - } |
|
100 | + return $rss; |
|
101 | + } |
|
102 | 102 | |
103 | - return 0; |
|
103 | + return 0; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /*=======================================================================*\ |
@@ -134,17 +134,17 @@ discard block |
||
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | - function cache_age( $cache_key ) { |
|
138 | - $filename = $this->file_name( $url ); |
|
139 | - if ( file_exists( $filename ) ) { |
|
140 | - $mtime = filemtime( $filename ); |
|
137 | + function cache_age( $cache_key ) { |
|
138 | + $filename = $this->file_name( $url ); |
|
139 | + if ( file_exists( $filename ) ) { |
|
140 | + $mtime = filemtime( $filename ); |
|
141 | 141 | $age = time() - $mtime; |
142 | - return $age; |
|
143 | - } |
|
144 | - else { |
|
145 | - return -1; |
|
146 | - } |
|
147 | - } |
|
142 | + return $age; |
|
143 | + } |
|
144 | + else { |
|
145 | + return -1; |
|
146 | + } |
|
147 | + } |
|
148 | 148 | |
149 | 149 | /*=======================================================================*\ |
150 | 150 | Function: serialize |
@@ -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']) && intval($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 |
@@ -1,193 +1,193 @@ |
||
1 | 1 | <?php |
2 | 2 | if(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 | |
6 | 6 | if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
7 | - header('HTTP/1.0 404 Not Found'); |
|
8 | - exit; |
|
7 | + header('HTTP/1.0 404 Not Found'); |
|
8 | + exit; |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | if(isset($_SESSION['mgrValidated']) && $_SESSION['usertype'] != 'manager') { |
12 | - // if (isset($_COOKIE[session_name()])) { |
|
13 | - // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
14 | - // } |
|
15 | - @session_destroy(); |
|
16 | - // start session |
|
17 | - // startCMSSession(); |
|
12 | + // if (isset($_COOKIE[session_name()])) { |
|
13 | + // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
14 | + // } |
|
15 | + @session_destroy(); |
|
16 | + // start session |
|
17 | + // startCMSSession(); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | // andrazk 20070416 - if installer is running, destroy active sessions |
21 | 21 | if(file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) { |
22 | - include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
23 | - if(isset($installStartTime)) { |
|
24 | - if((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
25 | - unset($installStartTime); |
|
26 | - @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
|
27 | - unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
28 | - } else { |
|
29 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | - if(isset($_COOKIE[session_name()])) { |
|
31 | - session_unset(); |
|
32 | - @session_destroy(); |
|
33 | - // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
34 | - } |
|
35 | - $installGoingOn = 1; |
|
36 | - } |
|
37 | - } |
|
38 | - } |
|
22 | + include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
23 | + if(isset($installStartTime)) { |
|
24 | + if((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
25 | + unset($installStartTime); |
|
26 | + @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
|
27 | + unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
28 | + } else { |
|
29 | + if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | + if(isset($_COOKIE[session_name()])) { |
|
31 | + session_unset(); |
|
32 | + @session_destroy(); |
|
33 | + // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
34 | + } |
|
35 | + $installGoingOn = 1; |
|
36 | + } |
|
37 | + } |
|
38 | + } |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // andrazk 20070416 - if session started before install and was not destroyed yet |
42 | 42 | if(isset($lastInstallTime)) { |
43 | - if(isset($_SESSION['mgrValidated'])) { |
|
44 | - if(isset($_SESSION['modx.session.created.time'])) { |
|
45 | - if($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | - if(isset($_COOKIE[session_name()])) { |
|
48 | - session_unset(); |
|
49 | - @session_destroy(); |
|
50 | - // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
51 | - } |
|
52 | - header('HTTP/1.0 307 Redirect'); |
|
53 | - header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2'); |
|
54 | - } |
|
55 | - } |
|
56 | - } |
|
57 | - } |
|
43 | + if(isset($_SESSION['mgrValidated'])) { |
|
44 | + if(isset($_SESSION['modx.session.created.time'])) { |
|
45 | + if($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | + if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | + if(isset($_COOKIE[session_name()])) { |
|
48 | + session_unset(); |
|
49 | + @session_destroy(); |
|
50 | + // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
51 | + } |
|
52 | + header('HTTP/1.0 307 Redirect'); |
|
53 | + header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2'); |
|
54 | + } |
|
55 | + } |
|
56 | + } |
|
57 | + } |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if(!isset($_SESSION['mgrValidated'])) { |
61 | - if(isset($manager_language)) { |
|
62 | - // establish fallback to English default |
|
63 | - include_once "lang/english.inc.php"; |
|
64 | - // include localized overrides |
|
65 | - include_once "lang/" . $manager_language . ".inc.php"; |
|
66 | - } else { |
|
67 | - include_once "lang/english.inc.php"; |
|
68 | - } |
|
69 | - |
|
70 | - $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
|
71 | - $modx->setPlaceholder('theme', $manager_theme); |
|
61 | + if(isset($manager_language)) { |
|
62 | + // establish fallback to English default |
|
63 | + include_once "lang/english.inc.php"; |
|
64 | + // include localized overrides |
|
65 | + include_once "lang/" . $manager_language . ".inc.php"; |
|
66 | + } else { |
|
67 | + include_once "lang/english.inc.php"; |
|
68 | + } |
|
69 | + |
|
70 | + $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
|
71 | + $modx->setPlaceholder('theme', $manager_theme); |
|
72 | 72 | $modx->setPlaceholder('favicon', (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico')); |
73 | 73 | |
74 | - // invoke OnManagerLoginFormPrerender event |
|
75 | - $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender'); |
|
76 | - $html = is_array($evtOut) ? implode('', $evtOut) : ''; |
|
77 | - $modx->setPlaceholder('OnManagerLoginFormPrerender', $html); |
|
78 | - |
|
79 | - $modx->setPlaceholder('site_name', $site_name); |
|
80 | - $modx->setPlaceholder('manager_path', MGR_DIR); |
|
81 | - $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
|
82 | - $modx->setPlaceholder('login_message', $_lang["login_message"]); |
|
83 | - $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
84 | - $modx->setPlaceholder('year', date('Y')); |
|
85 | - $modx->setPlaceholder('manager_theme_style', (isset($_COOKIE['MODX_themeColor']) ? $_COOKIE['MODX_themeColor'] : '')); |
|
86 | - |
|
87 | - // andrazk 20070416 - notify user of install/update |
|
88 | - if(isset($_GET['installGoingOn'])) { |
|
89 | - $installGoingOn = $_GET['installGoingOn']; |
|
90 | - } |
|
91 | - if(isset($installGoingOn)) { |
|
92 | - switch($installGoingOn) { |
|
93 | - case 1 : |
|
94 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
95 | - break; |
|
96 | - case 2 : |
|
97 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
98 | - break; |
|
99 | - } |
|
100 | - } |
|
101 | - |
|
102 | - if($modx->config['use_captcha'] == 1) { |
|
103 | - $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]); |
|
104 | - $modx->setPlaceholder('captcha_image', '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'includes/veriword.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>'); |
|
105 | - $modx->setPlaceholder('captcha_input', '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
106 | - } |
|
107 | - |
|
108 | - // login info |
|
109 | - $uid = isset($_COOKIE['modx_remember_manager']) ? preg_replace('/[^a-zA-Z0-9\-_@\.]*/', '', $_COOKIE['modx_remember_manager']) : ''; |
|
110 | - $modx->setPlaceholder('uid', $uid); |
|
111 | - $modx->setPlaceholder('username', $_lang["username"]); |
|
112 | - $modx->setPlaceholder('password', $_lang["password"]); |
|
113 | - |
|
114 | - // remember me |
|
115 | - $html = isset($_COOKIE['modx_remember_manager']) ? 'checked="checked"' : ''; |
|
116 | - $modx->setPlaceholder('remember_me', $html); |
|
117 | - $modx->setPlaceholder('remember_username', $_lang["remember_username"]); |
|
118 | - $modx->setPlaceholder('login_button', $_lang["login_button"]); |
|
119 | - |
|
120 | - // invoke OnManagerLoginFormRender event |
|
121 | - $evtOut = $modx->invokeEvent('OnManagerLoginFormRender'); |
|
122 | - $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : ''; |
|
123 | - $modx->setPlaceholder('OnManagerLoginFormRender', $html); |
|
124 | - |
|
125 | - // load template |
|
126 | - $target = $modx->getConfig('manager_login_tpl'); |
|
127 | - $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target); |
|
128 | - $target = $modx->mergeSettingsContent($target); |
|
129 | - |
|
130 | - $login_tpl = null; |
|
131 | - if(substr($target, 0, 1) === '@') { |
|
132 | - if(substr($target, 0, 6) === '@CHUNK') { |
|
133 | - $target = trim(substr($target, 7)); |
|
134 | - $login_tpl = $modx->getChunk($target); |
|
135 | - } elseif(substr($target, 0, 5) === '@FILE') { |
|
136 | - $target = trim(substr($target, 6)); |
|
137 | - $login_tpl = file_get_contents($target); |
|
138 | - } |
|
139 | - } else { |
|
140 | - $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/'; |
|
141 | - if(is_file($theme_path . 'style.php')) { |
|
142 | - include($theme_path . 'style.php'); |
|
143 | - } |
|
144 | - $chunk = $modx->getChunk($target); |
|
145 | - if($chunk !== false && !empty($chunk)) { |
|
146 | - $login_tpl = $chunk; |
|
147 | - } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
148 | - $target = MODX_BASE_PATH . $target; |
|
149 | - $login_tpl = file_get_contents($target); |
|
150 | - } elseif(is_file($target)) { |
|
151 | - $login_tpl = file_get_contents($target); |
|
152 | - } elseif(is_file($theme_path . 'login.tpl')) { |
|
153 | - $target = $theme_path . 'login.tpl'; |
|
154 | - $login_tpl = file_get_contents($target); |
|
155 | - } elseif(is_file($theme_path . 'templates/actions/login.tpl')) { |
|
156 | - $target = $theme_path . 'templates/actions/login.tpl'; |
|
157 | - $login_tpl = file_get_contents($target); |
|
158 | - } elseif(is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
159 | - $target = $theme_path . 'html/login.html'; |
|
160 | - $login_tpl = file_get_contents($target); |
|
161 | - } else { |
|
162 | - $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl'; |
|
163 | - $login_tpl = file_get_contents($target); |
|
164 | - } |
|
165 | - } |
|
166 | - |
|
167 | - // merge placeholders |
|
168 | - $login_tpl = $modx->mergePlaceholderContent($login_tpl); |
|
169 | - $regx = strpos($login_tpl, '[[+') !== false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers |
|
170 | - $login_tpl = preg_replace($regx, '', $login_tpl); //cleanup |
|
171 | - |
|
172 | - echo $login_tpl; |
|
173 | - |
|
174 | - exit; |
|
74 | + // invoke OnManagerLoginFormPrerender event |
|
75 | + $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender'); |
|
76 | + $html = is_array($evtOut) ? implode('', $evtOut) : ''; |
|
77 | + $modx->setPlaceholder('OnManagerLoginFormPrerender', $html); |
|
78 | + |
|
79 | + $modx->setPlaceholder('site_name', $site_name); |
|
80 | + $modx->setPlaceholder('manager_path', MGR_DIR); |
|
81 | + $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
|
82 | + $modx->setPlaceholder('login_message', $_lang["login_message"]); |
|
83 | + $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
84 | + $modx->setPlaceholder('year', date('Y')); |
|
85 | + $modx->setPlaceholder('manager_theme_style', (isset($_COOKIE['MODX_themeColor']) ? $_COOKIE['MODX_themeColor'] : '')); |
|
86 | + |
|
87 | + // andrazk 20070416 - notify user of install/update |
|
88 | + if(isset($_GET['installGoingOn'])) { |
|
89 | + $installGoingOn = $_GET['installGoingOn']; |
|
90 | + } |
|
91 | + if(isset($installGoingOn)) { |
|
92 | + switch($installGoingOn) { |
|
93 | + case 1 : |
|
94 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
95 | + break; |
|
96 | + case 2 : |
|
97 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
98 | + break; |
|
99 | + } |
|
100 | + } |
|
101 | + |
|
102 | + if($modx->config['use_captcha'] == 1) { |
|
103 | + $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]); |
|
104 | + $modx->setPlaceholder('captcha_image', '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'includes/veriword.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>'); |
|
105 | + $modx->setPlaceholder('captcha_input', '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
106 | + } |
|
107 | + |
|
108 | + // login info |
|
109 | + $uid = isset($_COOKIE['modx_remember_manager']) ? preg_replace('/[^a-zA-Z0-9\-_@\.]*/', '', $_COOKIE['modx_remember_manager']) : ''; |
|
110 | + $modx->setPlaceholder('uid', $uid); |
|
111 | + $modx->setPlaceholder('username', $_lang["username"]); |
|
112 | + $modx->setPlaceholder('password', $_lang["password"]); |
|
113 | + |
|
114 | + // remember me |
|
115 | + $html = isset($_COOKIE['modx_remember_manager']) ? 'checked="checked"' : ''; |
|
116 | + $modx->setPlaceholder('remember_me', $html); |
|
117 | + $modx->setPlaceholder('remember_username', $_lang["remember_username"]); |
|
118 | + $modx->setPlaceholder('login_button', $_lang["login_button"]); |
|
119 | + |
|
120 | + // invoke OnManagerLoginFormRender event |
|
121 | + $evtOut = $modx->invokeEvent('OnManagerLoginFormRender'); |
|
122 | + $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : ''; |
|
123 | + $modx->setPlaceholder('OnManagerLoginFormRender', $html); |
|
124 | + |
|
125 | + // load template |
|
126 | + $target = $modx->getConfig('manager_login_tpl'); |
|
127 | + $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target); |
|
128 | + $target = $modx->mergeSettingsContent($target); |
|
129 | + |
|
130 | + $login_tpl = null; |
|
131 | + if(substr($target, 0, 1) === '@') { |
|
132 | + if(substr($target, 0, 6) === '@CHUNK') { |
|
133 | + $target = trim(substr($target, 7)); |
|
134 | + $login_tpl = $modx->getChunk($target); |
|
135 | + } elseif(substr($target, 0, 5) === '@FILE') { |
|
136 | + $target = trim(substr($target, 6)); |
|
137 | + $login_tpl = file_get_contents($target); |
|
138 | + } |
|
139 | + } else { |
|
140 | + $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/'; |
|
141 | + if(is_file($theme_path . 'style.php')) { |
|
142 | + include($theme_path . 'style.php'); |
|
143 | + } |
|
144 | + $chunk = $modx->getChunk($target); |
|
145 | + if($chunk !== false && !empty($chunk)) { |
|
146 | + $login_tpl = $chunk; |
|
147 | + } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
148 | + $target = MODX_BASE_PATH . $target; |
|
149 | + $login_tpl = file_get_contents($target); |
|
150 | + } elseif(is_file($target)) { |
|
151 | + $login_tpl = file_get_contents($target); |
|
152 | + } elseif(is_file($theme_path . 'login.tpl')) { |
|
153 | + $target = $theme_path . 'login.tpl'; |
|
154 | + $login_tpl = file_get_contents($target); |
|
155 | + } elseif(is_file($theme_path . 'templates/actions/login.tpl')) { |
|
156 | + $target = $theme_path . 'templates/actions/login.tpl'; |
|
157 | + $login_tpl = file_get_contents($target); |
|
158 | + } elseif(is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
159 | + $target = $theme_path . 'html/login.html'; |
|
160 | + $login_tpl = file_get_contents($target); |
|
161 | + } else { |
|
162 | + $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl'; |
|
163 | + $login_tpl = file_get_contents($target); |
|
164 | + } |
|
165 | + } |
|
166 | + |
|
167 | + // merge placeholders |
|
168 | + $login_tpl = $modx->mergePlaceholderContent($login_tpl); |
|
169 | + $regx = strpos($login_tpl, '[[+') !== false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers |
|
170 | + $login_tpl = preg_replace($regx, '', $login_tpl); //cleanup |
|
171 | + |
|
172 | + echo $login_tpl; |
|
173 | + |
|
174 | + exit; |
|
175 | 175 | |
176 | 176 | } else { |
177 | - // Update table active_user_sessions |
|
178 | - $modx->updateValidatedUserSession(); |
|
179 | - |
|
180 | - // Update last action in table active_users |
|
181 | - $itemid = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
182 | - $lasthittime = time(); |
|
183 | - $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
|
184 | - |
|
185 | - if($action !== 1) { |
|
186 | - if(!intval($itemid)) { |
|
187 | - $itemid = null; |
|
188 | - } |
|
189 | - $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)", $modx->getFullTableName('active_users') // Table |
|
190 | - , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string) $action, $itemid == null ? var_export(null, true) : $itemid); |
|
191 | - $modx->db->query($sql); |
|
192 | - } |
|
177 | + // Update table active_user_sessions |
|
178 | + $modx->updateValidatedUserSession(); |
|
179 | + |
|
180 | + // Update last action in table active_users |
|
181 | + $itemid = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
182 | + $lasthittime = time(); |
|
183 | + $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
|
184 | + |
|
185 | + if($action !== 1) { |
|
186 | + if(!intval($itemid)) { |
|
187 | + $itemid = null; |
|
188 | + } |
|
189 | + $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)", $modx->getFullTableName('active_users') // Table |
|
190 | + , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string) $action, $itemid == null ? var_export(null, true) : $itemid); |
|
191 | + $modx->db->query($sql); |
|
192 | + } |
|
193 | 193 | } |
@@ -7,364 +7,364 @@ |
||
7 | 7 | // Added by Raymond 20-Jan-2005 |
8 | 8 | function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = '') { |
9 | 9 | |
10 | - global $modx; |
|
10 | + global $modx; |
|
11 | 11 | |
12 | - // process any TV commands in value |
|
13 | - $docid = intval($docid) ? intval($docid) : $modx->documentIdentifier; |
|
14 | - $value = ProcessTVCommand($value, $name, $docid); |
|
12 | + // process any TV commands in value |
|
13 | + $docid = intval($docid) ? intval($docid) : $modx->documentIdentifier; |
|
14 | + $value = ProcessTVCommand($value, $name, $docid); |
|
15 | 15 | |
16 | - $params = array(); |
|
17 | - if($paramstring) { |
|
18 | - $cp = explode("&", $paramstring); |
|
19 | - foreach($cp as $p => $v) { |
|
20 | - $v = trim($v); // trim |
|
21 | - $ar = explode("=", $v); |
|
22 | - if(is_array($ar) && count($ar) == 2) { |
|
23 | - $params[$ar[0]] = decodeParamValue($ar[1]); |
|
24 | - } |
|
25 | - } |
|
26 | - } |
|
16 | + $params = array(); |
|
17 | + if($paramstring) { |
|
18 | + $cp = explode("&", $paramstring); |
|
19 | + foreach($cp as $p => $v) { |
|
20 | + $v = trim($v); // trim |
|
21 | + $ar = explode("=", $v); |
|
22 | + if(is_array($ar) && count($ar) == 2) { |
|
23 | + $params[$ar[0]] = decodeParamValue($ar[1]); |
|
24 | + } |
|
25 | + } |
|
26 | + } |
|
27 | 27 | |
28 | - $id = "tv$name"; |
|
29 | - switch($format) { |
|
30 | - case 'image': |
|
31 | - $images = parseInput($value, '||', 'array'); |
|
32 | - $o = ''; |
|
33 | - foreach($images as $image) { |
|
34 | - if(!is_array($image)) { |
|
35 | - $image = explode('==', $image); |
|
36 | - } |
|
37 | - $src = $image[0]; |
|
28 | + $id = "tv$name"; |
|
29 | + switch($format) { |
|
30 | + case 'image': |
|
31 | + $images = parseInput($value, '||', 'array'); |
|
32 | + $o = ''; |
|
33 | + foreach($images as $image) { |
|
34 | + if(!is_array($image)) { |
|
35 | + $image = explode('==', $image); |
|
36 | + } |
|
37 | + $src = $image[0]; |
|
38 | 38 | |
39 | - if($src) { |
|
40 | - // We have a valid source |
|
41 | - $attributes = ''; |
|
42 | - $attr = array( |
|
43 | - 'class' => $params['class'], |
|
44 | - 'src' => $src, |
|
45 | - 'id' => ($params['id'] ? $params['id'] : ''), |
|
46 | - 'alt' => $modx->htmlspecialchars($params['alttext']), |
|
47 | - 'style' => $params['style'] |
|
48 | - ); |
|
49 | - if(isset($params['align']) && $params['align'] != 'none') { |
|
50 | - $attr['align'] = $params['align']; |
|
51 | - } |
|
52 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
53 | - $attributes .= ' ' . $params['attrib']; |
|
39 | + if($src) { |
|
40 | + // We have a valid source |
|
41 | + $attributes = ''; |
|
42 | + $attr = array( |
|
43 | + 'class' => $params['class'], |
|
44 | + 'src' => $src, |
|
45 | + 'id' => ($params['id'] ? $params['id'] : ''), |
|
46 | + 'alt' => $modx->htmlspecialchars($params['alttext']), |
|
47 | + 'style' => $params['style'] |
|
48 | + ); |
|
49 | + if(isset($params['align']) && $params['align'] != 'none') { |
|
50 | + $attr['align'] = $params['align']; |
|
51 | + } |
|
52 | + foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
53 | + $attributes .= ' ' . $params['attrib']; |
|
54 | 54 | |
55 | - // Output the image with attributes |
|
56 | - $o .= '<img' . rtrim($attributes) . ' />'; |
|
57 | - } |
|
58 | - } |
|
59 | - break; |
|
55 | + // Output the image with attributes |
|
56 | + $o .= '<img' . rtrim($attributes) . ' />'; |
|
57 | + } |
|
58 | + } |
|
59 | + break; |
|
60 | 60 | |
61 | - case "delim": // display as delimitted list |
|
62 | - $value = parseInput($value, "||"); |
|
63 | - $p = $params['format'] ? $params['format'] : " "; |
|
64 | - if($p == "\\n") { |
|
65 | - $p = "\n"; |
|
66 | - } |
|
67 | - $o = str_replace("||", $p, $value); |
|
68 | - break; |
|
61 | + case "delim": // display as delimitted list |
|
62 | + $value = parseInput($value, "||"); |
|
63 | + $p = $params['format'] ? $params['format'] : " "; |
|
64 | + if($p == "\\n") { |
|
65 | + $p = "\n"; |
|
66 | + } |
|
67 | + $o = str_replace("||", $p, $value); |
|
68 | + break; |
|
69 | 69 | |
70 | - case "string": |
|
71 | - $value = parseInput($value); |
|
72 | - $format = strtolower($params['format']); |
|
73 | - if($format == 'upper case') { |
|
74 | - $o = strtoupper($value); |
|
75 | - } else if($format == 'lower case') { |
|
76 | - $o = strtolower($value); |
|
77 | - } else if($format == 'sentence case') { |
|
78 | - $o = ucfirst($value); |
|
79 | - } else if($format == 'capitalize') { |
|
80 | - $o = ucwords($value); |
|
81 | - } else { |
|
82 | - $o = $value; |
|
83 | - } |
|
84 | - break; |
|
70 | + case "string": |
|
71 | + $value = parseInput($value); |
|
72 | + $format = strtolower($params['format']); |
|
73 | + if($format == 'upper case') { |
|
74 | + $o = strtoupper($value); |
|
75 | + } else if($format == 'lower case') { |
|
76 | + $o = strtolower($value); |
|
77 | + } else if($format == 'sentence case') { |
|
78 | + $o = ucfirst($value); |
|
79 | + } else if($format == 'capitalize') { |
|
80 | + $o = ucwords($value); |
|
81 | + } else { |
|
82 | + $o = $value; |
|
83 | + } |
|
84 | + break; |
|
85 | 85 | |
86 | - case "date": |
|
87 | - if($value != '' || $params['default'] == 'Yes') { |
|
88 | - if(empty($value)) { |
|
89 | - $value = 'now'; |
|
90 | - } |
|
91 | - $timestamp = getUnixtimeFromDateString($value); |
|
92 | - $p = $params['format'] ? $params['format'] : "%A %d, %B %Y"; |
|
93 | - $o = strftime($p, $timestamp); |
|
94 | - } else { |
|
95 | - $value = ''; |
|
96 | - } |
|
97 | - break; |
|
86 | + case "date": |
|
87 | + if($value != '' || $params['default'] == 'Yes') { |
|
88 | + if(empty($value)) { |
|
89 | + $value = 'now'; |
|
90 | + } |
|
91 | + $timestamp = getUnixtimeFromDateString($value); |
|
92 | + $p = $params['format'] ? $params['format'] : "%A %d, %B %Y"; |
|
93 | + $o = strftime($p, $timestamp); |
|
94 | + } else { |
|
95 | + $value = ''; |
|
96 | + } |
|
97 | + break; |
|
98 | 98 | |
99 | - case "hyperlink": |
|
100 | - $value = parseInput($value, "||", "array"); |
|
101 | - $o = ''; |
|
102 | - for($i = 0; $i < count($value); $i++) { |
|
103 | - list($name, $url) = is_array($value[$i]) ? $value[$i] : explode("==", $value[$i]); |
|
104 | - if(!$url) { |
|
105 | - $url = $name; |
|
106 | - } |
|
107 | - if($url) { |
|
108 | - if($o) { |
|
109 | - $o .= '<br />'; |
|
110 | - } |
|
111 | - $attributes = ''; |
|
112 | - // setup the link attributes |
|
113 | - $attr = array( |
|
114 | - 'href' => $url, |
|
115 | - 'title' => $params['title'] ? $modx->htmlspecialchars($params['title']) : $name, |
|
116 | - 'class' => $params['class'], |
|
117 | - 'style' => $params['style'], |
|
118 | - 'target' => $params['target'], |
|
119 | - ); |
|
120 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
121 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
99 | + case "hyperlink": |
|
100 | + $value = parseInput($value, "||", "array"); |
|
101 | + $o = ''; |
|
102 | + for($i = 0; $i < count($value); $i++) { |
|
103 | + list($name, $url) = is_array($value[$i]) ? $value[$i] : explode("==", $value[$i]); |
|
104 | + if(!$url) { |
|
105 | + $url = $name; |
|
106 | + } |
|
107 | + if($url) { |
|
108 | + if($o) { |
|
109 | + $o .= '<br />'; |
|
110 | + } |
|
111 | + $attributes = ''; |
|
112 | + // setup the link attributes |
|
113 | + $attr = array( |
|
114 | + 'href' => $url, |
|
115 | + 'title' => $params['title'] ? $modx->htmlspecialchars($params['title']) : $name, |
|
116 | + 'class' => $params['class'], |
|
117 | + 'style' => $params['style'], |
|
118 | + 'target' => $params['target'], |
|
119 | + ); |
|
120 | + foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
121 | + $attributes .= ' ' . $params['attrib']; // add extra |
|
122 | 122 | |
123 | - // Output the link |
|
124 | - $o .= '<a' . rtrim($attributes) . '>' . ($params['text'] ? $modx->htmlspecialchars($params['text']) : $name) . '</a>'; |
|
125 | - } |
|
126 | - } |
|
127 | - break; |
|
123 | + // Output the link |
|
124 | + $o .= '<a' . rtrim($attributes) . '>' . ($params['text'] ? $modx->htmlspecialchars($params['text']) : $name) . '</a>'; |
|
125 | + } |
|
126 | + } |
|
127 | + break; |
|
128 | 128 | |
129 | - case "htmltag": |
|
130 | - $value = parseInput($value, "||", "array"); |
|
131 | - $tagid = $params['tagid']; |
|
132 | - $tagname = ($params['tagname']) ? $params['tagname'] : 'div'; |
|
133 | - $o = ''; |
|
134 | - // Loop through a list of tags |
|
135 | - for($i = 0; $i < count($value); $i++) { |
|
136 | - $tagvalue = is_array($value[$i]) ? implode(' ', $value[$i]) : $value[$i]; |
|
137 | - if(!$tagvalue) { |
|
138 | - continue; |
|
139 | - } |
|
129 | + case "htmltag": |
|
130 | + $value = parseInput($value, "||", "array"); |
|
131 | + $tagid = $params['tagid']; |
|
132 | + $tagname = ($params['tagname']) ? $params['tagname'] : 'div'; |
|
133 | + $o = ''; |
|
134 | + // Loop through a list of tags |
|
135 | + for($i = 0; $i < count($value); $i++) { |
|
136 | + $tagvalue = is_array($value[$i]) ? implode(' ', $value[$i]) : $value[$i]; |
|
137 | + if(!$tagvalue) { |
|
138 | + continue; |
|
139 | + } |
|
140 | 140 | |
141 | - $attributes = ''; |
|
142 | - $attr = array( |
|
143 | - 'id' => ($tagid ? $tagid : $id), |
|
144 | - // 'tv' already added to id |
|
145 | - 'class' => $params['class'], |
|
146 | - 'style' => $params['style'], |
|
147 | - ); |
|
148 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
149 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
141 | + $attributes = ''; |
|
142 | + $attr = array( |
|
143 | + 'id' => ($tagid ? $tagid : $id), |
|
144 | + // 'tv' already added to id |
|
145 | + 'class' => $params['class'], |
|
146 | + 'style' => $params['style'], |
|
147 | + ); |
|
148 | + foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
149 | + $attributes .= ' ' . $params['attrib']; // add extra |
|
150 | 150 | |
151 | - // Output the HTML Tag |
|
152 | - $o .= '<' . $tagname . rtrim($attributes) . '>' . $tagvalue . '</' . $tagname . '>'; |
|
153 | - } |
|
154 | - break; |
|
151 | + // Output the HTML Tag |
|
152 | + $o .= '<' . $tagname . rtrim($attributes) . '>' . $tagvalue . '</' . $tagname . '>'; |
|
153 | + } |
|
154 | + break; |
|
155 | 155 | |
156 | - case "richtext": |
|
157 | - $value = parseInput($value); |
|
158 | - $w = $params['w'] ? $params['w'] : '100%'; |
|
159 | - $h = $params['h'] ? $params['h'] : '400px'; |
|
160 | - $richtexteditor = $params['edt'] ? $params['edt'] : ""; |
|
161 | - $o = '<div class="MODX_RichTextWidget"><textarea id="' . $id . '" name="' . $id . '" style="width:' . $w . '; height:' . $h . ';">'; |
|
162 | - $o .= $modx->htmlspecialchars($value); |
|
163 | - $o .= '</textarea></div>'; |
|
164 | - $replace_richtext = array($id); |
|
165 | - // setup editors |
|
166 | - if(!empty($replace_richtext) && !empty($richtexteditor)) { |
|
167 | - // invoke OnRichTextEditorInit event |
|
168 | - $evtOut = $modx->invokeEvent("OnRichTextEditorInit", array( |
|
169 | - 'editor' => $richtexteditor, |
|
170 | - 'elements' => $replace_richtext, |
|
171 | - 'forfrontend' => 1, |
|
172 | - 'width' => $w, |
|
173 | - 'height' => $h |
|
174 | - )); |
|
175 | - if(is_array($evtOut)) { |
|
176 | - $o .= implode("", $evtOut); |
|
177 | - } |
|
178 | - } |
|
179 | - break; |
|
156 | + case "richtext": |
|
157 | + $value = parseInput($value); |
|
158 | + $w = $params['w'] ? $params['w'] : '100%'; |
|
159 | + $h = $params['h'] ? $params['h'] : '400px'; |
|
160 | + $richtexteditor = $params['edt'] ? $params['edt'] : ""; |
|
161 | + $o = '<div class="MODX_RichTextWidget"><textarea id="' . $id . '" name="' . $id . '" style="width:' . $w . '; height:' . $h . ';">'; |
|
162 | + $o .= $modx->htmlspecialchars($value); |
|
163 | + $o .= '</textarea></div>'; |
|
164 | + $replace_richtext = array($id); |
|
165 | + // setup editors |
|
166 | + if(!empty($replace_richtext) && !empty($richtexteditor)) { |
|
167 | + // invoke OnRichTextEditorInit event |
|
168 | + $evtOut = $modx->invokeEvent("OnRichTextEditorInit", array( |
|
169 | + 'editor' => $richtexteditor, |
|
170 | + 'elements' => $replace_richtext, |
|
171 | + 'forfrontend' => 1, |
|
172 | + 'width' => $w, |
|
173 | + 'height' => $h |
|
174 | + )); |
|
175 | + if(is_array($evtOut)) { |
|
176 | + $o .= implode("", $evtOut); |
|
177 | + } |
|
178 | + } |
|
179 | + break; |
|
180 | 180 | |
181 | - case "unixtime": |
|
182 | - $value = parseInput($value); |
|
183 | - $o = getUnixtimeFromDateString($value); |
|
184 | - break; |
|
181 | + case "unixtime": |
|
182 | + $value = parseInput($value); |
|
183 | + $o = getUnixtimeFromDateString($value); |
|
184 | + break; |
|
185 | 185 | |
186 | - case "viewport": |
|
187 | - $value = parseInput($value); |
|
188 | - $id = '_' . time(); |
|
189 | - if(!$params['vpid']) { |
|
190 | - $params['vpid'] = $id; |
|
191 | - } |
|
192 | - $sTag = "<iframe"; |
|
193 | - $eTag = "</iframe>"; |
|
194 | - $autoMode = "0"; |
|
195 | - $w = $params['width']; |
|
196 | - $h = $params['height']; |
|
197 | - if($params['stretch'] == 'Yes') { |
|
198 | - $w = "100%"; |
|
199 | - $h = "100%"; |
|
200 | - } |
|
201 | - if($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | - $autoMode = "3"; //both |
|
203 | - } else if($params['awidth'] == 'Yes') { |
|
204 | - $autoMode = "1"; //width only |
|
205 | - } else if($params['aheight'] == 'Yes') { |
|
206 | - $autoMode = "2"; //height only |
|
207 | - } |
|
186 | + case "viewport": |
|
187 | + $value = parseInput($value); |
|
188 | + $id = '_' . time(); |
|
189 | + if(!$params['vpid']) { |
|
190 | + $params['vpid'] = $id; |
|
191 | + } |
|
192 | + $sTag = "<iframe"; |
|
193 | + $eTag = "</iframe>"; |
|
194 | + $autoMode = "0"; |
|
195 | + $w = $params['width']; |
|
196 | + $h = $params['height']; |
|
197 | + if($params['stretch'] == 'Yes') { |
|
198 | + $w = "100%"; |
|
199 | + $h = "100%"; |
|
200 | + } |
|
201 | + if($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | + $autoMode = "3"; //both |
|
203 | + } else if($params['awidth'] == 'Yes') { |
|
204 | + $autoMode = "1"; //width only |
|
205 | + } else if($params['aheight'] == 'Yes') { |
|
206 | + $autoMode = "2"; //height only |
|
207 | + } |
|
208 | 208 | |
209 | - $modx->regClientStartupScript(MODX_MANAGER_URL . "media/script/bin/viewport.js", array( |
|
210 | - 'name' => 'viewport', |
|
211 | - 'version' => '0', |
|
212 | - 'plaintext' => false |
|
213 | - )); |
|
214 | - $o = $sTag . " id='" . $params['vpid'] . "' name='" . $params['vpid'] . "' "; |
|
215 | - if($params['class']) { |
|
216 | - $o .= " class='" . $params['class'] . "' "; |
|
217 | - } |
|
218 | - if($params['style']) { |
|
219 | - $o .= " style='" . $params['style'] . "' "; |
|
220 | - } |
|
221 | - if($params['attrib']) { |
|
222 | - $o .= $params['attrib'] . " "; |
|
223 | - } |
|
224 | - $o .= "scrolling='" . ($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto")) . "' "; |
|
225 | - $o .= "src='" . $value . "' frameborder='" . $params['borsize'] . "' "; |
|
226 | - $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'" . $params['vpid'] . "\\'," . $autoMode . ")',100);\" width='" . $w . "' height='" . $h . "' "; |
|
227 | - $o .= ">"; |
|
228 | - $o .= $eTag; |
|
229 | - break; |
|
209 | + $modx->regClientStartupScript(MODX_MANAGER_URL . "media/script/bin/viewport.js", array( |
|
210 | + 'name' => 'viewport', |
|
211 | + 'version' => '0', |
|
212 | + 'plaintext' => false |
|
213 | + )); |
|
214 | + $o = $sTag . " id='" . $params['vpid'] . "' name='" . $params['vpid'] . "' "; |
|
215 | + if($params['class']) { |
|
216 | + $o .= " class='" . $params['class'] . "' "; |
|
217 | + } |
|
218 | + if($params['style']) { |
|
219 | + $o .= " style='" . $params['style'] . "' "; |
|
220 | + } |
|
221 | + if($params['attrib']) { |
|
222 | + $o .= $params['attrib'] . " "; |
|
223 | + } |
|
224 | + $o .= "scrolling='" . ($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto")) . "' "; |
|
225 | + $o .= "src='" . $value . "' frameborder='" . $params['borsize'] . "' "; |
|
226 | + $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'" . $params['vpid'] . "\\'," . $autoMode . ")',100);\" width='" . $w . "' height='" . $h . "' "; |
|
227 | + $o .= ">"; |
|
228 | + $o .= $eTag; |
|
229 | + break; |
|
230 | 230 | |
231 | - case "datagrid": |
|
232 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
233 | - $grd = new DataGrid('', $value); |
|
231 | + case "datagrid": |
|
232 | + include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
233 | + $grd = new DataGrid('', $value); |
|
234 | 234 | |
235 | - $grd->noRecordMsg = $params['egmsg']; |
|
235 | + $grd->noRecordMsg = $params['egmsg']; |
|
236 | 236 | |
237 | - $grd->columnHeaderClass = $params['chdrc']; |
|
238 | - $grd->cssClass = $params['tblc']; |
|
239 | - $grd->itemClass = $params['itmc']; |
|
240 | - $grd->altItemClass = $params['aitmc']; |
|
237 | + $grd->columnHeaderClass = $params['chdrc']; |
|
238 | + $grd->cssClass = $params['tblc']; |
|
239 | + $grd->itemClass = $params['itmc']; |
|
240 | + $grd->altItemClass = $params['aitmc']; |
|
241 | 241 | |
242 | - $grd->columnHeaderStyle = $params['chdrs']; |
|
243 | - $grd->cssStyle = $params['tbls']; |
|
244 | - $grd->itemStyle = $params['itms']; |
|
245 | - $grd->altItemStyle = $params['aitms']; |
|
242 | + $grd->columnHeaderStyle = $params['chdrs']; |
|
243 | + $grd->cssStyle = $params['tbls']; |
|
244 | + $grd->itemStyle = $params['itms']; |
|
245 | + $grd->altItemStyle = $params['aitms']; |
|
246 | 246 | |
247 | - $grd->columns = $params['cols']; |
|
248 | - $grd->fields = $params['flds']; |
|
249 | - $grd->colWidths = $params['cwidth']; |
|
250 | - $grd->colAligns = $params['calign']; |
|
251 | - $grd->colColors = $params['ccolor']; |
|
252 | - $grd->colTypes = $params['ctype']; |
|
247 | + $grd->columns = $params['cols']; |
|
248 | + $grd->fields = $params['flds']; |
|
249 | + $grd->colWidths = $params['cwidth']; |
|
250 | + $grd->colAligns = $params['calign']; |
|
251 | + $grd->colColors = $params['ccolor']; |
|
252 | + $grd->colTypes = $params['ctype']; |
|
253 | 253 | |
254 | - $grd->cellPadding = $params['cpad']; |
|
255 | - $grd->cellSpacing = $params['cspace']; |
|
256 | - $grd->header = $params['head']; |
|
257 | - $grd->footer = $params['foot']; |
|
258 | - $grd->pageSize = $params['psize']; |
|
259 | - $grd->pagerLocation = $params['ploc']; |
|
260 | - $grd->pagerClass = $params['pclass']; |
|
261 | - $grd->pagerStyle = $params['pstyle']; |
|
262 | - $o = $grd->render(); |
|
263 | - break; |
|
254 | + $grd->cellPadding = $params['cpad']; |
|
255 | + $grd->cellSpacing = $params['cspace']; |
|
256 | + $grd->header = $params['head']; |
|
257 | + $grd->footer = $params['foot']; |
|
258 | + $grd->pageSize = $params['psize']; |
|
259 | + $grd->pagerLocation = $params['ploc']; |
|
260 | + $grd->pagerClass = $params['pclass']; |
|
261 | + $grd->pagerStyle = $params['pstyle']; |
|
262 | + $o = $grd->render(); |
|
263 | + break; |
|
264 | 264 | |
265 | - case 'htmlentities': |
|
266 | - $value = parseInput($value); |
|
267 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
268 | - // remove delimiter from checkbox and listbox-multiple TVs |
|
269 | - $value = str_replace('||', '', $value); |
|
270 | - } |
|
271 | - $o = htmlentities($value, ENT_NOQUOTES, $modx->config['modx_charset']); |
|
272 | - break; |
|
265 | + case 'htmlentities': |
|
266 | + $value = parseInput($value); |
|
267 | + if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
268 | + // remove delimiter from checkbox and listbox-multiple TVs |
|
269 | + $value = str_replace('||', '', $value); |
|
270 | + } |
|
271 | + $o = htmlentities($value, ENT_NOQUOTES, $modx->config['modx_charset']); |
|
272 | + break; |
|
273 | 273 | |
274 | - case 'custom_widget': |
|
275 | - $widget_output = ''; |
|
276 | - $o = ''; |
|
277 | - /* If we are loading a file */ |
|
278 | - if(substr($params['output'], 0, 5) == "@FILE") { |
|
279 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 6)); |
|
280 | - if(!file_exists($file_name)) { |
|
281 | - $widget_output = $file_name . ' does not exist'; |
|
282 | - } else { |
|
283 | - $widget_output = file_get_contents($file_name); |
|
284 | - } |
|
285 | - } elseif(substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 9)); |
|
287 | - if(!file_exists($file_name)) { |
|
288 | - $widget_output = $file_name . ' does not exist'; |
|
289 | - } else { |
|
290 | - /* The included file needs to set $widget_output. Can be string, array, object */ |
|
291 | - include $file_name; |
|
292 | - } |
|
293 | - } elseif(substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
294 | - $chunk_name = trim(substr($params['output'], 7)); |
|
295 | - $widget_output = $modx->getChunk($chunk_name); |
|
296 | - } elseif(substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
297 | - $eval_str = trim(substr($params['output'], 6)); |
|
298 | - $widget_output = eval($eval_str); |
|
299 | - } elseif($value !== '') { |
|
300 | - $widget_output = $params['output']; |
|
301 | - } else { |
|
302 | - $widget_output = ''; |
|
303 | - } |
|
304 | - if(is_string($widget_output)) { |
|
305 | - $_ = $modx->config['enable_filter']; |
|
306 | - $modx->config['enable_filter'] = 1; |
|
307 | - $widget_output = $modx->parseText($widget_output, array('value' => $value)); |
|
308 | - $modx->config['enable_filter'] = $_; |
|
309 | - $o = $modx->parseDocumentSource($widget_output); |
|
310 | - } else { |
|
311 | - $o = $widget_output; |
|
312 | - } |
|
313 | - break; |
|
274 | + case 'custom_widget': |
|
275 | + $widget_output = ''; |
|
276 | + $o = ''; |
|
277 | + /* If we are loading a file */ |
|
278 | + if(substr($params['output'], 0, 5) == "@FILE") { |
|
279 | + $file_name = MODX_BASE_PATH . trim(substr($params['output'], 6)); |
|
280 | + if(!file_exists($file_name)) { |
|
281 | + $widget_output = $file_name . ' does not exist'; |
|
282 | + } else { |
|
283 | + $widget_output = file_get_contents($file_name); |
|
284 | + } |
|
285 | + } elseif(substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | + $file_name = MODX_BASE_PATH . trim(substr($params['output'], 9)); |
|
287 | + if(!file_exists($file_name)) { |
|
288 | + $widget_output = $file_name . ' does not exist'; |
|
289 | + } else { |
|
290 | + /* The included file needs to set $widget_output. Can be string, array, object */ |
|
291 | + include $file_name; |
|
292 | + } |
|
293 | + } elseif(substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
294 | + $chunk_name = trim(substr($params['output'], 7)); |
|
295 | + $widget_output = $modx->getChunk($chunk_name); |
|
296 | + } elseif(substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
297 | + $eval_str = trim(substr($params['output'], 6)); |
|
298 | + $widget_output = eval($eval_str); |
|
299 | + } elseif($value !== '') { |
|
300 | + $widget_output = $params['output']; |
|
301 | + } else { |
|
302 | + $widget_output = ''; |
|
303 | + } |
|
304 | + if(is_string($widget_output)) { |
|
305 | + $_ = $modx->config['enable_filter']; |
|
306 | + $modx->config['enable_filter'] = 1; |
|
307 | + $widget_output = $modx->parseText($widget_output, array('value' => $value)); |
|
308 | + $modx->config['enable_filter'] = $_; |
|
309 | + $o = $modx->parseDocumentSource($widget_output); |
|
310 | + } else { |
|
311 | + $o = $widget_output; |
|
312 | + } |
|
313 | + break; |
|
314 | 314 | |
315 | - default: |
|
316 | - $value = parseInput($value); |
|
317 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
318 | - // add separator |
|
319 | - $value = explode('||', $value); |
|
320 | - $value = implode($sep, $value); |
|
321 | - } |
|
322 | - $o = $value; |
|
323 | - break; |
|
324 | - } |
|
325 | - return $o; |
|
315 | + default: |
|
316 | + $value = parseInput($value); |
|
317 | + if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
318 | + // add separator |
|
319 | + $value = explode('||', $value); |
|
320 | + $value = implode($sep, $value); |
|
321 | + } |
|
322 | + $o = $value; |
|
323 | + break; |
|
324 | + } |
|
325 | + return $o; |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | function decodeParamValue($s) { |
329 | - $s = str_replace("%3D", '=', $s); // = |
|
330 | - $s = str_replace("%26", '&', $s); // & |
|
331 | - return $s; |
|
329 | + $s = str_replace("%3D", '=', $s); // = |
|
330 | + $s = str_replace("%26", '&', $s); // & |
|
331 | + return $s; |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | // returns an array if a delimiter is present. returns array is a recordset is present |
335 | 335 | function parseInput($src, $delim = "||", $type = "string", $columns = true) { // type can be: string, array |
336 | - global $modx; |
|
337 | - if($modx->db->isResult($src)) { |
|
338 | - // must be a recordset |
|
339 | - $rows = array(); |
|
340 | - while($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
341 | - return ($type == "array") ? $rows : implode($delim, $rows); |
|
342 | - } else { |
|
343 | - // must be a text |
|
344 | - if($type == "array") { |
|
345 | - return explode($delim, $src); |
|
346 | - } else { |
|
347 | - return $src; |
|
348 | - } |
|
349 | - } |
|
336 | + global $modx; |
|
337 | + if($modx->db->isResult($src)) { |
|
338 | + // must be a recordset |
|
339 | + $rows = array(); |
|
340 | + while($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
341 | + return ($type == "array") ? $rows : implode($delim, $rows); |
|
342 | + } else { |
|
343 | + // must be a text |
|
344 | + if($type == "array") { |
|
345 | + return explode($delim, $src); |
|
346 | + } else { |
|
347 | + return $src; |
|
348 | + } |
|
349 | + } |
|
350 | 350 | } |
351 | 351 | |
352 | 352 | function getUnixtimeFromDateString($value) { |
353 | - $timestamp = false; |
|
354 | - // Check for MySQL or legacy style date |
|
355 | - $date_match_1 = '/^([0-9]{2})-([0-9]{2})-([0-9]{4})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
356 | - $date_match_2 = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
357 | - $matches = array(); |
|
358 | - if(strpos($value, '-') !== false) { |
|
359 | - if(preg_match($date_match_1, $value, $matches)) { |
|
360 | - $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); |
|
361 | - } elseif(preg_match($date_match_2, $value, $matches)) { |
|
362 | - $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
|
363 | - } |
|
364 | - } |
|
365 | - // If those didn't work, use strtotime to figure out the date |
|
366 | - if($timestamp === false || $timestamp === -1) { |
|
367 | - $timestamp = strtotime($value); |
|
368 | - } |
|
369 | - return $timestamp; |
|
353 | + $timestamp = false; |
|
354 | + // Check for MySQL or legacy style date |
|
355 | + $date_match_1 = '/^([0-9]{2})-([0-9]{2})-([0-9]{4})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
356 | + $date_match_2 = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
357 | + $matches = array(); |
|
358 | + if(strpos($value, '-') !== false) { |
|
359 | + if(preg_match($date_match_1, $value, $matches)) { |
|
360 | + $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); |
|
361 | + } elseif(preg_match($date_match_2, $value, $matches)) { |
|
362 | + $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
|
363 | + } |
|
364 | + } |
|
365 | + // If those didn't work, use strtotime to figure out the date |
|
366 | + if($timestamp === false || $timestamp === -1) { |
|
367 | + $timestamp = strtotime($value); |
|
368 | + } |
|
369 | + return $timestamp; |
|
370 | 370 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /* |
|
2 | + /* |
|
3 | 3 | * MODX Manager Home Page Implmentation by pixelchutes (www.pixelchutes.com) |
4 | 4 | * Based on kudo's kRSS Module v1.0.72 |
5 | 5 | * |
@@ -30,43 +30,43 @@ discard block |
||
30 | 30 | require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc'); |
31 | 31 | // Convert relative path into absolute url |
32 | 32 | function rel2abs( $rel, $base ) { |
33 | - // parse base URL and convert to local variables: $scheme, $host, $path |
|
34 | - extract( parse_url( $base ) ); |
|
35 | - if ( strpos( $rel,"//" ) === 0 ) { |
|
36 | - return $scheme . ':' . $rel; |
|
37 | - } |
|
38 | - // return if already absolute URL |
|
39 | - if ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) { |
|
40 | - return $rel; |
|
41 | - } |
|
42 | - // queries and anchors |
|
43 | - if ( $rel[0] == '#' || $rel[0] == '?' ) { |
|
44 | - return $base . $rel; |
|
45 | - } |
|
46 | - // remove non-directory element from path |
|
47 | - $path = preg_replace( '#/[^/]*$#', '', $path ); |
|
48 | - // destroy path if relative url points to root |
|
49 | - if ( $rel[0] == '/' ) { |
|
50 | - $path = ''; |
|
51 | - } |
|
52 | - // dirty absolute URL |
|
53 | - $abs = $host . $path . "/" . $rel; |
|
54 | - // replace '//' or '/./' or '/foo/../' with '/' |
|
55 | - $abs = preg_replace( "/(\/\.?\/)/", "/", $abs ); |
|
56 | - $abs = preg_replace( "/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs ); |
|
57 | - // absolute URL is ready! |
|
58 | - return $scheme . '://' . $abs; |
|
33 | + // parse base URL and convert to local variables: $scheme, $host, $path |
|
34 | + extract( parse_url( $base ) ); |
|
35 | + if ( strpos( $rel,"//" ) === 0 ) { |
|
36 | + return $scheme . ':' . $rel; |
|
37 | + } |
|
38 | + // return if already absolute URL |
|
39 | + if ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) { |
|
40 | + return $rel; |
|
41 | + } |
|
42 | + // queries and anchors |
|
43 | + if ( $rel[0] == '#' || $rel[0] == '?' ) { |
|
44 | + return $base . $rel; |
|
45 | + } |
|
46 | + // remove non-directory element from path |
|
47 | + $path = preg_replace( '#/[^/]*$#', '', $path ); |
|
48 | + // destroy path if relative url points to root |
|
49 | + if ( $rel[0] == '/' ) { |
|
50 | + $path = ''; |
|
51 | + } |
|
52 | + // dirty absolute URL |
|
53 | + $abs = $host . $path . "/" . $rel; |
|
54 | + // replace '//' or '/./' or '/foo/../' with '/' |
|
55 | + $abs = preg_replace( "/(\/\.?\/)/", "/", $abs ); |
|
56 | + $abs = preg_replace( "/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs ); |
|
57 | + // absolute URL is ready! |
|
58 | + return $scheme . '://' . $abs; |
|
59 | 59 | } |
60 | 60 | $feedData = array(); |
61 | 61 | |
62 | 62 | // create Feed |
63 | 63 | foreach ($urls as $section=>$url) { |
64 | - $output = ''; |
|
64 | + $output = ''; |
|
65 | 65 | $rss = @fetch_rss($url); |
66 | 66 | if( !$rss ){ |
67 | - $feedData[$section] = 'Failed to retrieve ' . $url; |
|
68 | - continue; |
|
69 | - } |
|
67 | + $feedData[$section] = 'Failed to retrieve ' . $url; |
|
68 | + continue; |
|
69 | + } |
|
70 | 70 | $output .= '<ul>'; |
71 | 71 | |
72 | 72 | $items = array_slice($rss->items, 0, $itemsNumber); |
@@ -84,6 +84,6 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | $output .= '</ul>'; |
87 | - $feedData[$section] = $output; |
|
87 | + $feedData[$section] = $output; |
|
88 | 88 | } |
89 | 89 | ?> |
@@ -11,19 +11,19 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | function secureWebDocument($docid='') { |
14 | - global $modx; |
|
14 | + global $modx; |
|
15 | 15 | |
16 | - $modx->db->update('privateweb = 0', $modx->getFullTableName("site_content"), ($docid>0 ? "id='$docid'":"privateweb = 1")); |
|
17 | - $rs = $modx->db->select( |
|
18 | - 'DISTINCT sc.id', |
|
19 | - $modx->getFullTableName("site_content")." sc |
|
16 | + $modx->db->update('privateweb = 0', $modx->getFullTableName("site_content"), ($docid>0 ? "id='$docid'":"privateweb = 1")); |
|
17 | + $rs = $modx->db->select( |
|
18 | + 'DISTINCT sc.id', |
|
19 | + $modx->getFullTableName("site_content")." sc |
|
20 | 20 | LEFT JOIN ".$modx->getFullTableName("document_groups")." dg ON dg.document = sc.id |
21 | 21 | LEFT JOIN ".$modx->getFullTableName("webgroup_access")." wga ON wga.documentgroup = dg.document_group", |
22 | - ($docid>0 ? " sc.id='{$docid}' AND ":"")."wga.id>0" |
|
23 | - ); |
|
24 | - $ids = $modx->db->getColumn("id",$rs); |
|
25 | - if(count($ids)>0) { |
|
26 | - $modx->db->update('privateweb = 1', $modx->getFullTableName("site_content"), "id IN (".implode(", ",$ids).")"); |
|
27 | - } |
|
22 | + ($docid>0 ? " sc.id='{$docid}' AND ":"")."wga.id>0" |
|
23 | + ); |
|
24 | + $ids = $modx->db->getColumn("id",$rs); |
|
25 | + if(count($ids)>0) { |
|
26 | + $modx->db->update('privateweb = 1', $modx->getFullTableName("site_content"), "id IN (".implode(", ",$ids).")"); |
|
27 | + } |
|
28 | 28 | } |
29 | 29 | ?> |
30 | 30 | \ No newline at end of file |
@@ -51,7 +51,7 @@ |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | if($emptyCache) { |
54 | - $modx->clearCache('full'); |
|
54 | + $modx->clearCache('full'); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | echo $str; |
58 | 58 | \ No newline at end of file |