<?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)  {

$pid       = $GLOBALS['db']->XMFnum($pid);
$brconfig  = $GLOBALS['db']->XMFnum($brconfig);
$actif     = $GLOBALS['db']->XMFbin($actif);
$tab       = $GLOBALS['db']->XMFnum($tab);
$bold      = $GLOBALS['db']->XMFbin($bold);
$italik    = $GLOBALS['db']->XMFbin($italik);
$target    = $GLOBALS['db']->XMFbin($target);
$view      = $GLOBALS['db']->XMFnum($view);
$groups    = htmlentities($groups, ENT_QUOTES);
$firstimg  = htmlentities($firstimg, ENT_QUOTES);
$titre     = htmlentities($titre, ENT_QUOTES);
$title     = htmlentities($title, ENT_QUOTES);
$url       = htmlentities($url, ENT_QUOTES);
$secondimg = htmlentities($secondimg, ENT_QUOTES);


if($view == 4) { $ingroups = implode("-",$groups); }
if($view < 4) { $ingroups = ""; }
$db->sql_query("UPDATE `".TABLE_PLAN."` SET `firstimg`='$firstimg', `titre`='$titre', `title`='$title', `url`='$url', `secondimg`='$secondimg', `brconfig`='$brconfig', `actif`='$actif', `tab`='$tab', `bold`='$bold', `italik`='$italik', `target`='$target', `view`='$view', `groups`='$ingroups' WHERE `id`='$pid'  ");
$db->sql_query("OPTIMIZE TABLE `".TABLE_PLAN."` ");
redirect_url("".$admin_file.".php?op=Plan");

}
}else {
	echo "Access Denied";
}