ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 {
39 require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
41
42 require_once 'Services/YUI/classes/class.ilYuiUtil.php';
43 ilYuiUtil::initCookie();
44
45 $tpl->addJavaScript('./Services/Authentication/js/session_reminder.js');
46
47 $reminder_tpl = new ilTemplate('tpl.session_reminder.html', true, true, 'Services/Authentication');
48 $reminder_tpl->setVariable('DEBUG', defined('DEVMODE') && DEVMODE ? 1 : 0);
49 $reminder_tpl->setVariable('CLIENT_ID', CLIENT_ID);
50 $reminder_tpl->setVariable('SESSION_NAME', session_name());
51 $reminder_tpl->setVariable('FREQUENCY', 60);
52 $reminder_tpl->setVariable('SESSION_ID', session_id());
53 $reminder_tpl->setVariable(
54 'URL',
55 './sessioncheck.php?client_id=' . CLIENT_ID .
56 '&lang='.$lng->getLangKey()
57 );
58
59 return $reminder_tpl->get();
60 }
61
62 return '';
63 }
64
70 {
71 $this->session_reminder = $session_reminder;
72 return $this;
73 }
74
78 public function getSessionReminder()
79 {
81 }
82}
global $tpl
Definition: ilias.php:8
setSessionReminder($session_reminder)
__construct(ilSessionReminder $session_reminder)
special template class to simplify handling of ITX/PEAR
static initjQuery($a_tpl=null)
Init jQuery.
global $lng
Definition: privfeed.php:40