<?php
 
session_start();
$com = "M";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
?>

<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php
 
$ayuda = 'N1220A_MO.php';
include("DYAYUDA.php");
?>

<body
<?php
 
if(isset($_POST['bot3'])){
	echo ' onLoad="deshab()"';
}
?>
>
<?php

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=DN12200_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	
	include('DN12200_CL.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$reg=mysqli_fetch_array($res);
?>
<form name="frm1" method="post" action="">
<input name="bot" type="hidden" value="<?php
 echo $_POST['bot']?>">
    <table width="600"  align="center">
      <tr>
        <th width="600"> MODIFICAR IMSS/INFONAVIT/SAR</th>
      </tr>
    </table>	
      <table width="600"  align="center">
      <tr>
        <td colspan="4"><div align="left">Clave</div></td>
        <td width="439" colspan="4"> 
          <input name="t1" type="text" id="t1" size="15" onKeyPress="return validar(event)" readonly
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['cve_porc'].'"';
		}
		?>
		>
        </td>
      </tr>
      <tr>
        <td colspan="4"><div align="left">Fecha Vigencia </div></td>
        <td colspan="4"> 
          <input name="t2" type="text" id="t2" class="emplea" size="15" readonly
		<?php
 
		if(isset($_POST['bot'])){
		$fec1=$reg["fec_vig"];
		include('DF20000.php');
		echo 'value="'.$f_f.'"';
		}
		?>
	    >
<input name="bot2" id="bot2" type="image" value="Cal" src="logos/cal4.jpg" />
		 <script type="text/javascript">
  Calendar.setup(
    {
      inputField  : "t2",        // ID of the input field
      ifFormat    : "%d/%m/%Y",    // the date format
      button      : "bot2"      // ID of the button
    }
  );
</script>		
        </td>
      </tr>
      </table>
    <table width="600"  align="center">
      <tr>
        <th width="272"><div align="center">Enfermedad/Maternidad/Otros</div></th>
        <th width="100"> 
        <div align="center">Patron</div></th>
        <th width="100"> 
        <div align="center">Trabajador</div></th>
        <th width="100"> 
        <div align="center">Tope</div></th>
      </tr>
      <tr>
        <td width="272"><div align="left">Gastos Pencionados </div></td>
        <td width="100"> 
          <input name="t3" type="text" id="t3" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['gas_pen_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t4" type="text" id="t4" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['gas_pen_tra'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t5" type="text" id="t5" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['gas_pen_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Excedente 
           
          &nbsp;&nbsp;&nbsp;<input name="t6" type="text" id="t6" size="8" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ema_exc_smg'].'"';
		}
		?>
		  >
          &nbsp;&nbsp;&nbsp;
          
        S.M.G. </div></td>
        <td width="100"> 
          <input name="t7" type="text" id="t7" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ema_exc_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t8" type="text" id="t8" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ema_exc_tra'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t9" type="text" id="t9" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ema_exc_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Cuota Fija </div></td>
        <td width="100"> 
          <input name="t10" type="text" id="t10" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['cot_fij_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> </td>
        <td width="100"> 
          <input name="t11" type="text" id="t11" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['cot_fij_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Prestaciones Dinero </div></td>
        <td width="100"> 
          <input name="t12" type="text" id="t12" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ema_pre_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t13" type="text" id="t13" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ema_pre_tra'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t14" type="text" id="t14" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ema_pre_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Invalidez y Vida </div></td>
        <td width="100"> 
          <input name="t15" type="text" id="t15" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['inv_vid_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t16" type="text" id="t16" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['inv_vid_tra'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t17" type="text" id="t17" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['inv_vid_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Cesantia Edad Avanzada Vejez </div></td>
        <td width="100"> 
          <input name="t18" type="text" id="t18" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ces_eda_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t19" type="text" id="t19" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ces_eda_tra'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> 
          <input name="t20" type="text" id="t20" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ces_eda_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Guarderias</div></td>
        <td width="100"> 
          <input name="t21" type="text" id="t21" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['est_inf_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> </td>
        <td width="100"> 
          <input name="t22" type="text" id="t22" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['est_inf_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Seguro de Retiro </div></td>
        <td width="100"> 
          <input name="t23" type="text" id="t23" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['seg_ret_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> </td>
        <td width="100"> 
          <input name="t24" type="text" id="t24" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['seg_ret_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td width="272"><div align="left">Infonavit</div></td>
        <td width="100"> 
          <input name="t25" type="text" id="t25" size="15"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['inf_ona_pat'].'"';
		}
		?>
		  >
        </td>
        <td width="100"> </td>
        <td width="100"> 
          <input name="t26" type="text" id="t26" size="15" onKeyPress="return validar(event)"
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['inf_ona_top'].'"';
		}
		?>
		  >
        </td>
      </tr>
      <tr>
        <td colspan="4"><div align="center">
           
            <input type="button" name="Submit" value="Guardar" onClick="openpage('DN12200_MC.php','_self')"/>
            
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
           
            <input type="button" name="Submit2" value="Regresar" onClick="openpage('DN12200_PR.php','_self')"/>
            
        </div></td>
      </tr>
    </table>
</form>
     <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="DN12200_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
mysqli_close($con);
}
?>
</body>
</html>
