<?php

function comp_tot($xmodulo)
{
require('../cfg/res.php');
// include('php_gene1.php');
// include('php_cele1.php');
include('php_session.php');
	
// echo $xmodulo;
// fill_atrznume();	

// $sql_acce='select count(*) as conta from usrdoc1';
// $res_acce=mysql_query($sql_acce,$link_vcrx);
//   echo mysql_result($res_acce,0,'conta');
//   die();
  
$xacceinfo=0;
$sql_acce='select * from usrdoc1 where docu like "FP%" and info="1" and user="'.$_SESSION['user_vcrx_id'].'" ';
$res_acce=mysql_query($sql_acce,$link_vcrx);
if (mysql_num_rows($res_acce)!=0){$xacceinfo=1;}
if (mb_stristr('sist.supe',$_SESSION['user_vcrx_tipo'])){$xacceinfo=1;}

  
$xaccemodi=0;
$sql_acce='select * from usrdoc1 where docu like "FP%" and modi="1" and user="'.$_SESSION['user_vcrx_id'].'" ';
$res_acce=mysql_query($sql_acce,$link_vcrx);
if (mysql_num_rows($res_acce)!=0){$xaccemodi=1;}
if (mb_stristr('sist.supe',$_SESSION['user_vcrx_tipo'])){$xaccemodi=1;}

if ($xaccemodi==1){$xacceinfo=1;}
if ($xacceinfo==0){echo '<font size="8" color="red"><b>';die('No tiene acceso a Informe de Compras ' );}	
	
mysql_query("SET NAMES 'utf8'");

$fecha1 = date('Y-m-j');
$nuevafecha = strtotime ( '-1 month' , strtotime ( $fecha1 ) ) ;
$xfecha1 = date ( 'Y-m-j' , $nuevafecha );
$xfecha1= date('Y-m-'.'01');
$xfecha2= date('Y-m-d');

$xfgrou='D';	
$xforde='D';
$xfcodi='1';

?>



<script type="text/javascript">
<?php include('../../_js/busca_maes3.js');?>
<?php include('../../_js/lista_maes3.js');?>
<?php include('../../_js/fecha_format.js');?>


function _fecha(e,idfec)
{
//if(e.keyCode==9 || e.keyCode==13)
	if(e.keyCode==13)
	{
		var fn=document.getElementById(idfec).value;
		fn=fecha_format(fn);
		document.getElementById(idfec).value=fn;
	}
}



function compt1d(grupox,idnumx,obj)
{
	
	
	var obj2=obj.parentNode;
	var obj3=obj2.parentNode;	
	for(i=0;i<=document.getElementsByClassName('filax').length-1;i++)
	{
		document.getElementsByClassName('filax').item(i).style.background='#fff';
	}
       obj3.style.background='#09c';

document.getElementById('comptot2').innerHTML='Cargando datos...';
$.ajax({
		cache:false,
		url:'../lib/vrcompt1d.php',
		datatype: "text",
	    async:false,
		type:'POST',
		data:{grupo:grupox,idnum:idnumx,fini:document.getElementById('fecha_ini').value,ffin:document.getElementById('fecha_fin').value},
    	beforeSend: function(jqXHR, textStatus)
		{
		}, 
		success:function(dato, textStatus, jqXHR)
		{
			 document.getElementById('comptot2').innerHTML=dato;
		},
		error:function(jqXHR,textStatus,errorThrown )
		{
           if (jqXHR.status === 0) {
              document.getElementById('comptot2').innerHTML='Not connect: Verify Network.';
           } else if (jqXHR.status == 404) {
               document.getElementById('comptot2').innerHTML='Requested page not found [404]';
           } else if (jqXHR.status == 500) {
               document.getElementById('comptot2').innerHTML='Internal Server Error [500].';
           } else if (exception === 'parsererror') {
               document.getElementById('comptot2').innerHTML='Requested JSON parse failed.';
           } else if (exception === 'timeout') {
               //console.log('Time out error.');
			   document.getElementById('comptot2').innerHTML='Servidor no Responde';
           } else if (exception === 'abort') {
               document.getElementById('comptot2').innerHTML='Ajax request aborted.';
           } else {
               document.getElementById('comptot2').innerHTML='Uncaught Error: ' + jqXHR.responseText;
           }

		}, 
	    complete:function(jqXHR, textStatus)
    	{
			
			if(textStatus==='success')
	        {
 
			}           
		},
		timeout:60000
	});

}



function redireccionar(xmodi) 
{
	
// console.log(xmodi);	
var docu=document.getElementById('docu').value;
var enti=document.getElementById('enti').value;
var toenti=document.getElementById('toenti').value;
var item=document.getElementById('item').value;
	
var ftpro=document.getElementById('ftpro').value;
var fcair=document.getElementById('fcair').value;
var fctas=document.getElementById('fctas').value;
var flsub=document.getElementById('flsub').value;

var fnocta=document.getElementById('fnocta').checked;
// var fcdad=document.getElementById('fcdad').value;
// var frcdd=document.getElementById('frcdd').value;
// var fctlg=document.getElementById('fctlg').value;
// var fvndd=document.getElementById('fvndd').value;

var fecha_ini=document.getElementById('fecha_ini').value;
var fecha_fin=document.getElementById('fecha_fin').value;
fecha_ini=fecha_format(fecha_ini);
if(fecha_ini=='error'){alert('formato de fecha incorrecta'); document.getElementById('fecha_ini').focus();return false;}
fecha_fin=fecha_format(fecha_fin);
if(fecha_fin=='error'){alert('formato de fecha incorrecta'); document.getElementById('fecha_fin').focus();return false;}

var fgroud=document.getElementById('fgroud').checked;
var fgroue=document.getElementById('fgroue').checked;
var fgroui=document.getElementById('fgroui').checked;
var fgroum=document.getElementById('fgroum').checked;
var fgrous=document.getElementById('fgrous').checked;
var fgrouf=document.getElementById('fgrouf').checked;
var fgrour=document.getElementById('fgrour').checked;
var fgrouc=document.getElementById('fgrouc').checked;
var fgroup=document.getElementById('fgroup').checked;
// var fgrouv=document.getElementById('fgrouv').checked;
var fgrout=document.getElementById('fgrout').checked;
var fgroul=document.getElementById('fgroul').checked;

var fordec=document.getElementById('fordec').checked;
var forded=document.getElementById('forded').checked;
var fordet=document.getElementById('fordet').checked;

var fcodis=document.getElementById('fcodis').checked;
var fcodia=document.getElementById('fcodia').checked;
var fcodie=document.getElementById('fcodie').checked;


var fgrou='D';
var forde='D';
var fcodi='1';

if (fcodis){fcodi='1';}
if (fcodia){fcodi='2';}
if (fcodie){fcodi='3';}
	
if (fgroud){fgrou='D';}
if (fgroue){fgrou='E';}
if (fgroui){fgrou='I';}
if (fgrout){fgrou='T';}
if (fgroul){fgrou='L';}
if (fgroum){fgrou='M';}
if (fgrous){fgrou='S';}
if (fgrouf){fgrou='F';}
if (fgrour){fgrou='R';}
if (fgrouc){fgrou='C';}
if (fgroup){fgrou='P';}
// if (fgrouv){fgrou='V';}

if (fordec){forde='C';}
if (forded){forde='D';}
if (fordet){forde='T';}

// pagina="?opt=<?php echo $_GET['opt']?>" 
// +"&fecha_ini="+fecha_ini 
// +"&fecha_fin="+fecha_fin 
// +"&fgrou="+fgrou
// +"&fcodi="+fcodi
// +"&forde="+forde
// +"&xmodi="+xmodi
// +"&fdocu="+docu
// +"&fenti="+enti
// +"&fitem="+item
// +"&ftpro="+ftpro 
// +"&flsub="+flsub;
	
// console.log(pagina);
//location.href=pagina;

	document.getElementById('comptot1').innerHTML='Cargando datos...';

		$.ajax({
		cache:false,
		url:'vrcompt2.php',
		datatype: "text",
	    async:true,
		type:'POST',
		data:{opt:"<?php echo $_GET['opt']?>",
		fecha_ini:fecha_ini,
		fecha_fin:fecha_fin,
		fgrou:fgrou,
		fcodi:fcodi,
		forde:forde,
		fdocu:docu,
		fenti:enti,
		ftoenti:toenti,
		fitem:item,
		ftpro:ftpro,
		fcair:fcair,
		flsub:flsub,
		fctas:fctas,
		fnocta:fnocta,
		xmodi:xmodi}, 
    	beforeSend: function(jqXHR, textStatus)
		{	                  
		}, 
		success:function(dato, textStatus, jqXHR)
		{
			console.log(Date());
			console.log(dato.length);
			
			document.getElementById('comptot1').innerHTML=dato;
			console.log(Date());
		},
		error:function(jqXHR,textStatus,errorThrown )
		{
				if (jqXHR.status === 0) {
	              console.log('Not connect: Verify Network.');
		           } else if (jqXHR.status == 404) {
	               console.log('Requested page not found [404]');
		           } else if (jqXHR.status == 500) {
	               console.log('Internal Server Error [500].');
		           } else if (exception === 'parsererror') {
	               console.log('Requested JSON parse failed.');
		           } else if (exception === 'timeout') {
	               alert('Servidor no Responde');
		           } else if (exception === 'abort') {
	               console.log('Ajax request aborted.');
		           } else {
	               console.log('Uncaught Error: ' + jqXHR.responseText);
           			}
			
			
		   

		}, 
		complete:function(jqXHR, textStatus)
    	{
			if(textStatus==='success')
	        {
				    				    	
			}
		},
		timeout:300000
	});



} 



//function imprimirlista(entix,entid) 

function imprimirlista() 
{

var docu=document.getElementById('docu').value;
var enti=document.getElementById('enti').value;
var toenti=document.getElementById('toenti').value;
var item=document.getElementById('item').value;

var fnocta=document.getElementById('fnocta').checked;
var flsub=document.getElementById('flsub').value;
var ftpro=document.getElementById('ftpro').value;
var fcair=document.getElementById('fcair').value;
var fctas=document.getElementById('fctas').value;
// var fcdad=document.getElementById('fcdad').value;
// var frcdd=document.getElementById('frcdd').value;
// var fvndd=document.getElementById('fvndd').value;
// var fctlg=document.getElementById('fctlg').value;

var fecha_ini=document.getElementById('fecha_ini').value;
var fecha_fin=document.getElementById('fecha_fin').value;

fecha_ini=fecha_format(fecha_ini);
if(fecha_ini=='error'){alert('formato de fecha incorrecta'); document.getElementById('fecha_ini').focus();return false;}
fecha_fin=fecha_format(fecha_fin);
if(fecha_fin=='error'){alert('formato de fecha incorrecta'); document.getElementById('fecha_fin').focus();return false;}
	
	
var fgroud=document.getElementById('fgroud').checked;
var fgroue=document.getElementById('fgroue').checked;
var fgroui=document.getElementById('fgroui').checked;
var fgroum=document.getElementById('fgroum').checked;
var fgrous=document.getElementById('fgrous').checked;
var fgrouf=document.getElementById('fgrouf').checked;
var fgrour=document.getElementById('fgrour').checked;
var fgrouc=document.getElementById('fgrouc').checked;
var fgroup=document.getElementById('fgroup').checked;
// var fgrouv=document.getElementById('fgrouv').checked;
var fgrout=document.getElementById('fgrout').checked;
var fgroul=document.getElementById('fgroul').checked;

var fcodis=document.getElementById('fcodis').checked;
var fcodia=document.getElementById('fcodia').checked;
var fcodie=document.getElementById('fcodie').checked;

var fordec=document.getElementById('fordec').checked;
var forded=document.getElementById('forded').checked;
var fordet=document.getElementById('fordet').checked;

var fgrou='D';
var forde='D';
var fcodi='1';


if (fcodis){fcodi='1';}
if (fcodia){fcodi='2';}
if (fcodie){fcodi='3';}

if (fgroud){fgrou='D';}
if (fgroue){fgrou='E';}
if (fgroui){fgrou='I';}
if (fgroum){fgrou='M';}
if (fgrous){fgrou='S';}
if (fgrouf){fgrou='F';}
if (fgroup){fgrou='P';}
// if (fgrouv){fgrou='V';}
if (fgrour){fgrou='R';}
if (fgrouc){fgrou='C';}
if (fgrout){fgrou='T';}
if (fgroul){fgrou='L';}

if (fordec){forde='C';}
if (forded){forde='D';}
if (fordet){forde='T';}



pagina="../lib/impr_compt0.php?"
+"&fecha_ini="+fecha_ini 
+"&fecha_fin="+fecha_fin 
+"&fgrou="+fgrou
+"&fcodi="+fcodi
+"&forde="+forde
+"&fdocu="+docu
+"&fenti="+enti
+"&ftoenti="+toenti
+"&fitem="+item
+"&ftpro="+ftpro 
+"&fcair="+fcair
+"&fctas="+fctas
+"&fnocta="+fnocta
+"&flsub="+flsub;


window.open(pagina);
} 

function X_enti(e)
{
// 	if(e.keyCode==9 || e.keyCode==13)
	if(e.keyCode==13)
	{
		busca_maes2('enti',document.getElementById('enti').value,'enti','enti_descri','');
	}
}

function X_item(e)
{
// 	if(e.keyCode==9 || e.keyCode==13)
	if(e.keyCode==13)
	{
			busca_maes2('item',document.getElementById('item').value,'item','descri','');
	}
}

	
function _modi1(idnum)
{
	var suco=document.getElementById('suco_'+idnum).value;
	var fpag=document.getElementById('fpag_'+idnum).value;
	var atrz=document.getElementById('atrz_'+idnum).value;
	var impo=document.getElementById('impo_'+idnum).value;

	$.ajax({
		cache:false,
		url:'vrmcomp1.php',
		datatype: "text",
	    async:false,
		type:'POST',
		data:{
				idnum:idnum,
				impo:impo,
				suco:suco,
				fpag:fpag,
				atrz:atrz
			}, 
    	beforeSend: function(jqXHR, textStatus)
		{}, 
		success:function(dato, textStatus, jqXHR)
		{
			document.getElementById('error_'+idnum).innerHTML=dato;
		},
		error:function(jqXHR,textStatus,errorThrown )
		{
           if (jqXHR.status === 0) {console.log('Not connect: Verify Network.');}
						else if (jqXHR.status == 404) {console.log('Requested page not found [404]');}
						else if (jqXHR.status == 500) {console.log('Internal Server Error [500].');}
						else if (exception === 'parsererror') {console.log('Requested JSON parse failed.');}
						else if (exception === 'timeout') {alert('Servidor no Responde');}
						else if (exception === 'abort') {console.log('Ajax request aborted.');}
						else {console.log('Uncaught Error: ' + jqXHR.responseText);}

		}, 
	    complete:function(jqXHR, textStatus)
    	{
			if(textStatus==='success'){}           
		},
		timeout:30000
	});

	
}
	
	
function _modi2(idnum,iddet)
{
	var item=document.getElementById('item_'+idnum+'_'+iddet).value;
	var cair=document.getElementById('cair_'+idnum+'_'+iddet).value;
	var ctas=document.getElementById('ctas_'+idnum+'_'+iddet).value;

	$.ajax({
		cache:false,
		url:'vrmcomp2.php',
		datatype: "text",
	    async:false,
		type:'POST',
		data:{
				idnum:idnum,
				iddet:iddet,
				item:item,
				cair:cair,
				ctas:ctas
			}, 
    	beforeSend: function(jqXHR, textStatus)
		{
	
		}, 
		success:function(dato, textStatus, jqXHR)
		{
			document.getElementById('error_'+idnum+'_'+iddet).innerHTML=dato;
		},
		error:function(jqXHR,textStatus,errorThrown )
		{
           if (jqXHR.status === 0) {console.log('Not connect: Verify Network.');}
						else if (jqXHR.status == 404) {console.log('Requested page not found [404]');}
						else if (jqXHR.status == 500) {console.log('Internal Server Error [500].');}
						else if (exception === 'parsererror') {console.log('Requested JSON parse failed.');}
						else if (exception === 'timeout') {alert('Servidor no Responde');}
						else if (exception === 'abort') {console.log('Ajax request aborted.');}
						else {console.log('Uncaught Error: ' + jqXHR.responseText);}

		}, 
	    complete:function(jqXHR, textStatus)
    	{
			if(textStatus==='success'){}           
		},
		timeout:30000
	});

	
}
	

	
	
	
</script>

<?php $pidtxt='dl_impor'; $pdocu='FP'; $pcolu='impor'; include('vrsetlist.php'); ?>

<div style=" max-height:200px; overflow-y:scroll; margin-top:5px;">


<table id="tabla_filtros" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse;font-size:12px; border:#000000 solid 1px;">
<tr align="left" valign="top">

<th>
<table><caption>FECHAS</caption>	
	<tr>
		<?php $pcaption='inicial';  $pidtxt='fecha_ini'; $pdefa=$xfecha1; $pobj=3; include('vrgetfec.php'); ?>
</tr>
	<tr>
		<?php $pcaption='final';  $pidtxt='fecha_fin'; $pdefa=$xfecha2; $pobj=3; include('vrgetfec.php'); ?>
</tr>
	</table>
	
<!-- <div align="center">
FECHAS
</div>
<div align="right">
<span>Inicial</span> <input type="text" id="fecha_ini" placeholder="aaaa/mm/dd" size="6" onkeydown="_fecha(event,'fecha_ini');" value="<?php echo $xfecha1;?>" /> 
</div>
<div align="right">
<span>Final</span> <input type="text" id="fecha_fin" placeholder="aaaa/mm/dd" size="6" onkeydown="_fecha(event,'fecha_fin');" value="<?php echo $xfecha2;?>" /> 
</div> -->
</th>



<th style ="border-left:solid 1px;">
<div align="center">
<span>AGRUPADO X</span>
</div>
<div>
<input type="radio" id="fgroud" name="fgroup" <?php if($xfgrou=='D'){echo 'checked';}?>/><span>Documento</span> <br/>
<input type="radio" id="fgrout" name="fgroup" <?php if($xfgrou=='T'){echo 'checked';}?>/><span>T.Provee</span> <br/>
<input type="radio" id="fgroue" name="fgroup" <?php if($xfgrou=='E'){echo 'checked';}?>/><span>Proveedor</span> <br/>
<input type="hidden" id="fgroup" name="fgroup" <?php if($xfgrou=='P'){echo 'checked';}?>/><span></span>
<!-- <input type="hidden" id="fgrouv" name="fgroup" <?php// if($xfgrou=='V'){echo 'checked';}?>/><span></span> <br/> -->
</div>
</th>

<th>
<div>
<input type="radio" id="fgroul" name="fgroup" <?php if($xfgrou=='L'){echo 'checked';}?>/><span>Lineas</span> <br/>
<input type="radio" id="fgroui" name="fgroup" <?php if($xfgrou=='I'){echo 'checked';}?>/><span>Item</span> <br/>
<input type="radio" id="fgrouc" name="fgroup" <?php if($xfgrou=='C'){echo 'checked';}?>/><span>Cuenta</span> <br/>
<input type="radio" id="fgrour" name="fgroup" <?php if($xfgrou=='R'){echo 'checked';}?>/><span>Cod.Ret.</span> <br/>
</div>
</th>

<th>
<div>
<input type="radio" id="fgroum" name="fgroup" <?php if($xfgrou=='M'){echo 'checked';}?>/><span>Mensual</span> <br/>
<input type="radio" id="fgrous" name="fgroup" <?php if($xfgrou=='S'){echo 'checked';}?>/><span>Semanal</span> <br/>
<input type="radio" id="fgrouf" name="fgroup" <?php if($xfgrou=='F'){echo 'checked';}?>/><span>Diario</span> <br/>
</div>
</th>

<th style ="border-left:solid 1px;">
<div align="center">
<span>ORDENADO X</span>
</div>
<div>
<input type="radio" id="forded" name="forder" <?php if($xforde=='D'){echo 'checked';}?>/><span>Nombre</span> <br/>
<input type="radio" id="fordec" name="forder" <?php if($xforde=='C'){echo 'checked';}?>/><span>Codigo</span> <br/>
<input type="radio" id="fordet" name="forder" <?php if($xforde=='T'){echo 'checked';}?>/><span>Totales</span> <br/>
</div>
</th>

<th style ="border-left:solid 1px;">
<div align="center">
<span>CODIGOS</span>
</div>
<div>
<input type="radio" id="fcodis" name="tcodi" <?php if($xfcodi=='1'){echo 'checked';}?>/><span>Sistema</span> <br/>
<input type="radio" id="fcodia" name="tcodi" <?php if($xfcodi=='2'){echo 'checked';}?>/><span>Auxiliar</span> <br/>
<input type="radio" id="fcodie" name="tcodi" <?php if($xfcodi=='3'){echo 'checked';}?>/><span>EAN (Barras)</span> <br/>
</div>
</th>

	<?php
if ($xacceinfo==1)
{
?>
<th align="center" style ="border-left:solid 1px;" valign="middle">
<?php $pcaption='Consultar';  $ponclick="redireccionar();" ;include('vrbutton.php'); ?>
<br>	
<?php $pcaption='Imprimir';  $ponclick="imprimirlista();" ;include('vrbutton.php'); ?>
</th>
<?php
}
?>
</tr>
</table>

<?php $ptabla='item'; include('vrsetlist.php'); ?>
<?php $ptabla='ctas'; include('vrsetlist.php'); ?>
<?php $ptabla='cair'; include('vrsetlist.php'); ?>
<?php $ptabla='suco'; include('vrsetlist.php'); ?>
<?php $ptabla='fpag'; include('vrsetlist.php'); ?>
  
<table id="tabla_filtros2" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse;font-size:12px; border:#000000 solid 1px;">
<tr>
<th>FILTROS</th>
<th style ="border-left:solid 1px;" valign="top" >
<table>
	<tr>
		<?php $pcaption='Docu';  $ptabla='docu'; $pidtxt='docu'; $pdefa=$xfdocu; $pnotob=1; include('vrgetcod.php'); ?>
	</tr>
	<tr>
    <td>
		<?php $pcaption='NO-Cta.';   $pidtxt='fnocta';  include('vrchkbox.php'); ?>
    </td>
	</tr>
	<tr style="display:<?php if(!mb_stristr('demo.cele',$_SESSION['user_vcrx_empr'])){echo 'none';} ?>;">
		<?php $pcaption='Cliente';  $ptabla='enti'; $pidtxt='toenti'; $pdefa=$xftoenti; $pnotob=1; include('vrgetcod.php'); ?>
	</tr>
<!-- 	<tr> -->
		<?php //$pcaption='Pto.Vta.';  $ptabla='ptov'; $pidtxt='ptov'; $pdefa=$xfptov; $pnotob=1; include('vrgetcod.php'); ?>
<!-- 	</tr> -->
</table>	
</th>
<th style ="border-left:solid 1px;">
<table>
	<tr>
		<?php $pcaption='T.Prov.';  $ptabla='tpro'; $pidtxt='ftpro'; $pdefa=$xftpro; $pnotob=1; include('vrgetcod.php'); ?>
	</tr>
	<tr>
		<?php $pcaption='Proveedor';  $ptabla='enti'; $pidtxt='enti'; $pdefa=$xfenti; $pnotob=1; include('vrgetcod.php'); ?>
	</tr>
</table>	
	
</div>
</th>


<th style ="border-left:solid 1px;">
<table>
	<tr>
		<?php $pcaption='Linea';  $ptabla='lsub'; $pidtxt='flsub'; $pdefa=$xflsub; $pnotob=1; include('vrgetcod.php'); ?>
	</tr>
	<tr>
		<?php $pcaption='Item';  $ptabla='item'; $pidtxt='item'; $pdefa=$xfitem; $pnotob=1; include('vrgetcod.php'); ?>
	</tr>
</table>
</th>

<th style ="border-left:solid 1px;">
<table>
	<tr>
		<?php $pcaption='CAIR';  $ptabla='cair'; $pidtxt='fcair'; $pdefa=$xfcair; include('vrgetcod.php'); ?>
	</tr>
	<tr>
		<?php $pcaption='Cuenta';  $ptabla='ctas'; $pidtxt='fctas'; $pdefa=$xfctas;  include('vrgetcod.php'); ?>
	</tr>
</table>
</th>
	
	
<th style ="border-left:solid 1px; <?php if ($xaccemodi==0){echo 'display:none;';}?>">
<table align="center">

<th align="center" style ="border-left:none 1px;">
<?php $pcaption='Modif.Cab.';  $ponclick="redireccionar('1');" ;include('vrbutton.php'); ?>
	<br>
<?php $pcaption='Modif.Det.';  $ponclick="redireccionar('2');" ;include('vrbutton.php'); ?>
</th>
<?php //} ?>
	
	
	
	
</table>
</th>
	
	
</tr>
</table>

<table id="tabla_clave" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse;font-size:12px; border:#000000 solid 1px;">
<tr>
<th>
<?php $pcaption='Clave'; $pidtxt='claveacc'; $plong=49; $ponclick="upl_cel('".$pidtxt."');"; $pobj=3; $psize=12; include('vrgetnum.php'); ?>
</th>	
<?php if(1==2) { ?>	
<!-- 
<th>
<?php $pcaption='Clave'; $pidtxt='claveacc1'; $plong=8; $ponclick="upl_cel('".$pidtxt."');"; $pobj=3; $psize=12; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc2'; $plong=2; $ponclick=""; $pobj=1; $psize=12; $pdefa='01'; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc3'; $plong=13; $ponclick=""; $pobj=1; $psize=12; $ptabla='enti'; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc4'; $plong=1; $ponclick=""; $pobj=1; $psize=12; $pdefa='2'; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc5'; $plong=6; $ponclick=""; $pobj=1; $psize=12; $pdefa='001001'; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc6'; $plong=9; $ponclick=""; $pobj=1; $psize=12; $pdefa='000000001'; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc7'; $plong=8; $ponclick=""; $pobj=1; $psize=12; $pdefa='001001'; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc8'; $plong=1; $ponclick=""; $pobj=1; $psize=12; $pdefa='1'; include('vrgetnum.php'); ?>
</th>	
<th align="left" width="1%">
<?php $pcaption='';			 $pidtxt='claveacc9'; $plong=1; $ponclick=""; $pobj=1; $psize=12; include('vrgetnum.php'); ?>
</th>	 
 -->
<?php } ?>	
	
<th>
<?php $pcaption='XML'; $pidtxt='cexml'; $paccept=".XML"; $ponclick="upl_cel('".$pidtxt."');" ; $pobj=3; include('vrgetfil.php'); ?>
</th>	
<th>
<?php $pcaption='TXT'; $pidtxt='cetxt'; $paccept=".TXT"; $ponclick="upl_cel('".$pidtxt."');"; $pobj=3; $pmult=1; include('vrgetfil.php'); ?>
</th>
<th>
<?php $pcaption='SCAN'; $pidtxt='cescan'; $ponclick="upl_cel('".$pidtxt."');"; include('vrbutton.php'); ?>
</th>	
</tr>	
</table>

	
</div>

<hr/>


<div id="comptot1" style="overflow-y:scroll; height:300px;"></div>

<br>
<div id="comptot2"></div>

<?php		
// $xwidth=40;	
require('lista_car.php');
?>	
<!-- 
<div id="lista_temporal_contenedor" style=" display:none; padding:0px; margin:0px; background: #666; opacity:0.5; width:100%; min-height: 100%; height:auto !important;position: fixed;top:0;left:0; z-index:1;" ></div>
<div id="lista_cargador" style=" display:none; background:#FFF;position: fixed; top:50px;z-index:10;" ><img src="../img/ajax-loader.gif" /></div>    
<div id="lista_temporal" style=" display:none; background:#FFF;position: fixed; top:50px;z-index:10; overflow-y:scroll; min-height:50px; max-height:400px; width:100%;" ><img src="../img/ajax-loader.gif" /></div>    
 -->

<?php }?>