<?php
/*
* WebCompiler Header
*
* Copyright (C) 2004-2005 David "BAILOPAN" Anderson and the AMX Mod X Development Team
* Copyright (C) 2005-2010 NiLuJe <niluje@ak-team.com>
*
* $Id: header.inc.php 6077 2010-04-20 22:26:49Z NiLuJe $
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*
*/

/* Make the W3C happy */
header( "Vary: Accept" );	// Indicate content negotiation depends on the "accept" header
$accept_xml = ! empty( $_SERVER['HTTP_ACCEPT'] ) && strpos( $_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml' ) !== false;
if ( $accept_xml )
{
	header( "Content-Type: application/xhtml+xml; charset=utf-8" );
	echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
	echo '<?xml-stylesheet type="text/css" href="webcomp_style.css" media="all" ?>'."\n";
}
else
{
	header( "Content-Type: text/html; charset=utf-8" );
}

echo <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$LANG">
<head>
	<title>Webcompiler AMX(x) </title>

EOF;
if ( $accept_xml )
{
	echo "\t".'<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />'."\n";
}
else
{
	echo "\t".'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
}
echo <<<EOF
	<meta name="author" content="BAILOPAN, NiLuJe, DanRaZor, j0k3r_n0ir" />
	<meta name="description" content="Multilingual AMX Mod &amp; AMX Mod X Webcompiler" />
	<meta name="keywords" content="AMX Mod, AMX Mod X, Small, Pawn, sc, amxx, amx, amxxsc, amxxpc, compile, compiler, webcompiler, webcompile, linux, amxmod, amxmodx" />
	<meta name="robots" content="follow,index,all" />
	<meta name="revisit-after" content="15 days" />
	<meta http-equiv="reply-to" content="niluje@ak-team.com" />
	<link rel="icon" href="niluje.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="niluje.ico" type="image/x-icon" />

EOF;
if ( ! $accept_xml )
{
	echo "\t".'<link rel="stylesheet" href="webcomp_style.css" type="text/css" media="all"/>'."\n";
}
echo <<<EOF
	<script src="ryofade.js" type="text/javascript"></script>
</head>
<body>

EOF;

?>