Line | |
---|
1 | <?php |
---|
2 | if (!empty($_SESSION['_messages']) && is_array($_SESSION['_messages'])) { |
---|
3 | ?><div class="codebasemsg"><?php |
---|
4 | foreach ($_SESSION['_messages'] as $message) { |
---|
5 | if (error_reporting() > 0 && $CFG->display_errors) { |
---|
6 | echo "\n<!-- [" . $message['file'] . ' : ' . $message['line'] . '] -->'; |
---|
7 | } |
---|
8 | switch ($message['type']) { |
---|
9 | case MSG_ERR: |
---|
10 | echo '<div class="error">' . $message['message'] . '</div>'; |
---|
11 | break; |
---|
12 | |
---|
13 | case MSG_WARNING: |
---|
14 | echo '<div class="warning">' . $message['message'] . '</div>'; |
---|
15 | break; |
---|
16 | |
---|
17 | case MSG_SUCCESS: |
---|
18 | echo '<div class="success">' . $message['message'] . '</div>'; |
---|
19 | break; |
---|
20 | |
---|
21 | case MSG_NOTICE: |
---|
22 | default: |
---|
23 | echo '<div class="notice">' . $message['message'] . '</div>'; |
---|
24 | break; |
---|
25 | |
---|
26 | } |
---|
27 | } |
---|
28 | ?></div><?php |
---|
29 | |
---|
30 | // Reset the message stack. |
---|
31 | $_SESSION['_messages'] = array(); |
---|
32 | } |
---|
33 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.