<?php session_start();?>
<?php
include('../_cfg/config.php');
include('php_gene1.php'); 
include('php_session.php');


// $ce=new vrcelec1($_GET['docu'],$_GET['idnum'],$_GET['formato']);

$docu=$_GET['docu'];
$idnum=$_GET['idnum'];
$forma=$_GET['formato'];
$result=prnt_docu0($docu,$idnum,$forma,$desti);
echo $result;

die();
?>


<?php session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>COMPROBANTE</title>

<style type="text/css">
BODY{font-family: courier new;}
/* @page { */
/*    size: 7in 9.25in; */
/* 	 top left bott right */
/*    size: 215mm 297mm;  */
/*    margin: 15mm 0mm 0mm 0mm; */
/* } */
</style>	
<script type="text/javascript">
 <?php //require('../../_js/fecha_format.js');  ?>
</script>	
</head>
<body>
<div align="center">
<?php 
require('../cfg/res.php');

$req_ce = '../../_lib/vrcelec1.php';
// $req_cexml = '../../_lib/vrcexml1.php';
	
if(!mb_stristr('clie.prov',substr($_SESSION['user_vcrx_tipo'],0,4)))
{	
// echo $_GET['docu'];
		if($_GET['formato']==4)
		{
		if (mb_stristr('CH',substr($_GET['docu'],0,2)) )
		{	$req_ce='../../_lib/'.strtolower(substr($_GET['docu'],0,2)).'_formato.php';	}	}

	if($_GET['formato']!=3)
	{
		if (mb_stristr('OP.FC.FR.NC.GR.RP.CH',substr($_GET['docu'],0,2)) )
		{
			$req_cp='../../_lib/'.strtolower(substr($_GET['docu'],0,2)).'_'.$_SESSION['user_vcrx_empr'].'.php';
			if(file_exists($req_cp)){$req_ce = $req_cp;}
		}

		if (mb_stristr('FP11',substr($_GET['docu'],0,4)) )
		{
			$req_cp='../../_lib/'.strtolower(substr($_GET['docu'],0,4)).'_'.$_SESSION['user_vcrx_empr'].'.php';
			if(file_exists($req_cp)){$req_ce = $req_cp;}
		}

	}
}

	
	
// 	echo $req_ce;
require($req_ce); 
// require($req_cexml); 
	$ce=new vrcelec1($_GET['docu'],$_GET['idnum'],$_GET['formato']);
// $ce=new vrcelec1($_GET['docu'],$_GET['idnum'],$_GET['formato']);
// $cexml=new vrcexml1($_GET['docu'],$_GET['idnum']);
?>
</div>
</body>
</html>