fetch_all(MYSQLI_ASSOC); /* * Announce to * - mailing list (hereby the announcement archive at lists.arf20.com) * - discord webhook * - irc (bridged) announcement notice * - NNTP? * - phpBB? * - another, custom, archive ARFNET-ly */ // POST actions if ($_SERVER["REQUEST_METHOD"] == "POST") { /* Send email */ $mailer->addAddress(MAIL_ANNOUNCE_ADDRESS); $mailer->addReplyTo(getuserbyid($id)["email"]); $mailer->Subject = "[ARFNET Announcement] ".$_POST["subject"]; $mailer->Body = $_POST["body"]; if (!$mailer->send()) { echo 'Mailer Error [ask arf20]: ' . $mailer->ErrorInfo; } else header("location: ".$_SERVER['SCRIPT_NAME']); } function getuserbyid($id) { global $users; foreach ($users as $user) { if ($user["id"] == $id) { return $user; } } } ?>