<?php include 'sesion.php'; $ID = $_GET['ID'];?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $nombresitio ?> - Panel de Administracion</title>



<?php include 'concha.php';?>


  <script language=javascript>
function ventanaSecundaria (URL){
   window.open(URL,"ventana1","width=550,height=450,scrollbars=NO")
}
  </script>



<link href="../estilo.css" rel="stylesheet" type="text/css" />

  
</head>

<body>



<table width="900" border="0" align="center" cellpadding="4" cellspacing="0">
      <tr>
      <td bgcolor="#F1F2ED"><?php include 'menu.php';?></td>
    </tr>
  
    <tr>
      <td bgcolor="#FFFFFF"><p align="left" class="Estilo2">
          
<?php           if ($cat_user == 9) {} else { echo "no tiene permisos para acceder aqui"; exit; };?>
          
          
          
<? 
          
$c = (int)$_GET['c'];  
          
if ($c == '') {$c = 0;};
          
include('concha.php');


$sql = "SELECT * FROM `historial` ORDER BY ID desc LIMIT $c,30";

$consulta = $conn->query($sql);
while ($row = $consulta->fetch_assoc())
{

$ID = $row["ID"];
$user_p = $row["user"];
$operacion = $row["operacion"];
$ID_op = $row["ID_op"];
$texto = $row["texto"];
$fechaserver = $row["fechaserver"];
?>
          
          <? echo "$user_p / $operacion / $fechaserver / $texto"; ?> <hr>
          <?
}
$consulta->free_result();

?>
          <hr>
        
          <a href="historial.php?c=<? echo $c + 30; ?>">   SIGUIENTE </a>
          
          
          <?php  
$d = date(`d`);
$m = date(`m`); 
$Y = date(`Y`);
$H = date(`H`);
$i = date(`i`);
          
$texto = "EL USUARIO $user INGRESO AL HISTORIAL";
$operacion = "ingreso al historial";
          

$sSQL="INSERT INTO `historial` (`ID`,`user`,`operacion`,`ID_op`,`texto`,`d`,`m`,`a`,`hora`,`min`,`fechaserver`) VALUES (NULL,'$user','$operacion','22','$texto','$d','$m','$Y','$H','$i',CURRENT_TIMESTAMP);;";
          
$conn->query($sSQL);
          
?>
          
        
</td>
  </tr>
  </table>
<p>&nbsp;</p>
  <p>&nbsp;</p>
</body>
</html>
