<?
session_name('portal_absa');
session_start();
require_once("conexion/conectar.php");

$conexion = new CONDB();
$conexion->conectar();

if(isset($_POST["busca_emisor"])){
$rfcEmisor=$_POST["busca_emisor"];
$doc=$_POST["busca_documento"];
$serieI=$_POST["busca_serieI"];
$serieF=$_POST["busca_serieF"];
$folioI=$_POST["busca_folioI"];
$folioF=$_POST["busca_folioF"];
$fechaI=$_POST["busca_fechaI"];
$fechaF=$_POST["busca_fechaF"];
$busca_nombre=$_POST["busca_nombre"];
}else{

$serieI="";
$serieF="";
$folioI="";
$folioF="";
$fechaI="";
$fechaF="";
$busca_nombre="";
}
?>
<script>
$j_6(document).ready(function() {
        //$j_6('#menuAdmin_show').hide();	
        //$j_6('#busquedaDocs_show').hide();
        
        $j_6('#closeModal-content').hide();
        $j_6('#loading').hide();

        $j_6('#loading').hide();
    $j_6().ajaxStart(function() {
        $j_6('#loading').show();
    }).ajaxStop(function() {
        $j_6('#loading').hide();
    });
	
	$j_6('#form, #fat, #FormBuscar').submit(function() {
        $j_6.ajax({
            type: 'POST',
            url: $j_6(this).attr('action'),
            data: $j_6(this).serialize(),
            success: function(data) {
                $j_6('#cuerpo').html(data);
            }
        })
        
        return false;
    });
    
    $j_6(".ventanaModal").live('click',function () {
					rel=$j_6(this).attr("rel");
					arrayRel = rel.replace("[","").replace("]","").split(",");
					var height1 = $j_6(window).height();
					var width1 = $j_6(window).width();
					
					var left = (width1-arrayRel[1])/2;
					var top = (height1-arrayRel[2])/2;
					
					$j_6('#ventanaModal').height(height1);
					$j_6('#ventanaModal').width(width1);
					
					$j_6('#loadModal-content').width(arrayRel[1]);
					$j_6('#loadModal-content').height(arrayRel[2]);
					$j_6('#loadModal-content').css({left: left, top: top});
					
					$j_6('#closeModal-content').width(arrayRel[1]);
					$j_6('#closeModal-content').height(15);
					
					$j_6('#ventanaModal').removeClass();
					$j_6('#loadModal-content').removeClass();
					$j_6('#ventanaModal').addClass('ventanaModal_');
					if($j_6.browser.msie)
						$j_6('#loadModal-content').addClass('loadModal_');
					else
						$j_6('#loadModal-content').addClass('loadModal_ sombraModal');
						
					$j_6('#loadModal').load(arrayRel[0]);
					$j_6('#ventanaModal').show();
					$j_6('#loadModal-content').fadeIn('slow');
                                        $j_6('#closeModal-content').show();
		});
		
		$j_6("#closeModal").live('click',function () {
					$j_6('#loadModal').html('');
					$j_6('#loadModal-content').hide();
                    $j_6('#closeModal-content').hide();
					$j_6('#ventanaModal').hide();
					$j_6('#loading').hide();
		});
});

</script>
<center>
<br/>
<table width="300px" style="margin-left: 8px">
<?if(isset($_SESSION['usuario_p_prov_absa']) && trim($_SESSION['usuario_p_prov_absa']) != ""){?>
    <tr>
        <td align="left" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" style="cursor: pointer" onClick="collapseMenuLeft('consulta');">
            Consulta de Documentos
        </td>
    </tr>
    <tr>
		<td>
			<div id="consulta_show">
				<table width="100%">
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_busca_recibedoce.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
						<img src="Imagenes/documentReceipt.png"  width="24" height="24" />&nbsp;Documentos recibidos
						</td>
					</tr>
					<?if($_SESSION["MODULO_PAGOS"] == "1"){?>
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_busca_recibedoce_pagos.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
						<img src="Imagenes/expedientePagos.png"  width="24" height="24" />&nbsp;Expediente de pagos
						</td>
					</tr>
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_buscar_doce.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
						<img src="Imagenes/notifyPay.png"  width="24" height="24" />&nbsp;Notificaciones de pago
						</td>
					</tr>
					<?if(trim($_SESSION['sesion_ver_reportes']) == "1"){?>
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_busca_faltantes_complemento.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
						<img src="Imagenes/complementoPagoFaltante.png"  width="24" height="24" />&nbsp;Complementos faltantes
						</td>
					</tr>
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_busca_nopagados.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
						<img src="Imagenes/NoPagado.png"  width="24" height="24" />&nbsp;Documentos faltantes de pago
						</td>
					</tr>
					<?}?>
					<?}?>
				</table>
			</div>
		</td>
    </tr>
    <tr>
        <td align="left" style="cursor: pointer" onClick="tools('gridAdjuntaArchivos.php');" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
            Subir Documentos
        </td>
    </tr>
	<tr>
        <td align="left" style="cursor: pointer" onClick="tools('formularios/form_upload_cer.php');" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
            Subir Certificado
        </td>
    </tr>
	<?if($_SESSION["MODULO_PENDIENTES_CANCELAR"] == "1"){?>
		<?if($_SESSION["sesion_mod_pendientes_cancelar"] == "1"){?>
		<tr>
			<td align="left" style="cursor: pointer" onClick="tools('formularios/form_pendientes_cancelar.php');" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
				Pendientes de cancelar
			</td>
		</tr>
		<?}?>
	<?}?>
	<?if(trim($_SESSION['sesion_agrega_pago_check']) == "1"){?>
	<tr>
		<td align="left" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" style="cursor: pointer" onClick="collapseMenuLeft('importacion');">
			Importación
		</td>
	</tr>
	<tr>
		<td>
			<div id="importacion_hide">
				<table width="100%">
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_importa_pagos.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
							<img src="Imagenes/import.png"  width="24" height="24" />&nbsp;Importar Pagos
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
	<!--<tr>
		<td align="left" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" style="cursor: pointer" onClick="collapseMenuLeft('exportacion');">
			Exportación
		</td>
	</tr>
	<tr>
		<td>
			<div id="exportacion_hide">
				<table width="100%">
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_exporta_recibecfd.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
							<img src="Imagenes/export.png"  width="24" height="24" />&nbsp;Exportar Recepcion
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>-->
	<?}?>
	<tr>
		<td align="left" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" style="cursor: pointer" onClick="collapseMenuLeft('tools');">
			Herramientas
		</td>
	</tr>
	<tr>
		<td>
			<div id="tools_hide">
				<table width="100%">
					<tr>
						<td align="left" style="cursor: pointer" onClick="tools('formularios/form_tools.php');" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons">
							<img src="Imagenes/tools.png"  width="24" height="24" />&nbsp;Utilerias
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
    <?}?>
</table>
</center>
