# 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($_GET['zid'])) { require(dirname(__FILE__).'/include/members.inc.php'); $id = $_GET['zid']; $numero = $_GET['zid']; if(!empty($_POST['titre']) && !empty($_POST['texte'])) { if (IsProjectAdmin()) { $titre = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['titre']))); $type = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['type']))); $license = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['license']))); $traduction = ""; $choix0 = $_POST['traduc']; $n = 0; for ($n = 0 ; $n <= 50 ; $n ++) { if (isset($choix0[$n])) { $traduction .= $choix0[$n].", "; } } $lang = ""; $choix01 = $_POST['lang']; $n = 0; for ($n = 0 ; $n <= 50 ; $n ++) { if (isset($choix01[$n])) { $lang .= $choix01[$n].", "; } } if(!empty($_POST['weblink']) OR $_POST['weblink'] != 'http://') { $image =utf8_decode($_POST['weblink']); } else { $image = "n/a"; } $description = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['texte']))); if ( $_POST['TEST'] == 'TEST1') { //multiplateformes $operating = $_POST['osfacile01']; } elseif ( $_POST['TEST'] == 'TEST2') { //seulement $operating = $_POST['osfacile']; } elseif ( $_POST['TEST'] == 'TEST3') { //assemblage $operating = ""; $choix01 = $_POST['osfacile0']; $n = 0; for ($n = 0 ; $n <= 50 ; $n ++) { if (isset($choix01[$n])) { $operating .= $choix01[$n].", "; } } } mysql_query("UPDATE ct2_os SET titre = '$titre', type = '$type', license = '$license', traduction = '$traduction', langage = '$lang', logo = '$image', operating = '$operating', description = '$description' WHERE id = '$numero' LIMIT 1 ")or die(mysql_error()); Header('Location: '.$_GET['p'].'-aff_'.$ct_lang.'.html'); } else { exit('Error'); } } else { exit('Error (1).'); } } ?>