Source for file index_controller.php
Documentation is available at index_controller.php
* Index controller. Does some preprocessing jobs, tries to set following variables, depending
* on mod rewrite configuration and if request part exists:
* @author Murat Purc <murat@purc.de>
* @copyright © Murat Purc 2008
define("CON_FRAMEWORK", true);
// include security class and check request variables
include_once ('../contenido/classes/class.security.php');
Contenido_Security::checkRequests();
// include the config file of the frontend to init the Client and Language Id
include_once('config.php');
// Contenido startup process
include_once($contenido_path.
'includes/startup.php');
$ModRewriteStartTime =
getmicrotime();
cInclude('includes', 'functions.con.php');
cInclude('includes', 'functions.con2.php');
cInclude('includes', 'functions.api.php');
cInclude('includes', 'functions.pathresolver.php');
plugin_include('mod_rewrite', 'includes/config.plugin.php');
$GLOBALS['mpDebug']->addDebug($cfg['mod_rewrite'], 'index_controller.php mod rewrite config');
// mod rewrite is disabled, include front_content.php and get out from here
include_once('front_content.php');
#$GLOBALS['mpDebug']->addDebug($_SERVER['REQUEST_URI'], 'index_controller.php $_SERVER["REQUEST_URI"]');
// create an mod rewrite controller instance and execute processing
$oMRController->execute();
if ($oMRController->errorOccured()) {
// an error occured (idcat and or idart couldn't catched by controller)
$mr_preprocessedPageError =
true;
// set some global variables
if ($oMRController->getClient()) {
$client =
$oMRController->getClient();
if ($oMRController->getChangeClient()) {
$changeclient =
$oMRController->getChangeClient();
if ($oMRController->getLang()) {
$lang =
$oMRController->getLang();
if ($oMRController->getChangeLang()) {
$changelang =
$oMRController->getChangeLang();
if ($oMRController->getIdArt()) {
$idart =
$oMRController->getIdArt();
if ($oMRController->getIdCat()) {
$idcat =
$oMRController->getIdCat();
if ($oMRController->getPath()) {
$path =
$oMRController->getPath();
$GLOBALS['mpDebug']->addDebug($mr_preprocessedPageError, 'mr $mr_preprocessedPageError', __FILE__
);
$GLOBALS['mpDebug']->addDebug($idart, 'mr $idart', __FILE__
);
$GLOBALS['mpDebug']->addDebug($idcat, 'mr $idcat', __FILE__
);
$GLOBALS['mpDebug']->addDebug($lang, 'mr $lang', __FILE__
);
$GLOBALS['mpDebug']->addDebug($client, 'mr $client', __FILE__
);
* Loading of Mod Rewrite plugin well done, include front_content.php
include_once('front_content.php');
* used during development, comment following line if you want to play save
* and no debug info should be displayed
##########################################################################################
* Replaces calling of header method for redirects in front_content.php,
* used during development.
* @param $header Header value for redirect
# header($header);return;
<p><a href="'.
$header.
'">'.
$header.
'</a></p>';
* Debug output only during development
if (is_array($GLOBALS['DB_Contenido_QueryCache']) &&
count($GLOBALS['DB_Contenido_QueryCache']) >
0) {
$GLOBALS['mpDebug']->addDebug($GLOBALS['DB_Contenido_QueryCache'], 'sql statements');
$time =
sprintf('%.4f', (getmicrotime() -
$GLOBALS['ModRewriteStartTime']));
$GLOBALS['mpDebug']->addDebug($time, 'index_controller.php total time');
echo
$GLOBALS['mpDebug']->getResults();
Documentation generated on Tue, 12 Aug 2008 00:06:43 +0200 by phpDocumentor 1.4.0