<?php
session_start();
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
include 'database.php';

if(isset($_GET['ORDER']) && isset($_GET['BANK']) && isset($_SESSION['_OK_'])){
	die('Acceso Denegado');
}

if($_SESSION['LEN'] == 'SP'){
	$url = 'es'; 
	$T1 = 'Comprobante de Pago';
	$T2 = 'Transferencia Bancaria'; 
	$T3 = 'Apellidos'; 
	$T4 = 'Nombre'; 
	$T5 = 'Monto';
	$T11 = "Su compra no pudo ser realizada";
	$home = 'VOLVER AL INICIO';
}else{
	$url = 'en'; 
	$T1 = 'Payment Ticket';
	$T2 = 'Bank Trans'; 
	$T3 = 'Last Name'; 
	$T4 = 'Name'; 
	$T5 = 'Amount';
	$T11 = "Your payment can't be made";
	$home = 'HOME';
}

$linea = 0;

if(!_TRANS("EXECUTE PA_EPI_001 '{$_SESSION['cliente']}', '{$_GET['ORDER']}', '{$_GET['BANK']}', {$_SESSION['tarifa']};")){
	echo ("<br><br><center>[Error: 006] $T11<br><br><a href='$url/index.php'>[$home]</a></center>"); 
	_DESTRUYE_SESION();
	exit();
}
if(isset($_SESSION['a'])){
	_TRANS("EXECUTE PA_EPI_002 '{$_GET['ORDER']}', $linea, 'a', 0;");
	$linea++;
}
if(isset($_SESSION['b'])){
	_TRANS("EXECUTE PA_EPI_002 '{$_GET['ORDER']}', $linea, 'b', 0;");
	$linea++;
}
if(isset($_SESSION['c'])){
	_TRANS("EXECUTE PA_EPI_002 '{$_GET['ORDER']}', $linea, 'c', 0;");
	$linea++;
}
if(isset($_SESSION['d'])){
	_TRANS("EXECUTE PA_EPI_002 '{$_GET['ORDER']}', $linea, 'd', 0;");
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="imagenes/estilo.css">
</head>
<body>
<br>
<center><img src="imagenes/logo_epicoh.gif">&nbsp;&nbsp;<img align="top" src="imagenes/LOGO.gif"></center>
<br>
<table align="center" cellpadding="0" cellspacing="0" width="400px">
<tr>
    <td class="td1"></td><td class="td2"><b style="color:#FFFFFF;"><?=$T1?></b></td><td class="td3"></td>
</tr>
<tr><td rowspan="7" class="td4"></td><td height="5px"></td><td rowspan="7" class="td5"></tr>
<tr><td><b>ID:</b>&nbsp;<?=$_SESSION['cliente']?></td></tr>
<tr><td><b><?=$T2?>:</b>&nbsp;<?=$_GET['ORDER']?></td></tr>
<tr><td><b><?=$T3?>:</b>&nbsp;<?=$_SESSION['apellidos']?></td></tr>
<tr><td><b><?=$T4?>:</b>&nbsp;<?=$_SESSION['nombre']?></td></tr>
<tr><td><b><?=$T5?>:</b>&nbsp;$<?=$_SESSION['tarifa']?></td></tr>
<tr align="center"><td height="5"></td></tr>
<tr>
    <td class="td6"></td><td class="td7"></td><td class="td8"></td>
</tr>
</table>
<br>
<table align="center" bgcolor="#FFFFFF" width="460px" style="border:groove 2px;">
<tr>
<td>
<table align="center" width="135" border="0" cellpadding="2" cellspacing="0">
<tr align="center">
<td width="135" align="center" valign="top"><script src=https://seal.verisign.com/getseal?host_name=www.fundauna.una.ac.cr&size=M&use_flash=YES&use_transparent=YES&lang=es></script><br />
<a href="http://www.verisign.es/products-services/security-services/ssl/ssl-information-center/" target="_blank"  style="color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">Acerca de los certificados SSL</a></td>
</tr>
</table>
</td>
<td align="center"><img src="imagenes/visa.gif" border="0" /></td>
<td align="center"><img src="imagenes/mastercard.gif" border="0" /></td>
</tr>
</table>
<br>
<center>
	<input type="button" class="boton" value="Imprimir" onClick="window.print();">
<br> <br><a href="<?=$url?>/index.php">[<?=$home?>]</a>
</center>
<?php _DESTRUYE_SESION(); ?>
</body>
</html>