-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddMovie.php
144 lines (142 loc) · 8.11 KB
/
addMovie.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
include("include/db_connection.php");
include('CRUD/Movie/ADD.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add Movie</title>
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/add-movie.css">
</head>
<body>
<!-- Header Section -->
<header>
<!-- Header Container with Logo, Search, and User Info -->
<?php include 'include/header.php' ?>
<hr>
</header>
<main>
<!-- Movie List Column -->
<?php include 'include/movieList.php' ?>
<div class="main-content">
<h3><a href="admin_dashboard.php">Dashboard</a> | Add Movie</h3>
<div class="sub-container" id="form-container">
<div id="movie-image-container" style="display:none;">
<i class="fa-solid fa-x close" onclick="closePoster()"></i>
<img id="movie-image" src="module/poster6.jpeg" alt="Poster Image" onerror="handleImageError()">
</div>
<form action="addMovie.php" id="add-movie-form" method="post" class="admin-form">
<div class="form-group block">
<label for="title" >Title: <span style="color: red;">*</span></label>
<input type="text" name="title" id="title" placeholder="Movie Name" maxlength="50" required>
</div>
<div class="form-group block">
<label for="poster-name">Movie Poster Name: <span style="color: red;">*</span></label>
<input type="text" name="posterName" id="poster-name" placeholder="poster.jpeg" maxlength="50" required>
<div style="text-align: right;"><button type="button" id="poster-check-btn">Check</button></div>
</div>
<div class="form-group block">
<label for="director">Director: </label>
<input type="text" name="director" id="director" maxlength="40" placeholder="Edward">
</div>
<div class="form-group">
<label for="rating" class="bold">Rating:</label>
<select name="rating" id="rating">
<option value="" selected>none</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
<label for="duration" class="bold">Duration (minutes):</label>
<input type="number" name="duration" id="duration" min="0" max="240" step="1" placeholder="minutes">
</div>
<div class="form-group">
<label for="description" class="bold">Description: <span style="color: red;">*</span></label>
<textarea name="description" id="description" rows="6" placeholder="Enter movie description... (Word limit - 500)" maxlength="500" required></textarea>
</div>
<div class="form-group">
<p>Movie Language: <span style="color: red;">*</span></p>
<input type="radio" name="language" id="english" value="English" required>
<label for="english">English</label><br>
<input type="radio" name="language" id="sinhale" value="Sinhale">
<label for="sinhale">Sinhale</label><br>
<input type="radio" name="language" id="tamil" value="Tamil">
<label for="tamil">Tamil</label><br>
<input type="radio" name="language" id="hindi" value="Hindi">
<label for="hindi">Hindi</label><br>
<input type="radio" name="language" id="malayalem" value="Malayalem">
<label for="malayalem">Malayalem</label>
</div>
<div class="form-group">
<p>Movie Status: <span style="color: red;">*</span></p>
<input type="radio" name="status" id="ongoing" value="Ongoing" required>
<label for="ongoing">Ongoing</label>
<input type="radio" name="status" id="upcoming" value="Upcoming">
<label for="upcoming">Upcoming</label>
</div>
<div class="form-group">
<p>Movie Genre: <span style="color: red;">*</span></p>
<input type="checkbox" name="genre[]" id="action" value="Action">
<label for="action">Action</label><br>
<input type="checkbox" name="genre[]" id="comedy" value="Comedy">
<label for="comedy">Comedy</label><br>
<input type="checkbox" name="genre[]" id="romantic" value="Romantic">
<label for="romantic">Romantic</label><br>
<input type="checkbox" name="genre[]" id="thriller" value="Thriller">
<label for="thriller">Thriller</label><br>
<input type="checkbox" name="genre[]" id="sci-fi" value="Sci-fi">
<label for="sci-fi">Sci-fi</label><br>
<input type="checkbox" name="genre[]" id="horror" value="Horror">
<label for="horror">Horror</label><br>
<input type="checkbox" name="genre[]" id="fantasy" value="Fantasy">
<label for="fantasy">Fantasy</label><br>
<input type="checkbox" name="genre[]" id="drama" value="Drama">
<label for="drama">Drama</label><br>
<input type="checkbox" name="genre[]" id="crime" value="Crime">
<label for="crime">Crime</label><br>
<input type="checkbox" name="genre[]" id="other" value="other">
<label for="other">Other</label>
</div>
<div class="form-group">
<div id="cast-info">
<p>Movie Casts: </p>
<div class="cast-info">
<div class="cast-inputs">
<span class="block">
<input type="text" name="castName[]" placeholder="Actor Name" maxlength="30" required>
<input type="text" name="castPic[]" class="cast-dp-name" maxlength="30" placeholder="Profile Pic Name" required>
</span>
<span id="cast-pic">
<img src="module/system/profile.jpg" alt="Actor dp .">
</span>
</div>
<div class="cast-btns">
<button type="button" class="verify-btn">Verify Pic</button>
</div>
</div>
</div>
<div style="text-align: center;"><button type="button" id="addCast-btn">Add More</button></div>
</div>
<div class="form-group" id="showtime"></div>
<input type="submit" value="Submit">
</form>
</div>
</div>
</main>
<!-- Footer Section -->
<?php include 'include/footer.php' ?>
<script src="javascript/addMovie.js"></script>
</body>
</html>
<?php
mysqli_close($conn);
?>