# 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"); require_once("include/members.inc.php"); require_once("include/class.htaccess.php"); $numero = $_POST['n']; if (IsProjectAdmin()) { /* if (empty($_POST['svnpass'])) { exit('Error: need password.'); } */ $code = $_POST['p']; $etat = $_POST['statut']; $legars = $_POST['personne']; if (isset($_POST['admin'])) { if ($_POST['admin'] == "yes") { $ladmin = "oui"; } } else { $ladmin = "non"; } $ma_bis = mysql_query("SELECT * FROM ct2_os WHERE adresse = '$code' "); $mb_bis = mysql_fetch_array($ma_bis); $numerobis = $mb_bis['id']; $test = mysql_query("SELECT * FROM member WHERE pseudo = '$legars' AND pseudo != '$pseudo' LIMIT 1"); if (mysql_num_rows($test) == 1) { mysql_query("INSERT INTO ct2_os_team (idprojet,pseudo,rang,admin) VALUES ('$numerobis','$legars','$etat','$ladmin')") or die (mysql_error()); mysql_insert_id(); Header('Location: '.$racine.'/'.$code.'-aff_'.$ct_lang.'.html'); } else { exit('Error: not found!'); } } else { exit('Error.'); } ?>