<?php
ob_start();
	session_start();
$MERCHANT_KEY = "BqVkSpZF";
 
//Merchant Salt as provided by Payu
$SALT = "eayReArUXp";
 
//End point - change to https://secure.payu.in for LIVE mode
//$PAYU_BASE_URL = "https://test.payu.in";
$PAYU_BASE_URL = "https://secure.payu.in";

$action = '';

$posted = array();
if(!empty($_POST)) {
    //print_r($_POST);
  foreach($_POST as $key => $value) {    
    $posted[$key] = $value; 
	
  }
}

$formError = 0;

if(empty($posted['txnid'])) {
  // Generate random transaction id
  $txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20);
} else {
  $txnid = $posted['txnid'];
}
$hash = '';
// Hash Sequence
$hashSequence = "key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10";
if(empty($posted['hash']) && sizeof($posted) > 0) {
  if(
          empty($posted['key'])
          || empty($posted['txnid'])
          || empty($posted['amount'])
          || empty($posted['firstname'])
          || empty($posted['email'])
          || empty($posted['phone'])
          || empty($posted['productinfo'])
          || empty($posted['surl'])
          || empty($posted['furl'])
		  || empty($posted['service_provider'])
  ) {
  	echo 'Key:'.$posted['key'].'Txt:'.$posted['txnid'].'Amount:'.$posted['amount'].'firstname:'.$posted['firstname'].'email'.$posted['email'].'phone'.$posted['phone'].'product'.$posted['productinfo'].'success'.$posted['surl'].'failure'.$posted['furl'].'service'.$posted['service_provider'];
    $formError = 1;
  } else {
  	
	
    //$posted['productinfo'] = json_encode(json_decode('[{"name":"tutionfee","description":"","value":"500","isRequired":"false"},{"name":"developmentfee","description":"monthly tution fee","value":"1500","isRequired":"false"}]'));
	
	
	$hashVarsSeq = explode('|', $hashSequence);
    $hash_string = '';	
	foreach($hashVarsSeq as $hash_var) {
      $hash_string .= isset($posted[$hash_var]) ? $posted[$hash_var] : '';
      $hash_string .= '|';
    }

    $hash_string .= $SALT;
	
	 $firstname=$posted['firstname'];
	 $email=$posted['email'];
	 $phone=$posted['phone'];
	 $amount=$posted['amount'];
	 $address=$posted['udf1'];
	 $txnid=$posted['txnid'];
	 
     $srinivasa = array("$firstname","$email","$phone","$amount","$address","$txnid");
	 $str_json = json_encode($srinivasa);
	 $_SESSION['srinivasa']=$str_json;

    $hash = strtolower(hash('sha512', $hash_string));
    $action = $PAYU_BASE_URL . '/_payment';
  }
} elseif(!empty($posted['hash'])) {
  $hash = $posted['hash'];
  
     $firstname=$posted['firstname'];
	 $email=$posted['email'];
	 $phone=$posted['phone'];
	 $amount=$posted['amount'];
	 $address=$posted['udf1'];
	 $txnid=$posted['txnid'];
     $srinivasa = array("$firstname","$email","$phone","$amount","$address","$txnid");
	 $str_json = json_encode($srinivasa);
	 $_SESSION['srinivasa']=$str_json;
  
  $action = $PAYU_BASE_URL . '/_payment';
}
?>
<!DOCTYPE html>
<html>


<head>


