• Main Page
  • Related Pages
  • Classes
  • Files
  • Directories
  • File List
  • File Members

index.php

Go to the documentation of this file.
00001 <?php
00002 
00003 // Setting error reporting mode
00004     // some 3rd party libraries still use deprecated functions
00005     if ( defined( 'E_DEPRECATED' ) ) {
00006         error_reporting( E_ALL ^ E_NOTICE ^ E_DEPRECATED );
00007     } else {
00008         error_reporting( E_ALL ^ E_NOTICE );
00009     }
00010 
00011 //Know exactly where in the code the event occurred.
00012 //Zend platform only.
00013 if (function_exists('monitor_set_aggregation_hint') && isset($_REQUEST['cl'])) {
00014     $sAgregationHint = htmlentities($_REQUEST['cl'], ENT_QUOTES, 'UTF-8') . '/';
00015     if (isset($_REQUEST['fnc']))
00016         $sAgregationHint .= htmlentities($_REQUEST['fnc'], ENT_QUOTES, 'UTF-8');
00017     monitor_set_aggregation_hint($sAgregationHint);
00018 }
00019 
00020 
00021 //setting basic configuration parameters
00022 ini_set('session.name', 'sid' );
00023 ini_set('session.use_cookies', 0 );
00024 ini_set('session.use_trans_sid', 0);
00025 ini_set('url_rewriter.tags', '');
00026 ini_set('magic_quotes_runtime', 0);
00027 
00033 function getShopBasePath()
00034 {
00035     return dirname(__FILE__).'/';
00036 }
00037 
00038 
00039 if ( !function_exists( 'isAdmin' )) {
00045     function isAdmin()
00046     {
00047         return false;
00048     }
00049 }
00050 
00051 // custom functions file
00052 require getShopBasePath() . 'modules/functions.php';
00053 
00054 // Generic utility method file
00055 require_once getShopBasePath() . 'core/oxfunctions.php';
00056 
00057 
00058 // set the exception handler already here to catch everything, also uncaught exceptions from the config or utils
00059 
00060 // initializes singleton config class
00061 $myConfig = oxConfig::getInstance();
00062 
00063 //strips magics quote if any
00064 oxUtils::getInstance()->stripGpcMagicQuotes();
00065 
00066 // reset it so it is done with oxnew
00067 $iDebug = $myConfig->getConfigParam('iDebug');
00068 set_exception_handler(array(oxNew('oxexceptionhandler', $iDebug), 'handleUncaughtException'));
00069 // Admin handling
00070 if ( isAdmin() ) {
00071     $myConfig->setConfigParam( 'blAdmin', true );
00072     $myConfig->setConfigParam( 'blTemplateCaching', false );
00073     if ($sAdminDir)
00074         $myConfig->setConfigParam( 'sAdminDir', $sAdminDir );
00075     else
00076         $myConfig->setConfigParam( 'sAdminDir', "admin" );
00077 }
00078 
00079 //Starting the shop
00080 $oShopControl = oxNew('oxShopControl');
00081 $oShopControl->start();

Generated by  doxygen 1.7.1