1 |
rabit |
1.2 |
<?php |
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 |
rabit |
1.6 |
--- $Id: index.php,v 1.5 2004/08/30 11:51:15 rabit Exp $ |
8 |
rabit |
1.2 |
------------------------------------------------------------------------------*/ |
9 |
|
|
|
10 |
|
|
include('inc/common/common.php.inc'); |
11 |
rabit |
1.6 |
|
12 |
|
|
//------------------------------------------------------------------------------ |
13 |
|
|
//- Web authorisation: |
14 |
|
|
|
15 |
|
|
if(isset($_POST['un'])) { |
16 |
|
|
|
17 |
|
|
$common_sessiondata['userdata']['name'] = $_POST['un']; |
18 |
|
|
|
19 |
|
|
if(isset($_POST['pw'])) { |
20 |
|
|
|
21 |
|
|
$common_sessiondata['userdata']['password'] = $_POST['pw']; |
22 |
|
|
|
23 |
|
|
common_checkauthorisation(); |
24 |
|
|
|
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
} |
28 |
rabit |
1.2 |
|
29 |
|
|
//------------------------------------------------------------------------------ |
30 |
rabit |
1.3 |
//- GET/POST variable encapsulation: |
31 |
rabit |
1.2 |
|
32 |
rabit |
1.5 |
$request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : ''); |
33 |
|
|
$request_outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); |
34 |
rabit |
1.2 |
|
35 |
rabit |
1.5 |
if(isset($_GET['li'])) |
36 |
|
|
$common_sessiondata['userdata']['language_id'] = intval($_GET['li']); |
37 |
rabit |
1.4 |
|
38 |
rabit |
1.5 |
//------------------------------------------------------------------------------ |
39 |
|
|
//- Variable defaults: |
40 |
|
|
|
41 |
|
|
if(!$request_contentkey) $request_contentkey = 'Home'; |
42 |
|
|
|
43 |
|
|
if(!$request_outputtype) $request_outputtype = 'html'; |
44 |
rabit |
1.2 |
|
45 |
rabit |
1.5 |
if(isset($common_sessiondata['userdata']['language_id'])) { |
46 |
|
|
|
47 |
|
|
// Set language ID from the users session data. |
48 |
|
|
$language_id = $common_sessiondata['userdata']['language_id']; |
49 |
rabit |
1.3 |
|
50 |
rabit |
1.5 |
} else { |
51 |
rabit |
1.3 |
|
52 |
rabit |
1.5 |
$language_id = 1; // Default language ID. |
53 |
rabit |
1.4 |
|
54 |
rabit |
1.5 |
} |
55 |
rabit |
1.3 |
|
56 |
|
|
//------------------------------------------------------------------------------ |
57 |
|
|
|
58 |
|
|
// Dispatching the output content type: |
59 |
|
|
|
60 |
rabit |
1.5 |
switch($request_outputtype) { |
61 |
rabit |
1.3 |
|
62 |
|
|
case 'xml': // XML output |
63 |
|
|
|
64 |
|
|
break; |
65 |
|
|
|
66 |
|
|
// HTML output: |
67 |
|
|
|
68 |
|
|
case 'html': |
69 |
rabit |
1.2 |
|
70 |
rabit |
1.3 |
default: |
71 |
rabit |
1.2 |
|
72 |
rabit |
1.3 |
// Generate a HTML page: |
73 |
rabit |
1.5 |
common_page($request_contentkey, $language_id); |
74 |
rabit |
1.2 |
|
75 |
rabit |
1.3 |
} |
76 |
rabit |
1.2 |
|
77 |
|
|
//------------------------------------------------------------------------------ |
78 |
|
|
|
79 |
|
|
?> |