<?php
   require_once("header.php");
   require_once("menu.php");
   $databaseService = new DatabaseService();
   $con = $databaseService->getConnection();
   ?>
<style>
   th {
   width: 20%;
   }
</style>
<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-tools mr-1"></i>Site Configuration
                                  <?php 
                                   $query= $obj-> view_site_configuration($row['id']);
                                   $qu= mysqli_num_rows($query);

                                   if($qu==0)
                                    {
                                    ?>
                                    <a href="add_site_configuration.php" class="btn btn-primary btn-sm float-right add_right">Add</a>
                                    
                                    
                                    <?php
                                     }
                                    else
                                    {
                                 while($row=mysqli_fetch_array($query))
                                 {
                                 ?>
                                 <a  href="add_site_configuration.php?edit=<?php echo base64_encode($row['id']);?>" class="btn btn-primary btn-sm float-right add_right">EDIT INFORMATION</a> 
                                 <?php
                                     }
                                     }
                                     ?>
         </div>
         <div class="card-body">
            <div class="table-responsive">
               <?php
                  $ex = $obj->view_site_configuration();
                  while($row=mysqli_fetch_array($ex))
                  {
                  ?>
               <table class="table table-bordered" width="100%" cellspacing="0">
                <tr>
                     <th>About us Text</th>
                     <td><?php echo $row['about_text'];?></td>
                  </tr>
				  <tr>
                     <th>Get In Touch Text</th>
                     <td><?php echo $row['get_in_touch_text'];?></td>
                  </tr>
				   <tr>
                     <th>Email Id</th>
                     <td><?php echo $row['get_in_touch_email'];?></td>
                  </tr>
                  <tr>
                     <th>Address</th>
                     <td><?php echo $row['address'];?></td>
                  </tr>
				   <tr>
                     <th>Contact No 1</th>
                     <td><?php echo $row['contact_no'];?></td>
                  </tr>
                  <tr>
                     <th>Contact No 2</th>
                     <td><?php echo $row['contact_no2'];?></td>
                  </tr>
                  <tr>
                     <th>Email</th>
                     <td><?php echo $row['email_id'];?></td>
                  </tr>
                  <tr>
                     <th>Contact Us Inquiry Email</th>
                     <td><?php echo $row['contact_inquiry_mail_id'];?></td>
                  </tr>
                  <tr>
                     <th>Subscription Request Email Id</th>
                     <td><?php echo $row['subscribe_email_id'];?></td>
                  </tr>
                  <tr>
                     <th>Website</th>
                     <td><?php echo $row['website'];?></td>
                  </tr>
				  <tr>
                     <th>Google Map Iframe Code</th>
                     <td><?php echo $row['map_code'];?></td>
                  </tr>
                  <tr>
                     <th>Facebook Link</th>
                     <td><?php echo $row['facebook'];?></td>
                  </tr>
                  <tr>
                     <th>Twitter Link</th>
                     <td><?php echo $row['twitter'];?></td>
                  </tr>
                  <tr>
                     <th>Youtube Link</th>
                     <td><?php echo $row['youtube'];?></td>
                  </tr>
                  <tr>
                     <th>Instagram</th>
                     <td><?php echo $row['instagram'];?></td>
                  </tr>
                  <tr>
                     <th>LinkedIn</th>
                     <td><?php echo $row['linkedin'];?></td>
                  </tr>
                  <tr>
                     <th>Pinterest</th>
                     <td><?php echo $row['pinterest'];?></td>
                  </tr>
				      <tr>
                     <th>Header Logo</th>
                     <td><img width="150" src="<?php echo $row['header_logo'];?>"></td>
                  </tr>
                  <tr>
                     <th>Favicon</th>
                     <td><img width="50" src="<?php echo $row['fevicon'];?>"></td>
                  </tr>
                  <tr>
                     <th>Header banner</th>
                     <td><img width="500" src="<?php echo $row['header_banner'];?>"></td>
                  </tr>

                   <tr>
                     <th>White Logo</th>
                     <td class="slider_logo"><img width="150" src="<?php echo $row['footer_logo'];?>"></td>
                  </tr>
                    <tr>
                     <th>News Latter</th>
                     <td><?php echo $row['newsletter'];?></td>
                  </tr>
                    <!-- <tr>
                     <th>How Can We Help Text</th>
                     <td><?php //echo $row['how_can_text'];?></td>
                  </tr> -->
				
                  <tr>
                     <th>Copyright Text</th>
                     <td><?php echo $row['copy_right'];?></td>
                  </tr>
                
                  <tr>
                  <tr>
                     <!-- <td colspan="2">
                        <a href="add_site_configuration.php?edit=<?php // echo base64_encode($row['id']);?>" class="edit_right btn btn-primary btn-sm">EDIT INFORMATION</a>
                     </td> --> 
                  </tr>
                  <?php } ?>
               </table>
            </div>
         </div>
      </div>
   </div>
</main>
<?php require_once("footer.php");?>