<?php include 'inc/header.php'; ?>
<!-- ====== End Header ===== -->
<?php include 'inc/sidebar.php'; ?>

 <div class="main-content">
  <section class="section">
  <div class="section-header">
            <div class="row">
              <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12">
                <div class="section-header-breadcrumb-content">
                  <h1> Profile</h1>
                  <div class="section-header-breadcrumb">
                    <div class="breadcrumb-item active"><a href="#"><i class="fas fa-home"></i></a></div>
                    <div class="breadcrumb-item"><a href="#">Admin</a></div>
                    <div class="breadcrumb-item"><a href="#"> Profile</a></div>
                  </div>
                </div>
              </div>
             
            </div>
          </div>
       <div class="row justify-content-center">
         <div class="col-lg-3">
            <?php include 'admin_sidebar.php';?>
         </div>
        
         <div class="col-lg-9 mt-5 mt-lg-0">
          <ul class="nav nav-pills nav-justified tab-nav">
               <li class="nav-item" role="presentation">
                  <a class="nav-link active" id="tutor-tab" data-toggle="tab" href="#tutor" role="tab" aria-controls="tutor" aria-selected="true">Admin Profile</a>
               </li>
              
            </ul>
            <div class="p-30 mb-35 bg-white shadow rounded" style="margin-top: 55px;
    padding: 30px;">
               
                <hr>
                 <?php if (isset($_SESSION['msg_scs'])): ?>
            <p class="alert alert-success"><?= $_SESSION['msg_scs'];?></p>
          <?php endif ?>
          <?php unset($_SESSION['msg_scs']);?>
         
          <?php if (isset($_SESSION['msg_err'])): ?>
            <p class="alert alert-danger"><?= $_SESSION['msg_err'];?></p>
          <?php endif ?>
          <?php unset($_SESSION['msg_err']);?>
                <?php if ($ses_row['first_name']!='' && $ses_row['last_name']!=''): ?>
                    <form method="post" action="profile_update.php">
                        <div class="row">
                            <div class="col-md-6">
                               <div class="form-group">
                                 <label>First Name</label>
                                 <input type="text" name="first_name" id="first_name" class="form-control" value="<?= $ses_row['first_name'];?>" placeholder="First Name" required>
                               </div>
                             </div>
                             <div class="col-md-6">
                               <div class="form-group">
                                 <label>Last Name</label>
                                 <input type="text" name="last_name" id="last_name" class="form-control" value="<?= $ses_row['last_name'];?>" placeholder="Last Name" required>
                               </div>
                             </div>
                             <div class="col-md-12">
                               <div class="form-group">
                                 <label>Email</label>
                                 <input type="email" name="email" id="email" class="form-control" value="<?= $ses_row['email'];?>" placeholder="Email" required>
                               </div>
                             </div>
                          
                                 <input type="hidden" name="user"  class="form-control" value="<?= $ses_row['username'];?>" >
                               
                         
                             </div>

                             <div class="col-md-12">
                               <div class="form-group">
                                  <input type="hidden" name="action" id="action" value="individual_add_profile">
                                 
                                  <button class="btn btn-primary w-100 " name="add_profile" id="add_profile" type="submit">Update Profile</button>
                               </div>
                             </div>
                        </div>
                     </form>
                     <?php else: ?>
                     
                 <?php endif ?>

</section>
 </div>

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