-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
52 lines (51 loc) · 1.34 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
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>File Share</title>
</head>
<body>
<?php
// Reporting back error messages
if (isset($_SESSION['message']) && $_SESSION['message'])
{
printf('<b>%s</b>', $_SESSION['message']);
unset($_SESSION['message']);
}
?>
<div align="center"><h1>FileShare</h1></div>
<div align="center">
<form method="POST" action="upload.php" enctype="multipart/form-data">
<div>
<span>Upload a File:</span>
<input type="file" name="uploadedFile" />
</div>
<input type="submit" name="uploadBtn" value="Upload" />
</form>
<?PHP
// Reporting back location of upload
if (isset($_SESSION['link']) && $_SESSION['link'])
{
printf('<b>%s</b>', $_SESSION['link']);
unset($_SESSION['link']);
}
if (isset($_SESSION['error']) && $_SESSION['error'])
{
printf('<b>%s</b>', $_SESSION['error']);
unset($_SESSION['error']);
}
?>
</div>
<div align="center">
<li>
<lo>- 10mb limit</lo></br>
<lo>- Files will be deleted when disk is full eventually</lo></br>
<lo>- If there is something on here we don't like we will delete it! </lo></br>
<lo>Allowed extensions: jpg, jpeg, gif, png, zip, txt, rar, zip</lo></br>
</li>
</div>
<div align="center">V0.1</div>
</body>
</html>