56 lines
2.5 KiB
PHP
56 lines
2.5 KiB
PHP
<?php
|
|
include("config.php");
|
|
$irpg_page_title = "Contact";
|
|
$irpg_page_desc = "IdleRPG Contact";
|
|
include("header.php");
|
|
|
|
echo "<h1>Contact</h1>";
|
|
if (!$irpg_site_email) {
|
|
echo " <blockquote>Config error. The config file was not loaded correctly.</blockquote>\n";
|
|
}
|
|
else if ($irpg_site_email == "disabled") {
|
|
echo " <blockquote>Email is disabled.</blockquote>\n";
|
|
}
|
|
else if ($irpg_site_email == "php" && $_POST['from'] && $_POST['text']) {
|
|
$to = $admin_email;
|
|
$subject = "IdleRPG: ".$_POST['from'];
|
|
$message = "Name: ".$_POST['name']."\nE-mail: ".$_POST['from']."\n\n".$_POST['text'];
|
|
$additional_headers = "From: ".$_POST['from']."\r\n";
|
|
mail($to, $subject, $message, $additional_headers);
|
|
echo " <blockquote>Thanks for your submission.</blockquote>\n";
|
|
}
|
|
else if ($irpg_site_email == "smtp" && $_POST['from'] && $_POST['text']) {
|
|
echo " <blockquote>SMTP Email is under construction. Your submission was not submitted.</blockquote>\n";
|
|
}
|
|
else {
|
|
echo " <form method=\"post\" action=\"contact.php\">\n".
|
|
" <table border=\"0\">\n".
|
|
" <tr>\n".
|
|
" <th align=\"left\"><label for=\"from\">Your e-mail address</label>:</th>\n".
|
|
" <td align=\"right\">\n".
|
|
" <input type=\"text\" size=\"20\" maxlength=\"50\" name=\"from\" id=\"from\" />\n".
|
|
" </td>\n".
|
|
" </tr>\n".
|
|
" <tr>\n".
|
|
" <th align=\"left\"><label for=\"name\">Your name</label>:</th>\n".
|
|
" <td align=\"right\">\n".
|
|
" <input type=\"text\" size=\"20\" maxlength=\"50\" name=\"name\" id=\"name\" />\n".
|
|
" </td>\n".
|
|
" </tr>\n".
|
|
" <tr>\n".
|
|
" <td colspan=\"2\">\n".
|
|
" <textarea name=\"text\" rows=\"6\" cols=\"44\"></textarea><br />\n".
|
|
" </td>\n".
|
|
" </tr>\n".
|
|
" <tr>\n".
|
|
" <td colspan=\"2\" align=\"right\">\n".
|
|
" <input type=\"submit\" value=\"Send\" />\n".
|
|
" </td>\n".
|
|
" </tr>\n".
|
|
" </table>\n".
|
|
" </form>\n";
|
|
}
|
|
|
|
include("footer.php");
|
|
?>
|