PageRenderTime 65ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/manager/index.php

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