<?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

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONA UN REGISTRO... ACTUALIZANDO !!!</h2>';
	echo '<meta content="1; url=DN21000_PR4.php"  HTTP-EQUIV="REFRESH">';
}else{
	include('DN21000_CL4.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$row=mysqli_fetch_array($res);
?>
<body
<?php
 
if(isset($_POST['bot3'])){
	echo ' onLoad="deshab()"';
}
?>
>
<form  name="frm1" method="post" action="">
<input name="bot" type="hidden" value="<?php
 echo $_POST["bot"]?>">
  <table width="400"  align="center">
    <tr>
      <th colspan="4" class=\"titulo\"><div align="center">DATOS LABORALES </div></th>
    </tr>
	  <tr>
        <td width="80">Empresa</td>
        <td width="304"> 
        <input name="t1" type="text" id="t1" size="45"
		<?php
 
		echo 'value="'.$row['nom'].'"';
		?>
		>
        </td>
    </tr>
    <tr>
      <td width="80">Domicilio</td>
      <td width="304"> 
      <input name="t2" type="text" id="t2" size="45"
		<?php
 
		echo 'value="'.$row['dom'].'"';
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80">Telefono</td>
      <td width="304"> 
      <input name="t3" type="text" id="t3" size="15" onKeyPress="return validar(event)"
		<?php
 
		echo 'value="'.$row['tel'].'"';
		?>
		>
      </td>
    </tr>
	  <tr>
        <td width="80">Fecha Inicial </td>
        <td width="304"> <input name="t4" type="text" class="emplea" id="t4" size="15" readonly
			<?php

			$fec1=$row["fec_ini"];
			include('DF20000.php');
			echo 'value="'.$f_f.'"';
			?>/>
        <input name="reset" id="bot_a" type="image" src="logos/cal4.jpg"/>
        <script type="text/javascript">
  Calendar.setup(
    {
      inputField  : "t4",        // ID of the input field
      ifFormat    : "%d/%m/%Y",    // the date format
      button      : "bot_a"      // ID of the button
    }
  );
</script></td>
    </tr>
	  <tr>
        <td width="80">Fecha Final </td>
        <td width="304"> <input name="t5" type="text" class="emplea" id="t5" size="15" readonly
			<?php

			$fec1=$row["fec_fin"];
			include('DF20000.php');
			echo 'value="'.$f_f.'"';
			?>/>
        <input name="reset" id="bot_b" type="image" src="logos/cal4.jpg"/>
        <script type="text/javascript">
  Calendar.setup(
    {
      inputField  : "t5",        // ID of the input field
      ifFormat    : "%d/%m/%Y",    // the date format
      button      : "bot_b"      // ID of the button
    }
  );
</script></td>
    </tr>
    <tr>
      <td width="80">Puesto</td>
      <td width="304"> 
      <input name="t6" type="text" id="t6" size="45"
		<?php
 
		echo 'value="'.$row['puesto'].'"';
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80">Sueldo</td>
      <td width="304"> 
      <input name="t7" type="text" id="t7" size="3" onKeyPress="return validar(event)"
		<?php
 
		echo 'value="'.$row['sueldo'].'"';
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80">Pago</td>
      <td width="304"> 
      <select name="s1" id="s1">
		<?php

			if($row['pago']=="1"){
			  echo '<option value="1" selected>Honorario</option>';
			}else{
			  echo '<option value="1">Honorario</option>';
			}
			if($row['pago']=="2"){
			  echo '<option value="2" selected>Semanal</option>';
			}else{
			  echo '<option value="2">Semanal</option>';
			}
			if($row['pago']=="3"){
			  echo '<option value="3" selected>Docenal</option>';
			}else{
			  echo '<option value="3">Docenal</option>';
			}
			if($row['pago']=="4"){
			  echo '<option value="4" selected>Catorcenal</option>';
			}else{
			  echo '<option value="4">Catorcenal</option>';
			}
			if($row['pago']=="5"){
			  echo '<option value="5" selected>Quincenal</option>';
			}else{
			  echo '<option value="5">Quincenal</option>';
			}
			if($row['pago']=="6"){
			  echo '<option value="6" selected>Mensual</option>';
			}else{
			  echo '<option value="6">Mensual</option>';
			}
		?>
      </select>
      </td>
    </tr>
    <tr>
      <td width="80">Motivo de Separacion </td>
      <td width="304"> 
      <input name="t8" type="text" id="t8" size="45"
		<?php
 
		echo 'value="'.$row['motivo'].'"';
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80">Nombre de Jefe </td>
      <td width="304"> 
      <input name="t9" type="text" id="t9" size="45"
		<?php
 
		echo 'value="'.$row['nom_jefe'].'"';
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80">Puesto de Jefe</td>
      <td width="304"> 
      <input name="t10" type="text" id="t10" size="45"
		<?php
 
		echo 'value="'.$row['puesto_jefe'].'"';
		?>
		>
      </td>
    </tr>
    <tr>
      <td width="80">Informes de Usted </td>
      <td width="304"> 
      <select name="s2" id="s2">
		<?php

			if($row['informes']=="S"){
			  echo '<option value="S" selected>Si</option>';
			}else{
			  echo '<option value="S">Si</option>';
			}
			if($row['informes']=="N"){
			  echo '<option value="N" selected>No</option>';
			}else{
			  echo '<option value="N">No</option>';
			}
		?>
      </select>
      </td>
    </tr>
    <tr>
      <td width="80">Razones</td>
      <td width="304"> 
      <input name="t11" type="text" id="t11" size="45"
		<?php
 
		echo 'value="'.$row['razones'].'"';
		?>
		>
      </td>
    </tr>
</table>
<table width="400"  align="center">
    <tr>
      <td colspan="2"><div align="center">
		  <input type="button" name="Submit2" value="Modificar" onClick="openpage('DN21000_MC4.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('DN21000_PR4.php','_self')"/>
      </div></td>
    </tr>
  </table>
</form>
     <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="DN21000_PR4.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
?>
 </body>
<?php
 
mysqli_close($con);
}
?>
</html>