| 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$ | 
| 10 | include('inc/common/common.php.inc'); | include('inc/common/common.php.inc'); | 
| 11 |  |  | 
| 12 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 13 |  | //- GET/POST variable encapsulation: | 
| 14 |  |  | 
| 15 | common_pageheader(); | $contentkeyname = (isset($_GET['ck']) ? $_GET['ck'] : ''); | 
| 16 |  |  | 
| 17 | common_headline('CFG Variables:'); | $outputtype = (isset($_GET['ot']) ? $_GET['ot'] : ''); | 
| 18 |  |  | 
| 19 | common_paragraph('$documentroot = "' . $documentroot . '"'); | //------------------------------------------------------------------------------ | 
| 20 |  |  | 
| 21 |  | if(!$contentkeyname) $contentkeyname = 'Home'; | 
| 22 |  |  | 
| 23 |  | if(!$outputtype) $outputtype = 'html'; | 
| 24 |  |  | 
| 25 |  | //------------------------------------------------------------------------------ | 
| 26 |  |  | 
| 27 |  | // Dispatching the output content type: | 
| 28 |  |  | 
| 29 |  | switch($outputtype) { | 
| 30 |  |  | 
| 31 |  | case 'xml': // XML output | 
| 32 |  |  | 
| 33 |  | break; | 
| 34 |  |  | 
| 35 |  | // HTML output: | 
| 36 |  |  | 
| 37 |  | case 'html': | 
| 38 |  |  | 
| 39 | common_headline('$_SERVER array, readable:'); | default: | 
| 40 |  |  | 
| 41 | common_paragraph(nl2br(htmlentities(print_r($_SERVER, true))), 'hl'); | // Generate a HTML page: | 
| 42 |  | common_page($contentkeyname); | 
| 43 |  |  | 
| 44 | common_pagefooter(); | } | 
| 45 |  |  | 
| 46 | //------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ | 
| 47 |  |  |