Files
HotLunches/email-inactive-contacts.php
T
2026-10-19 15:22:52 -07:00

40 lines
957 B
PHP

<?php
require_once("include/globals.php");
if (SessionActive() != 1 || ! UserLoggedIn()) {
header("Location: /");
exit();
}
// Ensure that only admin users have access to this module
$AllowedUserTypes = array('SuperUser');
if (checkPermission($AllowedUserTypes) != 1) {
echo("<br>\n");
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
include "form.messages.php";
return;
}
if (array_key_exists('naction',$_GET) && strlen($_GET['naction']) > 0) $naction = $_GET['naction'];
if (array_key_exists('naction',$_POST) && strlen($_POST['naction']) > 0) $naction = $_POST['naction'];
//
// Process requests to send emails to parents
//
switch ($naction) {
case "confirm":
include "email-inactive-contacts-confirm.php";
break;
case "send":
include "email-batch-post.php";
break;
default:
include "email-inactive-contacts-form.php";
break;
}
?>