<?php
   require_once("header.php");
   require_once("menu.php");
 
 if(isset($_REQUEST['del']))
{
    $about_page_id = base64_decode($_REQUEST['del']);
    $about_page_status = '0';
    $ex = $obj->softdel_aboutpage($about_page_id,$about_page_status);
    echo '<script>window.location="aboutpage.php"</script>';
}
?>
<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-border-style"></i>  &nbsp;About Us

                                    <?php 
                                   $query= $obj-> get_aboutpage($row['about_page_id']);
                                   $qu= mysqli_num_rows($query);

                                            if($qu==0)
                                    {
                                    ?>
                                    <a href="add_about_page.php" class="btn btn-primary btn-sm float-right add_right">Add</a>
                                    <?php
                                     }
                                    else
                                    {
                                      while($row=mysqli_fetch_array($query))
                                      {
                                       ?>
                                        <a  href="add_about_page.php?edit=<?php echo base64_encode($row['about_page_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->get_aboutpage();
                  while($row=mysqli_fetch_array($ex))
                  {
                  ?>
               <table class="table table-bordered" width="100%" cellspacing="0">
                
                  <tr>
                     <th>Title</th>
                     <td><?php echo $row['title'];?></td>
                  </tr>
                  <tr>
                     <th>Sub Title</th>
                     <td><?php echo $row['subtitle'];?></td>
                  </tr>
                  <tr>
                     <th>Description</th>
                     <td><?php echo $row['about_desc'];?></td>
                  </tr>
				   <tr>
                     <th>About Sitebar Image</th>
                     <td><img height="auto" width="500" src="<?php echo $row['director1_img'];?>"></td>
                  </tr>
                  <tr>
                     <th>Vision</th>
                     <td><?php echo $row['vision'];?></td>
                  </tr>
                  <tr >
                     <th>Mission</th>
                     <td style="background: #727272;"><?php echo $row['mission'];?></td>
                  </tr>
                  <tr>
                     <th>Core Values</th>
                     <td><?php echo $row['core_values'];?></td>
                  </tr>
                
                  
                  <?php } ?>
               </table>
            </div>

         </div>
      </div>
   </div>
</main>
<?php require_once("footer.php");?>