 <?php 
 $role=$_REQUEST['role'];

 if($role=="user"){ ?>

  <?php
if($_SESSION["createds"]!=''){

?>
<script> swal("Successfully!", "Your account has been created!", "success");  </script>

<?php
unset($_SESSION["createds"]);
}
?>
<?php
if($_SESSION['forgot_pass']!=''){

?>
<script> swal("link!", "Reset Link set on your email", "success");  </script>

<?php
unset($_SESSION['forgot_pass']);
}
?>

 <section class="bg-primary-gradient">
         <div class="container">
            <div class="row">
               <div class="col-md-7 mx-auto ptb-50">
                  <!--form Sign in to our platform-->
                  <form class="form-sign" action="./forms/login-user.php" method="post" enctype="multipart/form-data">
                     <div class="col-md-12">
                         <!--Email Address-->
                        <div class="mb-3">
                           <label class="fw-bold form-label">Email Address:<span class="text-danger ps-1">*</span></label>
                            <input type="email"  class="form-control   validate[required,custom[email]] text-input" name="<?=SESS_MASTER?>emailid" maxlength="45" placeholder="Type Email">
                        </div>
                     </div>
                     <div class="col-md-12">
                           <!--Password-->
                        <div class="mb-3">
                           <label class="fw-bold form-label">Password:<span class="text-danger ps-1">*</span></label>
                           <input type="password" class="form-control  validate[required,minSize[3],maxSize[16]] text-input"  maxlength="15" name="<?=SESS_MASTER ?>userpass" placeholder="********">
                        </div>
                     </div>
                     <div class="row">
                        <div class="col-md-6">
                            <!--Remember me-->
                           <div class="mb-3">
                              <div class="form-check">
                                 <input type="checkbox" class="form-check-input" id="exampleCheck1" required>
                                 <label class="form-check-label" for="exampleCheck1"><small>Remember me</small></label>
                              </div>
                           </div>
                        </div>
                        <div class="col-md-6">
                            <!--Lost password?-->
                           <div class="mb-3">
                              <p class="text-lg-end lost-password"><a href="forgot-pass/user">Lost password?</a></p>
                           </div>
                        </div>
                     </div>
                     <div class="col-md-12 my-3">
                         <!--Submit-->
                        <div class="d-grid text-center">
                           <button type="submit" class="btn btn-secondary">Submit</button>
                        </div>
                     </div>
                     <div class="col-md-12 mt-4">
                        <p class="lead text-center not-registered mb-0">Not registered? <a href="registrations/user">Create account</a></p>
                     </div>
                  </form>
                   <!-- login username password not found -->
            <?php
              if($_SESSION[ADD_TAG.'_unvalidate_vendor']=='15'){
      echo ' <div style="padding-top:10px;">
      <div class="form-group nomargin">
          <div class="input-group">
            <div class="alert alert-danger">
              <strong>Warning!</strong> Invaid Username Found!!
            </div>
          </div>
      </div>
      </div>';
       unset($_SESSION[ADD_TAG.'_unvalidate_vendor']);
      }
        if($_SESSION[ADD_TAG.'_unvalidate_user']=='12'){
      echo ' <div style="padding-top:10px;">
      <div class="form-group nomargin">
          <div class="input-group">
            <div class="alert alert-danger">
              <strong>Warning!</strong> Invaid Username Found!!
            </div>
          </div>
      </div>
      </div>';
      unset($_SESSION[ADD_TAG.'_unvalidate_user']);
      }
     if($_SESSION[ADD_TAG.'_unvalidate_user']=='14'){
      echo ' <div style="padding-top:10px;">
      <div class="form-group nomargin">
          <div class="input-group">
            <div class="alert alert-warning">
                 <strong>Warning!</strong> Invalid Password found!!!
            </div>
          </div>
      </div>
      </div>'; 
       unset($_SESSION[ADD_TAG.'_unvalidate_user']);
      }
    ?>
      <!-- login username password not found -->
               </div>
               <div class="col-md-12 mt-4 mb-5">
                   <?php    if(!empty($google_adar )){
                echo $google_adar ;
            }else{
                echo ' <img src="admin/forms/'.$adimg3.'" alt="Horizontal Banner" title="Horizontal Banner" class="img-fluid w-100 rounded-3 mb-30">';
            }
            
            ?>
                 
               </div>
            </div>
         </div>
      </section>

 <?php } ?>
