-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStatia2.html
173 lines (144 loc) · 4.08 KB
/
Statia2.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
<!DOCTYPE html>
<html lang="ro">
<meta charset="UTF-8">
<style>
html {
background-image: url("greybg.jpeg");
font-family: "Helvetica", cursive, sans-serif;
}
p {
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;
}
form{
display: inline;
padding: 5px;
}
</style>
<head>
<title>Stația 2</title>
<h2><span>Stația 2 </span></h2>
</head>
<div class="row">
<div class="column">
<br>
<p id="demo2"></p>
<div class="cointainer">
<form action="ServiceHTML.html">
<button type="submit">Înapoi la pagina principală</button><br><br><br>
</form>
<form action="Statia1.html">
<button id="statii" type="submit">Stația 1</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><br>
<br>
<video autoplay="true" id="videoElement"> </video>
<img src="statia2.png?" alt="Numar inmatriculare masina curenta" class="centerImg" id="re">
<br>
<script>
let parola2 = localStorage['parola2'];
let password2 = prompt('Introdu parola ' +parola2,"");
if(password2 !== null && parola2 === password2.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 dataSalvata2 = parseInt(localStorage['dataSalvata2']) || 0;
let distance2 = new Date();
// Update the count down every 1 second
setInterval(function ()
{
// Get today's date and time
let now2 = new Date();
// Find the distance between now and the count down date
distance2 = dataSalvata2 - now2;
// Time calculations for days, hours, minutes and seconds
let hours2 = Math.floor((distance2 % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
let minutes2 = Math.floor((distance2 % (1000 * 60 * 60)) / (1000 * 60));
let seconds2 = Math.floor((distance2 % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("demo2").innerHTML = hours2 + "h "
+ minutes2 + "m " + seconds2 + "s ";
// If the count down is over, write some text
if (distance2 < 0) {
// clearInterval(x);
document.getElementById("demo2").innerHTML = "Disponibilă";
}
}, 1000);
var reimg
window.onload=function () {
reimg=document.getElementById('re')
setInterval(function () {
reimg.src=reimg.src.replace(/\?.*/,function () {
return '?'+new Date()
})
},5000)
}
</script>
</html>