Parašė WyPuk· 2010 Vas. 20 15:02:50
#10
<?
$admin_email = "mail@gmail.com";// kur bus siun?iami lai?kai
if (isset($_POST['siusti'])) {
if (preg_match('/^[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\.\-_]+\.[a-zA-Z0-9]{2,4}$/', $_POST['email'])) {
$tekstas .= "Gamenick: $_POST[nick]\n";
$tekstas .= "Skype: $_POST[skype]\n";
$tekstas .= "E-Pastas: $_POST[email]\n";
$tekstas .= "Numeris: $_POST[nr]\n";
$tekstas .= "IP: ".$_SERVER['REMOTE_ADDR']."\n";
mail($admin_email,"Siusti registracija",$tekstas,"From: ".$_POST['email']."");
echo "<center>Uþklausimas iðsiustas. Laukite administratoriaus þinutes.<br><br><a href='index.php'>Atgal</a></center>";
} else {
echo "<center>Neteisingas E-Pa?to adresas.<br><br><a href='index.php'>Bandyti dar karta</a></center>";
}
} else {
?>
<form name="emailform" method="post" action="">
<table align="center" cellpadding="0" cellspacing="1">
<td align="center" colspan="2">Registracija į 3x3 Turnyrą<br><br></td>
</tr>
<tr>
<td>GameNick:</td>
<td><input type="text" name="nick"></td>
</tr>
<tr>
<td>Skype:</td>
<td><input type="text" name="skype"></td>
</tr>
<tr>
<td>El-Paštas:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td>Numeris:</td>
<td><input type="text" name="nr"></td>
</tr>
<tr>
<td>IP adresas:</td>
<td><input disabled='disabled' type='text' name='ip' value='$ip' maxlength='20' class='style7' style='width:120px;'></td>
</tr>
<tr>
<td colspan="2" align="center"><br><br>
<input type="submit" name="siusti" value="VIP">
</td>
</tr>
</table>
</form>
<?php
}
?>