-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuploadCSV.php
45 lines (41 loc) · 1.46 KB
/
uploadCSV.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
include 'base.php';
$passkey = md5('thepasskey');
if (isset($_GET['passkey'])) {
if ($_GET['passkey'] == $passkey) {
?>
<form enctype="multipart/form-data" <?php echo 'action="csvuploader.php?passkey=' . $passkey . '"' ?> method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
<?php
} else {
?>
<form method="get" onsubmit="getById('passkey').value = md5(getById('passkey').value);">
Pass: <input id="passkey" type="password" name="passkey" /><br />
<input type='submit' />
</form>
<?php
}
} else { //IF THE FORM WAS NOT SUBMITTED
//SHOW FORM
?>
<form method="get" onsubmit="getById('passkey').value = md5(getById('passkey').value);">
Pass: <input id="passkey" type="password" name="passkey" /><br />
<input type='submit' />
</form>
<?php
}
?>
<br />
<a <?php echo 'href="manage.php?passkey=' . $_GET['passkey'] . '"' ?>>Back to management</a>
</body>
</html>