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
4include_once 'Services/Authentication/classes/class.ilSessionReminder.php';
5
12{
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
An exception for terminatinating execution or to throw for unit testing.
setSessionReminder($session_reminder)
__construct(ilSessionReminder $session_reminder)
special template class to simplify handling of ITX/PEAR
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
global $lng
Definition: privfeed.php:17