-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtes.php
40 lines (38 loc) · 1.46 KB
/
tes.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
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<!-- Toastr -->
<link rel="stylesheet" type="text/css" href="files\bower_components\toastr\toastr.css">
<!-- Toastr -->
<script type="text/javascript" src="files\bower_components\toastr\toastr.min.js"></script>
<script type="text/javascript" src="files\bower_components\jquery\js\jquery.min.js"></script>
<form action="abc" method="POST">
<input type="hidden" name="p_id" id="p_id" value="<?php echo $rows['p_id']; ?>">
<button class="btn btn-danger" name="archive" type="submit" onclick="archiveFunction()">
<i class="fa fa-archive"></i>
Archive
</button>
</form>
<script type="text/javascript">
function archiveFunction() {
event.preventDefault(); // prevent form submit
var form = event.target.form; // storing the form
swal({
title: "Are you sure?",
text: "But you will still be able to retrieve this file.",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, archive it!",
cancelButtonText: "No, cancel please!",
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm) {
form.submit();
} else {
swal("Cancelled", "Your imaginary file is safe :)", "error");
}
});
}
</script>