-
Notifications
You must be signed in to change notification settings - Fork 1
/
view-images.php
70 lines (61 loc) · 1.82 KB
/
view-images.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
62
63
64
65
66
67
68
69
70
<?php
include_once 'config/config.php';
$user_function = new config();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Image Upload</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<div class="container-fluid">
<div class="container">
<div class="row text-center">
<div class="col-lg-12">
<h1 class="head-title">View Images</h1>
</div>
</div>
</div>
<div class="container">
<div class="image-viewbox" id="img-pre">
</div>
</div>
</div>
<div class="container-fluid">
<a class="up-back" href="index.php">
<i class="fas fa-upload"></i>
</a>
</div>
<script src="http://code.jquery.com/jquery-3.3.1.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" ></script>
<script type="text/javascript">
$(document).ready(function (){
$('#img-pre').load("load-img.php");
$(document).on('click', '.img-close', function(){
var data_val = $(this).data('dataid');
$.ajax({
type: "POST",
url: "ajax-process/img-delete.php",
data: { 'dataid' : data_val },
success: function (data) {
var data = JSON.parse(data);
if(data.status == 200){
console.log(data.msg);
$('#img-pre').load("load-img.php");
}
else{
console.log(data.msg);
}
}
});
});
});
</script>
</body>
</html>