<meta charset="utf-8">
<title>ஸ்ரீ ஸ்ரீனிவாசா அறகட்டளை</title>
<meta name="description" content="Sri Srinivasa trust starts free medical camps,helping poor children for education"/>
<meta name="keywords" content="Famous tourist place in Salem,Old temples near salem,Famouse temples in salem,Famouse temples around salem,Trust in salem,top ten trust in salem,oldagaes in salemsrinivasa trust in salem,list of tyemples in salem,list of famouse temples in salem,Online donanation,Child homes in salem,Helpage homes around salem"/>
<meta name="robots" content="index, follow"/>
<meta name="language" content="English">
<meta name="Category" content="Trust"/>
<meta name="tags" content="Famous tourist place in Salem,Old temples near salem,Famouse temples in salem,Famouse temples around salem,Trust in salem,top ten trust in salem,oldagaes in salemsrinivasa trust in salem,list of tyemples in salem,list of famouse temples in salem,Online donanation,Child homes in salem,Helpage homes around salem"/>
<meta name="robots" content="index, follow"/>
<meta name="language" content="English">
<meta name="Category" content="Trust"/>


<meta name="geo.region" content="IN-TN" />
<meta name="geo.placename" content="Salem" />
<meta name="geo.position" content="42.51954;-70.896716" />
<meta name="ICBM" content="42.51954, -70.896716" />
<!-- Stylesheets -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<!-- Responsive -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="css/responsive.css" rel="stylesheet">
<script>
    var hash = '<?php echo $hash ?>';
    function submitPayuForm() {
      if(hash == '') {
        return;
      }
      var payuForm = document.forms.payuForm;
      payuForm.submit();
    }
  </script>
  
  <script>
 function validate()
 {
		var firstname=document.payuForm.firstname.value;
		if(firstname=="")
		{
		alert("Enter the name!");
		document.payuForm.firstname.focus();
		return false;
		}
		
		  	
	    var h=document.forms["payuForm"]["email"].value;
		var atpos=h.indexOf("@");
		var dotpos=h.lastIndexOf(".");
		if (atpos<1 || dotpos<atpos+2 || dotpos+2>=h.length)
		  {
		  alert("Enter a valid e-mail address");
		  document.payuForm.email.focus();
		  return false;
		  }
		  
		var phone=document.payuForm.phone.value;
		if(phone=="")
		{
		alert("Enter the Mobile Number!");
		document.payuForm.phone.focus();
		return false;
		}
		var phone=document.payuForm.phone.value;
		if(phone=="")
		{
		alert("Enter the your Mobile Number!");
		document.payuForm.phone.focus();
		return false;
		}
		if(isNaN(phone))
		{
		alert("Enter the valid Mobile Number");
		document.payuForm.phone.focus();
		return false;
		}
		var phone=document.payuForm.phone.value;
		if(phone=="")
		{
		alert("Enter the Mobile Number!");
		document.payuForm.phone.focus();
		return false;
		}
		
		var amount=document.payuForm.amount.value;
		if(amount=="")
		{
		alert("Enter the Amount!");
		document.payuForm.amount.focus();
		return false;
		}
		if(isNaN(amount))
		{
		alert("Numbers Only!");
		document.payuForm.amount.focus();
		return false;
		}
		
		var address=document.payuForm.udf1.value;
		if(address=="")
		{
		alert("Enter the address!");
		document.payuForm.udf1.focus();
		return false;
		}
	
	  	
	}
	
</script>
</head>

<body onload="submitPayuForm()">

