-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
126 lines (101 loc) · 3.08 KB
/
index.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
<!doctype html>
<html>
<head>
<title>GSM Panel</title>
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;border-color:#999;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:13px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#999;color:#444;background-color:#F7FDFA;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:13px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:#26ADE4;}
.tg .tg-c7d0{background-color:#bbdaff;text-align:center}
.tg .tg-ci37{background-color:#ecf4ff;text-align:center}
</style>
<table class="tg">
<tr>
<th class="tg-031e" colspan="3" >TURN ON TRX<br>
<form id="TRX">
<input type="radio" name="TRX" value="Off" checked>Off<br>
<input type="radio" name="TRX" value="On">On<br>
<INPUT TYPE="submit" VALUE="Submit"/></th>
</form>
</th>
</tr>
<tr>
<td class="tg-c7d0" colspan="3">TURN ON BTS<br>
<form id ="BTS">
<input type="radio" name="BTS" value="Off" checked>Off<br>
<input type="radio" name="BTS" value="On">On<br>
<INPUT TYPE="submit" VALUE="Submit"/></th>
</th>
</form>
</td>
</tr>
<tr>
<td class="tg-ci37" colspan="3">Turn on BSC<br>
<form id ="BSC">
<input type="radio" name="BSC" value="Off" checked>Off<br>
<input type="radio" name="BSC" value="On">On<br>
<INPUT TYPE=SUBMIT VALUE="submit"/></th>
</th>
</form>
</td>
</tr>
<tr>
<td class="tg-031e">Mesage Users</td>
<td class="tg-031e"><ul id="messages"></ul> </td>
<td class="tg-031e"><form id="me" > <input id="m" autocomplete="off" />
<button>Send GSM Message to All</button>
</form></td>
</tr>
<tr>
<td class="tg-031e"></td>
<td class="tg-031e"></td>
<td class="tg-031e"></td>
</tr>
</table>
<script src="https://cdn.socket.io/socket.io-1.2.0.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script>
//Send Message
var socket = io();
var Msocket = io(me);
$('#me').submit(function(){
socket.emit('Cmessage', $('#m').val());
$('#m').val('');
return false;
});
socket.on('Cmessage', function(msg){
$('#messages').append($('<li>').text(msg));
});
//Turn on TRX
var TRXsocket = io(TRX);
$('#TRX').submit(function(){
socket.emit('TurnOnTRX', $('#TRX').val());
$('#TRX').val('');
return false;
});
socket.on('TurnOnTRX', function(){
$('#TRX').append($('<li>').text(msg));
});
//Turn on BTS
var BTSsocket = io(BTS);
$('#BTS').submit(function(){
socket.emit('TurnOnBTS', $('#BTS').val());
$('#BTS').val('');
return false;
});
socket.on('TurnOnBTS', function(){
$('#BTS').append($('<li>').text(msg));
});
//Turn on BSC
var BSCsocket = io(BSC);
$('#BSC').submit(function(){
socket.emit('TurnOnBSC', $('#BSC').val());
$('#BSC').val('');
return false;
});
socket.on('TurnOnBSC', function(){
$('#BSC').append($('<li>').text(msg));
});
</script>
</body>
</html>