From 0869034ed71e3d3a6bc03551e48657bd83be9b96 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 17 Oct 2013 19:45:55 +0200 Subject: Day 3 --- inc/message.inc.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 inc/message.inc.php (limited to 'inc/message.inc.php') diff --git a/inc/message.inc.php b/inc/message.inc.php new file mode 100644 index 00000000..9409db95 --- /dev/null +++ b/inc/message.inc.php @@ -0,0 +1,29 @@ + 'Benutzername oder Kennwort falsch', + 'token' => 'Ungültiges Token. CSRF Angriff?', +); + +class Message +{ + private static $list = array(); + + public static function addError($id) + { + self::$list[] = array( + 'type' => 'error', + 'id' => $id + ); + } + + public static function renderList() + { + foreach (self::$list as $item) { + Render::addTemplate('messagebox-' . $item['type'], array('message' => $error_text[$item['id']])); + } + } + +} + -- cgit v1.2.3-55-g7522