tma/modules/magicbox.php

118 lines
2.5 KiB
PHP
Raw Permalink Normal View History

2020-11-29 11:25:34 +01:00
<?php
/*
Name: magicbox.php
Author: NicoSoft
Création: 15/08/01
MAJ : 23/09/01
*/
// include "include/theme.inc.php";
extract($themeset, EXTR_OVERWRITE);
2024-02-12 20:46:07 +01:00
if (!isset($largeur)) {
$largeur = "100%";
}
2020-11-29 11:25:34 +01:00
2024-02-12 20:46:07 +01:00
if ($boxborder == "") {
$boxborder = 0;
}
2020-11-29 11:25:34 +01:00
echo "\n<!-- // magicbox : module $module // -->\n";
echo "<!-- // (titre: $titre) // -->\n\n";
// ************* header ********************
echo "<table width='$largeur' border='$boxborder' class='";
2024-02-12 20:46:07 +01:00
if ($boxborder != 0) {
echo "bordure'>\n";
} else {
echo "magicbox'>\n";
}
2020-11-29 11:25:34 +01:00
echo " <tr>\n <td align='center'";
//if (isset($headcolor) && $headcolor != "")
2024-02-12 20:46:07 +01:00
//echo " bgcolor='#".$headcolor;
2020-11-29 11:25:34 +01:00
echo " class='";
2024-02-12 20:46:07 +01:00
if (isset($headclass)) {
echo $headclass;
} else {
echo "head";
}
2020-11-29 11:25:34 +01:00
echo "'>\n";
2024-11-03 21:50:57 +01:00
if (isset($headstartcode)) {
echo "$headstartcode";
}
2024-02-12 20:46:07 +01:00
if (isset($headlien)) {
echo "<a href='$headlien' title='$headtitle'>$titre</a>";
} else {
echo "$titre";
}
2024-11-03 21:50:57 +01:00
if (isset($headendcode)) {
echo "$headendcode\n";
}
2020-11-29 11:25:34 +01:00
// ************** body *******************
echo "</td>\n</tr>\n<tr>\n<td class='magicbox'>";
echo "<div class='center'>\n<table border='0' width='90%' class='";
2024-02-12 20:46:07 +01:00
if (isset($bodyclass)) {
echo $bodyclass;
} else {
echo "magicbox";
}
2020-11-29 11:25:34 +01:00
echo "'>\n<tr>\n<td>";
2024-11-03 21:50:57 +01:00
if (isset($bodystartcode)) {
echo "$bodystartcode";
}
2020-11-29 11:25:34 +01:00
include "modules/".$module.".php";
2024-11-03 21:50:57 +01:00
if (isset($bodyencode)) {
echo "$bodyencode";
}
2020-11-29 11:25:34 +01:00
echo "</td>\n</tr>\n</table>\n</div>\n</td>\n</tr>";
2024-02-12 20:46:07 +01:00
if (isset($footerbox) && ($footerbox == 1)) {
echo "<tr><td align='center'";
if (isset($headcolor) && $headcolor != "") {
//echo " bgcolor='#".$headcolor;
2020-11-29 11:25:34 +01:00
echo " class='";
2024-02-12 20:46:07 +01:00
}
if (isset($headclass)) {
echo $headclass;
} else {
echo "head";
}
echo "'>\n";
2020-11-29 11:25:34 +01:00
2024-02-12 20:46:07 +01:00
echo "$footerstartcode";
if (isset($footerlien)) {
echo "<a href='$footerlien' title='$footertitle' ";
if (isset($footerlientype) && $footerlientype == "ext") {
echo " target='blank'";
}
2020-11-29 11:25:34 +01:00
2024-02-12 20:46:07 +01:00
echo ">$footerboxtext</a>\n";
} else {
echo "$footerboxtext";
}
echo "$footerendcode\n";
echo " </td>\n</tr>\n";
2020-11-29 11:25:34 +01:00
}
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);