D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
epksuofuukz9
/
www
/
admin
/
Filename :
delete_menu_section.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>Menu Course</h1> </div> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="dashboard.php" style="color:#111;">Dashboard</a></li> <li class="breadcrumb-item"><a href="view_all_menu.php" style="color:#111;">View Menu Courses</a></li> <li class="breadcrumb-item"><a href="edit_menu_posts.php?edit=<?php echo $the_id; ?>" style="color:#111;">Edit Menu Courses</a></li> <li class="breadcrumb-item active">Delete Menu Section</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"></h3> </div> <!-- /.card-header --> <?php $get="SELECT * FROM menu_main_section WHERE `menu_main_section_course_id`='$the_id'"; $run=query($get); while($row=fetch($run)) { $section_main_id=$row['menu_main_section_id']; $section_main_name=$row['menu_main_section_name']; ?> <h4 style="text-align: center;"><?php echo $section_main_name; ?></h4> <div class="card-body table-responsive"> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th>S.N.</th> <th>Lesson</th> <th>Action</th> </tr> </thead> <tbody> <?php $i=0; $get_section_detail="SELECT * FROM `menu_course_section`WHERE menu_section_main_section_id='$section_main_id'"; $run_section_detail=query($get_section_detail); confirm($run_section_detail); while($row_section_detail=fetch($run_section_detail)) { $i++; $section_id=$row_section_detail['menu_section_id']; $section_lesson=$row_section_detail['menu_section_lesson']; $section_description=$row_section_detail['menu_section_description']; ?> <tr> <td><?php echo $i;?></td> <td><?php echo $section_lesson;?></td> <td><a href="delete_menu_section.php?final_delete=<?php echo $section_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>Lesson</th> <th>Action</th> </tr> </tfoot> </table> </div> <?php } ?> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> <?php if(isset($_GET['final_delete'])) { $the_id=$_GET['id']; $the_section_id=$_GET['final_delete']; $delete_section="DELETE FROM `menu_course_section` WHERE `menu_section_id`='$the_section_id'"; $run_delete_section=query($delete_section); confirm($run_delete_section); if($run_delete_section) { echo "<script>alert('Menu Section has been deleted');</script>"; echo "<script>window.open('delete_menu_section.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>