-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupload.php
70 lines (63 loc) · 1.76 KB
/
upload.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
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
<style>
html,body{
height: 100%;
background:#EEEEEE;
}
</style>
<?php
include 'config.php';
include 'fun.php';
if (is_array($_FILES)) {
if (is_uploaded_file($_FILES['userImage']['tmp_name'])) {
$sourcePath = $_FILES['userImage']['tmp_name'];
$targetPath = "img/" . $_FILES['userImage']['name'];
if (move_uploaded_file($sourcePath, $targetPath)) {
?>
<div style="padding-top:5%;"class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-header">Before</div>
<div class="card-body">
<center><img height="50%" width="50%" class="img-responsive" src="<?php echo $targetPath; ?>"
class="upload-preview" /></center>
</div></div></div>
<div class="col-sm-6">
<div class="card">
<div class="card-header">After</div>
<div class="card-body">
<?php
switch ($removeapi) {
case "1":
picwish($targetPath);
break;
case "2":
photoroom($targetPath);
break;
case "3":
imagga($targetPath);
break;
case "4":
clipdrop($targetPath);
break;
case "5":
slazzer($targetPath);
break;
case "6":
clippingmagic($targetPath);
break;
case "7":
removebg($targetPath);
break;
default:
echo "Configuration Failed";
}
?> </div> </div> </div> </div>
<?php
}
}
}
?>