PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/subsystems/lang/deu_DE/exponent.php

https://github.com/exponentcms/exponent-cms-1
PHP | 154 lines | 78 code | 17 blank | 59 comment | 20 complexity | 577120e912ee86fe14ccb431b4069e64 MD5 | raw file
  1. <?php
  2. ##################################################
  3. #
  4. # Copyright (c) 2004-2006 OIC Group, Inc.
  5. # Written and Designed by James Hunt
  6. #
  7. # This file is part of Exponent
  8. #
  9. # Exponent is free software; you can redistribute
  10. # it and/or modify it under the terms of the GNU
  11. # General Public License as published by the Free
  12. # Software Foundation; either version 2 of the
  13. # License, or (at your option) any later version.
  14. #
  15. # GPL: http://www.gnu.org/licenses/gpl.txt
  16. #
  17. ##################################################
  18. function __realpath($path) {
  19. $path = str_replace('\\','/',realpath($path));
  20. if ($path{1} == ':') {
  21. // We can't just check for C:/, because windows users may have the IIS webroot on X: or F:, etc.
  22. $path = substr($path,2);
  23. }
  24. return $path;
  25. }
  26. // Bootstrap, which will clean the _POST, _GET and _REQUEST arrays, and include
  27. // necessary setup files (exponent_setup.php, exponent_variables.php) as well as initialize
  28. // the compatibility layer.
  29. // This was moved into its own file from this file so that 'lighter' scripts could bootstrap.
  30. include_once(dirname(__realpath(__FILE__)).'/exponent_bootstrap.php');
  31. // After config config setup:
  32. // Put session stuff first.
  33. $user = null;
  34. // Initialize the Sessions Subsystem
  35. require_once(BASE.'subsystems/sessions.php');
  36. // Initializes the session. This will populate the $user variable
  37. exponent_sessions_initialize();
  38. if (!isset($_SERVER['QUERY_STRING'])) {
  39. $_SERVER['QUERY_STRING'] = '';
  40. }
  41. // Create a REQUEST_URI for people who don't have one.
  42. // FIXME: Move this code (and other similar platform stuff) into a platform compat layer.
  43. // FIXME:
  44. $_SERVER['REQUEST_URI'] = SCRIPT_RELATIVE.SCRIPT_FILENAME . '?' . $_SERVER['QUERY_STRING'];
  45. if (isset($_REQUEST['section'])) {
  46. exponent_sessions_set('last_section', intval($_REQUEST['section']));
  47. }
  48. if (!defined('DISPLAY_THEME')) {
  49. /* exdoc
  50. * The directory and class name of the current active theme. This may be different
  51. * than the configure theme (DISPLAY_THEME_REAL) due to previewing.
  52. */
  53. define('DISPLAY_THEME',DISPLAY_THEME_REAL);
  54. }
  55. if (!defined('THEME_ABSOLUTE')) {
  56. /* exdoc
  57. * The absolute path to the current active theme's files. This is similar to the BASE constant
  58. */
  59. define('THEME_ABSOLUTE',BASE.'themes/'.DISPLAY_THEME.'/'); // This is the recommended way
  60. }
  61. if (!defined('THEME_RELATIVE')) {
  62. /* exdoc
  63. * The relative web path to the current active theme. This is similar to the PATH_RELATIVE consant.
  64. */
  65. define('THEME_RELATIVE',PATH_RELATIVE.'themes/'.DISPLAY_THEME.'/');
  66. }
  67. // iconset base
  68. if (!defined('ICON_RELATIVE')) {
  69. if (is_readable(THEME_ABSOLUTE.'icons/')) {
  70. /* exdoc
  71. * The relative web path to the current icon set. If an icons/ directory exists directly
  72. * underneath the theme's directory, that is used. Otherwise, the system falls back to
  73. * the iconset directory in the root of the Exponent directory.
  74. */
  75. define('ICON_RELATIVE',THEME_RELATIVE.'icons/');
  76. } else {
  77. define('ICON_RELATIVE',PATH_RELATIVE.'iconset/');
  78. }
  79. }
  80. if (!defined('MIMEICON_RELATIVE')) {
  81. if (is_readable(THEME_ABSOLUTE.'mimetypes/')) {
  82. /* exdoc
  83. * The relative web path to the current MIME icon set. If a mimetypes/ directory
  84. * exists directly underneath the theme's directory, then that is used. Otherwise, the
  85. * system falls back to the iconset/mimetypes/ directory in the root of the Exponent directory.
  86. */
  87. define('MIMEICON_RELATIVE',THEME_RELATIVE.'mimetypes/');
  88. } else {
  89. define('MIMEICON_RELATIVE',PATH_RELATIVE.'iconset/mimetypes/');
  90. }
  91. }
  92. // Initialize the language subsystem
  93. require_once(BASE.'subsystems/lang.php');
  94. exponent_lang_initialize();
  95. // Initialize the AutoLoader Subsystem
  96. require_once(BASE.'subsystems/autoloader.php');
  97. // Initialize the Core Subsystem
  98. require_once(BASE.'subsystems/core.php');
  99. // Initialize the Database Subsystem
  100. require_once(BASE.'subsystems/database.php');
  101. $db = exponent_database_connect(DB_USER,DB_PASS,DB_HOST.':'.DB_PORT,DB_NAME);
  102. // Initialize the Modules Subsystem.
  103. require_once(BASE.'subsystems/modules.php');
  104. exponent_modules_initialize();
  105. // Initialize the Template Subsystem.
  106. require_once(BASE.'subsystems/template.php');
  107. // Initialize the Permissions Subsystem.
  108. require_once(BASE.'subsystems/permissions.php');
  109. // Initialize the Flow Subsystem.
  110. if (!defined('SYS_FLOW')) require_once(BASE.'subsystems/flow.php');
  111. // Validate session
  112. exponent_sessions_validate();
  113. // Initialize permissions variables
  114. exponent_permissions_initialize();
  115. #$section = (exponent_sessions_isset('last_section') ? exponent_sessions_get('last_section') : SITE_DEFAULT_SECTION);
  116. if (isset($_REQUEST['action']) && isset($_REQUEST['module'])) {
  117. $section = (exponent_sessions_isset('last_section') ? exponent_sessions_get('last_section') : SITE_DEFAULT_SECTION);
  118. } else {
  119. $section = (isset($_REQUEST['section']) ? $_REQUEST['section'] : SITE_DEFAULT_SECTION);
  120. }
  121. $section = $db->selectObject('section','id='. intval($section));
  122. if (!navigationmodule::canView($section)) {
  123. define('AUTHORIZED_SECTION',0);
  124. } else {
  125. define('AUTHORIZED_SECTION',1);
  126. }
  127. if (!navigationmodule::isPublic(intval($section))) {
  128. define('PUBLIC_SECTION',0);
  129. } else {
  130. define('PUBLIC_SECTION',1);
  131. }
  132. function eDebug($var){
  133. echo "<xmp>";
  134. print_r($var);
  135. echo "</xmp>";
  136. }
  137. ?>