Source for file index.php

Documentation is available at index.php

  1. <?php
  2.  
  3. /**
  4.  * @package default
  5.  */
  6.  
  7. /**
  8.  *
  9.  * index.php file
  10.  *
  11.  * @author Felix Rupp <kontakt@felixrupp.com>
  12.  * @version $Id$
  13.  * @copyright Copyright (c) 2011, Felix Rupp, Nicole Reinhardt
  14.  * @license http://www.opensource.org/licenses/mit-license.php MIT-License
  15.  * @license http://www.gnu.org/licenses/gpl.html GNU GPL
  16.  *
  17.  */
  18.  
  19. /**
  20.  * @var string BASEDIR Constant which represents the basedir of the server
  21.  */
  22. define("BASEDIR"substr($_SERVER["SCRIPT_FILENAME"]0strrpos($_SERVER["SCRIPT_FILENAME"],"/")));
  23. /**
  24.  * @var string TEMPLATEDIR Constant which represents the template directory of Caramel CMS installation
  25.  */
  26. #define("TEMPLATEDIR", dirname($_SERVER["SCRIPT_NAME"])."template");
  27. define("TEMPLATEDIR"substr($_SERVER["SCRIPT_NAME"]0strrpos($_SERVER["SCRIPT_NAME"],"/"))."/template");
  28.  
  29. require_once(BASEDIR.'/inc/controller/FrontendController.php');
  30.  
  31. # New frontend controller
  32. $frontendController new FrontendController();
  33.  
  34. # Automatical language redirect
  35. $frontendController->languageRedirectAction();
  36.  
  37. # Error reporting for testing
  38. ini_set('display_errors',1);
  39. error_reporting(E_ALL|E_STRICT);
  40.  
  41. ?>
  42.  
  43. <!DOCTYPE HTML>
  44. <?php echo($frontendController->versionInformationAction())?>
  45.  
  46. <html lang="<?php echo($frontendController->languageCodeAction())?>">
  47.  
  48. <head>
  49.  
  50. <?php echo($frontendController->headTagAction())?>
  51.  
  52. </head>
  53.  
  54. <body>
  55.  
  56. <?php echo $frontendController->frontendOutputAction()?>
  57.  
  58. </body>
  59.  
  60. </html>