| 9 |  |  | 
| 10 | include('inc/common/common.php.inc'); | include('inc/common/common.php.inc'); | 
| 11 |  |  | 
| 12 |  | common_benchmark_addstep('start'); | 
| 13 |  |  | 
| 14 |  | //------------------------------------------------------------------------------ | 
| 15 |  | //- Web authorisation: | 
| 16 |  |  | 
| 17 |  | if(isset($_POST['un'])) { | 
| 18 |  |  | 
| 19 |  | $common_sessiondata['userdata']['name'] = $_POST['un']; | 
| 20 |  |  | 
| 21 |  | if(isset($_POST['pw'])) { | 
| 22 |  |  | 
| 23 |  | $common_sessiondata['userdata']['password'] = $_POST['pw']; | 
| 24 |  |  | 
| 25 |  | common_checkauthorisation(); | 
| 26 |  |  | 
| 27 |  | } | 
| 28 |  |  | 
| 29 |  | } | 
| 30 |  |  | 
| 31 |  | common_benchmark_addstep('authorisation test'); | 
| 32 |  |  | 
| 33 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 34 | //- GET/POST variable encapsulation: | //- GET/POST variable encapsulation: | 
| 35 |  |  | 
| 39 | if(isset($_GET['li'])) | if(isset($_GET['li'])) | 
| 40 | $common_sessiondata['userdata']['language_id'] = intval($_GET['li']); | $common_sessiondata['userdata']['language_id'] = intval($_GET['li']); | 
| 41 |  |  | 
| 42 |  |  | 
| 43 |  | //------------------------------------------------------------------------------ | 
| 44 |  | //- User Agent <-> Output Type: | 
| 45 |  | $common['client']['session_enabled'] = 1; | 
| 46 |  | if ($_SERVER['HTTP_USER_AGENT'] == 'M3Gate/1.2') { | 
| 47 |  | $common['client']['session_enabled'] = 0; | 
| 48 |  | $request_outputtype = 'wml'; | 
| 49 |  | } | 
| 50 |  |  | 
| 51 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 52 | //- Variable defaults: | //- Variable defaults: | 
| 53 |  |  | 
| 66 |  |  | 
| 67 | } | } | 
| 68 |  |  | 
| 69 | //------------------------------------------------------------------------------ | common_benchmark_addstep('GET/POST variable processing'); | 
| 70 |  |  | 
| 71 |  | //------------------------------------------------------------------------------ | 
| 72 | // Dispatching the output content type: | // Dispatching the output content type: | 
| 73 |  |  | 
| 74 | switch($request_outputtype) { | switch($request_outputtype) { | 
| 75 |  |  | 
| 76 | case 'xml': // XML output | case 'wml': // WML output | 
| 77 |  |  | 
| 78 |  | include($common['site']['incroot'] . 'otdef/otd_wml1.php.inc'); | 
| 79 |  | common_benchmark_addstep('OTD_WML1 included'); | 
| 80 |  |  | 
| 81 | break; | break; | 
| 82 |  |  | 
| 86 |  |  | 
| 87 | default: | default: | 
| 88 |  |  | 
| 89 | // Generate a HTML page: | include($common['site']['incroot'] . 'otdef/otd_html1.php.inc'); | 
| 90 | common_page($request_contentkey, $language_id); | common_benchmark_addstep('OTD_HTML1 included'); | 
| 91 |  |  | 
| 92 | } | } | 
| 93 |  |  | 
| 94 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 95 |  | // Render output: | 
| 96 |  |  | 
| 97 |  | if(isset($otd_render)) $otd_render($request_contentkey, $language_id); | 
| 98 |  |  | 
| 99 |  | //------------------------------------------------------------------------------ | 
| 100 |  |  | 
| 101 | ?> | ?> |