All pastes #564208 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-13 14:24 UTC
rendered paste body
<?php

$username = (get_magic_quotes_gpc() === true)?$_POST['username']:addslashes($_POST['username']);
$team_name = (get_magic_quotes_gpc() === true)?$_POST['team_name']:addslashes($_POST['team_name']);
$url = (get_magic_quotes_gpc() === true)?$_POST['url']:addslashes($_POST['url']);
$irc_channel = (get_magic_quotes_gpc() === true)?$_POST['irc_channel']:addslashes($_POST['irc_channel']); 
$irc_server = (get_magic_quotes_gpc() === true)?$_POST['irc_server']:addslashes($_POST['irc_server']); 
$email = (get_magic_quotes_gpc() === true)?$_POST['email']:addslashes($_POST['email']);
$description = addslashes(htmlentities($_POST['description']));
$game = (get_magic_quotes_gpc() === true)?$_POST['game']:addslashes($_POST['game']);
//recupération des variables  


if (empty($irc_channel))
{  
	$irc_channel = "#Alsace";
}
elseif ($irc_channel = "#")
{  
	$irc_channel = "#Alsace";
}

if (empty($irc_server))
{  
	$irc_server = "Quakenet.org";
}  

if (empty($team_name))
{
 echo "Vous n'avez pas remplis le champ \"Nom de la team\".";
}
elseif(empty($email))
{  
	echo "Vous n'avez pas remplis le champ \"E-mail\".";
}  
else
{  
	include "connect.php";  

	mysql_query("INSERT INTO groups VALUES('','$team_name','$team_name','1','1','1','1','0','0','0','0','1','1','300','60','30','1','$url','$irc_channel','$irc_server','$email','$description','$game')");  

	mysql_query("UPDATE users SET group_id='" . mysql_insert_id() . "'WHERE username='$username')");  

}  

mysql_close(); // déconection sql  


?>

Ta team a bien &eacute;t&eacute; ajout&eacute;e <?php echo ($username); ?>!