ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilImprintGUI.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 require_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
5 require_once("./Services/Imprint/classes/class.ilImprint.php");
6 
18 {
22  public function __construct()
23  {
24  global $tpl;
25 
26  if(!ilImprint::_exists("impr", 1))
27  {
28  $page = new ilImprint("impr");
29  $page->setId(1);
30  $page->create();
31  }
32 
33  // there is only 1 imprint page
34  parent::__construct("impr", 1);
35 
36  // content style (using system defaults)
37  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
38 
39  $tpl->setCurrentBlock("SyntaxStyle");
40  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
42  $tpl->parseCurrentBlock();
43 
44  $tpl->setCurrentBlock("ContentStyle");
45  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
47  $tpl->parseCurrentBlock();
48  }
49 
53  function executeCommand()
54  {
55  global $ilCtrl, $ilLocator, $lng;
56 
57  if($_REQUEST["baseClass"] == "ilImprintGUI")
58  {
59  $this->renderFullscreen();
60  }
61 
62  $next_class = $ilCtrl->getNextClass($this);
63 
64  $title = $lng->txt("adm_imprint");
65 
66  switch($next_class)
67  {
68  case "ilpageobjectgui":
69  die("Deprecated. ilImprintGUI gui forwarding to ilpageobject");
70  return;
71 
72  default:
73  $this->setPresentationTitle($title);
74 
75  $ilLocator->addItem($title,
76  $ilCtrl->getLinkTarget($this, "preview"));
77 
78  return parent::executeCommand();
79  }
80  }
81 
82  function postOutputProcessing($a_output)
83  {
84  global $lng;
85 
86  if($this->getOutputMode() == IL_PAGE_PREVIEW)
87  {
88  if(!$this->getPageObject()->getActive())
89  {
90  ilUtil::sendInfo($lng->txt("adm_imprint_inactive"));
91  }
92  }
93 
94  return $a_output;
95  }
96 
97  protected function renderFullscreen()
98  {
99  global $tpl, $lng, $ilMainMenu;
100 
101  if(!ilImprint::isActive())
102  {
103  ilUtil::redirect("ilias.php?baseClass=ilPersonalDesktopGUI");
104  }
105 
106  $tpl->getStandardTemplate();
107 
108  $this->setRawPageContent(true);
109  $html = $this->showPage();
110 
111  $itpl = new ilTemplate("tpl.imprint.html", true, true, "Services/Imprint");
112  $itpl->setVariable("PAGE_TITLE", $lng->txt("imprint"));
113  $itpl->setVariable("IMPRINT", $html);
114  unset($html);
115 
116  $tpl->setContent($itpl->get());
117 
118  $ilMainMenu->showLogoOnly(true);
119  $tpl->setFrameFixedWidth(true);
120 
121  echo $tpl->show("DEFAULT", true, false);
122  exit();
123  }
124 }
125 
126 ?>