<?php
session_start();
include 'include/config.php';

// if(!isset($_SESSION['id'])){
//  echo "<script> window.location.href = 'index.php' </script>";
//   }
?>

<?php  include 'include/head.php'; ?>
                    
                      <!-- Start Content-->
                      <div class="container-fluid">
                        
                        <!-- start page title -->
                        <div class="row">
                            <div class="col-12">
                                <div class="page-title-box">
                                    <div class="page-title-right">
                                        <ol class="breadcrumb m-0">
                                            <li class="breadcrumb-item"><a href="dashboard.php">Home</a></li>
                                            <li class="breadcrumb-item active">Other </li>
                                        </ol>
                                    </div>
                                    <h4 class="page-title">Other</h4>
                                </div>
                            </div>
                        </div>
                        <!-- end page title --> 


                        <div class="row">
                            <div class="col-12">
                                <div class="card">
                                    <div class="card-body">
                                        
                                        <?php
                                        // if(isset($_GET['user'])){
                                        //     $id = $_GET['user'];
                                        
                                        //     $sql = "DELETE FROM `offer_banner` WHERE id='$id'";
                                        //   // print_r($sql);
                                        //     if(mysqli_query($conn,$sql)){

                                        //     echo "<script>document.location('banner.php');</script>";
                                        //     }
                                           
                                        // }
                                        ?>
                                        <div class="table-responsive">
                                            <div class="tab-pane show active" id="basic-datatable-preview">
                                                <table id="datatable" class="table table-striped dt-responsive nowrap w-100">
                                                    <thead>
                                                        <tr>
                                                            <th>Privcy Police</th>
                                                            <th>Disclaimer</th>
                                                            <th>Term Condition</th>
                                                            <th>Support Mail</th>
                                                            <th>Slide Image One</th>
                                                            <th>Slide Image Two</th>
                                                            <th>Slide Image Three</th>
                                                            <th>Action</th>
                                                            
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <?php
                                                     $selll = mysqli_query($conn,"SELECT * FROM `other`");
                                                                   while($data = mysqli_fetch_assoc($selll)) {?>
                                                        <tr>
                                                            <td><?= $data['privcy_police'];?></td>
                                                            <td><?= $data['disclaimer'];?></td>
                                                            <td><?= $data['term_condition'];?></td>
                                                            <td><?= $data['support_mail'];?></td>
                                                                 <?php  
                                                             $fullImagePath = $data['slide_img_1'];

                                                             $prefixToRemove = 'https://createapp.co.in/findmySpa/upload/';

                                                             $imageFilename = str_replace($prefixToRemove, '', $fullImagePath);
                                                             ?>
                                                             <td><img src="<?= '../upload/' . $imageFilename; ?>" style="width:100px; height:60px;"></td>
                                                             
                                                              <?php  
                                                             $fullImagePath = $data['slide_img_2'];

                                                             $prefixToRemove = 'https://createapp.co.in/findmySpa/upload/';

                                                             $imageFilename = str_replace($prefixToRemove, '', $fullImagePath);
                                                             ?>
                                                             <td><img src="<?= '../upload/' . $imageFilename; ?>" style="width:100px; height:60px;"></td>
                                                             
                                                            <?php  
                                                             $fullImagePath = $data['slide_img_3'];

                                                             $prefixToRemove = 'https://createapp.co.in/findmySpa/upload/';

                                                             $imageFilename = str_replace($prefixToRemove, '', $fullImagePath);
                                                             ?>
                                                             <td><img src="<?= '../upload/' . $imageFilename; ?>" style="width:100px; height:60px;"></td>  
                                                             <td>
                                                             <a href="otherr_edit.php?iddd=<?php echo $data['id'];?>" class="action-icon"> <i class="mdi mdi-square-edit-outline"></i></a>

                                                             </td>
                                                           
                                                            
                                                         </tr>
                                                       <?php }?>
                                                    </tbody>
                                                </table>                                           
                                            </div> <!-- end preview-->
                                        
                                            
                                        </div> <!-- end tab-content-->

                                    </div> <!-- end card body-->
                                </div> <!-- end card -->
                            </div><!-- end col-->
                        </div> <!-- end row-->

                    
                    </div> <!-- container -->


<?php  
include 'include/footer.php'; 
?>