/[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.10 by joko, Fri Sep 3 22:43:17 2004 UTC revision 1.11 by rabit, Sat Sep 4 03:21:55 2004 UTC
# Line 12  include('inc/common/common.php.inc'); Line 12  include('inc/common/common.php.inc');
12  common_benchmark_addstep('start');  common_benchmark_addstep('start');
13    
14  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
15  //- Web authorisation:  //- User Agent <-> Output Type:
   
 if(isset($_POST['un'])) {  
   
   $common_sessiondata['userdata']['name'] = $_POST['un'];  
   
   if(isset($_POST['pw'])) {  
16    
17      $common_sessiondata['userdata']['password'] = $_POST['pw'];  $common['client']['session_enabled'] = 1;
18    
19      common_checkauthorisation();  if($_SERVER['HTTP_USER_AGENT'] == 'M3Gate/1.2') {
20    
21    }    $common['client']['session_enabled'] = 0;
22      $common_sessiondata['user_prefs']['outputtype'] = 'wml';
23    
24  }  }
25    
 common_benchmark_addstep('authorisation test');  
   
26  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
27  //- GET/POST variable encapsulation:  //- Web authorisation:
28    
29  $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : '');  if(isset($_POST['un']) && isset($_POST['pw'])) {
 $request_outputtype = (isset($_GET['ot']) ? $_GET['ot'] : '');  
30    
31  if(isset($_GET['li']))    common_authorise($_POST['un'], $_POST['pw']);
  $common_sessiondata['userdata']['language_id'] = intval($_GET['li']);  
32    
33      common_benchmark_addstep('authorisation test');
34    
 //------------------------------------------------------------------------------  
 //- User Agent <-> Output Type:  
 $common['client']['session_enabled'] = 1;  
 if ($_SERVER['HTTP_USER_AGENT'] == 'M3Gate/1.2') {  
   $common['client']['session_enabled'] = 0;  
   $request_outputtype = 'wml';  
35  }  }
36    
37  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
38  //- Variable defaults:  //- GET/POST variable encapsulation:
39    
40  if(!$request_contentkey) $request_contentkey = 'Home';  $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : '');
41    
42  if(!$request_outputtype) $request_outputtype = 'html';  if(isset($_GET['li']))
43     $common_sessiondata['user_prefs']['language_id'] = $_GET['li'];
44    
45  if(isset($common_sessiondata['userdata']['language_id'])) {  if(isset($_GET['ot']))
46     $common_sessiondata['user_prefs']['outputtype'] = $_GET['ot'];
47    
48    // Set language ID from the users session data.  if(isset($_GET['debug']))
49    $language_id = $common_sessiondata['userdata']['language_id'];   $common_sessiondata['user_prefs']['debug'] = $_GET['debug'];
50    
51  } else {  if(isset($_GET['benchlist']))
52     $common_sessiondata['user_prefs']['benchlist'] = $_GET['benchlist'];
53    
54    $language_id = 1; // Default language ID.  //----------------------------------------------------------
55    //- Variable defaults:
56    
57  }  if(!$request_contentkey) $request_contentkey = 'Home';
58    
59  common_benchmark_addstep('GET/POST variable processing');  common_benchmark_addstep('GET/POST variable processing');
60    
61  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
62  // Dispatching the output content type:  // Dispatching the output content type:
63    
64  switch($request_outputtype) {  switch($common_sessiondata['user_prefs']['outputtype']) {
65    
66    case 'wml': // WML output    case 'wml': // WML output
67    
# Line 94  switch($request_outputtype) { Line 84  switch($request_outputtype) {
84  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
85  // Render output:  // Render output:
86    
87  if(isset($otd_render)) $otd_render($request_contentkey, $language_id);  if(isset($otd_render)) $otd_render(
88     $request_contentkey,
89     $common_sessiondata['user_prefs']['language_id']
90    );
91    
92  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
93    

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

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