ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 {
17  protected $tpl;
18 
22  protected $lng;
23 
24  protected $ctrl;
25 
29  public function __construct()
30  {
31  global $DIC;
32 
33  $ilCtrl = $DIC->ctrl();
34  $tpl = $DIC["tpl"];
35  $lng = $DIC->language();
36 
37  $this->ctrl = $ilCtrl;
38  $this->tpl = $tpl;
39  $this->lng = $lng;
40  }
41 
42 
46  public function executeCommand()
47  {
48  $cmd = $this->ctrl->getCmd("showContacts");
49  if (in_array($cmd, array("showContacts"))) {
50  $this->$cmd();
51  }
52  }
53 
57  public function showContacts()
58  {
59  $this->lng->loadLanguageModule("adm");
60  $this->tpl->getStandardTemplate();
61  $this->tpl->setTitle($this->lng->txt("adm_support_contacts"));
62  include_once("./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
63  $panel = ilPanelGUI::getInstance();
64  $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_PRIMARY);
65 
66  $html = "";
67  include_once("./Modules/SystemFolder/classes/class.ilSystemSupportContacts.php");
69  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
70  $pgui = new ilPublicUserProfileGUI($c);
71  //$pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
72  $pgui->setEmbedded(true);
73  $html .= $pgui->getHTML();
74  }
75 
76  $panel->setBody($html);
77 
78  $this->tpl->setContent($panel->getHTML());
79  $this->tpl->show();
80  }
81 
82 
88  public static function getFooterLink()
89  {
90  global $DIC;
91 
92  $ilCtrl = $DIC->ctrl();
93  $ilUser = $DIC->user();
94 
95  include_once("./Modules/SystemFolder/classes/class.ilSystemSupportContacts.php");
96 
98  if (count($users) > 0) {
99  // #17847 - we cannot use a proper GUI on the login screen
100  if (!$ilUser->getId()) {
101  foreach ($users as $user) {
102  $mail = ilObjUser::_lookupEmail($user);
103  if (trim($mail)) {
104  return "mailto:" . $mail;
105  }
106  }
107  } else {
108  return $ilCtrl->getLinkTargetByClass("ilsystemsupportcontactsgui", "", "", false, false);
109  }
110  }
111 
112 
113  /*$m = ilUtil::prepareFormOutput(ilSystemSupportContacts::getMailToAddress());
114  if ($m != "")
115  {
116  return "mailto:".$m;
117  }*/
118  return "";
119  }
120 
126  public static function getFooterText()
127  {
128  global $DIC;
129 
130  $lng = $DIC->language();
131  return $lng->txt("contact_sysadmin");
132  }
133 }
global $DIC
Definition: saml.php:7
const PANEL_STYLE_PRIMARY
global $ilCtrl
Definition: ilias.php:18
GUI class for public user profile presentation.
$ilUser
Definition: imgupload.php:18
$user
Definition: migrateto20.php:57
$users
Definition: authpage.php:44
static getInstance()
Get instance.
static _lookupEmail($a_user_id)
Lookup email.
static getValidSupportContactIds()
Get valid support contacts.
$html
Definition: example_001.php:87