ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilSessionReminderGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once 'Services/Authentication/classes/class.ilSessionReminder.php';
5 
12 {
16  protected $session_reminder;
17 
22  {
23  $this->setSessionReminder($session_reminder);
24  }
25 
29  public function getHtml()
30  {
35  global $lng, $tpl;
36 
37  if ($this->getSessionReminder()->isActive()) {
38  require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
40 
41  require_once 'Services/YUI/classes/class.ilYuiUtil.php';
42  ilYuiUtil::initCookie();
43 
44  $tpl->addJavaScript('./Services/Authentication/js/session_reminder.js');
45 
46  $reminder_tpl = new ilTemplate('tpl.session_reminder.html', true, true, 'Services/Authentication');
47  $reminder_tpl->setVariable('DEBUG', defined('DEVMODE') && DEVMODE ? 1 : 0);
48  $reminder_tpl->setVariable('CLIENT_ID', CLIENT_ID);
49  $reminder_tpl->setVariable('FREQUENCY', 60);
50  $reminder_tpl->setVariable('SESSION_ID_HASH', md5(session_id()));
51  $reminder_tpl->setVariable(
52  'URL',
53  './sessioncheck.php?client_id=' . CLIENT_ID .
54  '&lang=' . $lng->getLangKey()
55  );
56 
57  return $reminder_tpl->get();
58  }
59 
60  return '';
61  }
62 
68  {
69  $this->session_reminder = $session_reminder;
70  return $this;
71  }
72 
76  public function getSessionReminder()
77  {
79  }
80 }
$tpl
Definition: ilias.php:10
special template class to simplify handling of ITX/PEAR
setSessionReminder($session_reminder)
global $lng
Definition: privfeed.php:17
__construct(ilSessionReminder $session_reminder)
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27