-
Notifications
You must be signed in to change notification settings - Fork 11
/
play.php
48 lines (43 loc) · 1.56 KB
/
play.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
<?php
session_start();
// Only Allow Logged In Users
if (!(isset($_SESSION['loggedinanimeheaven']) && $_SESSION['loggedinanimeheaven'] == true)) {
header("Location: ./login.php");
}
if(isset($_GET['mid'])) {
include './db.php';
$mid = $_GET['mid'];
$sql = "SELECT * from movies WHERE mid = '$mid'";
$result = $conn->query($sql);
if(!$movie = $result->fetch_assoc()) {
echo "No movie found with mid $mid";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AnimeHeaven</title>
<!-- Favicon -->
<link rel="shortcut icon" type="image/png" href="./media/images/ah_logo.png"/>
<!-- Stylesheets -->
<link rel="stylesheet" href="./css/global.css">
<link rel="stylesheet" href="./css/play.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" />
</head>
<body>
<!-- Video Player Starts -->
<?php
$movie_file_path = $movie['movie_file_path'];
echo "<div class=\"video-player\">
<video controls autoplay fullscreen>
<source src=\"$movie_file_path\" type='video/mp4'>
</video>
</div>";
?>
<!-- Video Player Ends -->
</body>
</html>