/[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.9 by joko, Fri Sep 3 11:12:05 2004 UTC
# Line 1  Line 1 
1  <?php  <?php
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
7  --- $Id$  --- $Id$
# 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    //- Web authorisation:
16    
17    if(isset($_POST['un'])) {
18    
19      $common_sessiondata['userdata']['name'] = $_POST['un'];
20    
21      if(isset($_POST['pw'])) {
22    
23        $common_sessiondata['userdata']['password'] = $_POST['pw'];
24    
25        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(isset($_GET['li']))
40     $common_sessiondata['userdata']['language_id'] = intval($_GET['li']);
41    
42    //- Variable defaults:
43    
44    if(!$request_contentkey) $request_contentkey = 'Home';
45    
46    if(!$request_outputtype) $request_outputtype = 'html';
47    
48    if(isset($common_sessiondata['userdata']['language_id'])) {
49    
50      // Set language ID from the users session data.
51      $language_id = $common_sessiondata['userdata']['language_id'];
52    
53    } else {
54    
55      $language_id = 1; // Default language ID.
56    
57    }
58    
59    common_benchmark_addstep('GET/POST variable processing');
60    
61  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
62    // Dispatching the output content type:
63    
64    switch($request_outputtype) {
65    
66      case 'wml': // WML output
67    
68        include($common['site']['incroot'] . 'otdef/otd_wml1.php.inc');
69        common_benchmark_addstep('OTD_WML1 included');
70    
71  common_pageheader();      break;
72    
73  common_headline('CFG Variables:');    // HTML output:
74    
75  common_paragraph('$documentroot = "' . $documentroot . '"');    case 'html':
76    
77  common_headline('$_SERVER array, readable:');    default:
78    
79  common_paragraph(nl2br(htmlentities(print_r($_SERVER, true))), 'hl');      include($common['site']['incroot'] . 'otdef/otd_html1.php.inc');
80        common_benchmark_addstep('OTD_HTML1 included');
81    
82    }
83    
84    //------------------------------------------------------------------------------
85    // Render output:
86    
87  common_pagefooter();  if(isset($otd_render)) $otd_render($request_contentkey, $language_id);
88    
89  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
90    

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

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