<?php if($role=="merchant"){ ?>

  <?php
if($_SESSION["createds"]!=''){

?>
<script> swal("Created!", "Your vendor account is being reviewed. Kindly feel all profile information!", "success");  </script>

<?php
unset($_SESSION["createds"]);
}
?>

<?php
if( $_SESSION[ADD_TAG.'forgot_pass']!=''){

?>
<script> swal("link!", "Reset Link set on your email", "success");  </script>

<?php
unset( $_SESSION[ADD_TAG.'forgot_pass']);
}
?>

      <section class="bg-primary-gradient">
         <div class="container">
            <div class="row">
               <div class="col-md-7 mx-auto ptb-50">
                  <!--form Sign in to our platform-->
                  <form class="form-sign" action="./forms/login-vendor.php" method="post" enctype="multipart/form-data">
                     <div class="col-md-12">
                         <!--Email Address-->
                        <div class="mb-3">
                           <label class="fw-bold form-label">Email Address:<span class="text-danger ps-1">*</span></label>
                            <input type="email"  class="form-control   validate[required,custom[email]] text-input"  maxlength="45" name="<?=SESS_MASTER  ?>emailid" placeholder="Type Email">
                        </div>
                     </div>
                     <div class="col-md-12">
                         <!--Password-->
                        <div class="mb-3">
                           <label class="fw-bold form-label">Password:<span class="text-danger ps-1">*</span></label>
                           <input type="password"  maxlength="15" class="form-control  validate[required,minSize[3],maxSize[16]] text-input" name="<?=SESS_MASTER ?>userpass" placeholder="********">
                        </div>
                     </div>
                     <div class="row">
                        <div class="col-md-6">
                            <!--Remember me-->
                           <div class="mb-3">
                              <div class="form-check">
                                 <input type="checkbox" class="form-check-input" id="exampleCheck1" required>
                                 <label class="form-check-label" for="exampleCheck1"><small>Remember me</small></label>
                              </div>
                           </div>
                        </div>
                        <div class="col-md-6">
                            <!--Lost password?-->
                           <div class="mb-3">
                              <p class="text-lg-end lost-password"><a href="forgot-pass/merchant">Lost password?</a></p>
                           </div>
                        </div>
                     </div>
                     <div class="col-md-12 my-3">
                         <!--Submit-->
                        <div class="d-grid text-center">
                           <button type="submit" class="btn btn-secondary">Submit</button>
                        </div>
                     </div>
                     <div class="col-md-12 mt-4">
                        <p class="lead text-center not-registered mb-0">Not registered? <a href="registrations/merchant">Create account</a></p>
                     </div>
                  </form>
                   <!-- login username password not found -->
            <?php
            if($_SESSION[ADD_TAG.'_unvalidate_vendor']=='15'){
      echo ' <div style="padding-top:10px;">
      <div class="form-group nomargin">
          <div class="input-group">
            <div class="alert alert-danger">
              <strong>Warning!</strong> Invaid Username Found!!
            </div>
          </div>
      </div>
      </div>';
       unset($_SESSION[ADD_TAG.'_unvalidate_vendor']);
      }
        if($_SESSION[ADD_TAG.'_unvalidate_vendor']=='12'){
      echo ' <div style="padding-top:10px;">
      <div class="form-group nomargin">
          <div class="input-group">
            <div class="alert alert-danger">
              <strong>Warning!</strong> Invaid Username Found!!
            </div>
          </div>
      </div>
      </div>';
       unset($_SESSION[ADD_TAG.'_unvalidate_vendor']);
      }
     if($_SESSION[ADD_TAG.'_unvalidate_vendor']=='14'){
      echo ' <div style="padding-top:10px;">
      <div class="form-group nomargin">
          <div class="input-group">
            <div class="alert alert-warning">
                 <strong>Warning!</strong> Invalid Password found!!!
            </div>
          </div>
      </div>
      </div>'; 
        unset($_SESSION[ADD_TAG.'_unvalidate_vendor']);
      }
    ?>
      <!-- login username password not found -->
               </div>
               <div class="col-md-12 mt-4 mb-5">
                  <?php    if(!empty($google_adar )){
                echo $google_adar ;
            }else{
                echo ' <img src="admin/forms/'.$adimg3.'" alt="Horizontal Banner" title="Horizontal Banner" class="img-fluid w-100 rounded-3 mb-30">';
            }
            
            ?>
               </div>
            </div>
         </div>
      </section>

      <?php } ?>