-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessage.php
More file actions
35 lines (32 loc) · 739 Bytes
/
Copy pathmessage.php
File metadata and controls
35 lines (32 loc) · 739 Bytes
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
<?php
if(isset($_SESSION['alert']) && $_SESSION['alertCode']) :
?>
<script>
Swal.fire({
text: "<?= $_SESSION['alert'] ?>",
icon: "<?= $_SESSION['alertCode'] ?>",
});
</script>
<?php
unset($_SESSION['alert']);
endif;
?>
<script>
$('#logout').on('click', function(event){
event.preventDefault();
const href = $(this).attr('href')
Swal.fire({
text: "Do you really want to Log out?",
icon: "question",
showCancelButton: true,
confirmButtonText: 'Yes!',
confirmButtonColor: 'red',
focusCancel: true,
returnFocus: false,
}).then((result) => {
if(result.value){
document.location.href = href;
}
})
})
</script>