ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4require_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
5require_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
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
120 echo $tpl->show("DEFAULT", true, false);
121 exit();
122 }
123}
124
125?>
const IL_PAGE_PREVIEW
Class ilImprintGUI.
postOutputProcessing($a_output)
Finalizing output processing.
__construct()
Constructor.
executeCommand()
execute command
Class ilImprint.
static isActive()
getContentStylePath($a_style_id)
get content style path
getSyntaxStylePath()
get syntax style path
Class ilPageObjectGUI.
setPresentationTitle($a_title="")
showPage()
display content of page
setRawPageContent($a_rawpagecontent)
Set Get raw page content only.
getPageObject()
Get Page Object.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
special template class to simplify handling of ITX/PEAR
static redirect($a_script)
http redirect to other script
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
exit
Definition: login.php:54
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7