Initial revision
[Packages/TYPO3.CMS.git] / typo3 / alt_mod_frameset.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Creates the frameset for 'Frameset modules' like Web>* and File>*
29 *
30 * @author Kasper Skårhøj <kasper@typo3.com>
31 * @package TYPO3
32 * @subpackage core
33 *
34 * Revised for TYPO3 3.6 2/2003 by Kasper Skårhøj
35 * XHTML compliant content (with exception of a few attributes for the <frameset> tags)
36 */
37
38 require ('init.php');
39 require ('template.php');
40
41
42
43
44 // ***************************
45 // Script Class
46 // ***************************
47 class SC_alt_mod_frameset {
48 var $content;
49 var $defaultWidth = 245;
50
51 /**
52 * Creates the header and frameset for the module/submodules
53 */
54 function main() {
55 global $BE_USER,$TBE_TEMPLATE;
56
57 // Processing vars:
58 $width = $BE_USER->uc['navFrameWidth'];
59 $width = intval($width)?intval($width):$this->defaultWidth;
60
61 // Navigation frame URL:
62 $script = t3lib_div::GPvar('script');
63 $nav = t3lib_div::GPvar('nav');
64 $URL_nav = htmlspecialchars($nav.'?currentSubScript='.rawurlencode($script));
65
66 // List frame URL:
67 $exScript = t3lib_div::GPvar('exScript');
68 $id = t3lib_div::GPvar('id');
69 $URL_list = htmlspecialchars($exScript?$exScript:($script.($id?'?id='.rawurlencode($id):'')));
70
71 // Start page output
72 $TBE_TEMPLATE->docType='xhtml_frames';
73 $this->content = $TBE_TEMPLATE->startPage('Frameset');
74 $this->content.= '
75
76 <frameset cols="'.$width.',8,*" framespacing="0" frameborder="0" border="0">
77 <frame name="nav_frame" src="'.$URL_nav.'" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
78 <frame name="border_frame" src="border.html" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />
79 <frame name="list_frame" src="'.$URL_list.'" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
80 </frameset>
81
82 </html>
83 ';
84 }
85
86 /**
87 * Outputs it all.
88 */
89 function printContent() {
90 echo $this->content;
91 }
92 }
93
94 // Include extension?
95 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_mod_frameset.php']) {
96 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_mod_frameset.php']);
97 }
98
99
100
101
102
103
104
105
106
107
108
109 // ******************************
110 // Starting document output
111 // ******************************
112
113 // Make instance:
114 $SOBE = t3lib_div::makeInstance('SC_alt_mod_frameset');
115 $SOBE->main();
116 $SOBE->printContent();
117 ?>