-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.php
More file actions
77 lines (76 loc) · 2.48 KB
/
Copy pathmain.php
File metadata and controls
77 lines (76 loc) · 2.48 KB
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
<?php
require_once("session_helper.php");
if(isset($_SESSION["userLogin"])){
echo "Welcome, ".$_SESSION["userLogin"]."<br>";
}
else{
redirect("index.php");
}
if(isset($_GET['logout'])){
logout();
}
require_once("components/header.php")
?>
<a href="main.php?logout=true">Exit</a>
<br><hr>
<label>Додати фільм</label>
<form action="addFilm.php" method="post">
<label for="title">Назва</label>
<input type="text" name="title">
<label for="realese_year">Рік випуску</label>
<input type="number" name="realese_year">
<label for="format">Формат</label>
<select name="format">
<option value = "VHS">VHS</option>
<option value = "DVD">DVD</option>
<option value = "Blu-Ray">Blu-Ray</option>
</select>
<label for="actors">Актори</label>
<input type="text" name="actors">
<button type="submit">Додати фільм</button>
</form>
<?php if(isset($_SESSION["addFilm"]["insert"])){
echo $_SESSION["addFilm"]["insert"];
}
?>
<br><hr>
<label>Додати фільми з файлу</label>
<form action="addFilmFromFile.php" method="post" enctype="multipart/form-data">
<br><input type="file" name="fileWithFilms" accept="text/plain"><br>
<br>
<button type="submit">Завантажити фільми з файлу</button>
</form>
<?php if(isset($_SESSION["addFilm"]["file"])){
echo $_SESSION["addFilm"]["file"];
}
?>
<hr>
<label>Вивести всі фільми</label>
<form action="viewFilms.php">
<button type="submit">Переглянути всі фільми</button>
</form>
<hr>
<label>Вивести всі у алфавітному порядку</label>
<form action="viewFilmsOrderBy.php">
<button type="submit">Виконати</button>
</form>
<hr>
<label>Знайти фільм за назвою</label>
<form action="viewFilmByTitle.php" method="GET">
<label for="title">Назва</label>
<input type="text" name="title">
<button type="submit">Виконати</button>
</form>
<?php if(isset($_SESSION["findFilm"]["title"])){
echo $_SESSION["findFilm"]["title"];
}
?>
<hr>
<label>Знайти фільм за ім'ям актора</label>
<form action="viewFilmByName.php" method="GET">
<label for="name">Ім'я</label>
<input type="text" name="name">
<button type="submit">Виконати</button>
</form>
<hr>
<?php require_once("components/footer.php")?>