<?

$MangosVerison = '0.6 beta';
$MangosRevision = '3155'; 
$SilverDBVersion = '0.6.1';
$SilverDBChangeset = '113'; 

function ShowOnlinePlayerCount()
{
 global $WowEmuDirectory;
  // World of Warcraft user stat
  //$Content = @file_get_contents('http://wow.zdechov.net:8080/stat.xml');
  $Content = file_get_contents('http://localhost/mangos/inc/stat.xml');
  if(strlen($Content) > 0)
  {
    $PlayerCount = substr_count($Content, '<player>');
    $P = 'hráčů';
    if($PlayerCount == 1) $P = 'hráč';
    else if(($PlayerCount >= 2) and ($PlayerCount <= 4)) $P = 'hráči';
    echo($PlayerCount.' '.$P);
  } else echo('OFFLINE');
}

function CheckPortStatus($Ip, $Port)
{
  error_reporting(0);
	if($Fp1 = fsockopen($Ip, $Port, $ERROR_NO, $ERROR_STR,(float)0.5))
	{
	  fclose($Fp1);
	  return true;
	}
	else
	{
	  //echo($ERROR_NO.','.$ERROR_STR);
	  //die();
		return false;
	}
}

function ShowHeader()
{
  echo('
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
  <META http-equiv="Content-Language" content="cs">
  <META http-equiv="Content-Type" content="text/html; charset=windows-1250">
  <META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
  <link rel="SHORTCUT ICON" href="/images/favicon.ico">
  <TITLE>WoW server Heroes of Fantasy</TITLE>
  <style type="text/css" media="screen">@import url(/css/style.css);</style>
</HEAD>  


<BODY text="#cccccc">


<TABLE align="center" class="TableHlavni" border="0">
  <TR>
    <TD>
      <p class="pHlavni">
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
    ');
    
}


function ShowFooter()
{
  echo('
    </td>
    <TD class="TdSloupec" width="240" valign="top" align="center" >
<div class="Nadpis">Heroes of Fantasy</div>
 <div class="DivText">
');

 ShowOnlinePlayerCount();
 


echo('<br>');

include('panel.php');

echo('<TABLE width="220" border="1" align="center">
<TR><TD width="15%" valign="top">
<P class="pAktuality">
<A class="aAktuality" href="/VsechnyA.php"><i>Aktuality:</i></a>
');

include('aktuality.php');

echo('

<A HREF="http://www.toplist.cz/" target="_blank"><IMG alt="pocitadlo"
SRC="http://toplist.cz/count.asp?logo=mc&ID=324802"
border="0" width="1" height="1"></A>


</p>
</td>
</tr>
</table>

    </div>
    </TD>
  </TR>
  <tr>
    <td colspan="2">
      <DIV class="DivPaticka">
       <I class="Paticka"> 
   <A href="/administrace/" class="Paticka">#</A> 
      | Web designer: maron | e-mail: maron2@centrum.cz |  Počet přístupů: <A HREF="http://counter.cnw.cz/" TARGET=_parent>
      <IMG SRC="http://counter.cnw.cz/monika.cgi?wowzdechov&amp;5&amp;000000&amp;FFFFFF&amp;on" BORDER=0 ALT="CNW:Counter"></A><SCRIPT type="JavaScript">
      <!--
      document.write("<A href=\"http://counter.cnw.cz\" target=\"_parent\" >
      <IMG src=\"http://counter.cnw.cz/trackit.cgi?wowzdechov&amp;t3&amp;" + escape(top.document.referrer) + "\" alt=\"CNW:Tracker\" border=\"0\" width=\"0\" height=\"0\"><\/A>");
      // -->
      </SCRIPT></I>  
 
 </DIV>
    </td>
  </tr>
</TABLE>
</BODY>
</HTML>
');
}


?>
