D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
epksuofuukz9
/
www
/
admin
/
Filename :
delete_review.php
back
Copy
<?php include("includes/header.php"); ?> <?php $the_id=$_GET['delete']; ?> <body class="hold-transition sidebar-mini"> <div class="wrapper"> <!-- Navbar --> <?php include("includes/top_nav.php");?> <!-- /.navbar --> <!-- Main Sidebar Container --> <?php include("includes/side_nav.php");?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1>Course</h1> </div> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="#" style="color:#111;">Dashboard</a></li> <li class="breadcrumb-item active">View Course</li> </ol> </div> </div> </div><!-- /.container-fluid --> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <h3 class="card-title">View Review</h3> </div> <!-- /.card-header --> <div class="card-body table-responsive"> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th>S.N.</th> <th>Review Name</th> <th>Company Name</th> <th>Review</th> <th>Image</th> <th>Action</th> </tr> </thead> <tbody> <?php $i=0; $get_course_review="SELECT * FROM course_review WHERE course_id='$the_id'"; $run_course_review=query($get_course_review); while($row_course_review=fetch($run_course_review)) { $cr_id=$row_course_review['cr_id']; $cr_name=$row_course_review['cr_name']; $cr_company_name=$row_course_review['cr_company_name']; $cr_review=$row_course_review['cr_review']; $cr_image=$row_course_review['cr_image']; $i++; ?> <tr> <td><?php echo $i;?></td> <td><?php echo $cr_name;?></td> <td><?php echo $cr_company_name;?></td> <td><?php echo $cr_review;?></td> <td><a href="images/review/<?php echo $cr_image;?>" target="_blank"><img src="images/review/<?php echo $cr_image;?>" width="100px" height="100px"></a></td> <td><a href="delete_review.php?final_delete=<?php echo $cr_id; ?>&id=<?php echo $the_id; ?>" onclick="return confirm('Are you sure you want to delete it?');"><button class="btn btn-danger btn-sm">Final Delete</button></a></td> </tr> <?php } ?> </tbody> <tfoot> <tr> <th>S.N.</th> <th>Review Name</th> <th>Company Name</th> <th>Review</th> <th>Image</th> <th>Action</th> </tr> </tfoot> </table> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> <?php if(isset($_GET['final_delete'])) { $the_cr_id=$_GET['final_delete']; $the_id=$_GET['id']; $delete_course="DELETE FROM `course_review` WHERE `cr_id`='$the_cr_id'"; $run_delete_course=query($delete_course); confirm($run_delete_course); if($run_delete_course) { echo "<script>alert('Review has been deleted');</script>"; echo "<script>window.open('delete_review.php?delete=$the_id','_self');</script>"; } } ?> <!-- /.content --> </div> <!-- /.content-wrapper --> <?php include("includes/footer.php");?> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Control sidebar content goes here --> </aside> <!-- /.control-sidebar --> </div> <!-- ./wrapper --> <?php include("includes/scripts.php"); ?> <script> $(function () { $("#example1").DataTable(); $('#example2').DataTable({ "paging": true, "lengthChange": false, "searching": false, "ordering": true, "info": true, "autoWidth": false, }); }); </script> </body> </html>