Advertisement
Papadopolis

Untitled

Mar 26th, 2013
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. <?php    
  42. $arquivos = range(1, 12);
  43. foreach($arquivos as $arquivo) {
  44.     echo '<td width="144"><span class="content">';
  45.     $arquivo = sprintf("%02d", $arquivo);
  46.     $arrayL = explode(file_get_contents("templates/beez_20/ping/srv{$arquivo}.txt"), "\n");
  47.      
  48.     foreach($arrayL as $servers) {
  49.         list($nome, $numeroip) = explode($servers, ":");
  50.  
  51.         if($numeroip !== null)
  52.            echo "Final, sem ip";
  53.         else
  54.             if(!fsockopen($numeroip, 80, $errono, $errstr, 3))
  55.                 echo "<font color=#FF0000>$nome</font>"."<img src=templates/beez_20/ping/imgs/offline.png align=right>"."<br>";
  56.             else
  57.                 echo "<font color=#00CC00>$nome</font>"."<img src=templates/beez_20/ping/imgs/online.png align=right>"."<br>";
  58.     }
  59.  
  60.     echo '</span></td>';
  61. }
  62. ?>
  63.   </tr>
  64. </table>
  65. </body>
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement