| 10 | include('inc/common/common.php.inc'); | include('inc/common/common.php.inc'); | 
| 11 |  |  | 
| 12 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 13 | //- GET/POST variable encapsulation: | //- 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 |  |  | 
| 29 | $contentkeyname = (isset($_GET['ck']) ? $_GET['ck'] : ''); | //------------------------------------------------------------------------------ | 
| 30 |  | //- GET/POST variable encapsulation: | 
| 31 |  |  | 
| 32 | $language_id = (isset($_GET['li']) ? $_GET['li'] : ''); | $request_contentkey = (isset($_GET['ck']) ? $_GET['ck'] : ''); | 
| 33 |  | $request_outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); | 
| 34 |  |  | 
| 35 | $outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); | if(isset($_GET['li'])) | 
| 36 |  | $common_sessiondata['userdata']['language_id'] = intval($_GET['li']); | 
| 37 |  |  | 
| 38 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 39 |  | //- Variable defaults: | 
| 40 |  |  | 
| 41 |  | if(!$request_contentkey) $request_contentkey = 'Home'; | 
| 42 |  |  | 
| 43 | if(!$contentkeyname) $contentkeyname = 'Home'; | if(!$request_outputtype) $request_outputtype = 'html'; | 
| 44 |  |  | 
| 45 | if(!$language_id) $language_id = 1; | if(isset($common_sessiondata['userdata']['language_id'])) { | 
| 46 |  |  | 
| 47 | if(!$outputtype) $outputtype = 'html'; | // Set language ID from the users session data. | 
| 48 |  | $language_id = $common_sessiondata['userdata']['language_id']; | 
| 49 |  |  | 
| 50 |  | } else { | 
| 51 |  |  | 
| 52 |  | $language_id = 1; // Default language ID. | 
| 53 |  |  | 
| 54 |  | } | 
| 55 |  |  | 
| 56 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 57 |  |  | 
| 58 | // Dispatching the output content type: | // Dispatching the output content type: | 
| 59 |  |  | 
| 60 | switch($outputtype) { | switch($request_outputtype) { | 
| 61 |  |  | 
| 62 | case 'xml': // XML output | case 'xml': // XML output | 
| 63 |  |  | 
| 70 | default: | default: | 
| 71 |  |  | 
| 72 | // Generate a HTML page: | // Generate a HTML page: | 
| 73 | common_page($contentkeyname, $language_id); | common_page($request_contentkey, $language_id); | 
| 74 |  |  | 
| 75 | } | } | 
| 76 |  |  |