<?php session_start();?>
<?php include('../_cfg/config.php');?>
<?php include('php_gene1.php'); ?>
<?php include('php_session.php');?>
<?php foreach($_POST as $campo => $valor){${$campo}=$valor;} ?>
<?php //foreach($_GET as $campo => $valor){${$campo}=$valor;} ?>

<?php
header('Content-disposition: attachment; filename='.$ptipo.'_'.$xanio.$xmes.'_'.$codigoempr.'.xml');
header ("Content-Type:text/xml"); 

if($ptipo==''){$ptipo='ATS';}

if($ptipo=='ATS')
{echo gen_ats1($panio,$pmes);}



?>
