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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by rabit, Tue Aug 24 03:29:30 2004 UTC revision 1.13 by rabit, Sun Sep 5 03:09:47 2004 UTC
# Line 1  Line 1 
1  <?php  <?php $ID = substr(
2  /*------------------------------------------------------------------------------  /*------------------------------------------------------------------------------
3  --- www.netfrag.org  --- www.netfrag.org
4  --- Main index 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    //- 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    //- Web authorisation:
31    
32    if(isset($_POST['un']) && isset($_POST['pw'])) {
33    
34      common_authorise($_POST['un'], $_POST['pw']);
35    
36      common_benchmark_addstep('authorisation test');
37    
38    }
39    
40  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
41    //- GET/POST variable encapsulation:
42    
43  common_pageheader();  $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : '');
44    
45  common_headline('CFG Variables:');  if(isset($_GET['li']))
46     $common_sessiondata['user_prefs']['language_id'] = $_GET['li'];
47    
48  common_paragraph('$documentroot = "' . $documentroot . '"');  if(isset($_GET['ot']))
49     $common_sessiondata['user_prefs']['outputtype'] = $_GET['ot'];
50    
51  common_headline('$_SERVER array, readable:');  //----------------------------------------------------------
52    //- Variable defaults:
53    
54  common_paragraph(nl2br(htmlentities(print_r($_SERVER, true))), 'hl');  if(!$request_contentkey) $request_contentkey = 'Home';
55    
56    common_benchmark_addstep('GET/POST variable processing');
57    
58    //------------------------------------------------------------------------------
59    // Dispatching the output content type:
60    
61    switch($common_sessiondata['user_prefs']['outputtype']) {
62    
63      case 'wml': // WML output
64    
65        include($common['site']['incroot'] . 'otdef/otd_wml1/otd_wml1.php.inc');
66        common_benchmark_addstep('OTD_WML1 included');
67    
68        break;
69    
70      // HTML output:
71    
72      case 'html':
73    
74      default:
75    
76        include($common['site']['incroot'] . 'otdef/otd_html1/otd_html1.php.inc');
77        common_benchmark_addstep('OTD_HTML1 included');
78    
79    }
80    
81    //------------------------------------------------------------------------------
82    // Render output:
83    
84  common_pagefooter();  if(isset($otd_render)) $otd_render(
85     $request_contentkey,
86     $common_sessiondata['user_prefs']['language_id']
87    );
88    
89  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
90    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.13

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