I THINK ITS DONE
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
69ae935fb8
commit
fe17adaa38
|
@ -44,10 +44,11 @@
|
||||||
if (!empty($_GET['code'])) {
|
if (!empty($_GET['code'])) {
|
||||||
if (file_get_contents($filename) == $_GET['code']) {
|
if (file_get_contents($filename) == $_GET['code']) {
|
||||||
if ($_GET['action'] == "sub") {
|
if ($_GET['action'] == "sub") {
|
||||||
file_put_contents($filename, $code . PHP_EOL, FILE_APPEND);
|
file_put_contents("/var/spool/list", $email . PHP_EOL, FILE_APPEND);
|
||||||
} else {
|
} else {
|
||||||
$contents = file_get_contents("/var/spool/list");
|
$contents = file_get_contents("/var/spool/list");
|
||||||
$contents = str_replace($line . PHP_EOL, '', $contents);
|
$contents = preg_replace("/^" . preg_quote($email) . "$/", '', $contents);
|
||||||
|
$contents = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $contents);
|
||||||
file_put_contents("/var/spool/list", $contents);
|
file_put_contents("/var/spool/list", $contents);
|
||||||
}
|
}
|
||||||
unlink($filename);
|
unlink($filename);
|
||||||
|
|
Loading…
Reference in New Issue