damo1995

MCscript

May 18th, 2011
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 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.  
  4. <?php
  5. include('core/init.inc.php');
  6.  
  7. ?>
  8.  
  9. <head>
  10. <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  11. <title>Untitled 1</title>
  12. <style type="text/css">
  13.     table       { width 600px; border-collapse: collapse; }
  14.     td, th      { padding: 4px; border: solid 1px #444; }
  15.     .online     { background: #090 }
  16.     .offline    { background: #900 }
  17. </style>
  18.  
  19. </head>
  20.  
  21. <body>
  22.     <table>
  23.         <thead>
  24.             <tr>
  25.                 <th>server</th>
  26.                 <th>status</th>
  27.             </tr>
  28.         </thead>
  29.         <tbody>
  30.         <?php
  31.        
  32.         foreach ($servers as $server){
  33.         $online = server_online($server[0], $server[1]);
  34.         ?>
  35.         <tr>
  36.         <td><?php echo $server[0], ':', $server[1]; ?></td>
  37.             <td class=<?php echo($online) ? 'online' : 'offline' ?>> &gt;<?php echo ($online) ? 'Online' : 'Offline'; ?></td>
  38.         </tr>
  39.         </tbody>
  40.     </table>
  41.  
  42. </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment