87 lines
2.1 KiB
PHP
Executable File

<?php
/**-----------------------------------------------
*
* Rooty, 2018 <rooty@rooty.me>
*
*
* This software is protected by copyright, please
* read the file COPYRIGHT.
* 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. Please
* read the file LICENCE.
*
* Fichier MessagePrint.php
*
* Ce fichier contient la classe MessagePrint
*
* @author Rooty <rooty@rooty.me>
* @copyright Copyright &copy; 2018, Rooty
* @since 2004/06/07
* @version 0.3
* @link www.rooty.me
* @package object_printing
* @subpackage MessagePrint
*/
if ( !defined('SYSTEM_IN') )
{
die("Hacking attempt");
}
/**
* Classe MessagePrint
* <p>Cette classe permet la recuperation de message</p>
* @package object_printing
* @subpackage MessagePrint
*/
class MessagePrint extends Printing
{
//
// Constructor
//
/**
* Constructeur de la classe Message
* @access public
*/
function __construct()
{
parent::__construct("2.0", "Rooty", "Affichage des \"Communautées accessibles\" et possibilités d\'en Changer");
}
/**
* Remplace dans la template principale
* @access public
*/
function __print()
{
global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE;
$data="";
/* pour le message systéme */
if ($GLOBALS["SYSTEM_CONTROL"]->messageSystem!="")
{
if(getMessage($GLOBALS["SYSTEM_CONTROL"]->messageSystem))
{
$message=($GLOBALS["SYSTEM_MESSAGE"]->getMessage($GLOBALS["SYSTEM_CONTROL"]->messageSystem));
}
else
{
$message=htmlentitiesconv($GLOBALS["SYSTEM_CONTROL"]->messageSystem);
}
$MaTemplate = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_printing/messageprint/message.mxt");
$MaTemplate->SetModeliXe(true);
$MaTemplate->MxText("message", htmlentitiesconv(stripslashes(unhtmlentities(stripslashes($message)))));
$data=$MaTemplate->MxWrite();
}
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("messageprint", $data); // Et voila!!!!!
return true;
}
}
?>