-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_2g.php
168 lines (143 loc) · 6.7 KB
/
index_2g.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
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
<?php
include 'include/header.php';
?>
<table class="dash-table" border=1>
<tr>
<th colspan=3 style="background:#990000"><font color="#fff"> Nokia Network BSC Alarm Summary </font></th>
</tr>
<tr>
<center>
<th style="background: #91C910">Alarm ID </th>
<th style="background: #91C910">Alarm Text </th>
<th style="background: #91C910">Count </th>
</center>
</tr>
<?php
$query = "SELECT alarm_number, text, COUNT(*)
FROM net_diag
WHERE (dn NOT LIKE '%BCF%' AND dn NOT LIKE '%JUNIPER%' AND dn NOT LIKE '%OMS%' AND object_name NOT LIKE '%_C' AND DN NOT LIKE '%RNC%' AND dn NOT LIKE '%NETACT%' AND alarm_number!='ALARM_NUMBER' AND alarm_number!='')
GROUP BY text ORDER BY text";
$result = mysql_query($query);
$row = mysql_num_rows($result);
while ($rowsql = mysql_fetch_assoc($result)) {
if ($rowsql['COUNT(*)'] > 100) {
$color = '#cc0033';
$bg = 'background:#990000';
} else if ($rowsql['COUNT(*)'] > 50) {
$color = '#0066cc';
} else {
$color = 'black';
}
if ($rowsql['text'] == 'BTS AND TC UNSYNCHRONIZATION CLEAR CALLS ON ABIS I') {
$color = 'red';
}
?>
<tr>
<td class=td1 align="center"><font color=<?php echo $color . ">"; ?><?php echo $rowsql['alarm_number']; ?></color></td>
<td class=td1 align="left"><a href="alarm_details.php?object_type=bsc&text=<?php echo $rowsql['text']; ?>" target="_blank"><font color=<?php echo $color . ">"; ?><?php echo $rowsql['text']; ?> </color></a></td>
<td class=td2 align="center"><font color=<?php echo $color . ">"; ?><?php echo $rowsql['COUNT(*)']; ?><color></td>
</tr>
<?php
}
?>
</table>
<table class="dash-table" border=1>
<tr>
<th colspan=3 style="background:#990000"><font color="#fff"> Nokia Network BTS Alarm Summary <font></th>
</tr>
<tr>
<center>
<th style="background: #91C910">Alarm ID </th>
<th style="background: #91C910">Alarm Text </th>
<th style="background: #91C910">Count</th>
</center>
</tr>
<?php
$query2 = "SELECT alarm_number, text, COUNT(*)
FROM net_diag
WHERE (dn LIKE '%BCF%' AND alarm_number!='' AND text!='')
AND alarm_number!='7401' AND alarm_number!='7402' AND alarm_number!='7403' AND alarm_number!='7404' AND alarm_number!='7405'
AND alarm_number!='7406' AND alarm_number!='7407' AND alarm_number!='7408' AND alarm_number!='7409' AND alarm_number!='7410' AND alarm_number!='7411' AND alarm_number!='7490'
AND alarm_number!='7461' AND alarm_number!='7462' AND alarm_number!='7465' AND alarm_number!='7466' AND alarm_number!='7486' AND alarm_number!='7487' AND alarm_number!='7489' AND alarm_number!='7492' AND alarm_number!='7493' AND alarm_number!='7488' AND alarm_number!='7499'
AND alarm_number!='7622' AND alarm_number!='7995' AND alarm_number!='8112'
AND alarm_number!='61006'
GROUP BY text ORDER BY COUNT(*) DESC";
$result2 = mysql_query($query2);
$row2 = mysql_num_rows($result2);
while ($rowsql2 = mysql_fetch_assoc($result2)) {
if ($rowsql2['COUNT(*)'] > 100) {
$color = '#cc0033';
} else if ($rowsql2['COUNT(*)'] > 50) {
$color = '#0066cc';
} else {
$color = 'black';
}
if ($rowsql2['text'] == 'BTS AND TC UNSYNCHRONIZATION CLEAR CALLS ON ABIS I') {
$color = 'red';
}
?>
<tr>
<td class=td1 align="center"><font color=<?php echo $color . ">"; ?><?php echo $rowsql2['alarm_number']; ?></color></td>
<td class=td1 align="left"><a href="alarm_details.php?object_type=bts&text=<?php echo $rowsql2['text']; ?>" target="_blank"><font color=<?php echo $color . ">"; ?><?php echo $rowsql2['text']; ?> </color></a></td>
<td class=td2 align="center"><font color=<?php echo $color . ">"; ?><?php echo $rowsql2['COUNT(*)']; ?><color></td>
</tr>
<?php
}
?>
</table>
<table class="dash-table" border=1>
<tr>
<th colspan=3 style="background:#990000"><font color="#fff"> VVIP SITES Alarm Summary <font></th>
</tr>
<tr>
<center>
<th style="background: #91C910">Alarm ID </th>
<th style="background: #91C910">Alarm Text </th>
<th style="background: #91C910">Count</th>
</center>
</tr>
<?php
$query2 = "SELECT alarm_number, text, COUNT(*)
FROM net_diag
WHERE (vip_site='Y' AND (dn LIKE '%BCF%' AND alarm_number!='' AND text!=''
AND alarm_number!='7401' AND alarm_number!='7402' AND alarm_number!='7403' AND alarm_number!='7404' AND alarm_number!='7405'
AND alarm_number!='7406' AND alarm_number!='7407' AND alarm_number!='7408' AND alarm_number!='7409' AND alarm_number!='7410' AND alarm_number!='7411' AND alarm_number!='7490'
AND alarm_number!='7461' AND alarm_number!='7462' AND alarm_number!='7465' AND alarm_number!='7466' AND alarm_number!='7486' AND alarm_number!='7487' AND alarm_number!='7489' AND alarm_number!='7492' AND alarm_number!='7493' AND alarm_number!='7488' AND alarm_number!='7499'
AND alarm_number!='7622' AND alarm_number!='7995' AND alarm_number!='8112'
AND alarm_number!='61006'))
GROUP BY text ORDER BY COUNT(*) DESC";
$result2 = mysql_query($query2);
$row2 = mysql_num_rows($result2);
while ($rowsql2 = mysql_fetch_assoc($result2)) {
if ($rowsql2['COUNT(*)'] > 100) {
$color = '#cc0033';
} else if ($rowsql2['COUNT(*)'] > 50) {
$color = '#0066cc';
} else {
$color = 'black';
}
if ($rowsql2['text'] == 'BTS AND TC UNSYNCHRONIZATION CLEAR CALLS ON ABIS I') {
$color = 'red';
}
?>
<tr>
<td class=td1 align="center"><font color=<?php echo $color . ">"; ?><?php echo $rowsql2['alarm_number']; ?></color></td>
<td class=td1 align="left"><a href="alarm_details.php?object_type=vvip&text=<?php echo $rowsql2['text']; ?>" target="_blank"><font color=<?php echo $color . ">"; ?><?php echo $rowsql2['text']; ?> </color></a></td>
<td class=td2 align="center"><font color=<?php echo $color . ">"; ?><?php echo $rowsql2['COUNT(*)']; ?><color></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript">
Element.cleanWhitespace('content');
init();
</script>
<div class=top-portion>
</div>
</body>
</html>