PageRenderTime 95ms CodeModel.GetById 33ms RepoModel.GetById 1ms app.codeStats 1ms

/manager/index.php

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