n/oldblog
Archived
1
0
Fork 0
This repository has been archived on 2024-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
oldblog/modules/magicbox.php
2023-04-30 21:50:11 +02:00

148 lines
3.3 KiB
PHP

<?php
/*
Name: magicbox.php
Author: NicoSoft
Création: 15/08/01
MAJ : 25/09/04
*/
include_once "themes/default/theme.php";
include_once "include/lang.inc.php";
extract($themeset, EXTR_OVERWRITE);
if ($_GET["module"] != "")
$themeset["module"] = $_GET["module"];
if ($_GET["titre"] != "")
$titre = stripcslashes($_GET["titre"]);
if ($_GET["bodyclass"] != "")
$bodyclass = $_GET["bodyclass"];
if ($module == "")
die();
if (!isset($largeur))
$largeur="100%";
if (isset($sitedata))
{
include_once "include/rssparser.inc.php";
$sitedata = get_sitedata($source);
extract($sitedata);
$headtitle=$title_site;
if (strlen($title_site) > 30)
$title_site = substr($title_site, 0, 30)."...";
$titre = "<a href=\"".html2ascii($link_site)."\" target=\"_blank\">".$title_site."</a>";
unset($link_site);
}
if ($boxborder == "")
$boxborder = 1;
if ($lang == "fr")
{
echo "\n<!-- // module ".$module." // -->\n";
echo "<!-- // (titre: $titre) // -->\n\n";
}
else
{
echo "\n<!-- // ".$module." module // -->\n";
echo "<!-- // (title: $titre) // -->\n\n";
}
echo "<div class='$module'>\n";
// ************* header ********************
echo "<table summary='' width='$largeur' 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) || $headlien !=' ')
echo "<a href='$headlien' title='$headtitle'>".htmlspecialchars($titre)."</a>";
else*/
echo $titre;
echo "$headendcode\n";
// ************** body *******************
echo " </td>\n </tr>\n <tr>\n <td valign='middle' class='magicboxborder'>\n";
echo " <div align='center'>\n <table summary='' border='0' width='90%' class='";
/*if (isset($bodyclass))
echo $bodyclass;
else*/
echo "magicbox";
echo "'>\n <tr>\n <td>\n";
echo "$bodystartcode";
include "modules/".$module.".php";
echo "$bodyendcode";
echo " </td>\n </tr>\n </table>\n </div>\n </td>\n </tr>\n";
// ************** footer *********************
if (isset($footerbox) && ($footerbox == 1))
{
echo " <tr>\n <td";
echo " align='center' class='foot'>\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 " \n </td>\n </tr>\n";
}
echo "</table>\n";
echo "</div>\n\n";
if ($lang == "fr")
echo "<!-- // fin $module // -->\n\n<br />\n";
else
echo "<!-- // $module end // -->\n\n<br />\n";
unset($titre);
unset($headlien);
unset($headcolor);
unset($headstartcode);
unset($headendcode);
//unset($headclass);
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);
//unset($sitedata);
?>