<?php 
session_start();

require('../cfg/res.php');
require('../cfg/cfg.php');
?>
<?php

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

$sql_datesp='SET lc_time_names = "es_UY"';
$res_datesp=mysql_query($sql_datesp,$link_vcrx);
$user_sql='select *from ctas0';

if(isset($_POST['agrupax']) && !empty($_POST['agrupax'])){
	$user_sql.=' where user_tipo in('.$_POST['agrupax'].')';
}
$user_sql.=' order by ctas_'.$_POST['ordenax'];
;
$user_res=mysql_query($user_sql,$link_vcrx);
?>
<table width="100%" cellpadding="2" border="1" id="lista_tbl" style="border-collapse:collapse;">
<tr>
<th>M</th>
<th>I</th>
<th>CODIGO</th>
<th>DESCRI</th>
<th>TIPO</th>
<th>STATUS</th>
<th>CAIR</th>
</tr>
<?php while($user_r=mysql_fetch_assoc($user_res)){?>
<tr>
<!-- <td align="center"><input type="image" onclick="_modificar('<?php //echo $user_r['user_cedula'];?>');" src="http://vcrxol.com/_img/ico_edit.png" width="20" title="Modificar <?php //echo $user_r['user_cedula']?>"></td> -->
<td align="center"><a href="nctas.php?idx=<?php echo $user_r['ctas_codigo'];?>" target="_blank"><img src="http://vcrxol.com/_img/ico_edit.png" width="20" title="Modificar <?php echo $user_r['ctas_codigo']?>"></a></td>
<td align="center"><img src="http://vcrxol.com/_img/print2.png" width="20" title="Imprimir"></td>
<td><?php echo $user_r['ctas_codigo'];?></td>
<td><?php echo $user_r['ctas_descri'];?></td>
<td align="center"><?php echo $user_r['ctas_tipo'];?></td>
<td align="center"><?php echo $user_r['user_status'];?></td>
<td><?php echo $user_r['user_cair'];?></td>
</tr>
<?php }?>
</table>