painel / static /operacaomagma.html
Atualli's picture
Upload 85 files
490b2ec
raw
history blame
31 kB
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta charset="utf-8" />
<title>ATUALLI MOSAICO WEB</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Arial;
}
#logo {
width: 100%;
top: 10px;
z-index: 1;
}
.title_print, .reporting_period {
text-align: center;
}
.header {
text-align: center;
padding: 0.05%;
background: #053067;
color: white;
}
.row {
display: flex;
flex-wrap: wrap;
padding: 48px 0;
}
/* Create four equal columns that sits next to each other */
.column {
flex: 25%;
max-width: 25%;
padding: 0 2px;
}
.column img {
margin-top: 2px;
vertical-align: middle;
}
.column:active img {
-webkit-transform: scale(2);
transform: scale(2);
cursor: zoom-out;
}
/* Responsive layout - makes a two column-layout instead of four columns */
@media screen and (max-width: 800px) {
.column {
flex: 50%;
max-width: 50%;
}
}
/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
.column {
flex: 100%;
max-width: 100%;
}
}
#popupbox {
margin: 0;
margin-left: 40%;
margin-right: 40%;
margin-top: 50px;
padding-top: 10px;
width: 20%;
height: 150px;
position: fixed;
background: #FBFBF0;
border: solid #000000 2px;
z-index: 9;
font-family: arial;
visibility: hidden;
}
#ocorrencia {
margin: 0;
margin-left: 25%;
margin-right: 25%;
margin-top: 12%;
padding-top: 10px;
width: 50%;
height: 50%;
position: fixed;
background: white;
border: solid black 2px;
z-index: 9;
font-family: arial;
visibility: hidden;
}
.topnav {
position: fixed;
top: 0;
width: 100%;
overflow: hidden;
background-color: #333;
}
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.active {
background-color: #4CAF50;
color: white;
}
.topnav .icon {
display: none;
}
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 17px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;
}
.dropdown-content {
display: none;
position: fixed;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.topnav a:hover, .dropdown:hover .dropbtn {
background-color: #555;
color: white;
}
.dropdown-content a:hover {
background-color: #ddd;
color: black;
}
.dropdown:hover .dropdown-content {
display: block;
}
@media screen and (max-width: 600px) {
.topnav a:not(:first-child), .dropdown .dropbtn {
display: none;
}
.topnav a.icon {
float: right;
display: block;
}
}
@media screen and (max-width: 600px) {
.topnav.responsive {
position: relative;
}
.topnav.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
.topnav.responsive .dropdown {
float: none;
}
.topnav.responsive .dropdown-content {
position: relative;
}
.topnav.responsive .dropdown .dropbtn {
display: block;
width: 100%;
text-align: left;
}
}
/*
novo popup
*/
/* Button used to open the contact form - fixed at the bottom of the page */
.open-button {
background-color: #555;
color: white;
padding: 16px 20px;
border: none;
cursor: pointer;
opacity: 0.8;
position: fixed;
bottom: 23px;
right: 28px;
width: 280px;
}
/* The popup form - hidden by default */
.form-popup {
display: none;
position: fixed;
bottom: 0;
right: 15px;
border: 3px solid #f1f1f1;
z-index: 9;
}
/* Add styles to the form container */
.form-container {
max-width: 300px;
padding: 10px;
background-color: white;
}
/* Full-width input fields */
.form-container input[type=text], .form-container input[type=password] {
width: 100%;
padding: 15px;
margin: 5px 0 22px 0;
border: none;
background: #f1f1f1;
}
/* When the inputs get focus, do something */
.form-container input[type=text]:focus, .form-container input[type=password]:focus {
background-color: #ddd;
outline: none;
}
/* Set a style for the submit/login button */
.form-container .btn {
background-color: #4CAF50;
color: white;
padding: 16px 20px;
border: none;
cursor: pointer;
width: 100%;
margin-bottom: 10px;
opacity: 0.8;
}
/* Add a red background color to the cancel button */
.form-container .cancel {
background-color: red;
}
/* Add some hover effects to buttons */
.form-container .btn:hover, .open-button:hover {
opacity: 1;
}
/* POPUP central */
/* Full-width input fields */
input[type=text], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
/* Set a style for all buttons */
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
}
button:hover {
opacity: 0.8;
}
/* Extra styles for the cancel button */
.cancelbtn {
width: auto;
padding: 10px 18px;
background-color: #f44336;
}
/* Center the image and position the close button */
.imgcontainer {
text-align: center;
margin: 24px 0 12px 0;
position: relative;
}
img.avatar {
width: 40%;
border-radius: 50%;
}
.container {
padding: 16px;
}
span.psw {
float: right;
padding-top: 16px;
}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
padding-top: 60px;
}
/* Modal Content/Box */
.modal-content {
background-color: #fefefe;
margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */
border: 1px solid #888;
width: 80%; /* Could be more or less, depending on screen size */
}
/* The Close Button (x) */
.close {
position: absolute;
right: 25px;
top: 0;
color: #000;
font-size: 35px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: red;
cursor: pointer;
}
/* Add Zoom Animation */
.animate {
-webkit-animation: animatezoom 0.6s;
animation: animatezoom 0.6s
}
@-webkit-keyframes animatezoom {
from {
-webkit-transform: scale(0)
}
to {
-webkit-transform: scale(1)
}
}
@keyframes animatezoom {
from {
transform: scale(0)
}
to {
transform: scale(1)
}
}
/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
span.psw {
display: block;
float: none;
}
.cancelbtn {
width: 100%;
}
}
</style>
</head>
<body onload="iniciaPagina();">
<title>Hello</title>
<div class="topnav" id="myTopnav">
<a href="#news" onclick="javascript:void(0);" id="Fila">Fila</a>
<a href="#news"> Ocorrencias</a>
<div class="dropdown">
<button class="dropbtn">
Clientes
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="http://atualli.ddns.net/operacao">MOEMA</a>
<a href="http://atualli.ddns.net/operacaomagma">MAGMA</a>
<a href="http://atualli.ddns.net/operacaoatualli">ATUALLI</a>
<a href="http://atualli.ddns.net/operacaopedra">PEDRAFL</a>
<a href="http://atualli.ddns.net/operacaomultilaser-extrema-1">MULTILASER-EXTREMA-1</a>
<a href="http://atualli.ddns.net/operacaomultilaser-extrema-3">MULTILASER-EXTREMA-3</a>
</div>
</div>
<a href="javascript:openForm();" id="myLogin">Login</a>
<a href="javascript:void(0);" class="icon" onclick="myFunctionNav()">
<i class="fa fa-bars"></i>
</a>
</div>
<div class="row">
<tr>
<div class="form-popup" id="myForm">
<form action="javascript:autentica();" class="form-container">
<h1>Login</h1>
<label for="email"><b>Usuario</b></label>
<input type="text" placeholder="Usuario" id="myFormUsuario" name="email" required>
<label for="psw"><b>Senha</b></label>
<input type="password" placeholder="Senha" id="myFormSenha" name="psw" required>
<button type="submit" class="btn">Login</button>
<button type="button" class="btn cancel" onclick="closeForm()">Close</button>
</form>
</div>
<div id="ocoModal" class="modal">
<form class="modal-content animate" action="javascript:gravaOcorrencia()" method="get">
<div class="imgcontainer">
<span onclick="document.getElementById('ocoModal').style.display = 'none'" class="close" title="Close Modal">&times;</span>
<video id="videoocorrencia" preload="yes" autoplay loop muted playsinline width=50% height=50% controls src="getpathvideo?c=" type="video/mp4"> </video>
<br />
</div>
<div class="container" style="background-color:#f1f1f1">
<label id="Operador" for="rot"><b>Operador: </b></label>
</div>
<div class="container" style="background-color:#f1f1f1">
<label id="DataOcorrencia" for="rot"><b>Data: </b></label>
</div>
<div class="container" style="background-color:#f1f1f1">
<label id="NomeRoteiro" for="rot"><b>Roteiro: </b></label>
</div>
<div class="container">
<label id="pergunta1" for="uname"><b>Pergunta1</b></label>
<input type="text" id="resposta1" placeholder="Texto livre" name="resposta1" required>
<label id="pergunta2" for="psw"><b>Pergunta2</b></label>
<input type="text" id="resposta2" placeholder="Texto livre" name="resposta2" required>
<input type="hidden" name="cmd" id="GravaOcorrencia" value="">
<input type="hidden" name="idOco" id="idOco" value="">
<input type="hidden" name="idCamera" id="idCamera" value="">
<button type="submit">Grava</button>
</div>
<div class="container" style="background-color:#f1f1f1">
<button type="button" onclick="document.getElementById('ocoModal').style.display = 'none'" class="cancelbtn">Cancel</button>
</div>
</form>
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 1(1)
Setor:
" src="getresource?r=atualli.png&c=00&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick=" imgRedirect('zoom?n=1&m=1&p=00')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 2(2)
Setor:
" src="getresource?r=atualli.png&c=01&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick=" imgRedirect('zoom?n=1&m=1&p=01')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 3(3)
Setor:
" src="getresource?r=atualli.png&c=02&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=02')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 4(4)
Setor:
" src="getresource?r=atualli.png&c=03&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=03')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 5(5)
Setor:
" src="getresource?r=atualli.png&c=04&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=04')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 6(6)
Setor:
" src="getresource?r=atualli.png&c=05&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=05')">
</div>
</tr><tr>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 7(7)
Setor:
" src="getresource?r=atualli.png&c=06&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=06')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 8(8)
Setor:
" src="getresource?r=atualli.png&c=07&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=07')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 9(9)
Setor:
" src="getresource?r=atualli.png&c=08&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=08')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 10(10)
Setor:
" src="getresource?r=atualli.png&c=09&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=09')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 11(11)
Setor:
" src="getresource?r=atualli.png&c=10&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=10')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 12(12)
Setor:
" src="getresource?r=atualli.png&c=11&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=11')">
</div>
</tr><tr>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 13(13)
Setor:
" src="getresource?r=atualli.png&c=12&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=12')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 14(14)
Setor:
" src="getresource?r=atualli.png&c=13&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=13')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 15(15)
Setor:
" src="getresource?r=atualli.png&c=14&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=14')">
</div>
<div class="column">
<img title="Cliente: MAGMA
DVR: INTELBRAS(DVR01)
IP: ibiraofc.ddns-intelbras.com.br:37779
Cam: CAMERA 16(16)
Setor:
" src="getresource?r=atualli.png&c=15&123" onload="refreshimg(this)" onerror="errorloadimg(this)" class="refr" alt="" style="width:100%" onclick="imgRedirect('zoom?n=1&m=1&p=15')">
</div>
</tr>
</div>
<script async>
// setInterval("gogo();", 1500);
var to = 1; // 2; //3;
var first = 0;
var idx = 0;
// Get the modal
var modalOcorrencia = document.getElementById('ocoModal');
// When the user clicks anywhere outside of the modal, close it
window.onclick = function (event) {
if (event.target == modalOcorrencia) {
modalOcorrencia.style.display = "none";
}
}
function openForm() {
document.getElementById("myForm").style.display = "block";
}
function closeForm() {
document.getElementById("myForm").style.display = "none";
}
function getVideoOcorrencia() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
var json = JSON.parse(this.responseText);
var obj = document.getElementById("videoocorrencia");
//var s_rc = obj.getAttribute('src');
obj.setAttribute('src', "getpathvideo?c=" + json.video);
document.getElementById("pergunta1").innerHTML = "<b>" + json.pergunta1 + "</b>";
document.getElementById("pergunta2").innerHTML = "<b>" + json.pergunta2 + "</b>";
document.getElementById("NomeRoteiro").innerHTML = "<b> Roteiro :" + json.roteiro + "</b>";
document.getElementById("DataOcorrencia").innerHTML = "<b> Data: " + json.data + "</b>";
document.getElementById("Operador").innerHTML = "<b> Operador: " + document.getElementById("myLogin").innerHTML + "</b>";
var objidOco = document.getElementById("idOco");
var svalue = objidOco.getAttribute('value');
objidOco.setAttribute('value', json.idOcorrencia);
var objCam = document.getElementById("cameraOco");
objCam.setAttribute('src', "getresource?r=atualli.png&c="+json.camera+"&123");
}
};
xhttp.open("GET", "https://script.google.com/macros/s/AKfycbxNBYm7cgPj_TdVbsaU-LWdGT4Vdg0QBmkUXRoNmJlcrSVLRtE/exec?cmd=Ocorrencia&operador=" + document.getElementById("myLogin").innerHTML, true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("");
}
function gravaOcorrencia()
{
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
var json = JSON.parse(this.responseText);
document.getElementById('ocoModal').style.display = 'none';
alert("OCORRENCIA GRAVADA COM SUCESSO !");
}
};
var objidOco = document.getElementById("idOco");
var idOco = objidOco.getAttribute('value');
var idResp1 = document.getElementById("resposta1").value;
var idResp2 = document.getElementById("resposta2").value;
xhttp.open("GET", "https://script.google.com/macros/s/AKfycbxNBYm7cgPj_TdVbsaU-LWdGT4Vdg0QBmkUXRoNmJlcrSVLRtE/exec?cmd=GravaOcorrencia&idOco=" + idOco + "&resposta1=" + idResp1 + "&resposta2=" + idResp2, true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("");
}
function myFunctionNav() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
function login(showhide) {
if (showhide == "show") {
document.getElementById('popupbox').style.visibility = "visible";
} else if (showhide == "hide") {
document.getElementById('popupbox').style.visibility = "hidden";
}
}
function autentica() {
var xhttp = new XMLHttpRequest();
var usuario = document.getElementById("myFormUsuario").value;
var senha = document.getElementById("myFormSenha").value;
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
if (this.responseText.indexOf("ERRO") > -1) {
document.getElementById("myLogin").innerHTML = this.responseText;
localStorage.setItem("sessao", this.responseText);
}
else {
localStorage.setItem("sessao", this.responseText);
}
}
closeForm();
};
document.getElementById("myLogin").innerHTML = "Aguarde Login";
xhttp.open("GET", "https://script.google.com/macros/s/AKfycbxNBYm7cgPj_TdVbsaU-LWdGT4Vdg0QBmkUXRoNmJlcrSVLRtE/exec?cmd=Login&user="+usuario+"&psw="+senha, true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("");
}
function getFila()
{
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("Fila").innerHTML = "Fila" + "(" + this.responseText + ") " + first;
}
};
xhttp.open("GET", "https://script.google.com/macros/s/AKfycbxNBYm7cgPj_TdVbsaU-LWdGT4Vdg0QBmkUXRoNmJlcrSVLRtE/exec?cmd=Fila", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("");
}
function getSessao()
{
var token = localStorage.getItem("sessao");
if (token != "") {
var xhttp2 = new XMLHttpRequest();
xhttp2.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
if (this.responseText.indexOf("ERRO") == -1) {
document.getElementById("myLogin").innerHTML = this.responseText;
//if (document.getElementById("Fila").onclick.indexOf("javascript:void(0);")>-1)
var cfile = document.getElementById("Fila").getAttribute('onclick');
if (cfile == "javascript:void(0);") {
document.getElementById("Fila").setAttribute('onclick', "document.getElementById('ocoModal').style.display = 'block'; getVideoOcorrencia();");
}
}
else {
document.getElementById("myLogin").innerHTML = "Login";
document.getElementById("Fila").setAttribute('onclick', "javascript:void(0);");
}
}
};
xhttp2.open("GET", "https://script.google.com/macros/s/AKfycbxNBYm7cgPj_TdVbsaU-LWdGT4Vdg0QBmkUXRoNmJlcrSVLRtE/exec?cmd=Sessao&token=" + token, true);
xhttp2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp2.send("");
}
}
function gogo2()
{
getFila()
getSessao()
setTimeout(gogo2, to * 1000);
}
function refreshimg(img)
{
}
function errorloadimg(img) {
var d = new Date(),
dummy = d.getTime();
var newurl = 'getresource?r=atualli.png&';
var obj = img,
s_rc = obj.getAttribute('src'),
pure_src = s_rc.substring(s_rc.indexOf('c='), s_rc.indexOf('c=') + 4);
obj.setAttribute('src',newurl+pure_src + '&' + dummy);
// obj.nextSibling.innerHTML = obj.getAttribute('src');
first += 20;
if (first > 5000)
first = 5000;
}
function gogo()
{
try {
if (first == 0) {
first += 1;
setTimeout(gogo, to * 10000);
}
var d=new Date(),
dummy=d.getTime(),
i=idx,
pix=document.images;
for (; i < pix.length; i++)
{
if (pix[i].className !== 'refr')
{ continue; }
else
{
var obj = pix[i];
if ((obj.complete)) {
first -= 5;
if (first < 1) first = 1;
}
else {
first += 20;
if (first > 5000)
first = 5000;
}
{
var s_rc = obj.getAttribute('src');
if (s_rc.indexOf('r=')) {
var newurl = 'http://atualli.ddns.net:8091/getcamera?';
var pure_src = s_rc.substring(s_rc.indexOf('c='), s_rc.indexOf('c=') + 4);
obj.setAttribute('src', newurl + pure_src + '&' + dummy);
}
else {
var pure_src = s_rc.substring(0, s_rc.indexOf('c=') + 4);
obj.setAttribute('src', pure_src + '&' + dummy);
}
// obj.nextSibling.innerHTML = obj.getAttribute('src');
idx += 1;
if (idx >= pix.length) idx = 0;
break;
}
}
}
setTimeout(gogo, first);
}
catch (e) {
setTimeout(gogo, to * 100);
}
}
function iniciaPagina()
{
// gogo2();
document.getElementById("Fila").setAttribute('onclick', "document.getElementById('ocoModal').style.display = 'block'; getVideoOcorrencia();");
gogo();
}
</script>
</body>
</html>