<?php
session_start();
include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");
include("phpmnu_fun.php");
//
if(strlen($_SESSION['SYS_USER_ID'])==0){JsDir("login.php");	return;}
//
include("deos_personal_bx.php");

$IdUsu=$_SESSION['SYS_USER_ID'];
$AT=gs("at","usuarios","id_usuario=$IdUsu");
?>

<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Personal - Buscar</title>
<!----------------------------------------->
<?php AddJs(); ?>
<script type="text/javascript" src="ja/funciones.js"></script>

<!----------------------------------------->
<link rel="stylesheet" type="text/css" href="css/estiloss.css"  />
<link rel="stylesheet" type="text/css" href="css/basic.css"  />
<link rel="stylesheet" type="text/css" href="css/mnu.css"  />

<!----------------------------------------->
<style type="text/css">
.cF {height:600px;width:1250px;position:relative;top:0px}
.mM {height:34px;width:1250px;position:relative;top:0px;background-color:#09C; z-index:500;}

</style>

<!----------------------------------------->
<script>
$(document).ready(function(){  
   Inicializar();
   jF("TxtNom");
});


$(document).keydown(function(e){
	var AT=gv("TxtAT");

	if(e.which==66 && e.altKey){
		if(AT=="1"){	
		document.getElementById("CmdB").click();
		return;
		}
	}

	if(e.which==86 && e.altKey){
		if(AT=="1"){
		document.getElementById("CmdZ").click();
		return;
		}
	}
  
});

</script>
<!----------------------------------------->

<body  <?php echo $LStrMsg;?>  >
<div align="center">

<div class="mM" align="left" style="font-size:12px">
<?php
//$HTM=file_get_contents("http://inversionessounduniversal.com/ventas/phpmnu.php?USER_ID=$IdUsu");
echo GEN_MENU(vbval(V($_SESSION['SYS_USER_ID'])));
?>
</div>

<div Id="DivFRM"  class="cF" style="background-color:#FFFFFF;" >
<form id="Frm" name="Frm" method="post"  autocomplete="off"
action="personal_buscar.php" style="margin:0px; padding:0px; display:inline;" onSubmit="return false;">

<!----------------------------------------->
<div id="DivT" class="dT"  style="width:1250px;">
<img src="b.png" class="iT" />
<div class="tT">PERSONAL - BUSCAR</div>
</div>
<!----------------------------------------->

<div class="s1" style="left: 35px; top: 117px; width: 231px;">
NOMBRES Y APELLIDOSL</div>
<input name="TxtNom" type="text" id="TxtNom" 
class="lt"  style="left: 35px; top: 134px; width: 454px;"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $StrNom;?>" />

<div class="s1" style="left: 500px; top: 117px; width: 124px;"> DNI
</div>
<input name="TxtDni" type="text" id="TxtDni" 
class="lt"  style="left: 500px; top: 134px; width: 191px;"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $StrDni;?>" />
  
<!----------------------------------------->
<?php $VOLVER="personal.php";?>
<?php include("botones_b.php");?>;

<!-----------------------------------------> 

<div class="datagrid" style="position: absolute; left: 35px; top: 165px; width: 1180px; height: 400px; overflow: auto">
<table width="100%">
<thead>
<tr>
<td colspan="13" align="center"><?php echo PagBtn($LStrTR,$VP_RegXPag,$LStrPag);?></td>
</tr>

<tr>
<th width="43%">NOMBRES Y APELLIDOS</th>
<th width="11%">DNI</th>
<th width="12%">TEL</th>
<th width="13%">CEL</th>
<th width="19%">CARGO</th>
<th width="2%">&nbsp;</th>
</tr>
</thead>
<tbody>

<?php		  		
	$s="SELECT ID,NOMBRE,DNI,TEL,CEL,CARGO 
	FROM vpersonal 
	WHERE $FF 
	ORDER BY NOMBRE ";	
	
	$s=PagSql($s,$LStrPag,$VP_RegXPag,$LStrTR);		  				
	$result = grs($s);
	while ($r = $result->fetch_assoc()){
		?>	
        <tr onDblClick="location.href='personal.php?Id=<?php echo $r[0];?>&Pag=0'">
        <!----------------------------------------------->
        <td><?php echo $r[1];?></td>
        <td><?php echo $r[2];?></td>  
        <td><?php echo $r[3];?></td>  
        <td><?php echo $r[4];?></td>  
        <td><?php echo $r[5];?></td>
        <!----------------------------------------------->
        <td bgcolor="#FFFFFF" align="center">
        <a href="personal.php?Id=<?php echo $r[0];?>&Pag=0">
        <img src="img/b_edit.png"  border="0"/></a></td>
        </tr>
        <?php
	}

?>		  

</tbody>
</table>     
</div>

<!----------------------------------------->    
<?php include("ocultos.php");?>

</form>
</div>
</div>
</body>
</html>
