D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
Filename :
videos.php
back
Copy
<?php include('include/header.php'); $sno = 1; ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <div class="container-full"> <!-- Content Header (Page header) --> <div class="content-header"> <div class="d-flex align-items-center"> <div class="me-auto"> <h4 class="page-title">Add Videos</h4> <!--<div class="d-inline-block align-items-center">--> <!-- <nav>--> <!-- <ol class="breadcrumb">--> <!-- <li class="breadcrumb-item"><a href="#"><i class="mdi mdi-home-outline"></i></a></li>--> <!-- <li class="breadcrumb-item" aria-current="page">Products</li>--> <!-- <li class="breadcrumb-item active" aria-current="page">Add Products</li>--> <!-- </ol>--> <!-- </nav>--> <!--</div>--> </div> </div> </div> <!-- Main content --> <section class="content"> <div class="box"> <div class="box-header with-border d-flex justify-content-between" > <h4 class="box-title" style="margin-left: 20px;margin-top: 10px;">Videos List</h4> <button type="button" class="waves-effect waves-light btn btn-rounded btn-success mb-5 ed-btn text-right"><a href="video-form.php">Add New Video</a></button> </div> <!-- /.box-header --> <div class="box-body pt-0"> </div> <!-- /.box-body --> <input type="search" placeholder="Search By Keyword ..." class="form-control search-input my-3 searchin" data-table="customers-list"> <div class="box-body no-padding"> <input type="hidden" id="deleteId"> <div class="table-responsive"> <table class="table table-hover customers-list"> <tbody> <thead> <tr> <th width="5%">#</th> <th width="25%">Category</th> <th width="30%">Video Title</th> <th width="25%">Video</th> <th width="5%">Edit</th> <th width="5%">Delete</th> </tr> </thead> <?php $fetch2 = mysqli_query($conn, "select * from videos inner join video_category on video_category.id = videos.category_name"); while ($row=mysqli_fetch_array($fetch2)) { ?> <tr > <td><?php echo $sno++; ?></td> <td><?php echo $row['category_name']; ?></td> <td><?php echo $row['video_title']; ?></td> <td> <iframe style="width: 200px;height: 150px;" src="https://www.youtube.com/embed/<?=$row['video_name']?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></td> <td><button type="button" class="waves-effect waves-light btn btn-success mb-5 ed-btn"><?php echo "<a href='video_edit.php?eid=".$row['vid_id']."'><i class='fas fa-edit'></i></a>";?></button></td> <td><button type="button" class="waves-effect waves-light btn btn-danger mb-5 ed-btn"><a onclick="openDeleteModal(<?php echo $row['vid_id']; ?>)" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#delete-item"><i class="fas fa-trash-alt"></i></a></button></td> </tr> <?php }?> </tbody></table> </div> </div> </div> <!-- Delete --> <div class="modal fade" id="delete-item" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered "> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Delete Video</h5> <button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"> <i class="fe fe-x"></i> </button> </div> <div> <div class="modal-body py-0"> <div class="del-modal"> <p>Are you sure want to Delete?</p> </div> </div> <div class="modal-footer pt-0"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button> <button type="submit" onclick="confirmDelete()" class="btn btn-primary">Yes</button> </div> </div> </div> </div> </div> <!-- /Delete --> <script> function openDeleteModal(id) { document.getElementById('deleteId').value = id; } function confirmDelete() { // Get the stored ID var id = document.getElementById('deleteId').value; window.location.href = 'video_delete.php?did=' + id; } </script> </section> <!-- /.content --> </div> </div> <!-- /.content-wrapper --> <?php include('include/footer.php') ?>