# Copyright (c) 2007 Erwan Briand # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation # # 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. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ***** END LICENSE BLOCK ***** session_start(); require_once("include/config.inc.php"); if (empty($_POST['titre']) || empty($_POST['texte'])) { exit('Error.'); } $idb=$_GET['title']; $ida=$_GET['id']; $pseudom=harmonise_magic_quotes_gpc(addslashes($_POST['auteur'])); $titre=harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['titre']))); $message=harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['texte']))); mysql_query("INSERT INTO ct2_os_com (auteur,titre,message,projet) VALUES ('$pseudom','$titre','$message','$ida')") or die (mysql_error()); mysql_insert_id(); if(file_exists('rss/cache/cache-rss-rss4-projets-'.$ida.'.xml')) { unlink('rss/cache/cache-rss-rss4-projets-'.$ida.'.xml'); } Header("Location: ".$racine."/".$idb."-com_".$ct_lang.".html"); ?>