<?php 
include("db_connection.php");
if(isset($_POST['email']))
{
	$sql=mysql_query("select * from admin_login where aemail='".$_POST['email']."'");
	
	$res=mysql_fetch_assoc($sql);
	
	if(isset($res['aemail']))
	{
		$message='<div id=":nm" class="ii gt m152202c763663e6d adP adO"><div id=":nl" class="a3s" style="overflow: hidden;"><div marginwidth="0" marginheight="0"><div class="adM">
	   </div><div dir="ltr" style="background-color:#f5f5f5;margin:0;padding:70px 0 70px 0;width:100%"><div class="adM">
		  </div><table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
			 <tbody>
				<tr>
				   <td align="center" valign="top">
					  <div>
					  </div>
					  <table style="background-color:#fdfdfd;border:1px solid #dcdcdc;border-radius:3px!important" border="0" cellpadding="0" cellspacing="0" width="600">
						 <tbody>  
						 <tr>
							   <td align="center" valign="top">
								  <table style="margin-top:20px" border="0" cellpadding="0" cellspacing="0" width="600">
									 <tbody>
										<tr>
										   <td align="center">
											  <img class="CToWUd" src="">
											  <br>
											  Welcome to Exchange Kar De
										   </td>
										   
										</tr>
									 </tbody>
								  </table>
							   </td>
							</tr>                      
							<tr>
							   <td align="center" valign="top">
								  <table border="0" cellpadding="0" cellspacing="0" width="600">
									 <tbody>
										<tr>
										   <td style="background-color:#fdfdfd" valign="top">
											  <table border="0" cellpadding="20" cellspacing="0" width="100%">
												 <tbody>
													<tr>
													   <td style="padding:48px" valign="top">
														  <div style="color:#000;font-family:&quot;Helvetica Neue&quot;,Helvetica,Roboto,Arial,sans-serif;font-size:14px;line-height:150%;text-align:left">
															 
															 <p style="margin:0 0 16px">Dear '.$res['aname'].', We have received your sign-in  request. Please click on link for verify account.<br>
															 <a href="'.$actual_link.'reset_password.php?email='.base64_encode($res['aemail']).'&id='.$res['aid'].'">"'.$actual_link.'reset_password.php?email='.base64_encode($res['aemail']).'&id='.$res['aid'].'"</a>
															 
															 
															 </p>                                                         
														  </div>
													   </td>
													</tr>
												 </tbody>
											  </table>
										   </td>
										</tr>
									 </tbody>
								  </table>
							   </td>
							</tr>
							<tr>
							   <td align="center" valign="top">
								  <table border="0" cellpadding="10" cellspacing="0" width="600">
									 <tbody>
										<tr>
										   <td style="padding:0" valign="top">
											  <table border="0" cellpadding="10" cellspacing="0" width="100%">
												 <tbody>
													<tr>
													   <td colspan="2" style="border:0;color:#000;font-family:Arial;font-size:12px;line-height:125%;text-align:center" valign="middle">
														  <p>Powered by Exchange Kar De</p>
													   </td>
													</tr>
												 </tbody>
											  </table>
										   </td>
										</tr>
									 </tbody>
								  </table>
							   </td>
							</tr>
						 </tbody>
					  </table>
				   </td>
				</tr>
			 </tbody>
		  </table></div></div></div></div>';
		  
			
			
			$subject="Change Password";
			$to   = $res['aemail'];
			$from = 'info@exchangekarde.com';
			
			$headers = "From: " . strip_tags($from) . "\r\n";
			$headers .= "Reply-To: ". strip_tags($from) . "\r\n";
			
			$headers .= "MIME-Version: 1.0\r\n";
			$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
			
			mail($to, $subject, $message, $headers);
	}
	
	
}


