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

<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>!!! SELECCIONA UN REGISTRO... ACTUALIZANDO !!!</h2>';
	echo '<meta content="1; url=DN91100_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	
	include('DN91100_CL.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$row=mysqli_fetch_array($res);
?>
<form name="frm1" method="post" action="">
<input name="bot" type="hidden" value="<?php
 echo $_POST['bot']?>">
  <table width="400"  align="center">
    <tr>
      <th colspan="2">PARAMETROS GENERALES </th>
    </tr>
    <tr>
      <td width="90"><div align="left">Clave Falta </div></td>
      <td width="294"> 
        <select name="s1" id="s1">
		<option></option>
		<?php
 
		$sql = mysqli_query($con ,"SELECT * FROM dnmotaus");
		while($reg=mysqli_fetch_array($sql)){
			if($reg['no_reg']==$row["cve_fal"]){
				echo '<option value="' . $reg['no_reg'] . '"selected>' . $reg['descrip'].'</option>';
			}else{
				echo '<option value="' . $reg['no_reg'] . '">' . $reg['descrip'].'</option>';
			}			
		}
		?>		
        </select>
      </td>
    </tr>
    <tr>
      <td width="90"><div align="left">Clave Descanso </div></td>
      <td width="294"> 
        <select name="s2" id="s2">
		<option></option>
		<?php
 
		$sql = mysqli_query($con ,"SELECT * FROM dnmotaus");
		while($reg=mysqli_fetch_array($sql)){
			if($reg['no_reg']==$row["cve_des"]){
				echo '<option value="' . $reg['no_reg'] . '"selected>' . $reg['descrip'].'</option>';
			}else{
				echo '<option value="' . $reg['no_reg'] . '">' . $reg['descrip'].'</option>';
			}			
		}
		?>		
        </select>
      </td>
    </tr>
    <tr>
      <td width="90"><div align="left">Clave Dia Festivo </div></td>
      <td width="294"> 
        <select name="s3" id="s3">
		<option></option>
		<?php
 
		$sql = mysqli_query($con ,"SELECT * FROM dnmotaus");
		while($reg=mysqli_fetch_array($sql)){
			if($reg['no_reg']==$row["cve_dfe"]){
				echo '<option value="' . $reg['no_reg'] . '"selected>' . $reg['descrip'].'</option>';
			}else{
				echo '<option value="' . $reg['no_reg'] . '">' . $reg['descrip'].'</option>';
			}			
		}
		?>		
        </select>
      </td>
    </tr>
    <tr>
      <td width="90"><div align="left">Clave Dia Retardo </div></td>
      <td width="294"> 
        <select name="s4" id="s4">
		<option></option>
		<?php
 
		$sql = mysqli_query($con ,"SELECT * FROM dnmotaus");
		while($reg=mysqli_fetch_array($sql)){
			if($reg['no_reg']==$row["cve_ret"]){
				echo '<option value="' . $reg['no_reg'] . '"selected>' . $reg['descrip'].'</option>';
			}else{
				echo '<option value="' . $reg['no_reg'] . '">' . $reg['descrip'].'</option>';
			}			
		}
		?>		
        </select>
      </td>
    </tr>
    <tr>
      <td width="90"><div align="left">Descanso Trabajado </div></td>
      <td width="294"> 
        <select name="s5" id="s5">
		<option></option>
		<?php
 
		$sql = mysqli_query($con ,"SELECT * FROM dnmotaus");
		while($reg=mysqli_fetch_array($sql)){
			if($reg['no_reg']==$row["des_tra"]){
				echo '<option value="' . $reg['no_reg'] . '"selected>' . $reg['descrip'].'</option>';
			}else{
				echo '<option value="' . $reg['no_reg'] . '">' . $reg['descrip'].'</option>';
			}			
		}
		?>		
        </select>
      </td>
    </tr>
    <tr>
      <td width="90"><div align="left">Festivo Trabajado </div></td>
      <td width="294"> 
        <select name="s6" id="s6">
		<option></option>
		<?php
 
		$sql = mysqli_query($con ,"SELECT * FROM dnmotaus");
		while($reg=mysqli_fetch_array($sql)){
			if($reg['no_reg']==$row["fes_tra"]){
				echo '<option value="' . $reg['no_reg'] . '"selected>' . $reg['descrip'].'</option>';
			}else{
				echo '<option value="' . $reg['no_reg'] . '">' . $reg['descrip'].'</option>';
			}			
		}
		?>		
        </select>
      </td>
    </tr>
    <tr>
      <td width="90"><div align="left">Checa / Huella </div></td>
      <td width="294"> 
      <select name="s7" id="s7">
		<?php
 
			  if($row['huella']=="NO"){
				  echo '<option value="NO" selected>NO</option>';
			  }else{
				  echo '<option value="NO">NO</option>';
			  }
			  if($row['huella']=="SI"){
				  echo '<option value="SI" selected>SI</option>';
			  }else{
				  echo '<option value="SI">SI</option>';
			  }
		?>
      </select>
      </td>
    </tr>
    <tr>
      <td width="90"><div align="left">Prima Dominical </div></td>
      <td width="294"> 
        <select name="s8" id="s8">
		<option></option>
		<?php
 
		$sql = mysqli_query($con ,"SELECT * FROM dnmotaus");
		while($reg=mysqli_fetch_array($sql)){
			if($reg['no_reg']==$row["pri_vac"]){
				echo '<option value="' . $reg['no_reg'] . '"selected>' . $reg['descrip'].'</option>';
			}else{
				echo '<option value="' . $reg['no_reg'] . '">' . $reg['descrip'].'</option>';
			}			
		}
		?>		
        </select>
      </td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
         
        <input type="button" name="Submit" value="Modificar" onClick="openpage('DN91100_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('DN91100_PR.php','_self')"/>
		
      </div></td>
    </tr>
  </table>
</form>
     <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="DN91100_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
mysqli_close($con);
}
?>
</body>
</html>
