PageRenderTime 37ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/manager/index.php

https://github.com/dreeman/modx106
PHP | 948 lines | 573 code | 44 blank | 331 comment | 43 complexity | b56cea8097df3ff1e80fafd047b5e2a2 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, BSD-3-Clause
  1. <?php
  2. /*
  3. *************************************************************************
  4. MODx Content Management System and PHP Application Framework
  5. Managed and maintained by Raymond Irving, Ryan Thrash and the
  6. MODx community
  7. *************************************************************************
  8. MODx is an opensource PHP/MySQL content management system and content
  9. management framework that is flexible, adaptable, supports XHTML/CSS
  10. layouts, and works with most web browsers, including Safari.
  11. MODx is distributed under the GNU General Public License
  12. *************************************************************************
  13. MODx CMS and Application Framework ("MODx")
  14. Copyright 2005 and forever thereafter by Raymond Irving & Ryan Thrash.
  15. All rights reserved.
  16. This file and all related or dependant files distributed with this filie
  17. are considered as a whole to make up MODx.
  18. MODx is free software; you can redistribute it and/or modify
  19. it under the terms of the GNU General Public License as published by
  20. the Free Software Foundation; either version 2 of the License, or
  21. (at your option) any later version.
  22. MODx is distributed in the hope that it will be useful,
  23. but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. GNU General Public License for more details.
  26. You should have received a copy of the GNU General Public License
  27. along with MODx (located in "/assets/docs/"); if not, write to the Free Software
  28. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  29. For more information on MODx please visit http://modxcms.com/
  30. **************************************************************************
  31. Originally based on Etomite by Alex Butter
  32. **************************************************************************
  33. */
  34. /**
  35. * Filename: manager/index.php
  36. * Function: This file is the main root file for MODx. It is
  37. * only file that will be directly requested, and
  38. * depending on the request, will branch different
  39. * content
  40. */
  41. /*!!! quotes FIX*/
  42. function magic_quotes_gpc_off() {
  43. if (!get_magic_quotes_gpc()) {return;}
  44. function array_stripslashes($array) {
  45. return is_array($array) ? array_map("array_stripslashes", $array) : stripslashes($array);
  46. }
  47. $_GET = array_stripslashes($_GET);
  48. $_POST = array_stripslashes($_POST);
  49. $_COOKIE = array_stripslashes($_COOKIE);
  50. }
  51. magic_quotes_gpc_off();
  52. /*!!! end quotes FIX*/
  53. // get start time
  54. $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime;
  55. define("IN_MANAGER_MODE", "true"); // we use this to make sure files are accessed through
  56. // the manager instead of seperately.
  57. // harden it
  58. require_once('./includes/protect.inc.php');
  59. // send anti caching headers
  60. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  61. header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  62. header("Cache-Control: no-store, no-cache, must-revalidate");
  63. header("Cache-Control: post-check=0, pre-check=0", false);
  64. header("Pragma: no-cache");
  65. header("X-UA-Compatible: IE=edge;FF=3;OtherUA=4");
  66. // set error reporting
  67. error_reporting(E_ALL & ~E_NOTICE);
  68. // check PHP version. MODX Evolution is compatible with php 4 (4.3.3+)
  69. $php_ver_comp = version_compare(phpversion(), "4.3.3");
  70. // -1 if left is less, 0 if equal, +1 if left is higher
  71. if($php_ver_comp < 0) {
  72. echo sprintf($_lang['php_version_check'], phpversion());
  73. exit;
  74. }
  75. // set some runtime options
  76. $incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond
  77. set_include_path(get_include_path() . PATH_SEPARATOR . $incPath);
  78. if (version_compare(phpversion(), "5.3") < 0) {
  79. @set_magic_quotes_runtime(0);
  80. // include_once the magic_quotes_gpc workaround
  81. include_once "quotes_stripper.inc.php";
  82. }
  83. if (!defined("ENT_COMPAT")) define("ENT_COMPAT", 2);
  84. if (!defined("ENT_NOQUOTES")) define("ENT_NOQUOTES", 0);
  85. if (!defined("ENT_QUOTES")) define("ENT_QUOTES", 3);
  86. // set the document_root :|
  87. if(!isset($_SERVER["DOCUMENT_ROOT"]) || empty($_SERVER["DOCUMENT_ROOT"])) {
  88. $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PATH_INFO"], "", preg_replace("/\\\\/", "/", $_SERVER["PATH_TRANSLATED"]))."/";
  89. }
  90. define("IN_ETOMITE_SYSTEM", "true"); // for backward compatibility with 0.6
  91. // include_once config file
  92. $config_filename = "./includes/config.inc.php";
  93. if (!file_exists($config_filename)) {
  94. echo "<h3>Unable to load configuration settings</h3>";
  95. echo "Please run the MODx <a href='../install'>install utility</a>";
  96. exit;
  97. }
  98. // include the database configuration file
  99. include_once "config.inc.php";
  100. // initiate the content manager class
  101. include_once "document.parser.class.inc.php";
  102. $modx = new DocumentParser;
  103. $modx->loadExtension("ManagerAPI");
  104. $modx->getSettings();
  105. $etomite = &$modx; // for backward compatibility
  106. // connect to the database
  107. if(@!$modxDBConn = mysql_connect($database_server, $database_user, $database_password)) {
  108. die("<h2>Failed to create the database connection!</h2>. Please run the MODx <a href='../install'>install utility</a>");
  109. } else {
  110. mysql_select_db(str_replace('`', '', $dbase));
  111. @mysql_query("{$database_connection_method} {$database_connection_charset}");
  112. }
  113. // start session
  114. startCMSSession();
  115. // get the settings from the database
  116. include_once "settings.inc.php";
  117. // get the user settings from the database
  118. include_once "user_settings.inc.php";
  119. // include_once the language file
  120. if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) {
  121. $manager_language = "english"; // if not set, get the english language file.
  122. }
  123. $_lang = array();
  124. include_once "lang/english.inc.php";
  125. $length_eng_lang = count($_lang);
  126. if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) {
  127. include_once "lang/".$manager_language.".inc.php";
  128. }
  129. // send the charset header
  130. header('Content-Type: text/html; charset='.$modx_manager_charset);
  131. // include version info
  132. include_once "version.inc.php";
  133. // accesscontrol.php checks to see if the user is logged in. If not, a log in form is shown
  134. include_once "accesscontrol.inc.php";
  135. // double check the session
  136. if(!isset($_SESSION['mgrValidated'])){
  137. echo "Not Logged In!";
  138. exit;
  139. }
  140. // include_once the style variables file
  141. if(isset($manager_theme) && !isset($_style)) {
  142. $_style = array();
  143. include_once "media/style/".$manager_theme."/style.php";
  144. }
  145. // check if user is allowed to access manager interface
  146. if(isset($allow_manager_access) && $allow_manager_access==0) {
  147. include_once "manager.lockout.inc.php";
  148. }
  149. // include_once the error handler
  150. include_once "error.class.inc.php";
  151. $e = new errorHandler;
  152. // Initialize System Alert Message Queque
  153. if (!isset($_SESSION['SystemAlertMsgQueque'])) $_SESSION['SystemAlertMsgQueque'] = array();
  154. $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque'];
  155. // first we check to see if this is a frameset request
  156. if(!isset($_POST['a']) && !isset($_GET['a']) && ($e->getError()==0) && !isset($_POST['updateMsgCount'])) {
  157. // this looks to be a top-level frameset request, so let's serve up a frameset
  158. include_once "frames/1.php";
  159. exit;
  160. }
  161. // OK, let's retrieve the action directive from the request
  162. if(isset($_GET['a']) && isset($_POST['a'])) {
  163. $e->setError(100);
  164. $e->dumpError();
  165. // set $e to a corresponding errorcode
  166. // we know that if an error occurs here, something's wrong,
  167. // so we dump the error, thereby stopping the script.
  168. } else {
  169. $action= (int) $_REQUEST['a'];
  170. }
  171. if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) {
  172. include_once 'messageCount.inc.php';
  173. }
  174. // save page to manager object
  175. $modx->manager->action = $action;
  176. // attempt to foil some simple types of CSRF attacks
  177. if (isset($modx->config['validate_referer']) && intval($modx->config['validate_referer'])) {
  178. if (isset($_SERVER['HTTP_REFERER'])) {
  179. $referer = $_SERVER['HTTP_REFERER'];
  180. if (!empty($referer)) {
  181. if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) {
  182. echo "A possible CSRF attempt was detected from referer: {$referer}.";
  183. exit();
  184. }
  185. } else {
  186. echo "A possible CSRF attempt was detected. No referer was provided by the client.";
  187. exit();
  188. }
  189. } else {
  190. echo "A possible CSRF attempt was detected. No referer was provided by the server.";
  191. exit();
  192. }
  193. }
  194. // invoke OnManagerPageInit event
  195. $modx->invokeEvent("OnManagerPageInit", array("action" => $action));
  196. // Now we decide what to do according to the action request. This is a BIG list :)
  197. switch ($action) {
  198. /********************************************************************/
  199. /* frame management - show the requested frame */
  200. /********************************************************************/
  201. case 1 :
  202. // get the requested frame
  203. $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']);
  204. if($frame>9) {
  205. $enable_debug=false; // this is to stop the debug thingy being attached to the framesets
  206. }
  207. include_once "frames/".$frame.".php";
  208. break;
  209. /********************************************************************/
  210. /* show the homepage */
  211. /********************************************************************/
  212. case 2:
  213. // get the home page
  214. include_once "header.inc.php";
  215. include_once "actions/welcome.static.php";
  216. include_once "footer.inc.php";
  217. break;
  218. /********************************************************************/
  219. /* document data */
  220. /********************************************************************/
  221. case 3:
  222. // get the page to show document's data
  223. include_once "header.inc.php";
  224. include_once "actions/document_data.static.php";
  225. include_once "footer.inc.php";
  226. break;
  227. /********************************************************************/
  228. /* content management */
  229. /********************************************************************/
  230. case 85:
  231. // get the mutate page for adding a folder
  232. include_once "header.inc.php";
  233. include_once "actions/mutate_content.dynamic.php";
  234. include_once "footer.inc.php";
  235. break;
  236. case 27:
  237. // get the mutate page for changing content
  238. include_once "header.inc.php";
  239. include_once "actions/mutate_content.dynamic.php";
  240. include_once "footer.inc.php";
  241. break;
  242. case 4:
  243. // get the mutate page for adding content
  244. include_once "header.inc.php";
  245. include_once "actions/mutate_content.dynamic.php";
  246. include_once "footer.inc.php";
  247. break;
  248. case 5:
  249. // get the save processor
  250. include_once "processors/save_content.processor.php";
  251. break;
  252. case 6:
  253. // get the delete processor
  254. include_once "processors/delete_content.processor.php";
  255. break;
  256. case 63:
  257. // get the undelete processor
  258. include_once "processors/undelete_content.processor.php";
  259. break;
  260. case 51:
  261. // get the move action
  262. include_once "header.inc.php";
  263. include_once "actions/move_document.dynamic.php";
  264. include_once "footer.inc.php";
  265. break;
  266. case 52:
  267. // get the move document processor
  268. include_once "processors/move_document.processor.php";
  269. break;
  270. case 61:
  271. // get the processor for publishing content
  272. include_once "processors/publish_content.processor.php";
  273. break;
  274. case 62:
  275. // get the processor for publishing content
  276. include_once "processors/unpublish_content.processor.php";
  277. break;
  278. /********************************************************************/
  279. /* show the wait page - gives the tree time to refresh (hopefully) */
  280. /********************************************************************/
  281. case 7:
  282. // get the wait page (so the tree can reload)
  283. include_once "header.inc.php";
  284. include_once "actions/wait.static.php";
  285. include_once "footer.inc.php";
  286. break;
  287. /********************************************************************/
  288. /* let the user log out */
  289. /********************************************************************/
  290. case 8:
  291. // get the logout processor
  292. include_once "processors/logout.processor.php";
  293. break;
  294. /********************************************************************/
  295. /* user management */
  296. /********************************************************************/
  297. case 87:
  298. // get the new web user page
  299. include_once "header.inc.php";
  300. include_once "actions/mutate_web_user.dynamic.php";
  301. include_once "footer.inc.php";
  302. break;
  303. case 88:
  304. // get the edit web user page
  305. include_once "header.inc.php";
  306. include_once "actions/mutate_web_user.dynamic.php";
  307. include_once "footer.inc.php";
  308. break;
  309. case 89:
  310. // get the save web user processor
  311. include_once "processors/save_web_user.processor.php";
  312. break;
  313. case 90:
  314. // get the delete web user page
  315. include_once "processors/delete_web_user.processor.php";
  316. break;
  317. case 11:
  318. // get the new user page
  319. include_once "header.inc.php";
  320. include_once "actions/mutate_user.dynamic.php";
  321. include_once "footer.inc.php";
  322. break;
  323. case 12:
  324. // get the edit user page
  325. include_once "header.inc.php";
  326. include_once "actions/mutate_user.dynamic.php";
  327. include_once "footer.inc.php";
  328. break;
  329. case 32:
  330. // get the save user processor
  331. include_once "processors/save_user.processor.php";
  332. break;
  333. case 28:
  334. // get the change password page
  335. include_once "header.inc.php";
  336. include_once "actions/mutate_password.dynamic.php";
  337. include_once "footer.inc.php";
  338. break;
  339. case 34:
  340. // get the save new password page
  341. include_once "processors/save_password.processor.php";
  342. break;
  343. case 33:
  344. // get the delete user page
  345. include_once "processors/delete_user.processor.php";
  346. break;
  347. /********************************************************************/
  348. /* role management */
  349. /********************************************************************/
  350. case 38:
  351. // get the new role page
  352. include_once "header.inc.php";
  353. include_once "actions/mutate_role.dynamic.php";
  354. include_once "footer.inc.php";
  355. break;
  356. case 35:
  357. // get the edit role page
  358. include_once "header.inc.php";
  359. include_once "actions/mutate_role.dynamic.php";
  360. include_once "footer.inc.php";
  361. break;
  362. case 36:
  363. // get the save role page
  364. include_once "processors/save_role.processor.php";
  365. break;
  366. case 37:
  367. // get the delete role page
  368. include_once "processors/delete_role.processor.php";
  369. break;
  370. /********************************************************************/
  371. /* template management */
  372. /********************************************************************/
  373. case 16:
  374. // get the edit template action
  375. include_once "header.inc.php";
  376. include_once "actions/mutate_templates.dynamic.php";
  377. include_once "footer.inc.php";
  378. break;
  379. case 19:
  380. // get the new template action
  381. include_once "header.inc.php";
  382. include_once "actions/mutate_templates.dynamic.php";
  383. include_once "footer.inc.php";
  384. break;
  385. case 20:
  386. // get the save processor
  387. include_once "processors/save_template.processor.php";
  388. break;
  389. case 21:
  390. // get the delete processor
  391. include_once "processors/delete_template.processor.php";
  392. break;
  393. case 96:
  394. // get the duplicate template processor
  395. include_once "processors/duplicate_template.processor.php";
  396. break;
  397. case 117:
  398. // change the tv rank for selected template
  399. //include_once "header.inc.php"; - in action file
  400. include_once "actions/mutate_template_tv_rank.dynamic.php";
  401. include_once "footer.inc.php";
  402. break;
  403. /********************************************************************/
  404. /* snippet management */
  405. /********************************************************************/
  406. case 22:
  407. // get the edit snippet action
  408. include_once "header.inc.php";
  409. include_once "actions/mutate_snippet.dynamic.php";
  410. include_once "footer.inc.php";
  411. break;
  412. case 23:
  413. // get the new snippet action
  414. include_once "header.inc.php";
  415. include_once "actions/mutate_snippet.dynamic.php";
  416. include_once "footer.inc.php";
  417. break;
  418. case 24:
  419. // get the save processor
  420. include_once "processors/save_snippet.processor.php";
  421. break;
  422. case 25:
  423. // get the delete processor
  424. include_once "processors/delete_snippet.processor.php";
  425. break;
  426. case 98:
  427. // get the duplicate processor
  428. include_once "processors/duplicate_snippet.processor.php";
  429. break;
  430. /********************************************************************/
  431. /* htmlsnippet management */
  432. /********************************************************************/
  433. case 78:
  434. // get the edit snippet action
  435. include_once "header.inc.php";
  436. include_once "actions/mutate_htmlsnippet.dynamic.php";
  437. include_once "footer.inc.php";
  438. break;
  439. case 77:
  440. // get the new snippet action
  441. include_once "header.inc.php";
  442. include_once "actions/mutate_htmlsnippet.dynamic.php";
  443. include_once "footer.inc.php";
  444. break;
  445. case 79:
  446. // get the save processor
  447. include_once "processors/save_htmlsnippet.processor.php";
  448. break;
  449. case 80:
  450. // get the delete processor
  451. include_once "processors/delete_htmlsnippet.processor.php";
  452. break;
  453. case 97:
  454. // get the duplicate processor
  455. include_once "processors/duplicate_htmlsnippet.processor.php";
  456. break;
  457. /********************************************************************/
  458. /* show the credits page */
  459. /********************************************************************/
  460. case 18:
  461. // get the credits page
  462. include_once "header.inc.php";
  463. include_once "actions/credits.static.php";
  464. include_once "footer.inc.php";
  465. break;
  466. /********************************************************************/
  467. /* empty cache & synchronisation */
  468. /********************************************************************/
  469. case 26:
  470. // get the cache emptying processor
  471. include_once "header.inc.php";
  472. include_once "actions/refresh_site.dynamic.php";
  473. include_once "footer.inc.php";
  474. break;
  475. /********************************************************************/
  476. /* Module management */
  477. /********************************************************************/
  478. case 106:
  479. // get module management
  480. include_once "header.inc.php";
  481. include_once "actions/modules.static.php";
  482. include_once "footer.inc.php";
  483. break;
  484. case 107:
  485. // get the new module action
  486. include_once "header.inc.php";
  487. include_once "actions/mutate_module.dynamic.php";
  488. include_once "footer.inc.php";
  489. break;
  490. case 108:
  491. // get the edit module action
  492. include_once "header.inc.php";
  493. include_once "actions/mutate_module.dynamic.php";
  494. include_once "footer.inc.php";
  495. break;
  496. case 109:
  497. // get the save processor
  498. include_once "processors/save_module.processor.php";
  499. break;
  500. case 110:
  501. // get the delete processor
  502. include_once "processors/delete_module.processor.php";
  503. break;
  504. case 111:
  505. // get the duplicate processor
  506. include_once "processors/duplicate_module.processor.php";
  507. break;
  508. case 112:
  509. // execute/run the module
  510. //include_once "header.inc.php";
  511. include_once "processors/execute_module.processor.php";
  512. //include_once "footer.inc.php";
  513. break;
  514. case 113:
  515. // get the module resources (dependencies) action
  516. include_once "header.inc.php";
  517. include_once "actions/mutate_module_resources.dynamic.php";
  518. include_once "footer.inc.php";
  519. break;
  520. /********************************************************************/
  521. /* plugin management */
  522. /********************************************************************/
  523. case 100:
  524. // change the plugin priority
  525. //include_once "header.inc.php"; - in action file
  526. include_once "actions/mutate_plugin_priority.dynamic.php";
  527. include_once "footer.inc.php";
  528. break;
  529. case 101:
  530. // get the new plugin action
  531. include_once "header.inc.php";
  532. include_once "actions/mutate_plugin.dynamic.php";
  533. include_once "footer.inc.php";
  534. break;
  535. case 102:
  536. // get the edit plugin action
  537. include_once "header.inc.php";
  538. include_once "actions/mutate_plugin.dynamic.php";
  539. include_once "footer.inc.php";
  540. break;
  541. case 103:
  542. // get the save processor
  543. include_once "processors/save_plugin.processor.php";
  544. break;
  545. case 104:
  546. // get the delete processor
  547. include_once "processors/delete_plugin.processor.php";
  548. break;
  549. case 105:
  550. // get the duplicate processor
  551. include_once "processors/duplicate_plugin.processor.php";
  552. break;
  553. /********************************************************************/
  554. /* view phpinfo */
  555. /********************************************************************/
  556. case 200:
  557. // show phpInfo
  558. if($modx->hasPermission('logs')) {
  559. include_once "header.inc.php";
  560. include_once "actions/phpinfo.static.php";
  561. include_once "footer.inc.php";
  562. }
  563. break;
  564. /********************************************************************/
  565. /* errorpage */
  566. /********************************************************************/
  567. case 29:
  568. // get the error page
  569. include_once "actions/error_dialog.static.php";
  570. break;
  571. /********************************************************************/
  572. /* file manager */
  573. /********************************************************************/
  574. case 31:
  575. // get the page to manage files
  576. include_once "header.inc.php";
  577. include_once "actions/files.dynamic.php";
  578. include_once "footer.inc.php";
  579. break;
  580. /********************************************************************/
  581. /* access permissions */
  582. /********************************************************************/
  583. case 40:
  584. include_once "header.inc.php";
  585. include_once "actions/access_permissions.dynamic.php";
  586. include_once "footer.inc.php";
  587. break;
  588. case 91:
  589. include_once "header.inc.php";
  590. include_once "actions/web_access_permissions.dynamic.php";
  591. include_once "footer.inc.php";
  592. break;
  593. /********************************************************************/
  594. /* access groups processor */
  595. /********************************************************************/
  596. case 41:
  597. include_once "processors/access_groups.processor.php";
  598. break;
  599. case 92:
  600. include_once "processors/web_access_groups.processor.php";
  601. break;
  602. /********************************************************************/
  603. /* settings editor */
  604. /********************************************************************/
  605. case 17:
  606. // get the settings editor
  607. include_once "header.inc.php";
  608. include_once "actions/mutate_settings.dynamic.php";
  609. include_once "footer.inc.php";
  610. break;
  611. case 118:
  612. // call settings ajax include
  613. ob_clean();
  614. include_once "includes/mutate_settings.ajax.php";
  615. break;
  616. /********************************************************************/
  617. /* save settings */
  618. /********************************************************************/
  619. case 30:
  620. // get the save settings processor
  621. include_once "processors/save_settings.processor.php";
  622. break;
  623. /********************************************************************/
  624. /* system information */
  625. /********************************************************************/
  626. case 53:
  627. // get the settings editor
  628. include_once "header.inc.php";
  629. include_once "actions/sysinfo.static.php";
  630. include_once "footer.inc.php";
  631. break;
  632. /********************************************************************/
  633. /* optimise table */
  634. /********************************************************************/
  635. case 54:
  636. // get the table optimizer/truncate processor
  637. include_once "processors/optimize_table.processor.php";
  638. break;
  639. /********************************************************************/
  640. /* view logging */
  641. /********************************************************************/
  642. case 13:
  643. // view logging
  644. include_once "header.inc.php";
  645. include_once "actions/logging.static.php";
  646. include_once "footer.inc.php";
  647. break;
  648. /********************************************************************/
  649. /* empty logs */
  650. /********************************************************************/
  651. case 55:
  652. // get the settings editor
  653. include_once "processors/empty_table.processor.php";
  654. break;
  655. /********************************************************************/
  656. /* calls test page */
  657. /********************************************************************/
  658. case 999:
  659. // get the test page
  660. include_once "header.inc.php";
  661. include_once "test_page.php";
  662. include_once "footer.inc.php";
  663. break;
  664. /********************************************************************/
  665. /* Empty recycle bin */
  666. /********************************************************************/
  667. case 64:
  668. // get the Recycle bin emptier
  669. include_once "processors/remove_content.processor.php";
  670. break;
  671. /********************************************************************/
  672. /* Messages */
  673. /********************************************************************/
  674. case 10:
  675. // get the messages page
  676. include_once "header.inc.php";
  677. include_once "actions/messages.static.php";
  678. include_once "footer.inc.php";
  679. break;
  680. /********************************************************************/
  681. /* Delete a message */
  682. /********************************************************************/
  683. case 65:
  684. // get the message deleter
  685. include_once "processors/delete_message.processor.php";
  686. break;
  687. /********************************************************************/
  688. /* Send a message */
  689. /********************************************************************/
  690. case 66:
  691. // get the message deleter
  692. include_once "processors/send_message.processor.php";
  693. break;
  694. /********************************************************************/
  695. /* Remove locks */
  696. /********************************************************************/
  697. case 67:
  698. // get the lock remover
  699. include_once "processors/remove_locks.processor.php";
  700. break;
  701. /********************************************************************/
  702. /* Site schedule */
  703. /********************************************************************/
  704. case 70:
  705. // get the schedule page
  706. include_once "header.inc.php";
  707. include_once "actions/site_schedule.static.php";
  708. include_once "footer.inc.php";
  709. break;
  710. /********************************************************************/
  711. /* Search */
  712. /********************************************************************/
  713. case 71:
  714. // get the search page
  715. include_once "header.inc.php";
  716. include_once "actions/search.static.php";
  717. include_once "footer.inc.php";
  718. break;
  719. /********************************************************************/
  720. /* About */
  721. /********************************************************************/
  722. case 59:
  723. // get the about page
  724. include_once "header.inc.php";
  725. include_once "actions/about.static.php";
  726. include_once "footer.inc.php";
  727. break;
  728. /********************************************************************/
  729. /* Add weblink */
  730. /********************************************************************/
  731. case 72:
  732. // get the weblink page
  733. include_once "header.inc.php";
  734. include_once "actions/mutate_content.dynamic.php";
  735. include_once "footer.inc.php";
  736. break;
  737. /********************************************************************/
  738. /* User management */
  739. /********************************************************************/
  740. case 75:
  741. include_once "header.inc.php";
  742. include_once "actions/user_management.static.php";
  743. include_once "footer.inc.php";
  744. break;
  745. case 99:
  746. include_once "header.inc.php";
  747. include_once "actions/web_user_management.static.php";
  748. include_once "footer.inc.php";
  749. break;
  750. case 86:
  751. include_once "header.inc.php";
  752. include_once "actions/role_management.static.php";
  753. include_once "footer.inc.php";
  754. break;
  755. /********************************************************************/
  756. /* template/ snippet management */
  757. /********************************************************************/
  758. case 76:
  759. include_once "header.inc.php";
  760. include_once "actions/resources.static.php";
  761. include_once "footer.inc.php";
  762. break;
  763. /********************************************************************/
  764. /* keywords management */
  765. /********************************************************************/
  766. case 81:
  767. include_once "header.inc.php";
  768. include_once "actions/manage_metatags.dynamic.php";
  769. include_once "footer.inc.php";
  770. break;
  771. case 82:
  772. include_once "processors/metatags.processor.php";
  773. break;
  774. /********************************************************************/
  775. /* Export to file */
  776. /********************************************************************/
  777. case 83:
  778. include_once "header.inc.php";
  779. include_once "actions/export_site.static.php";
  780. include_once "footer.inc.php";
  781. break;
  782. /********************************************************************/
  783. /* Resource Selector */
  784. /********************************************************************/
  785. case 84:
  786. include_once "actions/resource_selector.static.php";
  787. break;
  788. /********************************************************************/
  789. /* Backup Manager */
  790. /********************************************************************/
  791. case 93:
  792. # header and footer will be handled interally
  793. include_once "actions/bkmanager.static.php";
  794. break;
  795. /********************************************************************/
  796. /* Duplicate Document */
  797. /********************************************************************/
  798. case 94:
  799. // get the duplicate processor
  800. include_once "processors/duplicate_content.processor.php";
  801. break;
  802. /********************************************************************/
  803. /* Import Document from file */
  804. /********************************************************************/
  805. case 95:
  806. include_once "header.inc.php";
  807. include_once "actions/import_site.static.php";
  808. include_once "footer.inc.php";
  809. break;
  810. /********************************************************************/
  811. /* Help */
  812. /********************************************************************/
  813. case 9:
  814. // get the help page
  815. include_once "header.inc.php";
  816. include_once "actions/help.static.php";
  817. include_once "footer.inc.php";
  818. break;
  819. /********************************************************************/
  820. /* Template Variables - Based on Apodigm's Docvars */
  821. /********************************************************************/
  822. case 300:
  823. // get the new document variable action
  824. include_once "header.inc.php";
  825. include_once "actions/mutate_tmplvars.dynamic.php";
  826. include_once "footer.inc.php";
  827. break;
  828. case 301:
  829. // get the edit document variable action
  830. include_once "header.inc.php";
  831. include_once "actions/mutate_tmplvars.dynamic.php";
  832. include_once "footer.inc.php";
  833. break;
  834. case 302:
  835. // get the save processor
  836. include_once "processors/save_tmplvars.processor.php";
  837. break;
  838. case 303:
  839. // get the delete processor
  840. include_once "processors/delete_tmplvars.processor.php";
  841. break;
  842. case 304:
  843. // get the duplicate processor
  844. include_once "processors/duplicate_tmplvars.processor.php";
  845. break;
  846. /********************************************************************/
  847. /* Event viewer: show event message log */
  848. /********************************************************************/
  849. case 114:
  850. // get event logs
  851. include_once "header.inc.php";
  852. include_once "actions/eventlog.dynamic.php";
  853. include_once "footer.inc.php";
  854. break;
  855. case 115:
  856. // get event log details viewer
  857. include_once "header.inc.php";
  858. include_once "actions/eventlog_details.dynamic.php";
  859. include_once "footer.inc.php";
  860. break;
  861. case 116:
  862. // get the event log delete processor
  863. include_once "processors/delete_eventlog.processor.php";
  864. break;
  865. case 501:
  866. //delete category
  867. include_once "processors/delete_category.processor.php";
  868. break;
  869. /********************************************************************/
  870. /* default action: show not implemented message */
  871. /********************************************************************/
  872. default :
  873. // say that what was requested doesn't do anything yet
  874. include_once "header.inc.php";
  875. echo "
  876. <div class='subTitle'>
  877. <span class='right'>".$_lang['functionnotimpl']."</span>
  878. </div>
  879. <div class='sectionHeader'>".$_lang['functionnotimpl']."</div>
  880. <div class='sectionBody'>
  881. <p>".$_lang['functionnotimpl_message']."</p>
  882. </div>
  883. ";
  884. include_once "footer.inc.php";
  885. }
  886. /********************************************************************/
  887. // log action, unless it's a frame request
  888. if($action!=1 && $action!=7 && $action!=2) {
  889. include_once "log.class.inc.php";
  890. $log = new logHandler;
  891. $log->initAndWriteLog();
  892. }
  893. /********************************************************************/
  894. // show debug
  895. unset($_SESSION['itemname']); // clear this, because it's only set for logging purposes
  896. include_once "debug.inc.php";