sql_fetchrow($db->sql_query("SELECT name, username, user_email FROM ".$user_prefix."_users WHERE user_id='$cookie[0]'"));
if ($row['name'] != "") {
$sender_name = $row['name'];
} else {
$sender_name = $row['username'];
}
$sender_email = $row['user_email'];
}
$form_block = "
"._CHALLNOTE."
";
OpenTable();
if ($opi != "ds") {
echo "$form_block";
} elseif ($opi == "ds") {
if ($sender_name == "") {
$name_err = ""._CHALENTERNAME."
";
$send = "no";
}
if ($sender_email == "") {
$email_err = ""._CHALENTEREMAIL."
";
$send = "no";
}
if ($message == "") {
$message_err = ""._CHALENTERMESSAGE."
";
$send = "no";
}
if ($send != "no") {
$sender_name = removecrlf($sender_name);
$sender_email = removecrlf($sender_email);
$sender_clan = removecrlf($sender_clan);
$sender_site = removecrlf($sender_site);
$sender_irc = removecrlf($sender_irc);
$sender_date = removecrlf($sender_date);
$sender_time = removecrlf($sender_time);
$sender_map = removecrlf($sender_map);
$sender_player = removecrlf($sender_player);
$sender_server = removecrlf($sender_server);
$msg = "$sitename\n\n";
$msg .= ""._SENDERNAME.": $sender_name\n";
$msg .= ""._SENDEREMAIL.": $sender_email\n";
$msg .= "Clan Name: $sender_clan\n";
$msg .= "Clan Site: $sender_site\n";
$msg .= "Clan IRC: $sender_irc\n";
$msg .= "Match Date: $sender_date\n";
$msg .= "Match Time: $sender_time\n";
$msg .= "Match Map: $sender_map\n";
$msg .= "Players Per Team: $sender_player\n";
$msg .= "Server: $sender_server\n";
$msg .= ""._MESSAGE.": $message\n\n";
$to = $adminmail;
$mailheaders = "From: $sender_name <$sender_email>\n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
echo ""._CHALMAILSENT."";
echo ""._CHALTHANKSFORCONTACT."";
} elseif ($send == "no") {
OpenTable2();
echo "$name_err";
echo "$email_err";
echo "$message_err";
CloseTable2();
echo "
";
echo "$form_block";
}
}
CloseTable();
OpenTable();
echo "N4G|Challenge Us Form Made By NUKE4GAMERS";
CloseTable();
include("footer.php");
?>