-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
59 lines (53 loc) · 1.69 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Converter</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css" />
<style>
body {
text-align: center;
}
h1 {
color: rgb(117, 59, 17);
}
input[type="file"] {
padding: 10px 20px;
border: 2px solid rgb(117, 59, 17);
border-radius: 10px;
cursor: pointer;
}
input[type="submit"] {
background-color: rgb(201, 115, 54);
padding: 10px 50px;
border: none;
border-radius: 10px;
cursor: pointer;
}
</style>
<script>
const validateUpload = () => {
let files = document.getElementById("files").files;
if (files.length === 0) {
alert("Please choose a file or multiple files to upload");
return false;
}
}
</script>
</head>
<body>
<center>
<form name="upload" method="POST" action="upload.php" enctype="multipart/form-data" onsubmit="return validateUpload()" required>
<div>
<h1>Upload XLS/XLSX File:</h1><br>
<input type="file" id="files" name="files[]" accept=".xlsx, .xls" multiple>
</div><br>
<input type="submit" name="submitJson" value="Json">
<input type="submit" name="submitArray" value="Array">
<input type="reset" value="Clear">
</form>
</center>
</body>
</html>