1 |
<?php |
<?php $ID = substr( |
2 |
/*------------------------------------------------------------------------------ |
/*------------------------------------------------------------------------------ |
3 |
--- www.netfrag.org |
--- www.netfrag.org |
4 |
--- Main index and content access page. |
--- Main index and content access page. |
5 |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
6 |
--- rabit, 01:28 24.08.2004 |
--- rabit, 01:28 24.08.2004 |
|
--- $Id$ |
|
7 |
------------------------------------------------------------------------------*/ |
------------------------------------------------------------------------------*/ |
8 |
|
'$Id$' |
9 |
|
//------------------------------------------------------------------------------ |
10 |
|
, 5, -2); |
11 |
|
//------------------------------------------------------------------------------ |
12 |
|
|
13 |
include('inc/common/common.php.inc'); |
include('inc/common/common.php.inc'); |
14 |
|
|
15 |
|
common_benchmark_addstep('start'); |
16 |
|
|
17 |
//------------------------------------------------------------------------------ |
//------------------------------------------------------------------------------ |
18 |
//- GET/POST variable encapsulation: |
//- User Agent <-> Output Type: |
19 |
|
|
20 |
$request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : ''); |
$common['client']['session_enabled'] = 1; |
|
$request_outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); |
|
21 |
|
|
22 |
if(isset($_GET['li'])) |
if($_SERVER['HTTP_USER_AGENT'] == 'M3Gate/1.2') { |
|
$common_sessiondata['userdata']['language_id'] = intval($_GET['li']); |
|
23 |
|
|
24 |
//------------------------------------------------------------------------------ |
$common['client']['session_enabled'] = 0; |
25 |
//- Variable defaults: |
$common_sessiondata['user_prefs']['outputtype'] = 'wml'; |
26 |
|
|
27 |
if(!$request_contentkey) $request_contentkey = 'Home'; |
} |
28 |
|
|
29 |
if(!$request_outputtype) $request_outputtype = 'html'; |
//------------------------------------------------------------------------------ |
30 |
|
//- GET/POST variable encapsulation: |
31 |
|
|
32 |
if(isset($common_sessiondata['userdata']['language_id'])) { |
$request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : ''); |
33 |
|
|
34 |
// Set language ID from the users session data. |
if(isset($_GET['li'])) |
35 |
$language_id = $common_sessiondata['userdata']['language_id']; |
$common_sessiondata['user_prefs']['language_id'] = $_GET['li']; |
36 |
|
|
37 |
} else { |
if(isset($_GET['ot'])) |
38 |
|
$common_sessiondata['user_prefs']['outputtype'] = $_GET['ot']; |
39 |
|
|
40 |
$language_id = 1; // Default language ID. |
//---------------------------------------------------------- |
41 |
|
//- Variable defaults: |
42 |
|
|
43 |
} |
if(!$request_contentkey) $request_contentkey = 'Home'; |
44 |
|
|
45 |
//------------------------------------------------------------------------------ |
common_benchmark_addstep('GET/POST variable processing'); |
46 |
|
|
47 |
|
//------------------------------------------------------------------------------ |
48 |
// Dispatching the output content type: |
// Dispatching the output content type: |
49 |
|
|
50 |
switch($request_outputtype) { |
switch($common_sessiondata['user_prefs']['outputtype']) { |
51 |
|
|
52 |
|
case 'wml': // WML output |
53 |
|
|
54 |
case 'xml': // XML output |
include($common['site']['incroot'] . 'otdef/otd_wml1/otd_wml1.php.inc'); |
55 |
|
common_benchmark_addstep('OTD_WML1 included'); |
56 |
|
|
57 |
break; |
break; |
58 |
|
|
62 |
|
|
63 |
default: |
default: |
64 |
|
|
65 |
// Generate a HTML page: |
include($common['site']['incroot'] . 'otdef/otd_html1/otd_html1.php.inc'); |
66 |
common_page($request_contentkey, $language_id); |
common_benchmark_addstep('OTD_HTML1 included'); |
67 |
|
|
68 |
} |
} |
69 |
|
|
70 |
//------------------------------------------------------------------------------ |
//------------------------------------------------------------------------------ |
71 |
|
// Render output: |
72 |
|
|
73 |
|
if(isset($otd_render)) $otd_render( |
74 |
|
$request_contentkey, |
75 |
|
$common_sessiondata['user_prefs']['language_id'] |
76 |
|
); |
77 |
|
|
78 |
|
//------------------------------------------------------------------------------ |
79 |
|
|
80 |
?> |
?> |