<?php
#
# HLstatsX - Real-time player and clan rankings and statistics for Half-Life 2
# http://www.hlstatsx.com/
# Copyright (C) 2005-2007 Tobias Oetzel (Tobi@hlstatsx.com)
#
# HlstatsX is an enhanced version of HLstats made by Simon Garner
# HLstats - Real-time player and clan rankings and statistics for Half-Life
# http://sourceforge.net/projects/hlstats/
# Copyright (C) 2001  Simon Garner
#             
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
	
	
	
	/*
	 * HLstatsX Page Header This file will be inserted at the top of every page
	 * generated by HLstats. This file can contain PHP code.
	 */
     
  global $game;   
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <link rel="stylesheet" type="text/css" href="hlstats.css">
  <link rel="SHORTCUT ICON" href="favicon.ico">

	<title><?php
    echo $g_options["sitename"]; 
		foreach ($title as $t)
		{
			echo " - $t";
		}
	?></title>
 
    
</head>

<?php
  $margin_style = "margin-top:".$g_options["body_topmargin"]."px;margin-right:".$g_options["body_leftmargin"]."px;margin-bottom:".$g_options["body_topmargin"]."px;margin-left:".$g_options["body_leftmargin"]."px";
?>

<body bgcolor="<?php echo $g_options["body_bgcolor"]; ?>" background="<?php echo $g_options["body_background"]; ?>" text="<?php echo $g_options["body_text"]; ?>" link="<?php echo $g_options["body_link"]; ?>" vlink="<?php echo $g_options["body_vlink"]; ?>"   alink="<?php echo $g_options["body_alink"]; ?>" style="<?php echo $margin_style?>"> 
    
<table width="100%" align="center" border=0 cellspacing=0 cellpadding=0>


<tr valign="top">
	<td width="100%">
		<table width="100%" border=0 cellspacing=0 cellpadding=0 style="border:1px solid #A8B090;">
		<tr valign="bottom">
			<td width=77 style="background-image:url(<?php echo $g_options["imgdir"]; ?>/title-background.gif);"><a href="<?php echo $g_options["scripturl"]; ?>"><img src="<?php echo $g_options["imgdir"]; ?>/title.gif" width=143 height=40 alt="HLstatsX" title="HLstatsX" border=0></a></td>
	    <td width="100%" align="right" style="background-image:url(<?php echo $g_options["imgdir"] ?>/title-background.gif);"><a href="<?php echo $g_options["scripturl"] ?>"><img src="<?php echo $g_options["imgdir"] ?>/title-contents.gif" alt="Contents" border=0 hspace=2></a><a href="<?php echo $g_options["scripturl"] ?>?mode=search"><img src="<?php echo $g_options["imgdir"] ?>/title-search.gif" alt="Search" border=0 hspace=2></a><a href="<?php echo $g_options["scripturl"] ?>?mode=help"><img src="<?php echo $g_options["imgdir"] ?>/title-help.gif" alt="Help" border=0 hspace=2></a><img src="<?php echo $g_options["imgdir"] ?>/spacer.gif" width=6 height=1 border=0 alt="spacer.gif"></td>
		</tr>
		</table> </td>
</tr>
<tr valign="top">
	<td width="100%"><img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width="1" height="1" border="0" alt="spacer.gif"></td>
</tr>
<tr valign="top">
	<td width="100%">

		<table width="100%" border=0 cellspacing=0 cellpadding=4 bgcolor="<?php echo $g_options["location_bgcolor"]; ?>">

		<tr valign="middle">
			<td width="100%"><?php echo $g_options["font_normal"]; ?><font color="<?php echo $g_options["location_text"]; ?>">&nbsp;&nbsp;&nbsp;<?php
        if ($g_options["sitename"] && $g_options["siteurl"])
		      echo "<a href=\"" . $g_options["siteurl"] . "\" style=\"color: " . $g_options["location_link"] . "\">" . $g_options["sitename"] . "</a>: ";
     	  echo "<a href=\"http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "\" style=\"color: " . $g_options["location_link"] . "\">HLstatsX</a>";


    	$i=0;
	    foreach ($location as $l=>$url)
	    {
		    $url = ereg_replace("%s", $g_options["scripturl"], $url);
		    echo ": ";
    		if ($url) {
			    echo "<a href=\"$url\" style=\"color: " . $g_options["location_link"] . "\">$l</a>";
		    } else {
			    echo "<b>$l</b>";
		    }
    		$i++;
	    }
    	echo "</font>";
	    echo $g_options["fontend_normal"];     