?>
<!DOCTYPE html>
<html class="no-js before-run" lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
  <meta name="description" content="bootstrap admin template">
  <meta name="author" content="">

  <title>Forgot password | Remark Admin Template</title>

  <link rel="apple-touch-icon" href="assets/images/apple-touch-icon.png">
  <link rel="shortcut icon" href="assets/images/favicon.ico">

  <!-- Stylesheets -->
  <link rel="stylesheet" href="assets/css/bootstrap.min.css">
  <link rel="stylesheet" href="assets/css/bootstrap-extend.min.css">
  <link rel="stylesheet" href="assets/css/site.min.css">

  <link rel="stylesheet" href="assets/vendor/animsition/animsition.css">
  <link rel="stylesheet" href="assets/vendor/asscrollable/asScrollable.css">
  <link rel="stylesheet" href="assets/vendor/switchery/switchery.css">
  <link rel="stylesheet" href="assets/vendor/intro-js/introjs.css">
  <link rel="stylesheet" href="assets/vendor/slidepanel/slidePanel.css">
  <link rel="stylesheet" href="assets/vendor/flag-icon-css/flag-icon.css">


  <!-- Page -->
  <link rel="stylesheet" href="assets/css/pages/forgot-password.css">

  <!-- Fonts -->
  <link rel="stylesheet" href="assets/fonts/web-icons/web-icons.min.css">
  <link rel="stylesheet" href="assets/fonts/brand-icons/brand-icons.min.css">
  <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,300italic'>


  <!--[if lt IE 9]>
    <script src="assets/vendor/html5shiv/html5shiv.min.js"></script>
    <![endif]-->

  <!--[if lt IE 10]>
    <script src="assets/vendor/media-match/media.match.min.js"></script>
    <script src="assets/vendor/respond/respond.min.js"></script>
    <![endif]-->

  <!-- Scripts -->
  <script src="assets/vendor/modernizr/modernizr.js"></script>
  <script src="assets/vendor/breakpoints/breakpoints.js"></script>
  <script>
    Breakpoints();
  </script>
</head>
<body class="page-forgot-password layout-full">
  <!--[if lt IE 8]>
        <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->


  <!-- Page -->
  <div class="page animsition vertical-align text-center" data-animsition-in="fade-in"
  data-animsition-out="fade-out">
    <div class="page-content vertical-align-middle">
      <h2 class="page-title">Forgot Your Password ?</h2>
      <p>Input your registered email to reset your password</p>

      <form class="width-300 margin-top-30 center-block" method="post">
        <div class="form-group">
          <input type="email" class="form-control" id="inputEmail" name="email" placeholder="Your Email">
        </div>
        <div class="form-group">
          <button type="submit" class="btn btn-primary btn-block">Reset Your Password</button>
        </div>
      </form>

      <footer class="page-copyright">
        <p>WEBSITE BY amazingSurge</p>
        <p>© 2015. All RIGHT RESERVED.</p>
        <div class="social">
          <a href="javascript:void(0)">
            <i class="icon bd-twitter" aria-hidden="true"></i>
          </a>
          <a href="javascript:void(0)">
            <i class="icon bd-facebook" aria-hidden="true"></i>
          </a>
          <a href="javascript:void(0)">
            <i class="icon bd-dribbble" aria-hidden="true"></i>
          </a>
        </div>
      </footer>
    </div>
  </div>
  <!-- End Page -->


  <!-- Core  -->
  <script src="assets/vendor/jquery/jquery.js"></script>
  <script src="assets/vendor/bootstrap/bootstrap.js"></script>
  <script src="assets/vendor/animsition/jquery.animsition.js"></script>
  <script src="assets/vendor/asscroll/jquery-asScroll.js"></script>
  <script src="assets/vendor/mousewheel/jquery.mousewheel.js"></script>
  <script src="assets/vendor/asscrollable/jquery.asScrollable.all.js"></script>
  <script src="assets/vendor/ashoverscroll/jquery-asHoverScroll.js"></script>

  <!-- Plugins -->
  <script src="assets/vendor/switchery/switchery.min.js"></script>
  <script src="assets/vendor/intro-js/intro.js"></script>
  <script src="assets/vendor/screenfull/screenfull.js"></script>
  <script src="assets/vendor/slidepanel/jquery-slidePanel.js"></script>


  <!-- Scripts -->
  <script src="assets/js/core.js"></script>
  <script src="assets/js/site.js"></script>

  <script src="assets/js/sections/menu.js"></script>
  <script src="assets/js/sections/menubar.js"></script>
  <script src="assets/js/sections/sidebar.js"></script>

  <script src="assets/js/configs/config-colors.js"></script>
  <script src="assets/js/configs/config-tour.js"></script>

  <script src="assets/js/components/asscrollable.js"></script>
  <script src="assets/js/components/animsition.js"></script>
  <script src="assets/js/components/slidepanel.js"></script>
  <script src="assets/js/components/switchery.js"></script>


  <script>
    (function(document, window, $) {
      'use strict';

      var Site = window.Site;
      $(document).ready(function() {
        Site.run();
      });
    })(document, window, jQuery);
  </script>

</body>

</html>