-
Notifications
You must be signed in to change notification settings - Fork 1
/
server.php
136 lines (125 loc) · 4.55 KB
/
server.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
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
<?php
$server = 'server';
$inst="server";
include 'header.php';
?>
<body class="" style="background-color: #FFFFFF;">
<div class="container-fluid">
<div class="row" style="">
<div class="col-lg-1 fade-in border-right text-black bg-dark" style="border-radius: 0px 0px 20px 0px; height: 20vh; padding: 80px 10px 180px 10px;">
<?php
$curr = 'dash';
// include 'includenav.php';
?>
<!-- <div class="bg-primary">
Server
</div> -->
<img src="images/valaiweb.svg" class="mx-auto d-block fade-in rounded-circle p-2" style="background-color: #fff; width: 88px; height: 88px; margin-top: 3%;" alt="logo">
<!-- <h2 class="text-white p-4 text-center fnt-cur">Valai - Server</h2> -->
</div>
<div class="col-lg-11 fade-in" id="" style="height: 40vh; padding: 1% 2% 2% 2%;">
<div id="inc">
<div class="spinner-border text-dark"></div>
</div>
<br />
<div id="inc1">
<div class="spinner-border text-dark"></div>
</div>
<br>
<div id="inc2">
<div class="spinner-border text-dark"></div>
</div>
<br>
<div id="inc3">
<div class="spinner-border text-dark"></div>
</div>
</div>
<script>
$('#inc1').hide()
$('#inc2').hide()
$('#inc3').hide()
// alert('hello');
setInterval(function () {
// alert('hello');
$.post("api.php",
{
act:"sayhello",
ip:"192.168.1.5",
nm:"stat",
stat:"failure",
inbox:"influx"
},
function(data, status){
// alert(data);
if(data == 'hello'){
$('#inc').html('<img src="images/tick.png" style="width: 32px;"> Connection established to primary server');
$('#inc1').show()
$('#inc2').show()
$('#inc3').show()
}
});
}, 2000);
setInterval(function () {
// alert('hello');
$.post("api.php",
{
act:"updatestatx",
ip:"192.168.1.5",
nm:"stat",
stat:"failure",
inbox:"influx"
},
function(data, status){
// alert(data);
if(data == 'success'){
$('#inc1').html('<img src="images/tick.png" style="width: 32px;"> Server is booted up and running...');
}else{
$('#inc1').html('<img src="images/warning.svg" style="width: 28px;"> Error booting up server please refer documentation ( error code : SERBT233501 )');
}
});
}, 20000);
setInterval(function () {
// alert('hello');
$.post("api.php",
{
act:"updateallproc",
ip:"192.168.1.5",
nm:"stat",
stat:"failure",
inbox:"influx"
},
function(data, status){
// alert(data);
if(data == 'success'){
$('#inc2').html('<img src="images/tick.png" style="width: 32px;"> Process monitor server is booted up and running...');
}else{
$('#inc2').html('<img src="images/warning.svg" style="width: 28px;"> Error booting up Process monitor server please refer documentation ( error code : SERBT433509X )');
}
});
}, 20000);
setInterval(function () {
// alert('hello');
$.post("api.php",
{
act:"updateallip",
ip:"192.168.1.5",
nm:"stat",
stat:"failure",
inbox:"influx"
},
function(data, status){
// alert(data);
if(data == 'success'){
$('#inc3').html('<img src="images/tick.png" style="width: 32px;"> IP monitor server is booted up and running...');
}else{
$('#inc3').html('<img src="images/warning.svg" style="width: 28px;"> Error booting up IP monitor server please refer documentation ( error code : SERBT433509X )');
}
});
}, 20000);
</script>
</div>
<b class="bg-dark text-white p-2 bor-ten" style="font-size: 38px;">Valai Server</b><br><br>
This is a server page and it will not execute on its own. <br />
Please refer documentation for more information on how to access it and work with it. <br /> <br>
<b class="bg-danger text-white p-2 bor-ten">Please don't close this window</b><br /><br />
<?php valai::DisplayVerBuild() ?> | An open source software<br />Copyright © 2020-2021 Valainet. All Rights Reserved.