<?php
$bol = explode(' / ',$_POST["Card_Expiry"]); $ay=$bol[0]; $yil=$bol[1];
$oid="SID_".rand(0,9999999999999999)."";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta charset="UTF-8" />
	<META HTTP-EQUIV="expires" CONTENT="0">
	<META HTTP-EQUIV="cache-control" CONTENT="no-cache">
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
</head>
<script language=javascript>
function findObj(n, d) { //v4.0
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
			if(!x && document.getElementById) x=document.getElementById(n); return x;
	}
	function XIDHesapla(){
		var simdi = new Date();
		var yil = new String(simdi.getFullYear());
		yil = yil.slice(2, 4);
		var ay = new String(simdi.getMonth()+1);
		if (ay.length == 1) ay = "0"+ay;
		var gun = new String(simdi.getDate());
		if (gun.length == 1) gun = "0"+gun;
		var sa = new String(simdi.getHours());
		if (sa.length == 1) sa = "0"+sa;
		var dk = new String(simdi.getMinutes());
		if (dk.length == 1) dk = "0"+dk;
		var sn = new String(simdi.getSeconds());
		if (sn.length == 1) sn = "0"+sn;
		findObj("XID").value = "YKB_0000"
		+yil+ay+gun+sa+dk+sn;
	}
	function Init() {
		XIDHesapla();
	}
</script>
<body onLoad="Init();document.frm1.submit();">
	<form name="frm1" method="post" action="yapikredi/request.php?burl=<?php echo $_POST["burl"]?>" style="display:none;">
		<input name="ccdata" type="checkbox" value="1" checked>
		<input name="custName" id="custName" value="<?php echo "".$_POST["Card_Name"]." ".$_POST["Card_Surname"].""?>" size ="25" maxlength="30">
		<input name="XID" id="XID" value="<?php echo $oid;?>" size="25" maxlength="20" >
			<input name="ccno" id="ccno" value="<?php echo str_replace(' ', '', $_POST["Card_Number"]);?>" size="22" maxlength="16" >
			<input name="expdate" id="expdate" value="<?php echo substr($yil,-2).$ay;?>" size="6" maxlength="4" >
			<input name="cvv" id="cvv" value="<?php echo $_POST["Card_Cvv"];?>" size="5" maxlength="3" >
			<input name="amount" id="amount" value="<?php echo "".str_replace(",","",number_format($_POST["Total"],0))."00";?>" maxlength="13" >
		<select name="currency" id="tranType0">
			<option value="TL" selected>TL</option>
			<option value="US">US</option>
			<option value="EU">EU</option>
		</select>
		<input name="instalment" id="instalment" value="00" size="2" maxlength="2" >
		<select name="tranType" id="tranType">
			<option value="Auth">Provizyon</option>
			<option value="Sale" selected>Satış</option>
			<option value="WP">Puan</option>
			<option value="SaleWP">Puan + Satış</option>
			<option value="Vft">Vade Farklı Satış</option>
		</select>
		<input name="vftCode" id="vftCode" value="K001" SIZE="8" maxlength="4" >
		<select name="openANewWindow" id="openANewWindow">
			<OPTION VALUE="true">Yeni bir sayfa aç</OPTION>
			<OPTION VALUE="false" SELECTED>Mevcut Sayfadan devam et</OPTION>
		</select>
		<input type="submit" name="Submit" value="Gönder">
	</form>
</body>
</html>