Citation :
<?
$pseudo = $_POST['pseudo'];
$email = $_POST['email'];
$msn = $_POST['msn'];
$slots = $_POST['slots'];
$duree = $_POST['temps'];
$login = $_POST['login'];
$pass = $_POST['pass'];
//insertion de la commande dans la base
include("config.php" );
mysql_query("INSERT INTO teamspeak VALUES('', '$pseudo', '$email', '$msn', '$slots', '$duree', '$login', '$pass', '0')" );
//Analyse de la commande
if ($slots = '8' AND $duree = '1') {$prix = '2';}
if ($slots = '8' AND $duree = '3') {$prix = '2';}
if ($slots = '8' AND $duree = '6') {$prix = '4';}
if ($slots = '8' AND $duree = '12') {$prix = '7';}
if ($slots = '12' AND $duree = '1') {$prix = '2';}
if ($slots = '12' AND $duree = '3') {$prix = '5';}
if ($slots = '12' AND $duree = '6') {$prix = '10';}
if ($slots = '12' AND $duree = '12') {$prix = '20';}
if ($slots = '18' AND $duree = '1') {$prix = '3';}
if ($slots = '18' AND $duree = '3') {$prix = '8';}
if ($slots = '18' AND $duree = '6') {$prix = '16';}
if ($slots = '18' AND $duree = '12') {$prix = '32';}
if ($slots = '20' AND $duree = '1') {$prix = '4';}
if ($slots = '20' AND $duree = '3') {$prix = '11';}
if ($slots = '20' AND $duree = '6') {$prix = '22';}
if ($slots = '20' AND $duree = '12') {$prix = '44';}
if ($slots = '32' AND $duree = '1') {$prix = '6';}
if ($slots = '32' AND $duree = '3') {$prix = '17';}
if ($slots = '32' AND $duree = '6') {$prix = '34';}
if ($slots = '50' AND $duree = '12') {$prix = '68';}
if ($slots = '50' AND $duree = '1') {$prix = '10';}
if ($slots = '50' AND $duree = '3') {$prix = '29';}
if ($slots = '50' AND $duree = '6') {$prix = '58';}
if ($slots = '50' AND $duree = '12') {$prix = '116';}
else {echo "Ce tarifs nous est inconnu";}
//Execution de la commande
echo "Pour terminer votre commander et effectuer votre paiement merci de cliquer ci-dessous";
echo "<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">
<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">
<input type=\"hidden\" name=\"business\" value=\"laszlolf@wanadoo.fr\">
<input type=\"hidden\" name=\"item_name\" value=\"ServeurTeamspeak$slots-$duree\">
<input type=\"hidden\" name=\"item_number\" value=\"$slots-$duree\">
<input type=\"hidden\" name=\"amount\" value=\"$prix\">
<input type=\"hidden\" name=\"no_shipping\" value=\"1\">
<input type=\"hidden\" name=\"return\" value=\"http://www.123heberg.com/index.php?page=paiementreussi\">
<input type=\"hidden\" name=\"no_note\" value=\"1\">
<input type=\"hidden\" name=\"currency_code\" value=\"EUR\">
<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\">
<input type=\"image\" src=\"https://www.paypal.com/fr_FR/i/btn/x-click-but23.gif\" border=\"0\" name=\"submit\" alt=\"Effectuez vos paiements via PayPal : une solution rapide, gratuite et sécurisée !\">
</form>";
?>
|