Qware_core/lib/object_printing/communityzoneicon/communityzoneicon.php

84 lines
2.0 KiB
PHP
Executable File

<?php
/**-----------------------------------------------
*
* 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 CommunityZoneIcon.php
*
* Ce fichier contient la classe CommunityZoneIcon
*
* @author Comendatore<comendatore@comendatore.net>
* @copyright Copyright &copy; 2015, Comendatore.net
* @since 2009/05/14
* @version 0.3
* @link www.comendatore.net
* @package object_printing
* @subpackage CommunityZoneIcon
*/
if ( !defined('SYSTEM_IN') )
{
die("Hacking attempt");
}
/**
* Classe CommunityZoneIcon
*<p>Cette classe permet la recuperation des CommunityZoneIcon</p>
* @package object_printing
* @subpackage CommunityZoneIcon
*/
class CommunityZoneIcon extends Printing
{
//
// Constructor
//
/**
* Constructeur de la classe CommunityZoneIcon
* @access public
*/
function CommunityZoneIcon()
{
$this->__construct();
}
function __construct()
{
parent::__construct("1.0", "Rooty", "Bloc d'affichage de l'icone de communauté");
}
/**
* Remplace dans la template principale
* @access public
*/
function __print()
{
global $SERVER_NAME, $SCRIPT_NAME, $CONF_AUTH_SECURE;
$MaTemplate = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_printing/communityzoneicon/communityzoneicon.mxt");
$MaTemplate->SetModeliXe(true);
/* recuperation de l'icone de la communauté */
if (file_exists($GLOBALS['CONF_DATA_PATH']."data/image/communities/".recupCommunity()."_logo.svg"))
{
$imgCommunity=$GLOBALS['CONF_DATA_PATH']."data/image/communities/".recupCommunity()."_logo.svg";
}else{
$imgCommunity=$GLOBALS['CONF_DATA_PATH']."data/image/communities/3_logo.svg";
}
$MaTemplate->MxImage("imageCommunity", $imgCommunity);
$data=$MaTemplate->MxWrite();
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("communityzoneicon", $data); // Et voila!!!!!
return true;
}
}
?>