--- nfo/site/htdocs/index.php 2004/08/30 11:51:15 1.5 +++ nfo/site/htdocs/index.php 2004/09/01 20:47:20 1.8 @@ -4,11 +4,32 @@ --- Main index and content access page. -------------------------------------------------------------------------------- --- rabit, 01:28 24.08.2004 ---- $Id: index.php,v 1.5 2004/08/30 11:51:15 rabit Exp $ +--- $Id: index.php,v 1.8 2004/09/01 20:47:20 rabit Exp $ ------------------------------------------------------------------------------*/ include('inc/common/common.php.inc'); +common_benchmark_addstep('start'); + +//------------------------------------------------------------------------------ +//- Web authorisation: + +if(isset($_POST['un'])) { + + $common_sessiondata['userdata']['name'] = $_POST['un']; + + if(isset($_POST['pw'])) { + + $common_sessiondata['userdata']['password'] = $_POST['pw']; + + common_checkauthorisation(); + + } + +} + +common_benchmark_addstep('authorisation test'); + //------------------------------------------------------------------------------ //- GET/POST variable encapsulation: @@ -18,7 +39,6 @@ if(isset($_GET['li'])) $common_sessiondata['userdata']['language_id'] = intval($_GET['li']); -//------------------------------------------------------------------------------ //- Variable defaults: if(!$request_contentkey) $request_contentkey = 'Home'; @@ -36,13 +56,20 @@ } -//------------------------------------------------------------------------------ +common_benchmark_addstep('GET/POST variable processing'); +//------------------------------------------------------------------------------ // Dispatching the output content type: switch($request_outputtype) { - case 'xml': // XML output + case 'wml': // WML output + +/* --- Example: --- + + include($common['site']['incroot'] . 'otdef/otd_wml1.php.inc'); + common_benchmark_addstep('OTD_WML1 included'); +*/ break; @@ -52,11 +79,16 @@ default: - // Generate a HTML page: - common_page($request_contentkey, $language_id); + include($common['site']['incroot'] . 'otdef/otd_html1.php.inc'); + common_benchmark_addstep('OTD_HTML1 included'); } //------------------------------------------------------------------------------ +// Render output: + +if(isset($otd_render)) $otd_render($request_contentkey, $language_id); + +//------------------------------------------------------------------------------ ?>