summaryrefslogtreecommitdiffstats
path: root/inc/message.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2013-10-18 13:20:31 +0200
committerSimon Rettberg2013-10-18 13:20:31 +0200
commit044631ed2ac590a5e67ba4ac07267e790f814863 (patch)
treeb92e817a5975c1db86b985303eac7ab37bb80750 /inc/message.inc.php
parentDay 3 (diff)
downloadslx-admin-044631ed2ac590a5e67ba4ac07267e790f814863.tar.gz
slx-admin-044631ed2ac590a5e67ba4ac07267e790f814863.tar.xz
slx-admin-044631ed2ac590a5e67ba4ac07267e790f814863.zip
Show different content on main page depending on logged in/guest status
Diffstat (limited to 'inc/message.inc.php')
-rw-r--r--inc/message.inc.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/inc/message.inc.php b/inc/message.inc.php
index 9409db95..238ed939 100644
--- a/inc/message.inc.php
+++ b/inc/message.inc.php
@@ -18,8 +18,33 @@ class Message
);
}
+ public static function addWarning($id)
+ {
+ self::$list[] = array(
+ 'type' => 'warning',
+ 'id' => $id
+ );
+ }
+
+ public static function addInfo($id)
+ {
+ self::$list[] = array(
+ 'type' => 'info',
+ 'id' => $id
+ );
+ }
+
+ public static function addSuccess($id)
+ {
+ self::$list[] = array(
+ 'type' => 'success',
+ 'id' => $id
+ );
+ }
+
public static function renderList()
{
+ global $error_text;
foreach (self::$list as $item) {
Render::addTemplate('messagebox-' . $item['type'], array('message' => $error_text[$item['id']]));
}