<?php
/*********************************************************************************
 * Gest'Ecole is a school management software developped by
 * DOX Conception Copyright (C) 2012-2013 DOX Conception
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the license published by DOX Conception.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY.  See the Software License for more details.
 * 
 * You should have received a copy of the software license along with
 * this program; if not, see:
 * http://www.doxconception.com/site/index.php/licence-de-gestecole.html
 ********************************************************************************/

  session_start();

  include "../../config.php";

	mysql_connect($gestclasse_config['param_connexion']['serveur'],$gestclasse_config['param_connexion']['user'],$gestclasse_config['param_connexion']['passe']);
	@mysql_select_db($gestclasse_config['param_connexion']['base']);

	$id=substr($_POST['elementid'],10,strlen($_POST['elementid']));
	$texte=str_replace("\n",'<br>',str_replace("\r",'',$_POST['newvalue']));
	
	$req=mysql_query("UPDATE `accueil_perso` SET parametre='$texte' WHERE id='$id'");
	
	echo str_replace('\"','"',str_replace("\'","'",$texte));
?>
