Server : Apache System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 User : apache ( 48) PHP Version : 8.0.28 Disable Function : NONE Directory : /var/www/html/prashantkr/prashantkr/ |
<form name='distributionStatus' method='post' enctype='multipart/form-data'>
<?php
$distribution1 = shell_exec('ping 172.18.0.2 -c 1');
$distribution2 = shell_exec('ping 172.16.0.2 -c 1');
$distribution3 = shell_exec('ping 172.25.0.2 -c 1');
$distribution4 = shell_exec('ping 172.17.0.2 -c 1');
$distribution5 = shell_exec('ping 172.21.0.2 -c 1');
$distribution6 = shell_exec('ping 172.20.0.2 -c 1');
$distribution7 = shell_exec('ping 172.28.0.2 -c 1');
$residence1 = shell_exec('ping 172.26.11.1 -c 1');
$residence2 = shell_exec('ping 172.26.12.1 -c 1');
$residence3 = shell_exec('ping 172.26.13.1 -c 1');
$residence4 = shell_exec('ping 172.26.31.1 -c 1');
$residence5 = shell_exec('ping 172.26.32.1 -c 1');
$residence6 = shell_exec('ping 172.26.34.1 -c 1');
$residence7 = shell_exec('ping 172.21.11.13 -c 1');
$residence8 = shell_exec('ping 172.21.11.7 -c 1');
//$residence9 = shell_exec('ping 172.19.0.2 -c 1');
$residence9 = shell_exec('ping 172.26.40.5 -c 1');
//$residence10 = shell_exec('ping 172.26.41.1 -c 1');
$residence10 = shell_exec('ping 172.26.44.5 -c 1');
//$residence11 = shell_exec('ping 172.26.45.1 -c 1');
$residence11 = shell_exec('ping 172.19.12.2 -c 1');
//$residence12 = shell_exec('ping 172.26.11.1 -c 1');
$residence12 = shell_exec('ping 172.19.16.2 -c 1');
$distribution8 = shell_exec('ping 172.20.1.2 -c 1');
$distribution9 = shell_exec('ping 172.20.1.6 -c 1');
$distribution10 = shell_exec('ping 172.20.1.10 -c 1');
$distribution11 = shell_exec('ping 172.20.1.14 -c 1');
$distribution12 = shell_exec('ping 172.20.1.18 -c 1');
$distribution13 = shell_exec('ping 172.20.1.22 -c 1');
echo "
<table border='1'><tr><td valign='top' colspan='3' align='center'>
<font color='red'>Distribution Switch Status</font>
</td></tr>
<tr><td valign='top'>
<table>
<tr><td colspan='2'><font color='red'>Academic Area </font></td></tr>
<tr> <td>Admin Block </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution1)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>CC - I </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution2)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Lecture Complex </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution3)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>CC - II </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution4)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Library </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution5)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>CC - III </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution6)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Director Residence </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution7)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
</table>
</td><td valign='top'>
<table>
<tr><td colspan='2'><font color='red'>Residence Area </font></td></tr>
<tr> <td>Visitor Hostel - I </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence1)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Visitor Hostel - II </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence2)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Visitor Hostel - III </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence3)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Girls Hostel - I </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence4)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Girls Hostel - II </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence5)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Girls Hostel - III </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence6)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>M S A - I </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence7)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>M S A - II </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence8)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Boys Hostel - I </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence9)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Boys Hostel - II </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $residence10)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Boys Hostel - III </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution11)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Boys Hostel - IV </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution12)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
</table>
</td><td valign='top'>
<table>
<tr><td colspan='2'><font color='red'>CC-III Floor wise</font></td></tr>
<tr> <td>Ground Floor </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution8)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>First Floor </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution9)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Second Floor </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution10)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Third Floor </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution11)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Fourth Floor </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution12)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
<tr> <td>Fifth Floor </td><td align='center'>";
if (preg_match("/\bttl=\b/i", $distribution13)) {
echo "<img src='up.jpg' height='25' width='25' />";
}else{
echo "<img src='down.jpg' height='25' width='25' />";}
echo "</td></tr>
</table>
</td></tr>
</table>";
echo "
</td></tr></table>";
?>
</form>