<?php
require_once("header.php");
require_once("menu.php");
$databaseService = new DatabaseService();
$con = $databaseService->getConnection();


if(isset($_REQUEST['del']))
{
    $slider_id = base64_decode($_REQUEST['del']);
	$slider_status='0';
    $ex = $obj->delete_logo($slider_id,$slider_status);
   if($ex){
	   echo '<script>window.location="slider_logo.php"</script>';
   }
 
}

?>

<div id="layoutSidenav_content">
<main class="mt-4">
    <div class="container-fluid">        
        <div class="card mb-4">
            <div class="card-header">
                <i class="fas fa-table mr-1"></i>Slider Logo
                <a href="add_slider_logo.php" class="add_right btn btn-primary btn-sm float-right">Add Slider Logo</a>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-bordered slider_logo" id="dataTable" width="100%" cellspacing="0">
                        <thead>
                            <tr>
								<th>Slider Logo</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            $ex = $obj->get_Slider_logo();
                            while($row=mysqli_fetch_array($ex))
                            {
                            ?>
                            <tr>
								<td><img src="<?php echo $row['logo_slider_img'];?>"style="width: 150px;"></td>
                                <td>
                                    <a href="add_slider_logo.php?edit=<?php echo base64_encode($row['id']);?>" class="edit_right btn btn-primary btn-sm"><i class="fas fa-edit"></i></a>
                                     <a href="slider_logo.php?del=<?php echo base64_encode($row['id']);?>" class="btn btn-danger btn-sm delete_right"><i class="fas fa-trash"></i></a>
                                
								</td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</main>


<?php require_once("footer.php");?>
