$invoice = get_unpaid_or_create_invoice($member); send_reminder_newmember_email($member, $invoice); } $key = 'Nouvelle adhésion, paiment non-reçu après 30 jours'; $report[$key][] = $member; } else { //echo '<div>Waiting for payment: '.$member['id'].": ".format_date($member['expiry_date'])."</div>\n"; // Do nothing //$key = 'Nouvelle adhésion, attente de paiement'; //$report[$key][] = $member; } } elseif ($member['expiry_date'] < $now) { //echo '<div>Expired: '.$member['id'].": ".format_date($member['expiry_date'])."</div>\n"; if (!$no_act) { if ($deactivate) { deactivate_member($member['id']); } $invoice = get_unpaid_or_create_invoice($member); send_expiry_notice_email($member, $invoice); } $key = 'Adhésion échue'; $report[$key][] = $member; } elseif ($member['expiry_date'] - $one_month < $now) { //echo '<div>In less than 30 days: '.$member['id'].": ".format_date($member['expiry_date'])."</div>\n"; // We send the e-mail only when creating the invoice, so that member is not bugged every day. $invoices = get_unpaid_invoices($member['id']); if (sizeof($invoices) == 0) { if (!$no_act) { $invoice = create_invoice($member); send_expiry_reminder_email($member, $invoice); }
# # This file is part of Famesy. # # Famesy is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Famesy is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Famesy; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA require_once "../../functions.php"; require_once "../../config.php"; $m = $_REQUEST['m']; if (strlen($m) == 0) { include "../../header.php"; echo format_error("Missing member ID"); include "../../footer.php"; } else { deactivate_member($m); $next = $_REQUEST['next']; if (strlen($next) == 0) { $next = ""; } header("Location: ../{$next}"); }