<?php use_helper('UrlFunctions'); ?>
<?php

if(isset($control)){

 	$o_clienteBean = new ClienteBean();	
 	if($EstadoFlagHuellaConProblema == "N"){
		$o_clienteBean->setFlagHuellaConProblema("S");
 	}
	if($EstadoFlagHuellaConProblema == "S"){
		$o_clienteBean->setFlagHuellaConProblema("N");
 	}
	
	$o_clienteBean->setIdCliente($id);
	$o_clienteDP = new ClienteDP($o_clienteBean);
	$o_clienteDP->update();
  if(1){
    
    ?>
    <script language="JavaScript">
    parent.objMainTab.reqBody('<?=buildUrl('cli/list_gen')?>','&block=001&insert=1&id=<?=$id;?>');
    parent.objMainTab.windowsCloseAll();
    </script>
    <?
  }else{
    $url = buildUrl('rep/add', "block=".$block."&error=1");
  }
  exit;
}


 

$o_ClienteBean = new ClienteBean();
$o_ClienteBean->setIdCliente($id);
$o_class = new ClienteBL();
$a_ObjectBean = $o_class->busquedaCliente($o_ClienteBean);

if(is_array($a_ObjectBean)){
  while(list($key,$o_ObjectBean) = each($a_ObjectBean)){
  	$FlagHuellaConProblema = $o_ObjectBean->getFlagHuellaConProblema();
  	if($FlagHuellaConProblema == "N"){
  		$mensaje = "¿Esta seguro que la huella del Cliente tiene problemas?";
  	}
  	if($FlagHuellaConProblema == "S"){
  		$mensaje = "¿Esta seguro que la huella del Cliente No tiene problemas?";
  	}
?>

<img src="/images/common/spacer.gif" width="10">
<table class="cuerpo" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="0">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td class="titleBody">
            <li>Cliente</li>
            <span class="subtitle" style="color=#ff0000"><I>&nbsp;&nbsp;&nbsp;:::&nbsp;&nbsp;<?php echo $mensaje;?>&nbsp;</I></span></td>
          <td align="right" valign="baseline">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
      
  <tr>
    <td valign="top">
     <form id="form1" name="form1" method="POST">
      <input type="hidden" name="control" value="1">
      <input type="hidden" name="EstadoFlagHuellaConProblema" value="<?php echo $o_ObjectBean->getFlagHuellaConProblema();?>">
        <table hspace="20px" class="marco" width="90%">
          <tr>
            <td valign="top">
	
              <table width="100%" border="0" cellpadding="5" cellspacing="0" style="background: #E3E9E2">
          		<tr>
    				  <td height="0">
    				  
    					 <table width="100%" border="0" cellspacing="1" cellpadding="0">
							  <tr>
								<td nowrap="nowrap" width="10%" class="cabecera"><label class="label req" for="txtDniCliente" >DNI </label></td>
								<td width="38%" nowrap="nowrap"><label class="label" for="Dni">&nbsp;:&nbsp;<?=$o_ObjectBean->getDni() ?></label></td>
								 
							   </tr>
							   <tr>
								<td nowrap="nowrap" class="cabecera"><label class="label req" for="txtNombres" >Nombres </label></td>
								<td width="38%" nowrap="nowrap"><label class="label" for="Nombres">&nbsp;:&nbsp;<?=$o_ObjectBean->getNombres() ?></label></td>
								
							  </tr>
							  <tr>
								<td nowrap="nowrap" width="12%" class="cabecera"><label class="label" for="txtApellidoPaterno">Apellido Paterno </label></td>
								<td width="38%" nowrap="nowrap"><label class="label" for="ApellidoPaterno">&nbsp;:&nbsp;<?=$o_ObjectBean->getApellidoPaterno() ?></label></td>
								 
							  </tr>
							  
							  <tr>
								<td nowrap="nowrap" width="12%" class="cabecera"><label class="label" for="txtApellidoMaterno" >Apellido Materno </label></td>
								<td width="38%" nowrap="nowrap"><label class="label" for="ApellidoMaterno">&nbsp;:&nbsp;<?=$o_ObjectBean->getApellidoMaterno() ?></label></td>
								
							  </tr>
							 
							  <tr>
							   <td nowrap="nowrap" width="12%" class="cabecera"><label class="label" for="txtEstado">Estado</label></td>
								<td width="38%" nowrap="nowrap"><label class="label" for="Estado">&nbsp;:&nbsp;<? if ($o_ObjectBean->getEstado()=='A'){ echo "Activo";} else { echo "Inactivo";}?></label></td>
								<td nowrap="nowrap" width="12%" class="cabecera">&nbsp;</td>
								  
							  </tr>
						</table>
    					
    				</td>
                </tr>
    			<tr>

				<td height="0" width="100%">
    			  <table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td><img src="/images/common/spacer.gif" width="10"></td>
					 </tr>
						<tr>
						 <td align="center">
						  <input type="hidden" name="typeSubmit" id="typeSubmit">
						  <input class="button" type="submit" value="Aceptar" onclick="$('typeSubmit').value='list';">
						   <input class="button" type="button" value="Cancelar" onclick="parent.objMainTab.windowsCloseAll();"/>
						  </td>
						</tr>
						<tr>
					<td height="10">&nbsp;</td>
				 </tr>
			    </table>
			    </td>
			   </tr>
  				
        		</tr>
				<tr>
      			</table>
     		</form>
			<script type="text/javascript">
				var valid = new Validation('form1', {immediate : true});
			</script>
			</td>
  		  </tr>
		</table>
    </td>
  </tr>
</table>
<?php
  }
}
?>

