-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotice.inc.php
30 lines (30 loc) · 927 Bytes
/
notice.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?
if (isset($_GET['notice']) && !preg_match("/^\s*$/i", $_GET['notice'])) {
$notice = $_GET['notice'];
switch ($notice) {
case "success":
$notice_msg = "Successfully logged in, welcome!";
$type = "notice_success";
break;
case "no_access":
$notice_msg = "Sorry, you do not have access to the requested page!";
$type = "notice_warning";
break;
case "logout":
$notice_msg = "Successfully logged out, see you next time!";
$type = "notice_success";
break;
default:
$notice_msg = "Sorry, you do not have access to the requested page!";
$type = "notice_warning";
break;
}
echo("
<script>
$(function() {
Notice.init('" . $notice_msg . "', '" . $type . "');
})
</script>
");
}
?>