44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
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','System Administrator','Application Administrator','Volunteer Administrator','Communications Administrator','Financial','Financial Team');
|
|
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":
|
|
if ($school_num == 3 && $_SESSION['UserInfo']['type'] != 'SuperUser') {
|
|
echo("<p>The email send is disabled on demo site</p>\n");
|
|
return;
|
|
}
|
|
include "email-parents-confirm.php";
|
|
break;
|
|
|
|
case "send":
|
|
include "email-batch-post.php";
|
|
break;
|
|
|
|
default:
|
|
include "email-parents-form.php";
|
|
break;
|
|
}
|
|
?>
|