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