D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
epksuofuukz9
/
www
/
admin
/
Filename :
delete_placement.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>Post</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 All Placement</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>Placement Name</th> <th>Placement Profession</th> <th>Placement Image</th> <th>Action</th> </tr> </thead> <tbody> <?php $i=0; $get_all="SELECT * FROM course_placement WHERE course_id ='$the_id'"; $run_all=query($get_all); while($row_all=fetch($run_all)) { $cp_id=$row_all['cp_id']; $cp_name=$row_all['cp_name']; $cp_profession=$row_all['cp_profession']; $cp_image=$row_all['cp_image']; $i++; ?> <tr> <td><?php echo $i;?></td> <td><?php echo $cp_name;?></td> <td><?php echo $cp_profession;?></td> <td><a href="images/placement/<?php echo $cp_image;?>" target="_blank"><img src="images/placement/<?php echo $cp_image;?>" width="100px" height="100px"></a></td> <td><a href="delete_placement.php?final_delete=<?php echo $cp_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>Placement Name</th> <th>Placement Profession</th> <th>Placement 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_cp_id=$_GET['final_delete']; $the_id=$_GET['id']; $delete_course="DELETE FROM `course_placement` WHERE `cp_id`='$the_cp_id'"; $run_delete_course=query($delete_course); confirm($run_delete_course); if($run_delete_course) { echo "<script>alert('Placement has been deleted');</script>"; echo "<script>window.open('delete_placement.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>