:> jean-luc.chretien@tice.ac-caen.fr * @auteurs oluve olivier.le_monnier@crdp.ac-caen.fr * @auteurs Olivier LECLUSE wawa olivier.lecluse@crdp.ac-caen.fr * @auteurs Plouf sudoification - HTMLPurifier * @Licence Distribue selon les termes de la licence GPL * @note */ /** * @Repertoire: setup/ * file: index.php */ require_once("lang.inc.php"); bindtextdomain('se3-core',"/var/www/se3/locale"); textdomain ('se3-core'); require ("config.inc.php"); require ("functions.inc.php"); // HTMLpurifier include("../se3/includes/library/HTMLPurifier.auto.php"); $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); if ( isset($_POST['submit'])) $submit = $purifier->purify($_POST['submit']); if ( isset($_POST['cat'])) $cat = $purifier->purify($_POST['cat']); elseif ( isset($_GET['cat'])) $cat = $purifier->purify($_GET['cat']); if (!isset($cat)) $cat=0; if ((!isset($submit)) and (!isset($queri))) { // Affichage du form de mise a jour des parametres print "
\n"; } if (isset($submit)) { // Traitement du Form $query="SELECT * from params"; if ($submit != 0) $query .= " WHERE cat=$submit"; $result=mysql_query($query); if ($result) { $i=0; $modif=0; $ldap_modify=""; while ($r=mysql_fetch_array($result)) { // Exclusion de deux valeurs particulieres de la table params if(($r["name"]!='dernier_import')&&($r["name"]!='imprt_cmpts_en_cours')){ $formname="form_".$r["name"]; $formname = $purifier->purify($_POST["$formname"]); // Si ancienne valeur n'est pas egale a la nouvelle if ($formname != $r["value"]) { // Mise a jour de la base de donnees $queri="UPDATE params SET value=\"".$formname."\" WHERE name=\"".$r["name"]."\""; $result1=mysql_query($queri); if ($result1) { print gettext("Modification du paramètre ")."".$r["name"]." ". gettext("de ")."".$r["value"]."".gettext(" en ")."".$formname.""."