?></td>
		</tr>

		</table></td>
</tr>

</table>

      
<br>

<!--
<table width="100%" align="center" border=0 cellspacing=0 cellpadding=0>

<tr valign="top">
	<td width="100%"><?php
		echo $g_options["font_title"];
		
		end($title);
		echo current($title);
		
		echo $g_options["fontend_title"];
	?></td>
</tr>

</table>
<p>
-->

<?php
  if ($game != "")  {
?>    

<table width="100%" align="center" border=0 cellspacing=0 cellpadding=0>
<tr>
    <td><?php echo $g_options["font_normal"]; ?>&nbsp;<img src="<?php echo $g_options["imgdir"]; ?>/downarrow.gif" width=9 height=6 border=0 align="middle" alt="downarrow.gif"><b>&nbsp;Sections</b><?php echo $g_options["fontend_normal"];?><p>
        
        <table width="95%" align="center" border=0 cellspacing=0 cellpadding=4>
        <tr valign="top">
        <td nowrap><?php echo $g_options["font_normal"]; ?>
        <a href="<?php echo $g_options["scripturl"]  . "?game=$game";  ?>"><img src="<?php echo $g_options["imgdir"]; ?>/server.gif" width=16 height=16 hspace=4 border=0 align="middle" alt="server.gif"><b>Server Overview</b></a>
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=1 height=5 border=0 alt="spacer.gif">
        <a href="<?php echo $g_options["scripturl"] . "?mode=players&amp;game=$game"; ?>"><img src="<?php echo $g_options["imgdir"]; ?>/player.gif" width=16 height=16 hspace=4 border=0 align="middle" alt="player.gif"><b>Player Rankings</b></a>
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=1 height=5 border=0 alt="spacer.gif">
        <a href="<?php echo $g_options["scripturl"] . "?mode=clans&amp;game=$game"; ?>"><img src="<?php echo $g_options["imgdir"]; ?>/clan.gif" width=16 height=16 hspace=4 border=0 align="middle" alt="clan.gif"><b>Clan Rankings</b></a>
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=1 height=5 border=0 alt=spacer.gif>
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=16 height=16 hspace=4 border=0 align="middle" alt="spacer.gif"><a href="<?php echo $g_options["scripturl"] . "?mode=weapons&amp;game=$game"; ?>"><b>Weapon Statistics</b></a>
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=1 height=5 border=0 alt=spacer.gif>
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=16 height=16 hspace=4 border=0 align="middle" alt="spacer.gif"><a href="<?php echo $g_options["scripturl"] . "?mode=actions&amp;game=$game"; ?>"><b>Action Statistics</b></a>
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=1 height=5 border=0 alt="spacer.gif">
        <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=16 height=16 hspace=4 border=0 align="middle" alt="spacer.gif"><a href="<?php echo $g_options["scripturl"] . "?mode=maps&amp;game=$game"; ?>"><b>Map Statistics</b></a>
        <?php if (SHOW_VAC_BANS == 1) { ?>
          <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=1 height=5 border=0 alt="spacer.gif">
          <img src="<?php echo $g_options["imgdir"]; ?>/spacer.gif" width=16 height=16 hspace=4 border=0 align="middle" alt="spacer.gif"><a href="<?php echo $g_options["scripturl"] . "?mode=cheaters&amp;game=$game"; ?>"><b>VAC Cheater List</b></a>
        <?php } ?>  
        <?php echo $g_options["fontend_normal"]; ?></td>
        </tr>
        </table></td>
</tr>

</table><p>
<?php
  }
?>  


