summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcgi/contact.php9
-rw-r--r--includes/template_head_start.html1
-rw-r--r--pages/about.html32
3 files changed, 35 insertions, 7 deletions
diff --git a/cgi/contact.php b/cgi/contact.php
index c6d18d9..3aceaac 100755
--- a/cgi/contact.php
+++ b/cgi/contact.php
@@ -8,7 +8,7 @@ session_start();
function missing_field(string $name): never {
http_response_code(400);
- echo "Missing or malformed field $name\n";
+ echo "Missing or malformed field '$name'\n";
exit;
}
@@ -17,7 +17,7 @@ function getenv_or_fail(string $key): ?string {
if ($value !== false)
return $value;
http_response_code(500);
- echo "Missing environment variable $key\n";
+ echo "Missing environment variable '$key'\n";
exit;
}
@@ -61,6 +61,11 @@ $mailer_dsn = getenv_or_fail("MAILER_DSN");
$transport = Transport::fromDsn($mailer_dsn);
+$time = (new DateTimeImmutable("now", new DateTimeZone("Europe/Berlin")))->format("d.m.y \\u\\m H:i");
+
+$message = implode("\n", array_map(fn($ln) => "> $ln", preg_split('~(*BSR_ANYCRLF)\R~', trim($message))));
+$message = "Am $time schrieb $name via Kontaktformular:\n$message\n";
+
$transport->send((new Email())
->from(new Address("mystic-contactform+no-reply@jonaskohl.de", $name))
->to("mystic@jonaskohl.de")
diff --git a/includes/template_head_start.html b/includes/template_head_start.html
index 8a4cac4..41e0017 100644
--- a/includes/template_head_start.html
+++ b/includes/template_head_start.html
@@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="imagetoolbar" content="no">
+ <meta http-equiv="MSThemeCompatible" content="no">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title><!--#echo var="PAGE_TITLE"--> - Mystic House Fansite</title>
<script language="JavaScript">
diff --git a/pages/about.html b/pages/about.html
index 242fed2..7d25dbf 100644
--- a/pages/about.html
+++ b/pages/about.html
@@ -1,5 +1,26 @@
<!--#set var="PAGE_TITLE" value="Ueber"-->
-<!--#include virtual="../includes/template_start.html"-->
+<!--#include virtual="../includes/template_head_start.html"-->
+<style type="text/css">
+<!--
+textarea, input {
+ font: 10pt Courier, monospace;
+ background: #362d25;
+ color: white;
+ border: 1px solid;
+ border-color: #0f0c0a #53483d #53483d #0f0c0a;
+ padding: 4px;
+}
+button {
+ font: 12pt/1 Times, serif;
+ background: #362d25;
+ color: white;
+ border: 1px solid;
+ border-color: #53483d #0f0c0a #0f0c0a #53483d;
+ padding: 4px;
+}
+-->
+</style>
+<!--#include virtual="../includes/template_head_end.html"-->
<h1>&Uuml;ber die Mystic House Corner</h1>
@@ -16,15 +37,16 @@ Mystic House Corner: Ein Projekt von Jan W. und Jonas K.
<h2>Kontakt</h2>
<form action="/cgi/contact.php" method="post" accept-charset="UTF-8">
+ <input name="utf8" type="hidden" value="&#x2713;">
<table>
<tr><th align="left">Ihre eMail-Adresse:</th></tr>
- <tr><td><input type="text" name="email" size="36"></td></tr>
+ <tr><td><input type="text" name="email" size="40"></td></tr>
<tr><th align="left">Ihr Name:</th></tr>
- <tr><td><input type="text" name="name" size="36"></td></tr>
+ <tr><td><input type="text" name="name" size="40"></td></tr>
<tr><th align="left">Betreff:</th></tr>
- <tr><td><input type="text" name="subject" size="36"></td></tr>
+ <tr><td><input type="text" name="subject" size="40"></td></tr>
<tr><th align="left">Ihre Nachricht:</th></tr>
<tr><td><textarea name="message" cols="40" rows="8"></textarea></td></tr>
@@ -35,7 +57,7 @@ Mystic House Corner: Ein Projekt von Jan W. und Jonas K.
<br>
<small><a href="/cgi/captcha.php" target="captchafr">Neues Bild</a></small>
<br>
- <input type="text" name="captcha" id="input-captcha" required="required" size="36">
+ <input type="text" name="captcha" id="input-captcha" size="40">
</td></tr>
<tr><td><button type="submit">Absenden</button></td></tr>