ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilPDSysMessageBlockGUI.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/Mail/classes/class.ilPDMailBlockGUI.php");
5
15{
16 static $block_type = "pdsysmess";
17
21 public function __construct()
22 {
23 global $lng;
24 parent::__construct();
25
26 $this->setTitle($lng->txt("show_system_messages"));
27 $this->setAvailableDetailLevels(3, 1);
28 $this->mail_mode = "system";
29 $this->allow_moving = false;
30 }
31
37 static function getBlockType()
38 {
39 return self::$block_type;
40 }
41
47 static function isRepositoryObject()
48 {
49 return false;
50 }
51
52 function getHTML()
53 {
54 if ($this->getCurrentDetailLevel() < 1)
55 {
56 $this->setCurrentDetailLevel(1);
57 }
58
59 $html = parent::getHTML();
60
61 if (count($this->mails) == 0)
62 {
63 return "";
64 }
65 else
66 {
67 return $html;
68 }
69 }
70
74 function getMails()
75 {
76 global $ilUser;
77
78 // BEGIN MAILS
79 $umail = new ilMail($_SESSION["AccountId"]);
80 $mbox = new ilMailBox($_SESSION["AccountId"]);
81 $inbox = $mbox->getInboxFolder();
82
83 //SHOW MAILS FOR EVERY USER
84 $this->mails = $umail->getMailsOfFolder($inbox, array('status' => 'unread', 'type' => 'system'));
85 }
86
90 function getOverview()
91 {
92 global $ilUser, $lng, $ilCtrl;
93
94 return '<div class="small">'.((int) count($this->mails))." ".$lng->txt("system_message")."</div>";
95 }
96
97}
98
99?>
getCurrentDetailLevel()
Get Current Detail Level.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setTitle($a_title)
Set Title.
setCurrentDetailLevel($a_currentdetaillevel)
Set Current Detail Level.
Class Mail this class handles base functions for mail handling.
BlockGUI class for Personal Desktop Mail block.
BlockGUI class for System Messages block on personal desktop.
static isRepositoryObject()
Get block type.
static getBlockType()
Get block type.
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15