| 12 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 13 | //- GET/POST variable encapsulation: | //- GET/POST variable encapsulation: | 
| 14 |  |  | 
| 15 | $contentkeyname = (isset($_GET['ck']) ? $_GET['ck'] : ''); | $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : ''); | 
| 16 |  | $request_outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); | 
| 17 |  |  | 
| 18 | $language_id = (isset($_GET['li']) ? $_GET['li'] : ''); | if(isset($_GET['li'])) | 
| 19 |  | $common_sessiondata['userdata']['language_id'] = intval($_GET['li']); | 
|  | $outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); |  | 
| 20 |  |  | 
| 21 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 22 |  | //- Variable defaults: | 
| 23 |  |  | 
| 24 |  | if(!$request_contentkey) $request_contentkey = 'Home'; | 
| 25 |  |  | 
| 26 |  | if(!$request_outputtype) $request_outputtype = 'html'; | 
| 27 |  |  | 
| 28 | if(!$contentkeyname) $contentkeyname = 'Home'; | if(isset($common_sessiondata['userdata']['language_id'])) { | 
| 29 |  |  | 
| 30 | if(!$language_id) $language_id = 1; | // Set language ID from the users session data. | 
| 31 |  | $language_id = $common_sessiondata['userdata']['language_id']; | 
| 32 |  |  | 
| 33 | if(!$outputtype) $outputtype = 'html'; | } else { | 
| 34 |  |  | 
| 35 |  | $language_id = 1; // Default language ID. | 
| 36 |  |  | 
| 37 |  | } | 
| 38 |  |  | 
| 39 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 40 |  |  | 
| 41 | // Dispatching the output content type: | // Dispatching the output content type: | 
| 42 |  |  | 
| 43 | switch($outputtype) { | switch($request_outputtype) { | 
| 44 |  |  | 
| 45 | case 'xml': // XML output | case 'xml': // XML output | 
| 46 |  |  | 
| 53 | default: | default: | 
| 54 |  |  | 
| 55 | // Generate a HTML page: | // Generate a HTML page: | 
| 56 | common_page($contentkeyname, $language_id); | common_page($request_contentkey, $language_id); | 
| 57 |  |  | 
| 58 | } | } | 
| 59 |  |  |