D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
Filename :
category.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 Category</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">Pages</li>--> <!-- <li class="breadcrumb-item active" aria-current="page">Add Category</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;">Category List</h4> <button type="button" class="waves-effect waves-light btn btn-rounded btn-success mb-5 ed-btn text-right"><a href="category-form.php">Add New Category</a></button> </div> <!-- /.box-header --> <div class="box-body"> <!--table start--> <div class="box"> <div class="box-body no-padding"> <div class="table-responsive"> <input type="search" placeholder="Search By Keyword ..." class="form-control search-input my-3 searchin" data-table="customers-list"> <input type="hidden" id="deleteId"> <table class="table table-hover customers-list"> <tbody> <thead> <tr> <th>#</th> <th>Id</th> <th>Category Name</th> <th>Edit</th> <th>Delete</th> </tr> </thead> <?php $catData = mysqli_query($conn,"select * from video_category"); while ($row=mysqli_fetch_array($catData)) { ?> <tr > <td><?php echo $sno++ ?></td> <td><?php echo $row['id']; ?></td> <td><?php echo $row['category_name']; ?></td> <td><button type="button" class="waves-effect waves-light btn btn-success mb-5 ed-btn"><?php echo "<a href='cat-edit.php?eid=".$row['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['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> </div> </div> </section> <!-- /.content --> <!-- 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 Categories</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 = 'delete.php?did=' + id; } </script> </div> </div> <!-- /.content-wrapper --> <?php include('include/footer.php') ?>