/[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.4 by rabit, Mon Aug 30 04:21:55 2004 UTC revision 1.10 by joko, Fri Sep 3 22:43:17 2004 UTC
# Line 9  Line 9 
9    
10  include('inc/common/common.php.inc');  include('inc/common/common.php.inc');
11    
12    common_benchmark_addstep('start');
13    
14  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
15  //- GET/POST variable encapsulation:  //- Web authorisation:
16    
17    if(isset($_POST['un'])) {
18    
19      $common_sessiondata['userdata']['name'] = $_POST['un'];
20    
21  $contentkeyname = (isset($_GET['ck']) ? $_GET['ck'] : '');    if(isset($_POST['pw'])) {
22    
23  $language_id = (isset($_GET['li']) ? $_GET['li'] : '');      $common_sessiondata['userdata']['password'] = $_POST['pw'];
24    
25  $outputtype = (isset($_GET['ot']) ? $_GET['ot'] : '');      common_checkauthorisation();
26    
27      }
28    
29    }
30    
31    common_benchmark_addstep('authorisation test');
32    
33  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
34    //- GET/POST variable encapsulation:
35    
36    $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : '');
37    $request_outputtype = (isset($_GET['ot']) ? $_GET['ot'] : '');
38    
39  if(!$contentkeyname) $contentkeyname = 'Home';  if(isset($_GET['li']))
40     $common_sessiondata['userdata']['language_id'] = intval($_GET['li']);
41    
 if(!$language_id) $language_id = 1;  
42    
43  if(!$outputtype) $outputtype = 'html';  //------------------------------------------------------------------------------
44    //- User Agent <-> Output Type:
45    $common['client']['session_enabled'] = 1;
46    if ($_SERVER['HTTP_USER_AGENT'] == 'M3Gate/1.2') {
47      $common['client']['session_enabled'] = 0;
48      $request_outputtype = 'wml';
49    }
50    
51  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
52    //- Variable defaults:
53    
54    if(!$request_contentkey) $request_contentkey = 'Home';
55    
56    if(!$request_outputtype) $request_outputtype = 'html';
57    
58    if(isset($common_sessiondata['userdata']['language_id'])) {
59    
60      // Set language ID from the users session data.
61      $language_id = $common_sessiondata['userdata']['language_id'];
62    
63    } else {
64    
65      $language_id = 1; // Default language ID.
66    
67    }
68    
69    common_benchmark_addstep('GET/POST variable processing');
70    
71    //------------------------------------------------------------------------------
72  // Dispatching the output content type:  // Dispatching the output content type:
73    
74  switch($outputtype) {  switch($request_outputtype) {
75    
76      case 'wml': // WML output
77    
78    case 'xml': // XML output      include($common['site']['incroot'] . 'otdef/otd_wml1.php.inc');
79        common_benchmark_addstep('OTD_WML1 included');
80    
81      break;      break;
82    
# Line 42  switch($outputtype) { Line 86  switch($outputtype) {
86    
87    default:    default:
88    
89      // Generate a HTML page:      include($common['site']['incroot'] . 'otdef/otd_html1.php.inc');
90      common_page($contentkeyname, $language_id);      common_benchmark_addstep('OTD_HTML1 included');
91    
92  }  }
93    
94  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
95    // Render output:
96    
97    if(isset($otd_render)) $otd_render($request_contentkey, $language_id);
98    
99    //------------------------------------------------------------------------------
100    
101  ?>  ?>

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.10

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