# 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(dirname(__FILE__).'/include/config.inc.php'); if(!empty($_POST['texte'])) { require('include/members.inc.php'); $cat = $_GET['idb']; $id = $_GET['id']; $post = $_GET['rep']; $secutest = mysql_query("SELECT auteur FROM forum_commentaire WHERE id = '$post' "); $testsecu = mysql_fetch_array($secutest); if ($testsecu['auteur'] == $pseudo || IsAdminOrModo($pseudo)) { $message=harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['texte']))); mysql_query("UPDATE forum_commentaire SET message = '$message' WHERE id = '$post' "); $nb_total=mysql_num_rows(mysql_query("SELECT * FROM forum_commentaire WHERE sujet='$id' ")); $i = 0; if($nb_total>10) { while($i<($nb_total/10)) $i++; } else { $i == 0; } if ($i != 0) $a = $i - 1; else $a = 0; Header("Location: ".$racine."/forumvoir,".$cat.",".$id.",".$a."_".$ct_lang.".html"); } else { exit('Error'); } } $post=$_GET['rep']; $id=$_GET['id']; $ida=$_GET['idb']; if ($ida == "news") { $cat = CODINGTEAM_FORUM_5; } if ($ida == "libre") { $cat = CODINGTEAM_FORUM_7; } if ($ida == "programmation") { $cat = CODINGTEAM_FORUM_9; } if ($ida == "projets") { $cat = CODINGTEAM_FORUM_11; } if ($ida == "team") { $cat = CODINGTEAM_FORUM_13; } if ($ida == "ubunture") { $cat = "Ubuntu RĂ©union"; } $cadreonecat = "communaute"; $ct_title = CODINGTEAM_FORUM_26.' - '.CODINGTEAM_GAUCHE_28.' - CodingTeam.net'; require(dirname(__FILE__).'/prepend.core.php'); ?>