1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
| <?php
if($act=='send'){
@$sql=mysql_query("SELECT * FROM users WHERE fid=$id AND fpassword='$password'");
if(!mysql_num_rows($sql))
{
echo"<b><font size=4 color=red>    Mot de passe incorrect !</b></font><p>    Veuillez réessayer...";
exit;
}
else
{
$ma = date("Y-m-d");
@mysql_query("INSERT INTO commandes (fid, fcado, fprix, fnbr, fdate) VALUES ('$fid','$bname','bprix','$fnbr','$ma')");
echo"<b>Votre demande a bien été envoyée !</b>";
}
}
?>
<table width="100%" border="0" cellspacing="0">
<tr>
<td colspan="2"><b>Vous pouvez faire une demande dans la boutique dès que votre solde de points est suffisant pour ce faire !
</b></td>
</tr>
<tr>
<td>
<p align="center"><b>Merci de compléter ce formulaire :</b><br>
</p>
<form name="form1" method="post" action="">
<table width="80%" border="0" cellspacing="0" align="center" background="images/fon.gif.gif">
<tr><td>Choissisez le cadeau de la boutique</td>
<td>
<?php
$sql=mysql_query("SELECT * FROM boutik");
extract(mysql_fetch_array($sql));
?>
<select name=bname>
<?php
for($i=0; $i<mysql_num_rows($sql); $i++)
{
mysql_data_seek($sql,$i);
extract(mysql_fetch_array($sql));
$fprix=$bprix;
echo"<option value=$bname $bprix>$bname $bprix</option>";
}
?>
</select>
</td></tr>
<tr><td>Nombre</td><td><select name="fnbr">
<option value="1">x1</option>
<option value="2">x2</option>
<option value="3">x3</option>
<option value="4">x4</option>
<option value="5">x5</option>
<option value="6">x6</option>
<option value="7">x7</option>
<option value="8">x8</option>
<option value="9">x9</option>
<option value="10">x10</option>
</select></td></tr>
<tr>
<td width="37%"><b>Votre ID :</b></td>
<td width="63%">
<input type="text" name="id">
</td>
</tr>
<tr>
<td width="37%"><b>Votre mot de passe:
</b></td>
<td width="63%">
<input type="password" name="password">
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="hidden" name="act" value="send">
<input type="hidden" name="tp" value="user">
<input type="hidden" name="st" value="redemption">
<input type="hidden" name="s" value="2">
<input type="submit" name="Submit" value="Envoyer">
</div>
</td>
</tr>
</table>
</form>
<p> </p>
</td>
<td> </td>
</tr>
</table> |
Partager