ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilFramesetGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 
32 {
33 
38  function __construct()
39  {
40  $this->setMainWidth("*");
41  $this->setSideWidth("25%");
42  }
43 
47  function setFramesetTitle($a_fs_title)
48  {
49  $this->frameset_title = $a_fs_title;
50  }
51 
55  function setMainFrameSource($a_main_source)
56  {
57  $this->main_frame_source = $a_main_source;
58  }
59 
63  function setMainFrameTitle($a_main_title)
64  {
65  $this->main_frame_title = $a_main_title;
66  }
67 
71  function setMainFrameName($a_main_name)
72  {
73  $this->main_frame_name = $a_main_name;
74  }
75 
79  function setSideFrameSource($a_side_source)
80  {
81  $this->side_frame_source = $a_side_source;
82  }
83 
87  function setSideFrameTitle($a_side_title)
88  {
89  $this->side_frame_title = $a_side_title;
90  }
91 
95  function setSideFrameName($a_side_name)
96  {
97  $this->side_frame_name = $a_side_name;
98  }
99 
105  function setMainWidth($a_mainwidth)
106  {
107  $this->mainwidth = $a_mainwidth;
108  }
109 
115  function getMainWidth()
116  {
117  return $this->mainwidth;
118  }
119 
125  function setSideWidth($a_sidewidth)
126  {
127  $this->sidewidth = $a_sidewidth;
128  }
129 
135  function getSideWidth()
136  {
137  return $this->sidewidth;
138  }
139 
143  function show()
144  {
145  global $ilSetting;
146 
147  if ($ilSetting->get("tree_frame") == "right")
148  {
149  $main = "LEFT";
150  $side = "RIGHT";
151  }
152  else
153  {
154  $main = "RIGHT";
155  $side = "LEFT";
156  }
157 
158  $tpl = new ilTemplate("tpl.frameset.html", true, false);
159  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
160  $tpl->setVariable("PAGETITLE", "- ".$this->frameset_title);
161  $tpl->setVariable("SRC_".$main, $this->main_frame_source);
162  $tpl->setVariable("SRC_".$side, $this->side_frame_source);
163  $tpl->setVariable("TITLE_".$main, $this->main_frame_title);
164  $tpl->setVariable("TITLE_".$side, $this->side_frame_title);
165  $tpl->setVariable("NAME_".$main, $this->main_frame_name);
166  $tpl->setVariable("NAME_".$side, $this->side_frame_name);
167  $tpl->setVariable("WIDTH_".$main, $this->getMainWidth());
168  $tpl->setVariable("WIDTH_".$side, $this->getSideWidth());
169  if ($ilSetting->get('short_inst_name') != "")
170  {
171  $tpl->setVariable("WINDOW_TITLE",
172  $ilSetting->get('short_inst_name'));
173  }
174  else
175  {
176  $tpl->setVariable("WINDOW_TITLE",
177  "ILIAS");
178  }
179 
180  $tpl->show("DEFAULT", false);
181  }
182 
183 }