<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}

if ($acces == 1) {
if($admintest && $adminsecu)  {

    global $admin_file;
    $xsitename         = htmlentities(addslashes($xsitename), ENT_QUOTES);
    $$xsiret           = htmlentities(addslashes($xsiret), ENT_QUOTES);
    $xnomdirecteur     = htmlentities(addslashes($xnomdirecteur), ENT_QUOTES);
    $xnomcodirecteur   = htmlentities(addslashes($xnomcodirecteur), ENT_QUOTES);
    $xresponsableredac = htmlentities(addslashes($xresponsableredac), ENT_QUOTES);
    $xnompro           = htmlentities(addslashes($xnompro), ENT_QUOTES);
    $xprenompro        = htmlentities(addslashes($xprenompro), ENT_QUOTES);
    $xdomicilepro      = htmlentities(addslashes($xdomicilepro), ENT_QUOTES);
    $xdenomination     = htmlentities(addslashes($xdenomination), ENT_QUOTES);
    $xraisonsociale    = htmlentities(addslashes($xraisonsociale), ENT_QUOTES);
    $xnomhebergeur     = htmlentities(addslashes($xnomhebergeur), ENT_QUOTES);
    $xurlhebergeur     = htmlentities(addslashes($xurlhebergeur), ENT_QUOTES);
    $xcnil             = htmlentities(addslashes($xcnil), ENT_QUOTES);

    $ip = get_ip($ip);
    $GLOBALS['db']->sql_query("UPDATE `".TABLE_CONFIGMENTIONSLEGALES."` SET `sitename`='$xsitename', `siret`='$xsiret', `nomdirecteur`='$xnomdirecteur', `nomcodirecteur`='$xnomcodirecteur', `responsableredac`='$xresponsableredac', `nompro`='$xnompro', `prenompro`='$xprenompro', `domicilepro`='$xdomicilepro', `denomination`='$xdenomination', `raisonsociale`='$xraisonsociale',  `nomhebergeur`='$xnomhebergeur', `urlhebergeur`='$xurlhebergeur', `cnil`='$xcnil', `date`=now(), `ip`='$ip', `admin`='$admin[0]' ");
    $GLOBALS['db']->sql_query("OPTIMIZE TABLE `".TABLE_CONFIGMENTIONSLEGALES."` ");
    redirect_url("".$admin_file.".php?op=MentionsLegales");

}
}else {
	echo "Access Denied";
}