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

68 lines
1.7 KiB
PHP

<?php
require_once("include/globals.php");
if (SessionActive() != 1 || ! UserLoggedIn()) {
header("Location: /");
exit();
}
// Start the template and output buffering
startTemplate();
$templatePageTitle = getLanguageText('TEXT-EMAIL-BROADCAST') . " " . getLanguageText('TEXT-ADMINISTRATION');;
$headerArgs = "";
// Ensure that only admin users have access to this module
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Volunteer Administrator','Communications Administrator','Financial','Financial Team');
if (checkPermission($AllowedUserTypes) != 1) {
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
$action = '';
$naction = '';
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
exit();
}
//
// Process according to the specified action
//
switch ($action) {
case "email-messages":
include "email-messages.php";
break;
case "email-logs":
include "email-logs.php";
break;
case "email-parents":
include "email-parents.php";
break;
case "email-hotlunch-contacts":
include "email-hotlunch-contacts.php";
break;
case "email-inactive-contacts":
include "email-inactive-contacts.php";
break;
case "email-sales-contacts":
include "email-sales-contacts.php";
break;
case "quick-send":
include "email-quicksend.php";
break;
default:
echo("<br>\n");
echo("<p>Welcome the email broadcast system. Select from an option above to continue</p>\n");
echo("<br>\n");
break;
}
endTemplate();
?>