Commit 503938f3 authored by moserfl's avatar moserfl 💬
Browse files

Merge branch 'mailingList' into 'master'

Adds a Form to Sign Up to the Mailing List

See merge request !1
parents 8f5029a5 e60578a2
Pipeline #128588 passed with stage
in 18 seconds
......@@ -71,6 +71,9 @@ include "../templates/head.html"
to help you use and produce Free and Open<br/>
Science, Hardware, Software and File Formats.
Join our <a href="/mailinglist.php">mailing list</a> to stay up to date!
<div class="resources">
......@@ -93,7 +96,7 @@ include "../templates/head.html"
<div class="events">
<p class="event-alert">
Do you like our talks? Care to support Open Source & Free Software?
Come join us at our next Stammtisch! Use the contact form below to let us know you are interested.
Come join us at our next Stammtisch! Use the contact form below to let us know you are interested. Or join our <a href="./mailinglist.php">mailing list</a> to get informed about upcomming events.
include "../src/bootstrap.php";
$error = FALSE;
$success = FALSE;
if (isset($_POST["email"])) {
$url = '';
$data = array('email' => $_POST["email"], 'fullname' => $_POST["fullname"], 'pw' => "", 'pw-conf' => "");
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data)
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
$error = TRUE;
} else {
$success = TRUE;
<!DOCTYPE html>
<html lang="en">
include "../templates/head.html"
include "../templates/header.html"
<div class="container">
<div class="page-header">
<h1 class="mt-5">Mailing List</h1>
<div class="page-content">
Stay up to date about all our upcoming events! We send you a preview at the beginning of each semester, and then a reminder one day before each event. There will be no spam, and you may leave the mailing list at anytime.
<form method="post" action="/mailinglist.php">
<?php if ($success) { ?>
<div class="alert alert-success">
Great to see you joining our mailing list. Pleas check your mails to confirm you sign up!
<?php } else if ($error) { ?>
<div class="alert alert-error">
Error signing up. Please contact us directly.
<?php } ?>
<div class="form-group">
<label for="inputEmail">Email Address</label>
<input name="email" type="email" class="form-control" id="inputEmail" aria-describedby="emailHelp" placeholder="Enter email" required>
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
<div class="form-group">
<label for="inputName">Your Name (optional)</label>
<input name="fullname" type="text" class="form-control" id="inputName" aria-describedby="nameHelp" placeholder="First Name">
<small id="nameHelp" class="form-text text-muted">We'll only use it to address you by your name.</small>
<button type="submit" name="email-button" class="btn btn-primary">Sign Up</button>
include "../templates/scripts.html"
......@@ -21,4 +21,9 @@
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment