Source for file index.php

Documentation is available at index.php

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