# 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 (isset($_POST['texte'])) { $num = $_GET['numero']; $texte = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['texte']))); if(mysql_num_rows(mysql_query("SELECT * FROM ct2_os_svn WHERE idprojet = '$num' ")) == 0) { mysql_query("INSERT INTO ct2_os_svn (idprojet,texte) VALUES ('$num','$texte')") or die (mysql_error()); } else { mysql_query("UPDATE ct2_os_svn SET texte = '$texte' WHERE idprojet = '$num' ") or die (mysql_error()); } $mb = mysql_fetch_array(mysql_query("SELECT * FROM ct2_os WHERE id = '$num' ")); $add = $mb['adresse']; Header("Location: ".$racine."/".$add."-code_".$ct_lang.".html"); } $code = $_GET['p']; $ma = mysql_query("SELECT * FROM ct2_os WHERE adresse = '$code' "); if (mysql_num_rows($ma) == 0) { require('include/erreurs.inc.php'); GenerateErrorPage ("404","Not Found",$txt); exit(); } $ma = mysql_query("SELECT * FROM ct2_os WHERE adresse = '$code' "); $mb = mysql_fetch_array($ma); $titre = $mb['titre']; $desc = $mb['description']; $numero = $mb['id']; $url = $mb['adresse']; $cadreonecat = "os"; $ct_title = utf8_encode(htmlspecialchars($titre)). ' - CodingTeam.net : '.CODINGTEAM_GAUCHE_22; require(dirname(__FILE__).'/prepend.core.php'); ?>
'.CODINGTEAM_PROJETLIBRE_138.'
'.CODINGTEAM_PROJETLIBRE_139.'
'; echo ''.CODINGTEAM_PROJETLIBRE_140.'
'; } else { echo ''.CODINGTEAM_PROJETLIBRE_139.'
'; } } ?>