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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (hide annotations)
Sun Sep 5 03:09:47 2004 UTC (19 years, 10 months ago) by rabit
Branch: MAIN
Changes since 1.12: +5 -8 lines
+ CVS ID variable; - Output type related variable encapsulation (moved to "otd_html1.php.inc").

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.13 '$Id: index.php,v 1.12 2004/09/04 14:06:52 rabit Exp $'
9     //------------------------------------------------------------------------------
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 rabit 1.11 }
28 rabit 1.6
29 rabit 1.11 //------------------------------------------------------------------------------
30     //- Web authorisation:
31 rabit 1.6
32 rabit 1.11 if(isset($_POST['un']) && isset($_POST['pw'])) {
33 rabit 1.6
34 rabit 1.11 common_authorise($_POST['un'], $_POST['pw']);
35 rabit 1.6
36 rabit 1.11 common_benchmark_addstep('authorisation test');
37 rabit 1.6
38     }
39 rabit 1.2
40     //------------------------------------------------------------------------------
41 rabit 1.3 //- GET/POST variable encapsulation:
42 rabit 1.2
43 rabit 1.5 $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : '');
44 rabit 1.2
45 rabit 1.5 if(isset($_GET['li']))
46 rabit 1.11 $common_sessiondata['user_prefs']['language_id'] = $_GET['li'];
47    
48     if(isset($_GET['ot']))
49     $common_sessiondata['user_prefs']['outputtype'] = $_GET['ot'];
50 joko 1.10
51 rabit 1.11 //----------------------------------------------------------
52 rabit 1.5 //- Variable defaults:
53    
54     if(!$request_contentkey) $request_contentkey = 'Home';
55    
56 rabit 1.7 common_benchmark_addstep('GET/POST variable processing');
57    
58 rabit 1.3 //------------------------------------------------------------------------------
59     // Dispatching the output content type:
60    
61 rabit 1.11 switch($common_sessiondata['user_prefs']['outputtype']) {
62 rabit 1.3
63 rabit 1.7 case 'wml': // WML output
64    
65 rabit 1.12 include($common['site']['incroot'] . 'otdef/otd_wml1/otd_wml1.php.inc');
66 rabit 1.8 common_benchmark_addstep('OTD_WML1 included');
67 rabit 1.3
68     break;
69    
70     // HTML output:
71    
72     case 'html':
73 rabit 1.2
74 rabit 1.3 default:
75 rabit 1.2
76 rabit 1.12 include($common['site']['incroot'] . 'otdef/otd_html1/otd_html1.php.inc');
77 rabit 1.8 common_benchmark_addstep('OTD_HTML1 included');
78 rabit 1.2
79 rabit 1.3 }
80 rabit 1.7
81 rabit 1.8 //------------------------------------------------------------------------------
82 rabit 1.7 // Render output:
83    
84 rabit 1.11 if(isset($otd_render)) $otd_render(
85     $request_contentkey,
86     $common_sessiondata['user_prefs']['language_id']
87     );
88 rabit 1.2
89     //------------------------------------------------------------------------------
90    
91     ?>

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