--- nfo/site/htdocs/index.php 2004/08/30 01:48:30 1.3 +++ nfo/site/htdocs/index.php 2004/08/30 11:51:15 1.5 @@ -4,7 +4,7 @@ --- Main index and content access page. -------------------------------------------------------------------------------- --- rabit, 01:28 24.08.2004 ---- $Id: index.php,v 1.3 2004/08/30 01:48:30 rabit Exp $ +--- $Id: index.php,v 1.5 2004/08/30 11:51:15 rabit Exp $ ------------------------------------------------------------------------------*/ include('inc/common/common.php.inc'); @@ -12,21 +12,35 @@ //------------------------------------------------------------------------------ //- GET/POST variable encapsulation: -$contentkeyname = (isset($_GET['ck']) ? $_GET['ck'] : ''); +$request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : ''); +$request_outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); -$outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); +if(isset($_GET['li'])) + $common_sessiondata['userdata']['language_id'] = intval($_GET['li']); //------------------------------------------------------------------------------ +//- Variable defaults: -if(!$contentkeyname) $contentkeyname = 'Home'; +if(!$request_contentkey) $request_contentkey = 'Home'; -if(!$outputtype) $outputtype = 'html'; +if(!$request_outputtype) $request_outputtype = 'html'; + +if(isset($common_sessiondata['userdata']['language_id'])) { + + // Set language ID from the users session data. + $language_id = $common_sessiondata['userdata']['language_id']; + +} else { + + $language_id = 1; // Default language ID. + +} //------------------------------------------------------------------------------ // Dispatching the output content type: -switch($outputtype) { +switch($request_outputtype) { case 'xml': // XML output @@ -39,7 +53,7 @@ default: // Generate a HTML page: - common_page($contentkeyname); + common_page($request_contentkey, $language_id); }