listar.php
Código PHP:
<div id='pases'>
<style type="text/css">
<!--
#tester {
background-color: #900;
height: 300px;
width: 300px;
}
#holder {
background-color: #E5E5E5;
height: 300px;
width: 300px;
float: left;
margin-right: 30px;
margin-bottom: 30px;
}
#fadeToggle {
clear: both;
}
-->
</style>
<script type="text/javascript">
$(document).ready(function() {
jQuery.fn.fadeToggle = function(speed, easing, callback) {
return this.animate({opacity: 'toggle'}, speed, easing, callback);
};
function resetTest() {
effectType = $('#effectType').val();
if (effectType == 'slideToggle()') {
$('#tester').slideUp(0)
}
}
$('#effectType, #easeType').change(function() {
$(this).blur()
resetTest()
})
$('#reset').click(function() {
resetTest()
})
resetTest()
$('#fadeToggle').click(function() {
$(this).next('.explaination').slideToggle(800, 'easeOutCubic');
})
})
function runTest() {
easeType = 'linear';
effectType = 'slideToggle()';
testDuration = 3000;
$('#testDuration, #test, #reset').blur()
if (effectType == 'slideToggle()') {
$('#tester').slideToggle(testDuration,easeType)
}
}
</script>
</div>
<div align='right'>
<script type='text/javascript'>
function cambios()
{
$.ajax({
url: "leo.php",
cache: false,
success: function(html){
$("#cambiante").html(html); //Inserta el log de chat en el div #cambiante
},
});
}
</script>
<div id='cambiante'>
</div>
</div>
<br/>
<div id="holder" align='right' style="float:relative">
<div id="tester"></div>
</div>
<div id='divResultado' align='right' style="float:relative">
</div>
Código PHP:
<?php
require("../../clases/3_logicaNegocio/DistribucionLogic.php");
$Controlador = new DistribucionLogic ;
$listado=$Controlador->Suceso();
$a0=$listado['er'];
$actual='';
if($actual==''){ $a=$a0; $actual=$a0; }
?>
<br/>
<table width='800' align='center' cellspacing='2' cellpadding='2' border='0' class="tablagradient">
<tr>
<th>
<?php
switch ($a)
{
case 0 :
echo "tanque vacio";
?>
<script type='text/javascript'>
enviaQuery('divResultado','../../funcion/tanque.php?opcion=veo&estado=0');
</script>
<?php
break;
case 1 :
echo "llenando tanque";
?>
<script type='text/javascript'>
enviaQuery('divResultado','../../funcion/tanque.php?opcion=veo&estado=1');
</script>
<?php
break;
case 2 :
echo "tanque lleno";
?>
<script type='text/javascript'>
enviaQuery('divResultado','../../funcion/tanque.php?opcion=veo&estado=2');
</script>
<?php
break;
case 3 :
echo "distribuyendo agua";
?>
<script type='text/javascript'>
enviaQuery('divResultado','../../funcion/tanque.php?opcion=veo&estado=3');
</script>
<?php
break;
}
?>
</th>
</tr>
</table>
Código PHP:
<?php
session_start();
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
if ($_GET['opcion']=="veo")
{
$estado=$_GET['estado'];
switch ($estado)
{
case 0 :
echo "<img src='../../../web/images/vacio.png' height='200px' />";
break;
case 1 :
?>
<script type='JavaScript'>
runTest();
</script>
<?php
echo "<img src='../../../web/images/llenando.png' height='200px' />";
break;
case 2 :
echo "<img src='../../../web/images/descargando.png' height='200px' />";
break;
case 3 :
echo "<img src='../../../web/images/vacio.png' height='200px' />";
break;
}
}
?>
Código PHP:
<!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" />
<!-- styles -->
<link type="text/css" rel="stylesheet" href="../../../web/css/style-azul.css" />
<!-- scripts -->
<script type="text/JavaScript" src="../../../web/js/jquery1.10.2.js"> </script>
<script type="text/javascript" src="../../../web/js/tiny_mce/tiny_mce.js"></script>
<script type="text/JavaScript" src="../../../web/js/livevalidation.js"> </script>
<script type="text/JavaScript" src="../../../web/js/jquery.easing.1.3.js"></script>
<script type="text/JavaScript" src="../../../web/js/myajax.js"> </script>
<script type="text/JavaScript" src="../../../web/js/titulo.js"> </script>
<script type="text/javascript" src="../../../web/js/lightview/lightview.js"></script>
<link rel="stylesheet" type="text/css" href="../../../web/css/lightview/lightview.css"/>
</head>
<body onLoad="setInterval('cambios()',1000);setInterval('runTest()',1000);">