forked from vern/website
I screwed up the email check part earlier so i fix
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
506fcadec9
commit
92e3dec9f9
|
@ -27,18 +27,21 @@
|
|||
}
|
||||
$err = $email = $code = $code_err = '';
|
||||
$confirmed = false;
|
||||
if (!empty($_GET['action']))
|
||||
if (!empty($_GET['email']))
|
||||
if (filter_var(sanitize($_GET['email']), FILTER_VALIDATE_EMAIL))
|
||||
if (preg_match("/^" . preg_quote($_GET['email']) . "$/", file_get_contents("/var/spool/list")) !== 1)
|
||||
if (!empty($_GET['action'])) {
|
||||
if (!empty($_GET['email'])) {
|
||||
if (filter_var(sanitize($_GET['email']), FILTER_VALIDATE_EMAIL)) {
|
||||
if (preg_match("/^" . preg_quote($_GET['email']) . "$/", file_get_contents("/var/spool/list")) === 1) {
|
||||
if ($_GET['action'] == "sub")
|
||||
$email = sanitize($_GET['email']);
|
||||
else $err = "E-mail already in list";
|
||||
} else {
|
||||
if ($_GET['action'] == "unsub")
|
||||
$email = sanitize($_GET['email']);
|
||||
else $err = "E-mail not in list";
|
||||
else if ($_GET['action'] == "unsub")
|
||||
$email = sanitize($_GET['email']);
|
||||
else $err = "E-mail already in list";
|
||||
else $err = "Invalid E-mail";
|
||||
else $err = "E-mail is required";
|
||||
}
|
||||
} else $err = "Invalid E-mail";
|
||||
} else $err = "E-mail is required";
|
||||
}
|
||||
|
||||
$filename = "/tmp/list-code-" . $email;
|
||||
|
||||
|
|
Loading…
Reference in New Issue