<?php

/*
Name: magicbox.php
Author: NicoSoft
Création: 15/08/01
MAJ      : 23/09/01
*/
// include "include/theme.inc.php";
extract($themeset, EXTR_OVERWRITE);

if (!isset($largeur))
        $largeur="100%";

if ($boxborder == "")
        $boxborder = 0;
echo "\n<!-- // magicbox : module $module // -->\n";
echo "<!-- // (titre: $titre) // -->\n\n";
// ************* header ********************
echo "<table width='$largeur' border='$boxborder' class='";
if ($boxborder != 0)
        echo "bordure'>\n";
else
        echo "magicbox'>\n";

echo "  <tr>\n    <td align='center'";

//if (isset($headcolor) && $headcolor != "")
        //echo " bgcolor='#".$headcolor;
echo " class='";
if (isset($headclass))
        echo $headclass;
else
        echo "head";
echo "'>\n";

echo "$headstartcode";
if (isset($headlien))
        echo "<a href='$headlien' title='$headtitle'>$titre</a>";
else
        echo "$titre";
echo "$headendcode\n";
// ************** body *******************
echo "</td>\n</tr>\n<tr>\n<td class='magicbox'>";
echo "<div class='center'>\n<table border='0' width='90%' class='";
if (isset($bodyclass))
        echo $bodyclass;
else
        echo "magicbox";
echo "'>\n<tr>\n<td>";
echo "$bodystartcode";
include "modules/".$module.".php";
echo "$bodyendcode";
echo "</td>\n</tr>\n</table>\n</div>\n</td>\n</tr>";

if (isset($footerbox) && ($footerbox == 1))
{
        echo "<tr><td align='center'";
        if (isset($headcolor) && $headcolor != "")
                //echo " bgcolor='#".$headcolor;
        echo " class='";
        if (isset($headclass))
                echo $headclass;
        else
                echo "head";
        echo "'>\n";

        echo "$footerstartcode";
        if (isset($footerlien))
	{
                echo "<a href='$footerlien' title='$footertitle' ";
		if (isset($footerlientype) && $footerlientype == "ext")
			echo " target='blank'";

		echo ">$footerboxtext</a>\n";
	}
        else
                echo "$footerboxtext";
        echo "$footerendcode\n";
        echo " </td>\n</tr>\n";
}

echo "</table>\n<br />\n";
echo "<!-- // fin $module // -->\n\n";
unset($titre);
unset($headlien);
unset($headcolor);
unset($headstartcode);
unset($headendcode);
unset($bodycolor);
unset($bodyclass);
unset($bodystartcode);
unset($bodyendcode);
unset($headstartcode);
unset($headendcode);
unset($module);
unset($largeur);
unset($footerstartcode);
unset($footerendcode);
unset($footerbox);
unset($footerboxtext);
unset($footerlien);

?>