-
Notifications
You must be signed in to change notification settings - Fork 0
/
alert.php
61 lines (61 loc) · 1.44 KB
/
alert.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
if(isset($_COOKIE['alert'])) {
$alert = $_COOKIE['alert'];
if($alert == "permission_denial") {
echo "
<script>
Swal.fire({
icon: 'error',
title: 'Sorry, You do not have permission...',
text: 'This page are only accessible to admins.',
})
</script>
";
}
if($alert == "fail_login") {
echo "
<script>
Swal.fire({
icon: 'error',
title: 'Sorry...',
text: 'Your information does not match any rows.',
footer: 'Recheck your username and password infomation.'
})
</script>
";
}
if($alert == "register_success") {
echo "
<script>
Swal.fire({
icon: 'success',
title: 'Register Sucessfully!',
text: 'You are now can login to the system.'
})
</script>
";
}
if($alert == "successfully_add_ticket") {
echo "
<script>
Swal.fire({
icon: 'success',
title: 'Add Ticket Successful!',
text: 'Your tickets are now visible to admins.'
})
</script>
";
}
if($alert == "successfully_logout") {
echo "
<script>
Swal.fire({
icon: 'success',
title: 'You are now logged out!'
})
</script>
";
}
setcookie('alert', '', 0);
}
?>