--- nfo/site/htdocs/index.php 2004/08/24 03:29:30 1.2 +++ nfo/site/htdocs/index.php 2004/09/03 22:43:17 1.10 @@ -1,27 +1,100 @@ Output Type: +$common['client']['session_enabled'] = 1; +if ($_SERVER['HTTP_USER_AGENT'] == 'M3Gate/1.2') { + $common['client']['session_enabled'] = 0; + $request_outputtype = 'wml'; +} + //------------------------------------------------------------------------------ +//- Variable defaults: + +if(!$request_contentkey) $request_contentkey = 'Home'; + +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']; -common_pageheader(); +} else { -common_headline('CFG Variables:'); + $language_id = 1; // Default language ID. + +} + +common_benchmark_addstep('GET/POST variable processing'); + +//------------------------------------------------------------------------------ +// Dispatching the output content type: -common_paragraph('$documentroot = "' . $documentroot . '"'); +switch($request_outputtype) { -common_headline('$_SERVER array, readable:'); + case 'wml': // WML output -common_paragraph(nl2br(htmlentities(print_r($_SERVER, true))), 'hl'); + include($common['site']['incroot'] . 'otdef/otd_wml1.php.inc'); + common_benchmark_addstep('OTD_WML1 included'); + + break; + + // HTML output: + + case 'html': + + default: + + include($common['site']['incroot'] . 'otdef/otd_html1.php.inc'); + common_benchmark_addstep('OTD_HTML1 included'); + +} + +//------------------------------------------------------------------------------ +// Render output: -common_pagefooter(); +if(isset($otd_render)) $otd_render($request_contentkey, $language_id); //------------------------------------------------------------------------------