<?php

session_start();
include("DMMYSQLG.php");
include("DMMYSQLG.php"); 
include("JQUERY.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="JavaScript" type="text/javascript" src="js/click.js"></script>
</head>
<body>

<div align="center">
<form name="frm1" method="post" action="" >
<?php

//$fecha=$_GET['fecha'];
$clave=$_GET['clave'];
$sql=mysqli_query($con ,"SELECT * FROM movimientos where ncto='$clave'  GROUP BY nstarecep,nstaamalla,usuario,acc_fec,acc_hor order by acc_fec DESC");
?>
<table width="1108" border='1'>
      <tr>
     
          <th colspan="11"><div align="center" ><strong>ULTIMOS CAMBIOS</strong> <div align="center"><input type="button" name="bot1" value="Regresar"  onClick="openpage('cat_maestros_PR.php','_self')"/> </div></div></th>
        
    </tr>
<!--    <tr>
        <input type="button" name="bot1" value="Regresar"  onClick="openpage('cat_maestros_PR.php','_self')"/>
    </tr>-->
	<tr>
      <!--<th width="42"><div align="center">SEL</div></th>-->
        <th width="92"><div align="center">CLAVE</div></th>
		<th width="281"><div align="center">DESCRIPCION</div></th>
	    <th width="144">STATUS RECEPCION</th>
		<th width="144">STATUS AMA DE LLAVES</th>
		<th width="144">USUARIO</th>
		<th width="144">FECHA</th>
		<th width="144">HORA</th>
    </tr>
<?php
 
//	$vart=(isset($_POST['tbus']))?$_POST['tbus']:"";  
//	echo '<input name="txt_bus" type="hidden" value="'.$vart.'">';
//	$vars=(isset($_POST['submit']))?$_POST['submit']:""; 
//	if($vars=="")
//	{
//		echo '<input name="tip_bus" type="hidden" value="nombre">';
//            
//		@$sql = mysqli_query($con ,"SELECT * FROM valeryus08 WHERE ntipo like '%".$vart."%'order by ncto");
//	}
	while($reg = mysqli_fetch_array($sql))
	{
	  	echo "<tr>";
		//echo '<td> <div align="center"><input name="bot" type="radio" value="'. $reg["n_reg"].'"></div></td>';
		echo "<td> <div align='center' style='color:#000'><a style=\"text-decoration:underline;cursor:pointer;\" onclick=\"openpage('movimientos_maestros.php?clave=".$reg["ncto"]."','_self')\"><strong>" . $reg["ncto"] . "&nbsp;</strong></div></td>";
		echo "<td> <div align='center'><strong>" . $reg["ntipo"] . "&nbsp;</strong></div></td>";
		echo "<td> <div align='center'><strong>" . $reg["nstarecep"] . "&nbsp;</strong></div></td>";
		echo '<td style='.$reg["ocupado"].'> <div align="center" style="color:#000"><strong>' . $reg["nstaamalla"] . '</strong></div></td>';
		echo '<td> <div align="center"><strong>' . $reg["usuario"] . '</strong></div></td>';
		$fec1=$reg["acc_fec"];
		include('DF20000.php');
		echo "<td> <div align='center'><strong>" . $f_f . "&nbsp</strong></div></td>";
		echo '<td> <div align="center"><strong>' . $reg["acc_hor"] . '</strong></div></td>';	
		echo "</tr>";

	}
	mysqli_close($con);
?>
</table>
</form>
</div>
</body>
</html>
