<?php

$bgcolor1 = "#d1f3ff"; // blue Clair
$bgcolor2 = "#7fd2fe"; // blue moyen
$bgcolor3 = "#efefef";
$bgcolor4 = "#FF7F00";
$bgcolor0 = "#0957c6"; // bleu foncé
$textcolor1 = "#ffffff";
$textcolor2 = "#0957c6";

global $name;
if ($name == "News") { if (is_file("themes/MaX_Kmax/news.php")) {include_once("themes/MaX_Kmax/news.php");}}

function themeheader() {

 global $site_logo, $sitename, $anonymous,$slogan, $cookie, $anonymous, $banners, $cacheblocsl, $cacheblocsr, $name;
$username = $cookie[1];
if ($username == "") $username = $anonymous;
echo "<body><a name='max_top'></a>";

if ( !empty( $config_banners ) ) {
	$sql = "SELECT `bid` FROM `".TABLE_NSNBA_BANNERS."` WHERE `active`='1'";
	if ( !($bresult = $GLOBALS['db']->sql_query($sql)) )
	{ query_die(GENERAL_ERROR, 'Could not obtain _nsnba_banners', '', __LINE__, __FILE__, $sql);}
$numrows = $GLOBALS['db']->sql_numrows($bresult);
if($numrows > 0) {
	if (is_file("kernel/babanners1.php")) {
		include_once("kernel/babanners1.php");
	}
echo "<table width='99%' cellpadding='0' cellspacing='0' border='0' align='center'><tr valign='top'><td align='center'>"
."$babanners1"
. "</td></tr></table>";
}

}

echo "<table  width=\"99%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\" ><td align=\"left\">
<div id=\"menu\">";
if (defined('ADMIN_ALLOW')) {
global $admin_file;
echo "<a href='$admin_file.php'>"._ADMIN."</a> ";
}

echo "<a href=\"index.php\">"._HOME."</a>
<a href=\"plan.php\">"._MAPWEBSITE."</a>";
    if ($username == "Anonymous") {
	echo " <a href=\"modules.php?name=Your_Account\">"._LOGIN."</a> "
	    ."&nbsp;<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a> ";
    } else {
	echo " <a href=\"modules.php?name=Your_Account\"><b>"._YOURACCOUNT." $username !</b></a> ";
    }
echo "<a href=\"modules.php?name=Topics\">"._TOPICS."</a>
 &nbsp;<a href=\"modules.php?name=Forums\">"._FORUMS."</a>
 <a href=\"modules.php?name=Downloads\">"._DOWNLOADS."</a>
 <a href=\"modules.php?name=Search\">"._SEARCH."</a>
 <a href=\"modules.php?name=Feedback\">"._FEEDBACK."</a></div>
</td></tr></table>";

if (@$_COOKIE['blo']['0'] == "1"){
$cacheblocsl = "<a href=\"index.php?g&amp;cote=g&amp;actif=\"><img src=\"images/blocks/droite.png\" border=\"0\" alt=\""._OPENPANEL."\" title=\""._OPENPANEL."\"></a>";
} else {
$cacheblocsl ="<a href=\"index.php?g&amp;cote=g&amp;actif=1\"><img src=\"images/blocks/gauche.png\" border=\"0\" alt=\""._CLOSEPANEL."\" title=\""._CLOSEPANEL."\"></a>";
}

if (@$_COOKIE['blo']['1'] == "1"){
$cacheblocsr = "<a href=\"index.php?g&amp;cote=d&amp;actif=\"><img src=\"images/blocks/gauche.png\" border=\"0\" alt=\""._OPENPANEL."\" title=\""._OPENPANEL."\"></a>";
} else {
$cacheblocsr = "<a href=\"index.php?g&amp;cote=d&amp;actif=1\"><img src=\"images/blocks/droite.png\" border=\"0\" alt=\""._CLOSEPANEL."\" title=\""._CLOSEPANEL."\"></a>";
}
    $public_msg = public_message();
    $tmpl_file = "themes/MaX_Kmax/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval("$thefile");
    print $r_file;

if (@$_COOKIE['blo']['0'] == "") {
    blocks("left");
    }
max_template_block('left_center', '', '');
}

function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
    $navbarfooter = "&nbsp; <a href=\"index.php\">"._HOME."</a>
&nbsp;&#8226;&nbsp;<a href=\"plan.php\">"._MAPWEBSITE."</a>
&nbsp;&#8226;&nbsp;<a href=\"modules.php?name=Search\">"._SEARCH."</a>
&nbsp;&#8226;&nbsp;<a href=\"modules.php?name=Feedback\">"._FEEDBACK."</a>";

        max_template_block('center_right', '', '');

if (@$_COOKIE['blo']['1'] == "") {
	blocks("right");
}

    $tmpl_file = "themes/MaX_Kmax/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval("$thefile");
    print $r_file;
    $footer_message = footmsg();
   }