check_captcha($_POST['captcha'], $_POST['captcha_hash'])) {
$error="The security code was wrong!";
die('ERROR: '.$error.'
');
}
if(!(strlen(trim($nick)))) {
$error="you forgot to enter your nickname!";
die('ERROR: '.$error.'
');
}
if(!(strlen(trim($name)))) {
$error="you forgot to enter your realname!";
die('ERROR: '.$error.'
');
}
if(!(strlen(trim($messenger)))) {
$error="you have no icq, msn, aim etc?";
die('ERROR: '.$error.'
');
}
if(!(strlen(trim($age)))) {
$error="you forgot to enter your age!";
die('ERROR: '.$error.'
');
}
if(!(strlen(trim($city)))) {
$error="you forgot to enter your city!";
die('ERROR: '.$error.'
');
}
if(!(strlen(trim($clanhistory)))) {
$error="you forgot to enter your clanhistory!";
die('ERROR: '.$error.'
');
}
$sem = '^[a-z0-9_\.-]+@[a-z0-9_-]+\.[a-z0-9_\.-]+$';
if(!(eregi($sem, $email))) {
$error="your e-mail is not valid!";
die('ERROR: '.$error.'
');
}
$ergebnis=safe_query("SELECT userID FROM ".PREFIX."squads_members WHERE joinmember='1' AND squadID='".$squad."'");
while($ds=mysql_fetch_array($ergebnis)) {
$touser[]=$ds[userID];
}
if($touser[0] != "") {
$message = '[b]Someone want do join your Squad ('.$squad.')![/b]
His/her nickname: '.$nick.'
Name: '.$name.'
Age: '.$age.'
Mail: [URL]mailto:'.$email.'[/url]
Messenger: '.$messenger.'
City: '.$city.'
Clanhistory: '.$clanhistory.'
Information:
'.$info.'
';
foreach($touser as $id) {
sendmessage($id,'Join us',$message);
}
}
redirect('index.php?site=joinus', 'thank you for your entry, you will got mail.');
}
else {
echo'