/[cvs]/nfo/site/htdocs/index.php
ViewVC logotype

Contents of /nfo/site/htdocs/index.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations)
Sun Sep 5 05:52:55 2004 UTC (20 years, 4 months ago) by rabit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -12 lines
- HTTP authosiation test (moved to "otd_html1.php.inc").

1 <?php $ID = substr(
2 /*------------------------------------------------------------------------------
3 --- www.netfrag.org
4 --- Main index and content access page.
5 --------------------------------------------------------------------------------
6 --- rabit, 01:28 24.08.2004
7 ------------------------------------------------------------------------------*/
8 '$Id: index.php,v 1.13 2004/09/05 03:09:47 rabit Exp $'
9 //------------------------------------------------------------------------------
10 , 5, -2);
11 //------------------------------------------------------------------------------
12
13 include('inc/common/common.php.inc');
14
15 common_benchmark_addstep('start');
16
17 //------------------------------------------------------------------------------
18 //- User Agent <-> Output Type:
19
20 $common['client']['session_enabled'] = 1;
21
22 if($_SERVER['HTTP_USER_AGENT'] == 'M3Gate/1.2') {
23
24 $common['client']['session_enabled'] = 0;
25 $common_sessiondata['user_prefs']['outputtype'] = 'wml';
26
27 }
28
29 //------------------------------------------------------------------------------
30 //- GET/POST variable encapsulation:
31
32 $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : '');
33
34 if(isset($_GET['li']))
35 $common_sessiondata['user_prefs']['language_id'] = $_GET['li'];
36
37 if(isset($_GET['ot']))
38 $common_sessiondata['user_prefs']['outputtype'] = $_GET['ot'];
39
40 //----------------------------------------------------------
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:
49
50 switch($common_sessiondata['user_prefs']['outputtype']) {
51
52 case 'wml': // WML output
53
54 include($common['site']['incroot'] . 'otdef/otd_wml1/otd_wml1.php.inc');
55 common_benchmark_addstep('OTD_WML1 included');
56
57 break;
58
59 // HTML output:
60
61 case 'html':
62
63 default:
64
65 include($common['site']['incroot'] . 'otdef/otd_html1/otd_html1.php.inc');
66 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 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed