<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
if (isset($_POST['sendmessage'])) { $error = "";
$mailname = substr(stripinput
(trim($_POST['mailname'])),0,50); $email = substr(stripinput
(trim($_POST['email'])),0,100); $message = descript
(stripslash
(trim($_POST['message']))); if ($mailname == "") {
$error .= "· <span class='alt'>Musisz poda? swój Nick</span><br>\n";
}
if ($email == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) { $error .= "· <span class='alt'>Musisz poda? swój adres e-mail</span><br>\n";
}
if ($subject == "") {
$error .= "· <span class='alt'>Musisz poda? kim chcia?by¶ zosta? w serwisie</span><br>\n";
}
if ($gg == "") {
$error .= "· <span class='alt'>Musisz poda? numer gadu-gadu</span><br>\n";
}
if ($message == "") {
$error .= "· <span class='alt'>Musisz wpisa? jak±¶ tre¶? Wiadomo¶ci</span><br>\n";
}
if (!$error) {
require_once INCLUDES."sendmail_include.php";
sendemail($settings['siteusername'],$settings['siteemail'],$mailname,$email,$subject,$gg,$message);
opentable("Nabór do ekipy");
echo "<center><br>\nTwoje zg?oszenie zosta?o wys?ane. ?yczymy powodzenia!<br><br>\n".$locale['441']."</center><br>\n";
closetable();
} else {
opentable("Nabór do ekipy");
echo "<center><br>\nTwoje zg?oszenie nie zosta?o wys?ane z nast?puj±cych powodów:<br><br>\n$error<br>\nSpróbuj ponownie.</center><br>\n";
closetable();
}
} else {
opentable("Nabór do ekipy");
echo" Chcesz nale?e? do naszej ekipy? Nie ma problemu! Wype?nij poni?szy formularz. Trafi on do Administratorów serwisu drog± e-mail. Wtedy na pewno dadz± Ci odpowiedz!<br><br>
<form name='userform' method='post' action='".FUSION_SELF."'>
<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<td width='100'>Nick:</td>
<td><input type='text' name='mailname' maxlength='50' class='textbox' style='width: 200px;'></td>
</tr>
<tr>
<td width='100'><br>Kontaktowy adres e-mail:</td>
<td><input type='text' name='email' maxlength='100' class='textbox' style='width: 200px;'></td>
</tr>
<tr>
<td width='100'><br>Kim chcesz by? w serwisie:</td>
<td><input type='text' name='subject' maxlength='50' class='textbox' style='width: 200px;'></td>
</tr>
<tr>
<td width='100'><br>Numer gadu-gadu:</td>
<td><input type='text' name='gg' maxlength='50' class='textbox' style='width: 200px;'></td>
</tr>
<tr><td valign='top' width='90'><br>Napisz co¶ o sobie:</td>
<td><textarea name='message' rows='10' class='textbox' style='width: 320px'></textarea></td>
</tr>
<tr>
<td align='center' colspan='2'>
<input type='submit' name='sendmessage' value='Wy¶lij zg?oszenie' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();
}
require_once "side_right.php";
require_once "footer.php";
?>