Added more comments, $Id$ keywords etc for the whole core of TYPO3.
[Packages/TYPO3.CMS.git] / typo3 / alt_mod_frameset.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skaarhoj (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 * $Id$
31 * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
32 * XHTML compliant content (with exception of a few attributes for the <frameset> tags)
33 *
34 * @author Kasper Skaarhoj <kasper@typo3.com>
35 */
36 /**
37 * [CLASS/FUNCTION INDEX of SCRIPT]
38 *
39 *
40 *
41 * 63: class SC_alt_mod_frameset
42 * 72: function main()
43 * 109: function printContent()
44 *
45 * TOTAL FUNCTIONS: 2
46 * (This index is automatically created/updated by the extension "extdeveval")
47 *
48 */
49
50 require ('init.php');
51 require ('template.php');
52
53
54
55
56 /**
57 * Script Class
58 *
59 * @author Kasper Skaarhoj <kasper@typo3.com>
60 * @package TYPO3
61 * @subpackage core
62 */
63 class SC_alt_mod_frameset {
64 var $content;
65 var $defaultWidth = 245;
66
67 /**
68 * Creates the header and frameset for the module/submodules
69 *
70 * @return void
71 */
72 function main() {
73 global $BE_USER,$TBE_TEMPLATE;
74
75 // Processing vars:
76 $width = $BE_USER->uc['navFrameWidth'];
77 $width = intval($width)?intval($width):$this->defaultWidth;
78
79 // Navigation frame URL:
80 $script = t3lib_div::GPvar('script');
81 $nav = t3lib_div::GPvar('nav');
82 $URL_nav = htmlspecialchars($nav.'?currentSubScript='.rawurlencode($script));
83
84 // List frame URL:
85 $exScript = t3lib_div::GPvar('exScript');
86 $id = t3lib_div::GPvar('id');
87 $URL_list = htmlspecialchars($exScript?$exScript:($script.($id?'?id='.rawurlencode($id):'')));
88
89 // Start page output
90 $TBE_TEMPLATE->docType='xhtml_frames';
91 $this->content = $TBE_TEMPLATE->startPage('Frameset');
92 $this->content.= '
93
94 <frameset cols="'.$width.',8,*" framespacing="0" frameborder="0" border="0">
95 <frame name="nav_frame" src="'.$URL_nav.'" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
96 <frame name="border_frame" src="border.html" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />
97 <frame name="list_frame" src="'.$URL_list.'" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
98 </frameset>
99
100 </html>
101 ';
102 }
103
104 /**
105 * Outputs it all.
106 *
107 * @return void
108 */
109 function printContent() {
110 echo $this->content;
111 }
112 }
113
114 // Include extension?
115 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_mod_frameset.php']) {
116 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_mod_frameset.php']);
117 }
118
119
120
121
122
123
124
125
126
127
128
129 // ******************************
130 // Starting document output
131 // ******************************
132
133 // Make instance:
134 $SOBE = t3lib_div::makeInstance('SC_alt_mod_frameset');
135 $SOBE->main();
136 $SOBE->printContent();
137 ?>