<?php
 
session_start();
$com = "A";
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
 
$ayuda = 'DN2100A_AG.php';
include("DYAYUDA.php");
?>

<form name="frm1" id="frm1" method="post" action="" enctype="multipart/form-data">
  <table width="350"  align="center">
    <tr>
      <th colspan="2"> AGREGAR DATOS DE NOMINA </th>
    </tr>
    <tr>
      <td width="105"><div align="left">Nombre del documento: </div></td>
      <td width="229"><label>
        <select name="doc" id="doc">
	  
	  <option value="">----------Selecciona----------</option>
          <?php
   
			include("DN21000_CL6.php");
		 
		 	$objvr = new clase();
		 	$objvr->id_emp = $_SESSION['no_nom'];
		 	$resultado=$objvr->getDoc();		 
			//@$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>
      </label></td>
    </tr>
    <tr>
      <td width="105"><div align="left">Fotografia:</div></td>
      <td width="229"> 
        <input name="fichero" type="file">      </td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
         
        <input type="button" name="Submit" value="Guardar" onClick="openpage('DN21000_AC6.php','_self')"/>
        <input type="button" name="Submit2" value="Regresar" onClick="openpage('DN21000_PR6.php','_self')"/>
		
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>