<div class="page-wrapper">
 	
    <!-- Preloader -->
	<!--
    <div class="preloader"></div>
 	-->
    <!-- Main Header-->
    <header class="main-header">
    	<!-- Header Top -->
    	<div class="header-top">
        	<div class="auto-container">
            	<div class="clearfix">
                    
                    <!--Top Left-->
                    <div class="top-left">
                    	<ul class="clearfix">
                        		<li><span class="icon flaticon-technology"></span>+91 93459 73432</li>
                            <li><span class="icon flaticon-note"></span>info@srisrinivasatrust.in</li>
                        </ul>
                    </div>
                    
                    <!--Top Right-->
                    <div class="top-right">
                    
                    	<!--social-icon-->
                        <div class="social-icon">
                        	<a href="#"><span class="fa fa-facebook"></span></a>
                            <a href="#"><span class="fa fa-youtube-play"></span></a>
                            <a href="#"><span class="fa fa-linkedin"></span></a>
                            <a href="#"><span class="fa fa-instagram"></span></a>
                            <a href="#"><span class="fa fa-twitter"></span></a>
							<a href="#"><div id="google_translate_element"></div></a>
                        </div>
                        
						<script type="text/javascript">
						function googleTranslateElementInit() {
						  new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'en,ta', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
						}
						</script>
						<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
                        
                        
                    </div>
                    
                </div>
                
            </div>
        </div><!-- Header Top End -->
        
        
        <!-- Main Box -->
    	<div class="main-box">
        	<div class="auto-container">
            	<div class="outer-container clearfix">
                    <!--Logo Box-->
                    <div class="logo-box">
                        <div class="logo"><a href="index.html"><img src="images/logo.png" alt=""></a></div>
                    </div>
                    
                    <!--Nav Outer-->
                    <div class="nav-outer clearfix">
                        <!-- Main Menu -->
                        <nav class="main-menu">
                            <div class="navbar-header">
                                <!-- Toggle Button -->    	
                                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                </button>
                            </div>
                            
                           <div class="navbar-collapse collapse clearfix">
                                <ul class="navigation clearfix">
                                    <li class="current dropdown"><a href="index.html">முகப்பு</a></li>
                                    <li ><a href="about-us.html">எங்களை பற்றி</a> </li>
									
                                    <li ><a href="scope-of-the-trust.html">எங்களின் நோக்கம்</a> </li>
                                    <li ><a href="donate.php">நன்கொடை அளிக்க</a> </li>
                                    	
                                   
                                    <li><a href="gallery.html">புகைப்படங்கள்</a></li>
                                    
                                    <li><a href="contact.html">எங்களை தொடர்புகொள்ள</a></li>
                                    
                                 </ul>
                            </div>
                        </nav><!-- Main Menu End-->
                        
                    </div><!--Nav Outer End-->
                    
                    <!-- Hidden Nav Toggler -->
                    <div class="nav-toggler">
                    <button class="hidden-bar-opener"><span class="icon fa fa-bars"></span></button>
                    </div><!-- / Hidden Nav Toggler -->
                    
            	</div>    
            </div>
        </div>
    
    </header>
    <!--End Main Header -->
    
    
    
    
    <!--Page Title-->
	<!--
	style="background-image:url(images/background/bg-page-title-1.jpg);"
	-->
    <section class="page-title" >
        <div class="auto-container">
            <h1>நன்கொடை வழங்க</h1>
            <div class="bread-crumb-outer">
                <ul class="bread-crumb clearfix">
                    <li><a href="index.html">முகப்பு</a></li>
                    <li class="active">நன்கொடை வழங்க</li>
                </ul>
            </div>
        </div>
    </section>
    
    
    <!--Donate Section-->
    <section class="donate-now">
    	<div class="auto-container">
        	<div class="default-form">
                <form action="<?php echo $action; ?>" method="post" onsubmit="return validate()" name="payuForm">
      <input type="hidden" name="key" value="<?php echo $MERCHANT_KEY ?>" />
      <input type="hidden" name="hash" value="<?php echo $hash ?>"/>
      <input type="hidden" name="txnid" value="<?php echo $txnid ?>" />
                    <div class="row clearfix">
                        
                       
                        <!--Right Column-->
                        <div class="left-column col-md-6 col-sm-12 col-xs-12">
                            <div class="default-title"><h3>DONOR DETAILS</h3></div>
                            <div class="row clearfix">
                            
                                <div class="form-group col-md-6 col-sm-6 col-xs-12">
                                    <div class="field-label">பெயர் *</div>
                                    <input type="text" name="firstname" id="firstname" value="<?php echo (empty($posted['firstname'])) ? '' : $posted['firstname']; ?>" placeholder="" >
                                </div>
                               
                                
                                <div class="form-group col-md-6 col-sm-6 col-xs-12">
                                    <div class="field-label">மின்னஞ்சல் முகவரி *</div>
                                    <input type="text" name="email" id="email" value="<?php echo (empty($posted['email'])) ? '' : $posted['email']; ?>" placeholder="" >
                                </div>
                                
                                <div class="form-group col-md-6 col-sm-6 col-xs-12">
                                    <div class="field-label">கைபேசி எண்</div>
                                    <input type="text" name="phone" value="<?php echo (empty($posted['phone'])) ? '' : $posted['phone']; ?>" placeholder="">
                                </div>
                                  <div class="form-group col-md-6 col-sm-6 col-xs-12">
                                    <div class="field-label">தொகை</div>
                                   <input type="text" name="amount" value="<?php echo (empty($posted['amount'])) ? '' : $posted['amount'] ?>" placeholder="Enter Your Amount">
                                </div>
                                <div class="form-group col-md-12 col-sm-12 col-xs-12">
                                    <div class="field-label">முகவரி</div>
                                    <textarea name="udf1" placeholder=""><?php echo (empty($posted['udf1'])) ? '' : $posted['udf1']; ?></textarea>
                                </div>
                                <input type="hidden" name="surl" value="<?php echo (empty($posted['surl'])) ? 'datainsert.php' : $posted['surl'] ?>" size="64" />
								<input type="hidden" name="furl" value="<?php echo (empty($posted['furl'])) ? 'failure.php' : $posted['furl'] ?>" size="64" />
								<input type="hidden" name="service_provider" value="payu_paisa" size="64" />
								<input type="hidden" name="productinfo" value="<?php echo (empty($posted['productinfo'])) ? 'Sri Srinivasa Capitable Trust' : $posted['productinfo'] ?>" size="64" />
								<?php if(!$hash) { ?>
                                <div class="form-group col-md-12 col-sm-12 col-xs-12">
                                   <input type="submit" class="theme-btn btn-style-three"></input>
                                </div>
								<?php } ?>
                                
                            </div>
                            
                        </div>
						<!--Right Column-->
                        <div class="right-column col-md-6 col-sm-12 col-xs-12">
                            <div class="default-title"><h3>வங்கி கணக்கு தகவல்கள்</h3></div>
							
                            <div class="row clearfix">
                             <div class="form-group col-md-6 col-sm-6 col-xs-12">
							 <div class="field-label"><strong>Bank Name:</strong>&nbsp;State Bank of India</div>
                                    <div class="field-label"><strong>Account Holder Name:</strong>&nbsp; Srinivasa Trust</div>
									 <div class="field-label"><strong>Account No:</strong>&nbsp;36735217071</div>
									  <div class="field-label"><strong>IFSC Code:</strong>&nbsp;SBIN0002267</div>
									   <div class="field-label"><strong>Branch Name:</strong>&nbsp;Mohan Nagar Township,Salem</div>
                                    
                                </div>
                            
                                
                            </div>
                            
                        </div>
                         
                    </div>
                         
                    </div>
                </form>
                
            </div>
        </div>
    </section>
    
    
    
    
    <!--Main Footer-->
    <footer class="main-footer">
    	
        
        <!--Footer Bottom-->
         <div class="footer-bottom">
         	<div class="auto-container">
            	<div class="copyright-text"><a href="http://luisantsoftwares.com" style="color: #064bb3;" target="_blank"><img src="images/footer.png"/></a></div>
            </div>
        </div>
    </footer>
    
</div>
<!--End pagewrapper-->

<!--Scroll to top-->
<div class="scroll-to-top scroll-to-target" data-target="html"><span class="fa fa-long-arrow-up"></span></div>


<script src="js/jquery.js"></script> 
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/jquery.fancybox.pack.js"></script>
<script src="js/jquery.fancybox-media.js"></script>
<script src="js/wow.js"></script>
<script src="js/script.js"></script>
</body>

<!-- Mirrored from wp1.themexlab.com/html2/preview-human-welfare/donate.html by HTTrack Website Copier/3.x [XR&CO'2010], Sat, 29 Apr 2017 05:40:28 GMT -->
</html>