Advertisement
Guest User

Untitled

a guest
Mar 26th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.49 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html" charset="" />
  5. <META HTTP-EQUIV="Refresh" CONTENT="20">
  6. <title>Servidor de Ping UAM</title>
  7. <link rel="stylesheet" href="3col_rightNav.css" type="text/css">
  8. <style type="text/css">
  9. body {
  10.     background-color:#000;
  11. }
  12.  
  13. td {
  14.     background-color:#000;
  15.     font-size:small;
  16.     color:#FFF;
  17.     font-family:"Courier New", Courier, monospace;
  18.    
  19. }
  20. </style>
  21. </head>
  22. <body><div id="masthead">
  23.   <h1 align="center" id="siteName"><font color="#00FF33" face="Courier New, Courier, monospace">..::Monitoramento de servidores::..</font></h1>
  24. </div>
  25. <table width="800" align="center">
  26.   <tr>
  27.     <td width="107"><font color="#FFFFFF" face="Courier New, Courier, monospace">Srv - Servidor</font></td>
  28.     <td width="125"><font color="#FFFFFF" face="Courier New, Courier, monospace">T - Torniquete</font></td>
  29.     <td width="125"><font color="#FFFFFF" face="Courier New, Courier, monospace">Sw - Switch</font></td>
  30.     <td width="125">C - Catraca</td>
  31.   </tr>
  32.   <tr>
  33.     <td><font color="#FFFFFF" face="Courier New, Courier, monospace">Vm - Virtual Machine</font></td>
  34.     <td><font color="#FFFFFF" face="Courier New, Courier, monospace">R - Relogio de ponto</font></td>
  35.     <td>Det - Detector de metal</td>
  36.     <td>Imp - Impressora</td>
  37.   </tr>
  38. </table>
  39. <table width="892" height="445" align="center">
  40.   <tr>
  41.     <td width="144"><span class="content">
  42.       <?php  
  43. $arrayL = fopen("templates/beez_20/ping/srv01.txt","r");
  44.  
  45.  
  46. while(!feof($arrayL)){
  47.     $linha =fgets($arrayL, 999);
  48.     $nome = strtok($linha, ":");
  49.     $pingando = " ";
  50.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  51.  
  52.     if(empty($numeroip)){
  53.        echo "Final, sem ip";
  54.        exit;
  55.     }else{
  56.  
  57.        $pingando = shell_exec("ping -c 1 $numeroip");
  58.  
  59.        if(!preg_match("/bytes from/",$pingando)){
  60.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  61.          
  62.        }else{
  63.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  64.          
  65.        }
  66.  
  67.        
  68.     }
  69. }
  70. ?>
  71.     </span></td>
  72.     <td width="144"><?php
  73. $arrayL = fopen("templates/beez_20/ping/srv02.txt","r");
  74.  
  75. while(!feof($arrayL)){
  76.     $linha =fgets($arrayL, 999);
  77.     $nome = strtok($linha, ":");
  78.     $pingando = " ";
  79.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  80.  
  81.     if(empty($numeroip)){
  82.        echo "Final, sem ip";
  83.        exit;
  84.     }else{
  85.  
  86.        $pingando = shell_exec("ping -c 1 $numeroip");
  87.  
  88.        if(!preg_match("/bytes from/",$pingando)){
  89.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  90.          
  91.        }else{
  92.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  93.          
  94.        }
  95.  
  96.        
  97.     }
  98. }
  99. ?></td>
  100.     <td width="144"><?php
  101. $arrayL = fopen("templates/beez_20/ping/srv03.txt","r");
  102.  
  103. while(!feof($arrayL)){
  104.     $linha =fgets($arrayL, 999);
  105.     $nome = strtok($linha, ":");
  106.     $pingando = " ";
  107.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  108.  
  109.     if(empty($numeroip)){
  110.        echo "Final, sem ip";
  111.        exit;
  112.     }else{
  113.  
  114.        $pingando = shell_exec("ping -c 1 $numeroip");
  115.  
  116.        if(!preg_match("/bytes from/",$pingando)){
  117.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  118.          
  119.        }else{
  120.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  121.          
  122.        }
  123.  
  124.        
  125.     }
  126. }
  127. ?></td>
  128.     <td width="144"><?php
  129. $arrayL = fopen("templates/beez_20/ping/srv04.txt","r");
  130.  
  131. while(!feof($arrayL)){
  132.     $linha =fgets($arrayL, 999);
  133.     $nome = strtok($linha, ":");
  134.     $pingando = " ";
  135.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  136.  
  137.     if(empty($numeroip)){
  138.        echo "Final, sem ip";
  139.        exit;
  140.     }else{
  141.  
  142.        $pingando = shell_exec("ping -c 1 $numeroip");
  143.  
  144.        if(!preg_match("/bytes from/",$pingando)){
  145.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  146.          
  147.        }else{
  148.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  149.          
  150.        }
  151.  
  152.        
  153.     }
  154. }
  155. ?></td>
  156.     <td width="144"><?php
  157. $arrayL = fopen("templates/beez_20/ping/srv05.txt","r");
  158.  
  159. while(!feof($arrayL)){
  160.     $linha =fgets($arrayL, 999);
  161.     $nome = strtok($linha, ":");
  162.     $pingando = " ";
  163.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  164.  
  165.     if(empty($numeroip)){
  166.        echo "Final, sem ip";
  167.        exit;
  168.     }else{
  169.  
  170.        $pingando = shell_exec("ping -c 1 $numeroip");
  171.  
  172.        if(!preg_match("/bytes from/",$pingando)){
  173.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  174.          
  175.        }else{
  176.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  177.          
  178.        }
  179.  
  180.        
  181.     }
  182. }
  183. ?></td>
  184.     <td width="144"><?php
  185. $arrayL = fopen("templates/beez_20/ping/srv06.txt","r");
  186.  
  187. while(!feof($arrayL)){
  188.     $linha =fgets($arrayL, 999);
  189.     $nome = strtok($linha, ":");
  190.     $pingando = " ";
  191.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  192.  
  193.     if(empty($numeroip)){
  194.        echo "Final, sem ip";
  195.        exit;
  196.     }else{
  197.  
  198.        $pingando = shell_exec("ping -c 1 $numeroip");
  199.  
  200.        if(!preg_match("/bytes from/",$pingando)){
  201.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  202.          
  203.        }else{
  204.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  205.          
  206.        }
  207.  
  208.        
  209.     }
  210. }
  211. ?></td>
  212.   </tr>
  213.   <tr>
  214.     <td><?php
  215. $arrayL = fopen("templates/beez_20/ping/srv07.txt","r");
  216.  
  217. while(!feof($arrayL)){
  218.     $linha =fgets($arrayL, 999);
  219.     $nome = strtok($linha, ":");
  220.     $pingando = " ";
  221.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  222.  
  223.     if(empty($numeroip)){
  224.        echo "Final, sem ip";
  225.        exit;
  226.     }else{
  227.  
  228.        $pingando = shell_exec("ping -c 1 $numeroip");
  229.  
  230.        if(!preg_match("/bytes from/",$pingando)){
  231.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  232.          
  233.        }else{
  234.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  235.          
  236.        }
  237.  
  238.        
  239.     }
  240. }
  241. ?></td>
  242.     <td><?php
  243. $arrayL = fopen("templates/beez_20/ping/srv08.txt","r");
  244.  
  245. while(!feof($arrayL)){
  246.     $linha =fgets($arrayL, 999);
  247.     $nome = strtok($linha, ":");
  248.     $pingando = " ";
  249.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  250.  
  251.     if(empty($numeroip)){
  252.        echo "Final, sem ip";
  253.        exit;
  254.     }else{
  255.  
  256.        $pingando = shell_exec("ping -c 1 $numeroip");
  257.  
  258.        if(!preg_match("/bytes from/",$pingando)){
  259.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  260.          
  261.        }else{
  262.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  263.          
  264.        }
  265.  
  266.        
  267.     }
  268. }
  269. ?></td>
  270.     <td><?php
  271. $arrayL = fopen("templates/beez_20/ping/srv09.txt","r");
  272.  
  273. while(!feof($arrayL)){
  274.     $linha =fgets($arrayL, 999);
  275.     $nome = strtok($linha, ":");
  276.     $pingando = " ";
  277.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  278.  
  279.     if(empty($numeroip)){
  280.        echo "Final, sem ip";
  281.        exit;
  282.     }else{
  283.  
  284.        $pingando = shell_exec("ping -c 1 $numeroip");
  285.  
  286.        if(!preg_match("/bytes from/",$pingando)){
  287.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  288.          
  289.        }else{
  290.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  291.          
  292.        }
  293.  
  294.        
  295.     }
  296. }
  297. ?></td>
  298.     <td><?php
  299. $arrayL = fopen("templates/beez_20/ping/srv10.txt","r");
  300.  
  301. while(!feof($arrayL)){
  302.     $linha =fgets($arrayL, 999);
  303.     $nome = strtok($linha, ":");
  304.     $pingando = " ";
  305.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  306.  
  307.     if(empty($numeroip)){
  308.        echo "Final, sem ip";
  309.        exit;
  310.     }else{
  311.  
  312.        $pingando = shell_exec("ping -c 1 $numeroip");
  313.  
  314.        if(!preg_match("/bytes from/",$pingando)){
  315.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  316.          
  317.        }else{
  318.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  319.          
  320.        }
  321.  
  322.        
  323.     }
  324. }
  325. ?></td>
  326.     <td><?php
  327. $arrayL = fopen("templates/beez_20/ping/srv11.txt","r");
  328.  
  329. while(!feof($arrayL)){
  330.     $linha =fgets($arrayL, 999);
  331.     $nome = strtok($linha, ":");
  332.     $pingando = " ";
  333.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  334.  
  335.     if(empty($numeroip)){
  336.        echo "Final, sem ip";
  337.        exit;
  338.     }else{
  339.  
  340.        $pingando = shell_exec("ping -c 1 $numeroip");
  341.  
  342.        if(!preg_match("/bytes from/",$pingando)){
  343.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  344.          
  345.        }else{
  346.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  347.          
  348.        }
  349.  
  350.        
  351.     }
  352. }
  353. ?></td>
  354.     <td><?php
  355. $arrayL = fopen("templates/beez_20/ping/srv12.txt","r");
  356.  
  357. while(!feof($arrayL)){
  358.     $linha =fgets($arrayL, 999);
  359.     $nome = strtok($linha, ":");
  360.     $pingando = " ";
  361.     $numeroip = strtr(strrchr($linha,":"), ":", " ");
  362.  
  363.     if(empty($numeroip)){
  364.        echo "Final, sem ip";
  365.        exit;
  366.     }else{
  367.  
  368.        $pingando = shell_exec("ping -c 1 $numeroip");
  369.  
  370.        if(!preg_match("/bytes from/",$pingando)){
  371.          echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  372.          
  373.        }else{
  374.          echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  375.          
  376.        }
  377.  
  378.        
  379.     }
  380. }
  381.  
  382. ?>
  383. </td>
  384.   </tr>
  385. </table>
  386. </body>
  387. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement