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