<?php
 
session_start();
$com = "C";
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>

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

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=DN11100_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	
	include('DN11100_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" 
<?php
 
if(isset($_POST['bot'])){ 
	echo 'value="' . $_POST['bot'] .  '"';
}else{
	  echo 'value="' . $reg['cve_mae'] .  '"';
}
?>
>
  <table width="400"  align="center">
    <tr>
      <th> CONSULTAR MASTER PERCEPCIONES / DEDUCCIONES </th>
    </tr>
  </table>
  <table width="400"  align="center">
    <tr>
      <td width="80"><div align="left">Clave</div></td>
      <td width="304"> 
        <input name="t1" type="text" id="t1" size="15" 
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['cve_mae'].'"';
		}
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80"><div align="left">Fecha Vigencia </div></td>
      <td width="304"> 
        <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>
    <tr>
      <td width="80"><div align="left">Descripcion</div></td>
      <td width="304"> 
        <input name="t3" type="text" id="t3" size="45" 
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['des_mae'].'"';
		}
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80"><div align="left">Formula Calculo </div></td>
      <td width="304"> 
        <input name="t4" type="text" id="t4" size="45" 
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['for_cal'].'"';
		}
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80"><div align="left">Formula Excento ISPT</div></td>
      <td width="304"> 
        <input name="t5" type="text" id="t5" size="45" 
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['for_exe_isr'].'"';
		}
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80"><div align="left">Formula Excento IMSS </div></td>
      <td width="304"> 
        <input name="t6" type="text" id="t6" size="45" 
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['for_exe_ims'].'"';
		}
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80"><div align="left">Programa Calculo </div></td>
      <td width="304"> 
        <input name="t7" type="text" id="t7" 
		<?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['pgm_cal'].'"';
		}
		?>
		>
      </td>
    </tr>
  </table>
  <table width="400"  align="center">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
     <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="DN11100_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
mysqli_close($con);
}
?>
</body>
</html>
