Created
October 17, 2021 19:58
-
-
Save z1tr0t3c/629130391ce1648dabe38262945791c8 to your computer and use it in GitHub Desktop.
An-/Abmelde-Fontend für 1&1 IONOS Mailinglisten.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'; | |
$full_url = $protocol."://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
$no_params_url = explode('?', $full_url, 2)[0]; | |
$actual_link = $no_params_url; | |
$mlName = 'ML'; | |
$mlAdress = 'ml@example.org'; | |
?> | |
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<title><?php echo $mlName; ?> An-/Abmeldung</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
</head> | |
<body> | |
<h1><?php echo $mlName; ?> An-/Abmeldung</h1> | |
<form action="https://ml.kundenserver.de/cgi-bin/mailinglist.cgi" method="POST"> | |
<input name="FBMLNAME" type="hidden" value="<?php echo $mlAdress; ?>"> | |
<input name="FBLANG" type="hidden" value="de"> | |
<input name="FBURLERROR_L" type="hidden" value="<?php echo $actual_link; ?>?1"> | |
<input name="FBURLSUBSCRIBE_L" type="hidden" value="<?php echo $actual_link; ?>?2"> | |
<input name="FBURLUNSUBSCRIBE_L" type="hidden" value="<?php echo $actual_link; ?>?3"> | |
<input name="FBURLINVALID_L" type="hidden" value="<?php echo $actual_link; ?>?4"> | |
<fieldset> | |
<legend>Aktion</legend> | |
<label for="subscribe_r">Aktion:</label> | |
<select name="subscribe_r" id="subscribe_r"> | |
<option value="subscribe">Anmelden</option> | |
<option value="unsubscribe">Abmelden</option> | |
</select> | |
</fieldset> | |
<br> | |
<fieldset> | |
<legend>E-Mail</legend> | |
<label for="mailaccount_r">E-Mail-Adresse:</label> | |
<input maxlength="51" name="mailaccount_r" id="mailaccount_r" size="51" type="email" required> | |
<label for="mailaccount2_r">E-Mail-Adresse wiederholen:</label> | |
<input maxlength="51" name="mailaccount2_r" id="mailaccount2_r" size="51" type="email" required> | |
</fieldset> | |
<br> | |
<input type="submit" value="Absenden"> | |
</form> | |
<?php | |
if(isset($_GET['1'])) | |
{ | |
echo("<h2>Status</h2><b>Fehler:</b> Es ist ein Fehler aufgetreten. Bitte versuchen Sie es später noch einmal."); | |
} | |
if(isset($_GET['2'])) | |
{ | |
echo("<h2>Status</h2><b>Erfolg:</b> Um Ihre Anmeldung zu bestätigen, erhalten Sie eine Bestätigungs-E-Mail. Öffnen Sie die Bestätigungs-E-Mail und klicken Sie auf den darin enthaltenen Link, um die Anmeldung abzuschließen."); | |
} | |
if(isset($_GET['3'])) | |
{ | |
echo("<h2>Status</h2><b>Erfolg:</b> Um Ihre Abmeldung zu bestätigen, erhalten Sie eine Bestätigungs-E-Mail. Öffnen Sie die Bestätigungs-E-Mail und klicken Sie auf den darin enthaltenen Link, um die Abmeldung abzuschließen."); | |
} | |
if(isset($_GET['4'])) | |
{ | |
echo("<h2>Status</h2><b>Fehler:</b> Ihre E-Mail-Adresse scheint ungültig zu sein. Bitte überprüfen Sie, die korrekte Schreibweise in beiden Formular-Feldern."); | |
} | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment