forked from nik1097/MeTube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload.php
99 lines (94 loc) · 3.88 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
require_once("files/connection.php");
require_once("files/main.php");
?>
<form action="upload_process.php" method="POST" enctype="multipart/form-data">
<div class="mb-3">
<?php
if(isset($_GET["file_exist"])) {
echo "<p style='color: Red'> File exists! Please upload again</p>";
}
?>
<label for="formFile" class="form-label">Select a media file to upload</label>
<input class="form-control" type="file" id="formFile" name = 'mediaFile' required>
</div>
<div class="form-floating">
<label for="title">Media Title:</label>
<textarea class="form-control" name="title" rows = "1" maxlength="50"
placeholder="Enter your title(required)" id="title" required></textarea>
</div>
<br>
<div class="form-floating">
<label for="keywords">Keyword List (separted by ',')</label>
<textarea class="form-control" name="keywords" placeholder="Enter keywords list, each keyword separated by ','" id="keywords"></textarea>
</div>
<br>
<!-- <p> Select a category</p>-->
<label class="form-label" for="category">
Select a category:
</label>
<div id = 'category'>
<div class="form-check">
<input type="radio" class="form-check-input" name="category" id="Animal" value="Animal">
<label class="form-check-label" for="Animal">
Animal
</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="category" id="Human" value="Human">
<label class="form-check-label" for="Human">
Human
</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="category" id="Sports" value="Sports">
<label class="form-check-label" for="Sports">
Sports
</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="category" id="Other" value="Other" checked>
<label class="form-check-label" for="Other">
Other
</label>
</div>
</div>
<br>
<label class="form-label" for="visibility">
Visibility:
</label>
<div id = 'visibility'>
<div class="form-check">
<input type="radio" class="form-check-input" name="visibility" id="Public" value="Public" checked>
<label class="form-check-label" for="Public">
Public
</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="visibility" id="Friend" value="Friend">
<label class="form-check-label" for="Friend">
Friend
</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="visibility" id="Family" value="Family">
<label class="form-check-label" for="Family">
Family
</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="visibility" id="Fav" value="Fav">
<label class="form-check-label" for="Fav">
Fav
</label>
</div>
</div>
<br>
<div class="form-floating">
<label for="floatingTextarea">Description</label>
<textarea class="form-control" name = 'description' placeholder="Enter media description 200 characters maximum" id="floatingTextarea" maxlength="200"></textarea>
</div>
<br>
<button class="btn btn btn-primary" value="upload" name="upload" type="submit" />Upload</button>
<button class="btn btn btn-secondary" onclick="location.href='index.php?page=Home';" type="button" >Cancel</button>
</form>