<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
include("DMMYSQLG.php");
//   --->  Matriz para comparar
$mat_pd = array("P04", "P12", "P19", "P20", "Q03", "Q04", "Q06", "Q13", "Q14", "Q15");
//   --->  busco la percepcion para sacarel numero maestro de 
$sq_catper = mysqli_query($con ,"select * from dncatper where no_pd = '".$_POST['t2']."' and operac = '".$_POST['t1']."'");
$dt_catper = mysqli_fetch_array($sq_catper);
$nr = count($mat_pd);
$y = 0;
for ($i=0;$i<$nr;$i++){
	if ($mat_pd[$i] == $dt_catper['cve_mae']) $y=1;
}		
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<body>
<?php
 
$ayuda = 'DN31500A_PR.php';
include("DYAYUDA.php");
?>

<form name="frm1" id="frm1" method="post" action="">
  <table border="0" align="center">
    <tr>
      <th colspan="2" scope="col">CAPTURA X NUMERO DE PERCEPCION O DEDUCCION</th>
    </tr>
    <tr>
      <td>Tipo de Incidencia Fija </td>
      <td> 
        <select name="co1" id="co1">
			<?php
 
		if($_REQUEST['co1']=="F"){
			echo '<option value="F" selected>FIJA</option>';
		}else{
			echo '<option value="F">FIJA</option>';
		}
		if($_REQUEST['co1']=="A"){
			echo '<option value="A" selected>ACUMULADA</option>';
		}else{
			echo '<option value="A">ACUMULADA</option>';
		}
		?>
        </select>
      </td>
    </tr>
    <tr>
      <td>Tipo de nomina: </td>
      <td><select name="tip_nom" id="tip_nom">
          <?php
 
	  	$r = mysqli_query($con ,"SELECT * FROM dntipnom");
		while($reg = mysqli_fetch_array($r)){
			echo '<option value="'.$reg['cve_nomi'].'">'.$reg['des_nomi'].'</option>';
		}
	  ?>
      </select></td>
    </tr>
    
    <tr>
      <td colspan="2"><div align="center">
        <input type="submit" name="Submit22" value="Entrar" onClick="openpage('DN31500_PR1.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="submit" name="Submit2" value="Cerrar" onClick="openpage('DSCERRAR.php','_top')">
</div></td>
    </tr>
  </table>
</form>
</body>
</html>