-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStatia1.html
202 lines (165 loc) · 4.73 KB
/
Statia1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html lang="ro">
<meta charset="UTF-8">
<style>
html {
background-image: url("greybg.jpeg");
font-family: "Helvetica", cursive, sans-serif;
}
p {
text-align:center;
font-size: 1.5vw;
}
.column {
text-align: center;
}
#videoElement {
width: 500px;
height: 375px;
display:inline-block;
margin-left: 33%;
transform: translateX(-50%);
padding-bottom: 15px;
}
#centerImg {
display:inline-block;
width: 500px;
height: 375px;
outline: darkgray;
outline-width: 10px;
}
button {
background-color: whitesmoke; color: black;
padding: 10px;
text-align: center;
font-size: 1vw;
border-radius: 5px;
opacity: 1;
}
button:hover {
background: rgba(45,45,45,0.95);
color: white;
}
div.column {
background-color: whitesmoke;
opacity: 0.90;
border-radius: 5px;
}
h2 {
font-size: 2vw;
text-align: center;
}
span {
background-color: whitesmoke;
opacity: 0.8;
border-radius: 5px;
padding: 2px;
}
.AddProd{
background-color: whitesmoke;
opacity: 0.97;
border-radius: 5px;
width: 300px;
margin: 0 auto;
text-align: center;
padding-left: 50px;
padding-right: 50px;
}
table, td, th {
border: 1px solid black;
width: 300px;
}
form{
display: inline;
padding: 5px;
}
</style>
<head>
<title>Stația 1</title>
<h2><span>Stația 1</span></h2>
</head>
<div class="row">
<div class="column">
<br>
<p id="demo1"></p>
<div class="cointainer">
<form action="ServiceHTML.html">
<button type="submit">Înapoi la pagina principală</button><br><br><br>
</form>
<form action="Statia2.html">
<button id="statii" type="submit">Stația 2</button>
</form>
<form action="Statia3.html">
<button id="statii" type="submit">Stația 3</button>
</form>
<form action="Statia4.html">
<button id="statii" type="submit">Stația 4</button>
</form>
</div>
<br><br>
</div>
</div>
<br>
<video autoplay="true" id="videoElement"> </video>
<img src="statia1.png?" alt="Numar inmatriculare masina curenta" class="centerImg" id="re">
<br>
<script>
let parola1 = localStorage['parola1'];
let input = prompt('Introduceți parola vă rog' + parola1 , "");
if(input !== null && parola1 === input.toString())
alert('Bun venit');
else
{
window.location="ServiceHTML.html";
}
let video = document.querySelector("#videoElement");
if (navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia({video: true})
.then(function (stream) {
video.srcObject = stream;
})
.catch(function () {
console.log("Eroare la accesul camerei video");
})
}
let dataSalvata1 = parseInt(localStorage['dataSalvata1']) || 0;
let distance1 = new Date();
// Update the count down every 1 second
setInterval(function ()
{
// Get today's date and time
let now1 = new Date();
// Find the distance between now and the count down date
distance1 = dataSalvata1 - now1;
// Time calculations for days, hours, minutes and seconds
let hours1 = Math.floor((distance1 % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
let minutes1 = Math.floor((distance1 % (1000 * 60 * 60)) / (1000 * 60));
let seconds1 = Math.floor((distance1 % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("demo1").innerHTML = hours1 + "h "
+ minutes1 + "m " + seconds1 + "s ";
// If the count down is over, write some text
if (distance1 < 0) {
// clearInterval(x);
document.getElementById("demo1").innerHTML = "Disponibilă";
}
}, 1000);
var reimg
window.onload=function () {
reimg=document.getElementById('re')
setInterval(function () {
reimg.src=reimg.src.replace(/\?.*/,function () {
return '?'+new Date()
})
},5000)
}
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
</html>