ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilFramesetGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
12 {
13 
18  function __construct()
19  {
20  global $lng;
21 
22  $this->setMainWidth("*");
23  $this->setSideWidth("25%");
24 
25  // default titles (accessibility revision)
26  // should not been overwritten, if no good reason is given
27  $this->setSideFrameTitle($lng->txt("side_frame"));
28  $this->setMainFrameTitle($lng->txt("content_frame"));
29  }
30 
34  function setFramesetTitle($a_fs_title)
35  {
36  $this->frameset_title = $a_fs_title;
37  }
38 
42  function setMainFrameSource($a_main_source)
43  {
44  $this->main_frame_source = $a_main_source;
45  }
46 
50  function setMainFrameTitle($a_main_title)
51  {
52  $this->main_frame_title = $a_main_title;
53  }
54 
58  function setMainFrameName($a_main_name)
59  {
60  $this->main_frame_name = $a_main_name;
61  }
62 
66  function setSideFrameSource($a_side_source)
67  {
68  $this->side_frame_source = $a_side_source;
69  }
70 
74  function setSideFrameTitle($a_side_title)
75  {
76  $this->side_frame_title = $a_side_title;
77  }
78 
82  function setSideFrameName($a_side_name)
83  {
84  $this->side_frame_name = $a_side_name;
85  }
86 
92  function setMainWidth($a_mainwidth)
93  {
94  $this->mainwidth = $a_mainwidth;
95  }
96 
102  function getMainWidth()
103  {
104  return $this->mainwidth;
105  }
106 
112  function setSideWidth($a_sidewidth)
113  {
114  $this->sidewidth = $a_sidewidth;
115  }
116 
122  function getSideWidth()
123  {
124  return $this->sidewidth;
125  }
126 
130  function show()
131  {
132  global $ilSetting;
133 
134  if ($ilSetting->get("tree_frame") == "right")
135  {
136  $main = "LEFT";
137  $side = "RIGHT";
138  }
139  else
140  {
141  $main = "RIGHT";
142  $side = "LEFT";
143  }
144 
145  $tpl = new ilTemplate("tpl.frameset.html", true, false);
146  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
147 
148  $tpl->setVariable("PAGETITLE", "- ".ilUtil::stripScriptHTML($this->frameset_title));
149  $tpl->setVariable("SRC_".$main, $this->main_frame_source);
150  $tpl->setVariable("SRC_".$side, $this->side_frame_source);
151  $tpl->setVariable("TITLE_".$main, $this->main_frame_title);
152  $tpl->setVariable("TITLE_".$side, $this->side_frame_title);
153  $tpl->setVariable("NAME_".$main, $this->main_frame_name);
154  $tpl->setVariable("NAME_".$side, $this->side_frame_name);
155  $tpl->setVariable("WIDTH_".$main, $this->getMainWidth());
156  $tpl->setVariable("WIDTH_".$side, $this->getSideWidth());
157  if ($ilSetting->get('short_inst_name') != "")
158  {
159  $tpl->setVariable("WINDOW_TITLE",
160  $ilSetting->get('short_inst_name'));
161  }
162  else
163  {
164  $tpl->setVariable("WINDOW_TITLE",
165  "ILIAS");
166  }
167 
168  $tpl->show("DEFAULT", false);
169  }
170 
171 }