I THINK ITS DONE

Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2023-08-26 05:40:59 -04:00
parent 69ae935fb8
commit fe17adaa38
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
1 changed files with 3 additions and 2 deletions

View File

@ -44,10 +44,11 @@
if (!empty($_GET['code'])) {
if (file_get_contents($filename) == $_GET['code']) {
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 {
$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);
}
unlink($filename);