ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSystemSupportContactsGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
4
13{
14 protected $ctrl;
15
19 function __construct()
20 {
21 global $ilCtrl, $tpl, $lng;
22
23 $this->ctrl = $ilCtrl;
24 $this->tpl = $tpl;
25 $this->lng = $lng;
26 }
27
28
32 function executeCommand()
33 {
34 $cmd = $this->ctrl->getCmd("showContacts");
35 if (in_array($cmd, array("showContacts")))
36 {
37 $this->$cmd();
38 }
39 }
40
44 function showContacts()
45 {
46 $this->lng->loadLanguageModule("adm");
47 $this->tpl->getStandardTemplate();
48 $this->tpl->setTitle($this->lng->txt("adm_support_contacts"));
49 include_once("./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
50 $panel = ilPanelGUI::getInstance();
51 $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_PRIMARY);
52
53 $html = "";
54 include_once("./Modules/SystemFolder/classes/class.ilSystemSupportContacts.php");
56 {
57 include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
58 $pgui = new ilPublicUserProfileGUI($c);
59 //$pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
60 $pgui->setEmbedded(true);
61 $html.= $pgui->getHTML();
62 }
63
64 $panel->setBody($html);
65
66 $this->tpl->setContent($panel->getHTML());
67 $this->tpl->show();
68 }
69
70
76 static function getFooterLink()
77 {
78 global $ilCtrl, $ilUser;
79
80 include_once("./Modules/SystemFolder/classes/class.ilSystemSupportContacts.php");
81
83 if (count($users) > 0)
84 {
85 // #17847 - we cannot use a proper GUI on the login screen
86 if(!$ilUser->getId())
87 {
88 foreach($users as $user)
89 {
90 $mail = ilObjUser::_lookupEmail($user);
91 if(trim($mail))
92 {
93 return "mailto:".$mail;
94 }
95 }
96 }
97 else
98 {
99 return $ilCtrl->getLinkTargetByClass("ilsystemsupportcontactsgui", "", "", false, false);
100 }
101 }
102
103
104 /*$m = ilUtil::prepareFormOutput(ilSystemSupportContacts::getMailToAddress());
105 if ($m != "")
106 {
107 return "mailto:".$m;
108 }*/
109 return "";
110 }
111
117 static function getFooterText()
118 {
119 global $lng;
120 return $lng->txt("contact_sysadmin");
121 }
122
123}
124
125?>
global $tpl
Definition: ilias.php:8
_lookupEmail($a_user_id)
Lookup email.
static getInstance()
Get instance.
const PANEL_STYLE_PRIMARY
GUI class for public user profile presentation.
static getValidSupportContactIds()
Get valid support contacts.
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35
global $ilUser
Definition: imgupload.php:15