-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmiss_script.inc.php
89 lines (87 loc) · 2.94 KB
/
miss_script.inc.php
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
<?php
$ausgabe .= "
<script type=\"text/javascript\">
StartZ = new Date();
function ankzcalc(s1){
var ZeitServer = new Date(\"". date("M, d Y H:i:s") ."\");
var Zeit = new Date();
var offset = ZeitServer.getTime() - StartZ.getTime();
var AbsolutJetzt = Zeit.getTime();
var AbsolutDann = AbsolutJetzt + (s1 * 1000);
Zeit.setTime(AbsolutDann + offset);
var Jahr = Zeit.getFullYear();
var Monat = Zeit.getMonth() + 1;
var Tag = Zeit.getDate();
var hh = Zeit.getHours();
var mm = Zeit.getMinutes();
var ss = Zeit.getSeconds();
if(ss<10){ss=\"0\"+ss}
if(mm<10){mm=\"0\"+mm}
if(hh<10){hh=\"0\"+hh}
if(Tag<10){Tag=\"0\"+Tag}
if(Monat<10){Monat=\"0\"+Monat}
document.getElementById(\"z\").innerHTML=hh+\":\"+mm+\":\"+ss+\" (\"+Tag+\".\"+Monat+\".\"+Jahr+\")\";
}
function endzcalc(s2){
var ZeitServer = new Date(\"". date("M, d Y H:i:s") ."\");
var Zeit = new Date();
var offset = ZeitServer.getTime() - StartZ.getTime();
var AbsolutJetzt = Zeit.getTime();
var AbsolutDann = AbsolutJetzt + (2 * s1 * 1000);
Zeit.setTime(AbsolutDann + offset);
var Jahr = Zeit.getFullYear();
var Monat = Zeit.getMonth() + 1;
var Tag = Zeit.getDate();
var hh = Zeit.getHours();
var mm = Zeit.getMinutes();
var ss = Zeit.getSeconds();
if(ss<10){ss=\"0\"+ss}
if(mm<10){mm=\"0\"+mm}
if(hh<10){hh=\"0\"+hh}
if(Tag<10){Tag=\"0\"+Tag}
if(Monat<10){Monat=\"0\"+Monat}
document.getElementById(\"y\").innerHTML=hh+\":\"+mm+\":\"+ss+\" (\"+Tag+\".\"+Monat+\".\"+Jahr+\")\";
}
function daucalc(){
a=document.getElementsByName(\"mkx\")[0].value;
b=document.getElementsByName(\"mky\")[0].value;
c=document.getElementsByName(\"mkz\")[0].value;
p=document.getElementsByName(\"mg\")[0].value;
m=0;
h=0;
d=\"-\";
if((a!=$x || b!=$y || c!=$z) && a<7 && b<7 && c<7 && a>0 && b>0 && c>0){
d=500;
l=500;
j=700;
d=Math.round(Math.sqrt(Math.pow(Math.abs($z-c)*100,2)+Math.pow(Math.abs($y-b)*100,2)+Math.pow(Math.abs($x-a)*100,2))*100000)/100000;
l=Math.round(Math.sqrt(Math.abs($z-c)+Math.abs($y-b)+Math.abs($x-a))/10*100000)/100000+1;
j=Math.round(((d+300)/l)*100000)/100000;
s=Math.round((100/p)*j/$ges*4000);
d=Math.round(d*100)/100;
s1=s;
s2=s;
ankzcalc(s1);
endzcalc(s2);
if(s>59){
m=Math.floor(s/60);
s=s-m*60}
if(m>59){
h=Math.floor(m/60);
m=m-h*60}
if(s<10){s=\"0\"+s}
if(m<10){m=\"0\"+m}
if(h<10){h=\"0\"+h}
}
if(d==\"-\"){
document.getElementById(\"w\").innerHTML=d;
document.getElementById(\"x\").innerHTML=d;
document.getElementById(\"y\").innerHTML=d;
document.getElementById(\"z\").innerHTML=d;
}else{
document.getElementById(\"w\").innerHTML=d;
document.getElementById(\"x\").innerHTML=h+\":\"+m+\":\"+s;
}
}
</script>\n";
?>