ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ?>
const PANEL_STYLE_PRIMARY
$cmd
Definition: sahs_server.php:35
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
GUI class for public user profile presentation.
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
static getInstance()
Get instance.
static _lookupEmail($a_user_id)
Lookup email.
global $lng
Definition: privfeed.php:17
static getValidSupportContactIds()
Get valid support contacts.
$html
Definition: example_001.php:87