This repository has been archived by the owner on Jun 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjavascript.js
190 lines (142 loc) · 3.62 KB
/
javascript.js
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
$(document).ready(function() {
horloge();
ts3();
//xplanet();
ifstat();
meteo();
emailChecker();
//vpn();
ping();
});
/* meteo */
var meteo_timeout;
function meteo ()
{
$.ajax({
async : false,
type: "GET",
url: "./ajax.php",
data: "block=meteo",
success: function(html){
$("#meteo").html(html);
}
});
meteo_timeout = setTimeout("meteo()", 3600000);
}
/* horloge */
var horloge_timeout;
function horloge()
{
dows = ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"];
mois = ["janv", "fév", "mars", "avril", "mai", "juin", "juillet", "août", "sept", "oct", "nov", "déc"];
now = new Date;
heure = now.getHours();
min = now.getMinutes();
sec = now.getSeconds();
jour_semaine = dows[now.getDay()];
jour = now.getDate();
mois = mois[now.getMonth()];
annee = now.getFullYear();
if (sec < 10) {
sec0 = "0";
} else {
sec0 = "";
}
if (min < 10) {
min0 = "0";
} else {
min0 = "";
}
if (heure < 10) {
heure0 = "0";
} else {
heure0 = "";
}
horloge_heure = heure + ":" + min0 + min;
horloge_date = "<span class='horloge_grey'>" + jour_semaine + "</span> " + jour + " " + mois + " <span class='horloge_grey'>" + annee + "</span>";
horloge_content = "<div class='horloge_heure'>" + horloge_heure + "</div><div class='horloge_date'>" + horloge_date + "</div>";
$("#horloge").html(horloge_content);
horloge_timeout = setTimeout("horloge()", 1000);
}
/* TS3 */
var ts3_timeout;
function ts3 ()
{
$.ajax({
async : false,
type: "GET",
url: "./ajax.php",
data: "block=ts3",
success: function(html){
$("#ts3").html(html);
}
});
ts3_timeout = setTimeout("ts3()", 10000);
}
/* PING */
var ping_timeout;
function ping ()
{
$.ajax({
async : false,
type: "GET",
url: "./ajax.php",
data: "block=ping",
success: function(html){
$("#ping").html(html);
}
});
ping_timeout = setTimeout("ping()", 30000);
}
/* VPN */
var vpn_timeout;
function vpn ()
{
$.ajax({
async : false,
type: "GET",
url: "./ajax.php",
data: "block=vpn",
success: function(html){
$("#vpn").html(html);
}
});
vpn_timeout = setTimeout("vpn()", 5000);
}
/* xplanet */
var xplanet_timeout;
function xplanet () {
var now = new Date().getTime();
var img_earth = $("<img />").attr("src", "xplanet/img/xplanet_earth.png?"+now);
var img_mon = $("<img />").attr("src", "xplanet/img/xplanet_moon.png?"+now);
$("#img_earth").attr("src", "xplanet/img/xplanet_earth.png?"+now);
$("#img_moon").attr("src", "xplanet/img/xplanet_moon.png?"+now);
xplanet_timeout = setTimeout("xplanet()", 600000);
}
/* ifstat */
var ifstat_timeout;
function ifstat () {
var now = new Date().getTime();
var url_eth1_down = "ajax.php?block=ifstatð=wan&up_down=down&max=2000&hour="+now;
var url_eth1_up = "ajax.php?block=ifstatð=wan&up_down=up&max=150&hour="+now;
var img_oberon_down = $("<img />").attr("src", url_eth1_down);
$("#img_oberon_down").attr("src", url_eth1_down);
var img_oberon_up = $("<img />").attr("src", url_eth1_up);
$("#img_oberon_up").attr("src", url_eth1_up);
ifstat_timeout = setTimeout("ifstat()", 5000);
}
/* Email checker */
var email_timeout;
function emailChecker ()
{
$.ajax({
async : false,
type: "GET",
url: "./ajax.php",
data: "block=emailChecker",
success: function(html){
$("#emailChecker").html(html);
}
});
email_timeout = setTimeout("emailChecker()", 60000);
}