home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / status.php < prev    next >
Encoding:
PHP Script  |  2004-04-13  |  4.6 KB  |  177 lines

  1. <html>
  2. <head>
  3. <meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang">
  4. <link href="xampp.css" rel="stylesheet" type="text/css">
  5. </head>
  6.  
  7. <body>
  8. <? include("lang/".file_get_contents("lang.tmp").".php"); ?>
  9.  <p>
  10.  
  11. <h1><?=$TEXT['status-head']?></h1>
  12.  
  13. <?=$TEXT['status-text1']?><p>
  14.  
  15. <?php
  16.     
  17.     $curdir = getcwd();
  18.     list ($partwampp, $directorwampp) = spliti ('\\\htdocs\\\xampp', $curdir);
  19.  
  20.  
  21.     $i=0;
  22.  
  23.     $up="";
  24.  
  25.        if($GLOBALS['SERVER_PORT']==443)
  26.                 $prot="https";
  27.         else
  28.                 $prot="http";
  29.  
  30.     if($PHP_AUTH_USER)
  31.         $up="$PHP_AUTH_USER:$PHP_AUTH_PW@";
  32.     $b="$prot://$up".$GLOBALS['SERVER_NAME'];
  33.     if($GLOBALS['SERVER_PORT']!=80)
  34.     {
  35.         $b="$prot://$up".$GLOBALS['SERVER_NAME'].".:".$GLOBALS['SERVER_PORT'];
  36.     }
  37.     function line($text,$status,$link="")
  38.     {
  39.         global $i,$TEXT;
  40.  
  41.         if($i>0)
  42.         {
  43.             echo "<tr valign=bottom>";
  44.             echo "<td bgcolor=#ffffff background='img/strichel.gif' colspan=5><img src=img/blank.gif width=1 height=1></td>";
  45.             echo "</tr>";
  46.         }
  47.         echo "<tr bgcolor=#ffffff>";
  48.         echo "<td bgcolor=#ffffff><img src=img/blank.gif width=1 height=20></td>";
  49.         echo "<td class=tabval>";
  50.         echo "$text";
  51.         echo "</td>";
  52.         if(trim($status)=="OK"){ 
  53.             echo "<td><span class=green> ".$TEXT['status-ok']." </span></td>";
  54.             echo "<td></td>";
  55.             $i++;
  56.          }
  57.         else 
  58.         {
  59.             echo "<td><span class=red> ".$TEXT['status-nok']." </span></td>";
  60.             if($link=="")
  61.                 echo "<td></td>";
  62.             else
  63.                 echo "<td><a target=faq href='$link'><span style='font-size: 10pt'>".$TEXT['status-lookfaq']."</span></a></td>";
  64.         }
  65.         echo "<td bgcolor=#ffffff><img src=img/blank.gif width=1 height=1></td>";
  66.         echo "</tr>";
  67.         $i++;
  68.     }
  69.  
  70.  
  71.     $a=@file("$b/xampp/php.php");
  72.     $php=$a[0];
  73.     $a=@file("$b/xampp/mysql.php");
  74.     $mysql=$a[0];
  75.     $a=@file("$b/cgi-bin/cgi.cgi");
  76.     $cgi=$a[0];
  77.     $a=@file("$b/xampp/ssi.shtml");
  78.     $ssi=$a[0];
  79.     
  80.  
  81.     
  82.  
  83.         $host = "127.0.0.1";
  84.         $timeout= 1;
  85.     
  86.         
  87.  
  88.  
  89.     if (($handle = @fsockopen($host, 443, $errno, $errstr, $timeout)) == false)
  90.         $ssl="NOK";
  91.         else
  92.         $ssl="OK";
  93.         @fclose($handle);
  94.     
  95.  
  96.     echo '<table border=0 cellpadding=0 cellspacing=0>';
  97.     echo "<tr valign=top>";
  98.     echo "<td bgcolor=#fb7922 valign=top><img src=img/blank.gif width=10 height=0></td>";
  99.     echo "<td bgcolor=#fb7922 class=tabhead><img src=img/blank.gif width=250 height=6><br>".$TEXT['status-tab1']."</td>";
  100.     echo "<td bgcolor=#fb7922 class=tabhead><img src=img/blank.gif width=100 height=6><br>".$TEXT['status-tab2']."</td>";
  101.     echo "<td bgcolor=#fb7922 class=tabhead><img src=img/blank.gif width=100 height=6><br>".$TEXT['status-tab3']."</td>";
  102.     echo "<td bgcolor=#fb7922 valign=top><br><img src=img/blank.gif width=1 height=10></td>";
  103.     echo "</tr>";
  104.     line($TEXT['status-mysql'],$mysql);
  105.     line($TEXT['status-php'],$php);
  106.     line($TEXT['status-ssl'],$ssl);
  107.     line($TEXT['status-cgi'],$cgi);
  108.     line($TEXT['status-ssi'],$ssi);
  109.     
  110.     
  111.     
  112.     if ((file_exists("$partwampp\htdocs\python\default.py")) && (file_exists("$partwampp\apache\conf\python.conf")))
  113.     { $a=@file("$b/python/default.py"); $python=$a[0]; line($TEXT['status-python'],$python);}
  114.     
  115.     if ((file_exists("$partwampp\htdocs\modperl\perl.pl")) && (file_exists("$partwampp\apache\conf\perl.conf")))
  116.     { $a=@file("$b/modperl/perl.pl"); $perl=$a[0]; line($TEXT['status-perl'],$perl);}
  117.     
  118.     if (file_exists("$partwampp\MercuryMail\MERCURY.INI"))
  119.     { 
  120.     if (($handle = @fsockopen($host, 110, $errno, $errstr, $timeout)) == false)
  121.         $smtp="NOK";
  122.         else
  123.         $smtp="OK";
  124.         @fclose($handle);
  125.         line($TEXT['status-smtp'],$smtp);
  126.     }
  127.     if (file_exists("$partwampp\FileZillaFTP\FzGSS.dll"))
  128.     {
  129.     if (($handle = @fsockopen($host, 21, $errno, $errstr, $timeout)) == false)
  130.         $ftp="NOK";
  131.         else
  132.         $ftp="OK";
  133.         @fclose($handle);    
  134.         line($TEXT['status-ftp'],$ftp);
  135.     }
  136.  
  137.     if (file_exists("$partwampp\tomcat\bin\tomcat.exe"))
  138.     {
  139.     if (($handle = @fsockopen($host, 8080, $errno, $errstr, $timeout)) == false)
  140.         $tomcat="NOK";
  141.         else
  142.         $tomcat="OK";
  143.         @fclose($handle);
  144.         line($TEXT['status-tomcat'],$tomcat);
  145.     }
  146.     
  147. if (file_exists("$partwampp\PosadisDNS\posadis.exe"))
  148.     {
  149.     if (($handle = @fsockopen($host, 53, $errno, $errstr, $timeout)) == false)
  150.         $named="NOK";
  151.         else
  152.         $named="OK";
  153.         @fclose($handle);
  154.         line($TEXT['status-named'],$named);
  155.     }
  156.     // line($TEXT['status-oci8'],$oci8,$TEXT['status-oci8-url']);
  157.  
  158.     echo "<tr valign=bottom>";
  159.     echo "<td bgcolor=#fb7922></td>";
  160.     echo "<td bgcolor=#fb7922 colspan=3><img src=img/blank.gif width=1 height=8></td>";
  161.     echo "<td bgcolor=#fb7922></td>";
  162.     echo "</tr>";
  163.     echo "</table>";
  164.  
  165.     echo "<p>";
  166.  
  167.  
  168. ?>
  169. <?=$TEXT['status-text2']?><p>
  170.  
  171. <? if ($source=="in")
  172.         { include("code.php"); $beispiel = $SCRIPT_FILENAME; pagecode($beispiel);} 
  173.         else
  174.         { print("<p><br><br><h2><U><a href=\"$PHP_SELF?source=in\">".$TEXT['srccode-in']."</a></U></h2>");} ?>
  175. </body>
  176. </html>
  177.