Vous êtes sur la page 1sur 4

<?

php
include('admin/config.php');
$id = htmlspecialchars($_GET['id']);
$query = mysqli_query($con, "SELECT * FROM film WHERE id = '$id' ");
$terbaru = mysqli_query($con, "SELECT * FROM film ORDER BY id DESC");
$kom = mysqli_query($con, "SELECT * FROM komen WHERE video_id = '$id' ORDER BY
id DESC");
$iframe = mysqli_fetch_array($query);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="nonton film gratis disini,nonton <?php
echo $iframe['judul']; ?>, <?php echo $iframe['judul']; ?>">
<meta name="keywords" content="lk21, film, nonton film, ,nonton21, lk21, ,
nonton21.site, nonton 21, <?php echo $iframe["judul"]; ?>">
<meta name="author" content="reinxceed">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.main{
height: max-content;
width: 900px;
min-width: 300px;
background-color: dimgray;

}
.box-dark{
min-height: max-content;
}
.box{
position: relative;

width: 100%;
padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625)
*/
}
.iframe{
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
}
.download{
margin-left: 2px;
}
.body{
background-color: rgb(66, 64, 64);
}
.video{
overflow-x: scroll;
overflow-y: hidden;
height: max-content;
white-space:nowrap;
}
img{
position: relative;
}
.m{
margin-left: 15px;
margin-right:15px;
}
.tes{
background-color: rgb(66, 64, 64);
}
div a{
color: white;
text-decoration: none;
}
div a:hover{
color: yellow;
}
.scrollkmn{
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
height: 300px;
}
</style>
<title>NONTON21 - <?php echo $iframe['judul']; ?></title>
<link rel="stylesheet" type="text/css" href="style/style.css">
<link rel="icon"
href="https://p4.wallpaperbetter.com/wallpaper/698/904/960/dice-hd-wallpaper-
wallpaper-preview.jpg">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/6.1.1/css/all.min.css" integrity="sha512-
KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXge
l0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
</head>
<body class="tes">
<?php include('navbar.php');?>
<div class="container-sm justify-content-center body d-flex">
<div class="py-3 main">
<!-- iframe -->
<div class="box-dark bg-dark py-3 border border-warning text-
white">
<div class="box">
<iframe src="<?php echo $iframe['video']; ?>"
frameborder="0" allow="accelerometer; autoplay; picture in picture" class="iframe"
allowfullscreen></iframe>
</div>
<div class="p-2">
<a href="<?php echo $iframe['download']; ?>"
class="download btn btn-dark btn-outline-warning">Download</a>
</div>
</div>
<!-- judul -->
<div class="border border-warning container d-flex justify-content-
center bg-dark text-white mt-2 p-2">
<strong><?php echo $iframe['judul']; ?></strong>
</div>
<!-- info -->
<div class="border border-warning mt-2 p-2 bg-dark text-white">
<div class="container-fluid">
<label>Genre</label>
<p><?php echo $iframe['genre']; ?></p>
</div>
<div class="container-fluid">
<label>Synopsis</label>
<p><?php echo $iframe['info']; ?></p>
</div>
</div>
<!-- video lain -->
<div class="mt-2 container-fluid d-flex justify-content-center bg-
dark text-white border border-warning">
<strong class="py-2">Film terbaru</strong>
</div>
<div class="border d-flex border-warning video p-2 mt-2 bg-dark">
<?php while($baru = mysqli_fetch_array($terbaru)){ ?>
<div class="img p-2">
<div>
<a href="?id=<?php echo $baru['id']; ?>"><img
width="100px" height="180px" src="images/<?php echo $baru['foto']; ?>"></a>
</div>
</div>
<?php } ?>
</div>
<!-- komen -->
<div class="border border-warning justify-content-center d-flex bg-
dark text-white container-fluid mt-2">
<strong class="py-2">Komentar</strong>
</div>
<div class="border border-warning container-fluid mt-2 d-flex
justify-content-center align-items-center bg-dark text-white">
<div class="scrollkmn py-2">
<input type="submit" class="btn btn-dark btn-outline-
warning" value="reload" onClick="reloadThePage()">
<?php while($komen = mysqli_fetch_array($kom)){ ?>
<div class="form-control border border-warning bg-dark
text-white mt-1">
<p><?php echo $komen['dari'] ?> : <?php echo
$komen['text'];?></p>
</div>
<?php }?>
</div>
</div>
<div class="border border-warning bg-dark text-white container-
fluid d-flex justify-content-center align-items-center mt-2 py-2">
<div class="container-sm">
<form action="" method="post">
<input type="text" class="form-control border border-
warning text-white bg-dark" name="dari" placeholder="tulis nama anda" >
<input type="text" class="mt-1 form-control border
border-warning text-white bg-dark" name="komen" placeholder="tulis komentar" >
<input type="submit" class="mt-1 btn btn-dark btn-
outline-warning form-control" name="kirim" value="kirim">
</form>
<?php
if(isset($_POST['kirim'])){
$dari = htmlspecialchars($_POST['dari']);
$text = htmlspecialchars($_POST['komen']);
if(!empty($text)){
if(!empty($dari)){
$kirim = mysqli_query($con, "INSERT INTO
komen (video_id,dari,text) VALUES ('$id','$dari','$text')");
if($kirim){
echo("<meta http-equiv='refresh'
content='0'>");

}else{
echo '<script>alert("gagal kirim
komentar")</script>';
}
}else{
echo '<script>alert("nama tidak boleh
kosong")</script>';
}
}else{
echo '<script>alert("komentar tidak boleh
kosong")</script>';
}
}
?>
</div>
</div>
</div>
</div>
<!-- footer -->
<div class="border border-warning container-fluid bg-dark text-white">
<?php include('footer.php');?>
</div>
<script>
function reloadThePage(){
location.reload();
}
</script>
</body>
</html>

Vous aimerez peut-être aussi