<?php
session_start();
if(isset($_SESSION['user_email'])){
    $email=$_SESSION['user_email'];
    include ("sidebar.php");
    include ("header.php");
    require_once('database.php');
    $query="SELECT name,email,password,phone,address FROM customers WHERE email='$email'";
    $rec=db::getRecord($query);

?>
<style>
.avatar {
  vertical-align: middle;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
    .card-body{
   text-align: left;
    }
 

.demo-solution--flexbox {
  display: flex;
  align-items: center;
    
 }
</style>
        <div class="content">
          <div class="container-fluid" style="margin-top:-40px">
            <div class="row">
              <div class="col-md-12">
                <div class="card " style="min-height:550px">
                    
                <div class="card-header card-header-info" style="background:#E93E21">
                  <h4 class="card-title ">Profile</h4>
                </div>
                   <div class="card-body ">
                      <br>
      
      <div class="content">
                 <div class="container-fluid">
                 <div class="row">
                 <div class="col-md-2"></div>
                 <div class="col-md-8">
                 <div class="card card-profile"> 
                    <div class="card-body"> 
                        <div class="row">
                        <div class="col-lg-6">
                            <div class="demo-solution demo-solution--flexbox">
              <img src="images/avatar.png" alt="Avatar" class="avatar" style="height:20px;width:20px">&nbsp;&nbsp;
              <span><h4 class="card-title" style="margin-top:10px"><?php  echo $rec['name']; ?></h4></span>
              </div>
                   <div class="demo-solution demo-solution--flexbox"  style="margin-top:13px">
              <img src="images/email.png" alt="Avatar" class="avatar" style="height:20px;width:20px">&nbsp;&nbsp;
              <span><h4 class="card-title" style="margin-top:0px"><?php  echo $rec['email']; ?></h4></span>
              </div> 
                             <div class="demo-solution demo-solution--flexbox"  style="margin-top:13px">
              <img src="images/phone.png" alt="Avatar" class="avatar" style="height:20px;width:20px">&nbsp;&nbsp;
              <span><h4 class="card-title" ><?php  echo $rec['phone']; ?></h4></span>
              </div>
              <!--<div class="demo-solution demo-solution--flexbox">-->
              <!--<img src="images/location.png" alt="Avatar" class="avatar" style="height:25px;width:25px">&nbsp;&nbsp;-->
              <!--<span><h4 class="card-title" ><?php  echo $rec['address']; ?></h4></span>-->
              <!--</div>-->
               
                   <a href="edit_p.php" class="btn btn-round" style="margin-left:25%;background:#E93E21;margin-top:30px"><i class="material-icons">edit</i>Edit Profile</a> 
                            </div>
                        <div class="col-lg-6">
                             <img src="images/tandoori_mixed_grill.jpg" style="height:100%;width:100%" />
                            </div>  
                        </div> 
                      
                 </div>     
                 </div>
                     </div>
                 <div class="col-md-2"></div>        
            </div>
      
                       </div>
                          </div>
                          </div>
                        </div>
           
              
                      </div>
                    </div>
                  </div>

<?php
require_once('footer.php');
}

else{
   echo "<script>location='../index.php'</script>";   
}
?>





                      
                 
              