<?php
 
session_start();
$com = "E";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
?>
<html>
<head>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="cache-control" content="no-cache"> 
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT"> 
</head>
<body
<?php
 
if(isset($_POST['bot3'])){
	echo ' onLoad="deshab()"';
}
?>
>
<?php

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=DN21000_PR6.php"  HTTP-EQUIV="REFRESH">';
}else{
	
	include('DN21000_CL6.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$reg=mysqli_fetch_array($res);
?>
<form name="frm1" id="frm1" method="post" action="" enctype="multipart/form-data">
<input name="bot" type="hidden" value="<?php
 echo $_POST['bot']?>">
  <table width="350"  align="center">
    <tr>
      <th colspan="2">ELIMINAR DATOS NOMINA </th>
    </tr>
    <tr>
      <td width="105"><div align="left">Nombre del Documento </div></td>
      <td width="229"> 
        <select name="doc" id="doc">
          <option value="">----------Selecciona----------</option>
          <?php
   
		 	$objvr = new clase();
		 	$objvr->id_emp = $_SESSION['no_nom'];
			$objvr->id_doc =$reg['id_doc'];
		 	$resultado=$objvr->getDocMod();	
			//@$resultado=mysqli_query($con ,"select * from dnnomdoc");
			if(!isset($_REQUEST['id_doc'])){
				$dt_doc=mysqli_fetch_array($resultado);
				$selDoc=$dt_doc['id_doc'];
				if(mysqli_num_rows($resultado)>0)
					mysqli_data_seek($resultado,0);		
			}
			else{
				$selDoc=$_REQUEST['id_doc'];
			}
			while($registro=mysqli_fetch_array($resultado)){
				if($selDoc==$registro['id_doc']){
					echo '<option value="' . $registro['id_doc'] . '" selected>' . $registro['des_doc'] . '</option>';
				}else{
					echo '<option value="' . $registro['id_doc'] . '">' . $registro['des_doc'] . '</option>';
				}
				
			}			
		?>
        </select>
		
		</td>
    </tr>
</table>
  <table width="350"  align="center">
    <tr>
      <td width="350" class="inputcodigo">
		<div align="center">
		  <?php

			echo '<img src="foto/doc_trab/'.$reg['doc'].'" width="150" height="175">';

		  ?>
		</div></td>
	  <div id="capa" align="center"></div></th>
    </tr>
</table>
  <table width="350"  align="center">
    <tr>
      <td colspan="2"><div align="center">
         
        <input type="button" name="Submit" value="Eliminar" onClick="openpage('DN21000_EC6.php','_self')"/>
        <input type="button" name="Submit2" value="Regresar" onClick=		"openpage('DN21000_PR6.php','_self')"/>
		
      </div></td>
    </tr>
  </table>
</form>
     <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="DN21000_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
mysqli_close($con);
}
?>
</body>
</html>