<!-- check profile created  -->
<?
   if($_SESSION["created"]!=''&&$tab_id ==''){
   
   ?>
<script> swal("Successfully!", "Your profile has been saved!", "success");  </script>
<?
   unset($_SESSION["created"]);
   }
   ?>
<!-- check profile created -->
<div class="tab-pane  <?php if($tab_id ==''){ echo 'active';} ?>" id="v-pills-profile-setting" role="tabpanel" aria-labelledby="v-pills-profile-setting-tab">
   <div class="row">
      <div class="col-lg-12 col-md-12">
         <div class="create-profile-right">
            <div class="card">
               <div class="card-body">
                  <!--Form User Profile Begin-->
                  <form class="profile-box"  action="./forms/update_user_profile" method="post" enctype="multipart/form-data">
                     <div class="bottom-line">
                        <h6 class="h5 mb-5">User Profile</h6>
                     </div>
                     <div class="row">
                        <!--Full Name-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Full Name :<span class="text-danger ps-1">*</span></label>
                              <input type="text" placeholder="Type your full name " name="<?=SESS_MASTER?>full_name" class="form-control validate[required,maxSize[30],custom[onlyLetterSp]] text-input" value="<?php if($first_name!=''){ echo $first_name;}?>">
                           </div>
                        </div>
                        <!--Company Name-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Company Name:<span class="text-danger ps-1">*</span></label>
                              <input type="text" name="<?=SESS_MASTER?>company_name" placeholder="Type your company name" class="form-control validate[optional,maxSize[50],custom[onlyLetterSp]] text-input" value="<?php if($company_name!=''){ echo $company_name;}?>">
                           </div>
                        </div>
                        <!--Email-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Email:<span class="text-danger ps-1">*</span></label>
                              <input type="email"   name="<?=SESS_MASTER?>emailid"  class="form-control  validate[required,custom[email],maxSize[50]] text-input" value="<?php if($email_id!=''){ echo $email_id;}?>" placeholder="Type your email" class="form-control">
                           </div>
                        </div>
                        <!--Website Name-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Website Name:<span class="text-danger ps-1">*</span></label>
                              <input type="text" placeholder="Type your Website Name" name="<?=SESS_MASTER?>website_name" class="form-control  validate[required] text-input" value="<?php if($website_name!=''){ echo $website_name; }?>">
                           </div>
                        </div>
                        <!--Company Address-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Company Address:<span class="text-danger ps-1">*</span></label>
                              <input type="text" placeholder="Type your Company Address" name="<?=SESS_MASTER?>company_address"    class="form-control  validate[required] text-input" value="<?php if($company_address!=''){ echo $company_address; }?>">
                           </div>
                        </div>
                        <!--Mobile-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Mobile:</label>
                              <input type="text" placeholder="Type your Mobile No." name="<?=SESS_MASTER?>phone" class="form-control validate[required,custom[phone],minSize[10],maxSize[15]] text-input"
                                 value="<?php if($phone!=''){ echo $phone;}?>">
                           </div>
                        </div>
                        <!--Profile pic-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Profile pic:</label>
                              <input type="file"  class="form-control  validate[optional] text-input" name="<?=SESS_MASTER ?>file_up">
                              <?php if($profile_pic!=''){ echo '<img src="forms/'.$profile_pic.'"  height="100">';}?>
                              <p class="fst-italic fs-11 py-2"><strong class="text-danger pe-1">Note:</strong>Image Recommended size 93*94 in .jpg format.</p>
                           </div>
                        </div>
                        <!--Select Country-->
                        <div class="col-md-6">
                           <div class="mb-3">
                              <label class="fw-bold form-label">Select Country:</label>
                              <select class="form-select validate[required] text-input" name="<?=SESS_MASTER ?>country">
                                 <option value="">Select Country</option>
                                 <?php if($location_country!=''){ echo '<option value="'.$location_country.'" selected>'.$location_country.'</option>';}?>
                                 <?php
                                    $sql='SELECT * FROM country_master';
                                    $myquery=$conn->query($sql);
                                    $mydara=$myquery->fetchAll();
                                    
                                    foreach($mydara as $row){
                                    $country_name=$row['country_name'];
                                    $rowId=$row['rowId'];
                                    echo ' <option value="'.$country_name.'">'.$country_name.'</option>';
                                    }
                                    
                                    
                                    ?>
                              </select>
                           </div>
                        </div>
                        <!--Save-->
                        <div class="col-md-12">
                           <div class="d-grid text-center">
                              <button type="submit" class="btn btn-secondary mt-3">Save</button>
                           </div>
                        </div>
                     </div>
                  </form>
                  <!--Form User Profile End-->
               </div>
            </div>
         </div>
      </div>
   </div>
</div>