<?php session_start();
include("../config/config.php");
$email=$_REQUEST['email'];
 $sql = "SELECT * FROM admin_master ";
   
    $myquery=$conn->query($sql);
  $mydara= $myquery->fetchAll()  ;
  
  $rows_found = $myquery->rowCount();
  foreach ($mydara as $key ) {
     $emailid= $key['emailid'];
     $full_name= $key['full_name'];
     $mobileno= $key['mobileno'];
     $city = $key['location_city'];
     $state= $key['location_state'];
     $country= $key['location_country'];
     $profile_pic = $key['profile_pic'];
     $company_name = $key['company_name'];
     $company_logo = $key['company_logo'];
     $copyright = $key['copyright'];
      $freshdesk_url  = $key['freshdesk_url'];
         
  }
?>
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>Reset Password - iCouponWorld | Coupons | Discounts| Promo Codes</title>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <link id="favicon" rel="icon" type="image/x-icon" href="../images/web-images/logo/favicon.png">
      <meta name="robots" content="index, follow" />
      <meta name="author" content="Design Collection">
      <meta name="description" content="Reset password? Reset password in few quick steps.">
      <meta name="keywords" content="iCouponWorld stores, products, coupon, coupon code, promo code, cashback, offer, promotion, deal">
      <link rel="canonical" href="reset-password.php"/>
      <!-- Viewport configuration, scaling options -->
      <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
      <!-- Bootstrap CSS -->
      <link href="../css/icouponworld.css" rel="stylesheet">
      <!-- CSS Stylesheet -->
      <link href="../css/dashboard.css" rel="stylesheet">
      <!-- Font Awesome icon -->
      <link href="../fontawesome/css/fontawesome.css" rel="stylesheet" />
      <!-- Roboto font  -->
      <link rel="preconnect" href="https://fonts.googleapis.com">
      <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
      <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">
      <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
        <link href="../css/validation.css" rel="stylesheet">
      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
   </head>
   <body>
      <!--unique id begin -->
      <div id="s_mm">
    
         <div class="authentication">
            <!--authentication-form-box Begin-->
            <div class="authentication-form-box">
               <div class="align-items-center d-flex h-100">
                  <div class="card-body">
                     <!-- Logo -->
                     <div class="auth-brand text-center text-lg-start">
                        <a href="#">
                        <span>
                            <?php if($company_logo==''){ ?>

                   <span class="sidebar-brand-text mx-3">icouponworld</span>

                    <?php   }else{
                      
                      ?>  
                      <img src="../images/web-images/logo/<?=$company_logo?>" alt="logo" title="logo" class="img-fluid">
                         <?php   }
                      
                      ?>  
                    </span>
                        </a>
                     </div>
                     <!-- title-->
                     <h4 class="mt-5">Reset <span class="text-primary pe-2"> Password</span><i class="fas fa-sign-in-alt text-primary"></i></h4>
                     <p class="mt-4 mb-4 text-muted">Reset your password to access your dashboard account.</p>
                     <!-- form Begin-->
                     <form class="form-sign" action="./backend/reset_password.php" method="post" enctype="multipart/form-data">
                        <div class="mb-3">
                           <label for="email" class="fw-bold form-label">Type Password: <span class="text-danger ps-1">*</span></label>
                            <input class="form-control form-control-lg validate[required,minSize[3],maxSize[16]] text-input" maxlength="15"  id="txtPassword" type="password" name="<?=SESS_MASTER?>newpassword"  required="" placeholder="*****">
                           <span id="toggle_pwd" class="fa fa-fw cursor-pointer field-icon fa-eye"></span>
                        </div>
                        <div class="mb-3">
                         
                           <label for="password" class="fw-bold form-label">Retype Password: <span class="text-danger ps-1">*</span></label>
                           <input class="form-control form-control-lg validate[required,equals[txtPassword]] text-input" maxlength="15" name="<?=SESS_MASTER?>newpasswords" id="retypetxtPassword"  type="password"  required="" placeholder="*****">
                           <span id="retype_pwd" class="fa fa-fw cursor-pointer field-icon fa-eye"></span>
                        </div>
                      
                        <div class="d-grid mb-0 text-center">
                          <input   type="hidden" name="<?=SESS_MASTER?>emailid" value="<?=$email?>" required="" placeholder="*****">
                           <button type="submit" class="btn btn-primary br-4"> Save <i class="fas fa-long-arrow-alt-right ms-1"></i></button>
                        </div>
                     </form>
                         <?php
        if($_SESSION[ADD_TAG.'_unvalidate']=='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']);
      }
     if($_SESSION[ADD_TAG.'_unvalidate']=='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']);
      }
    ?>
                     <!-- form End-->
                     <!-- Footer-->
                     <footer class="footer-alt">
                        <div class="container">
                           <div class="row align-items-center">
                              <div class="col-lg-12 col-sm-12">
                                 <small class="text-center p-0 m-0 text-muted"><?=$copyright?> </small>
                              </div>
                           </div>
                        </div>
                     </footer>
                  </div>
               </div>
            </div>
            <!--authentication-form-box Begin-->
            <!-- authentication-right Begin -->
            <div class="authentication-right text-center">
               <div class="auth-user-testimonial">
                  <div class="bg-white br-4 p-4 mx-auto">
                     <h2 class="mb-3 text-primary text-inherit">Explore Several of</h2>
                     <p class="lead text-primary">" Coupons, Discounts, Promo Codes "
                     </p>
                  </div>
               </div>
            </div>
            <!-- authentication-right End -->
         </div>
         <!-- Jquery Script Begin-->
         <script src="../js/jquery-3.4.1.min.js"></script>
         <!-- Jquery Script End-->
         <!-- bootstrap.bundle.min Script Begin-->
         <script src="../js/bootstrap.bundle.min.js"></script>
         <!-- bootstrap.bundle.min Script End-->
         <!-- dashboard-icouponworld.js Begin -->
         <script src="../js/dashboard-icouponworld.js"></script>
           <!-- dashboard-icouponworld.js End -->
             <!-- jquery.validationEngine-en.js Begin -->
          <script src="../js/jquery.validationEngine-en.js" type="text/javascript"></script>
            <!-- jquery.validationEngine-en.js End -->
              <!-- jquery.validationEngine.js Begin -->
 <script src="../js/jquery.validationEngine.js" type="text/javascript" > </script>
 <!-- jquery.validationEngine.js End -->
 <!-- validationEngine Begin -->
 <script>
  jQuery(document).ready(function() {
    jQuery("form").validationEngine(); 
  });
</script> 
<!-- validationEngine End -->
      </div>
      <!--unique id End -->
   </body>
</html>
