Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
php /
templates /
school /
Delete
Unzip
Name
Size
Permission
Date
Action
CertificateEmailOneAddress.php
8.08
KB
-rw-r--r--
2026-08-24 10:15
SchoolAttendeeBookingForm.php
369
B
-rw-r--r--
2026-04-02 12:19
SchoolAttendeeBookingFormSend.php
544
B
-rw-r--r--
2026-04-02 12:19
SchoolAttendeeBulkEmail.php
19.04
KB
-rw-r--r--
2026-08-24 10:15
SchoolAttendeeFixCase.php
552
B
-rw-r--r--
2026-04-02 12:19
SchoolEventCourseCancelledEmail.php
9.62
KB
-rw-r--r--
2026-08-24 10:15
SchoolEventCoursePostponedEmail.php
13.36
KB
-rw-r--r--
2026-08-24 10:15
SchoolEventInsufficientDelegatesEmail.php
9.05
KB
-rw-r--r--
2026-08-24 10:15
SchoolWeeksCoursesDashboard.php
8.98
KB
-rw-r--r--
2026-08-24 10:15
php_errors.log
966
B
-rw-r--r--
2026-08-21 08:08
Save
Rename
<?php session_start(); ob_start(); // Load PHPMaker core stack before echasl23 header/menu rendering. if (!function_exists('IsLoggedIn')) { include_once($_SERVER['DOCUMENT_ROOT'] . '/echasl23/ewcfg7.php'); include_once($_SERVER['DOCUMENT_ROOT'] . '/php/includes/require_ewmysql.php'); cesa_require_ewmysql($_SERVER['DOCUMENT_ROOT'] . '/echasl23/ewmysql7.php'); include_once($_SERVER['DOCUMENT_ROOT'] . '/echasl23/phpfn7.php'); include_once($_SERVER['DOCUMENT_ROOT'] . '/echasl23/userfn7.php'); } include_once($_SERVER['DOCUMENT_ROOT'] . '/cfg/config.php'); include_once($_SERVER['DOCUMENT_ROOT'] . '/php/includes/sqlFunctions.php'); include_once($_SERVER['DOCUMENT_ROOT'] . '/php/includes/SchoolAttendeeBulkMailerService.php'); if (defined('EW_SESSION_STATUS') && (!isset($_SESSION[EW_SESSION_STATUS]) || $_SESSION[EW_SESSION_STATUS] !== 'login')) { header('Location: /echasl23/login.php'); exit; } $eventId = isset($_REQUEST['EventID']) ? intval($_REQUEST['EventID']) : 0; $service = new SchoolAttendeeBulkMailerService($sqlf, $sqlfMail); $data = $service->getEventWithAttendees($eventId); $event = $data['event']; $attendees = $data['attendees']; $errorMessage = ''; $successMessage = ''; $eventCancelled = is_array($event) && intval(isset($event['Cancelled']) ? $event['Cancelled'] : 0) > 0; $defaultSubject = 'Course Cancelled due to Insufficient Delegates'; $defaultTemplate = "Dear *FullName*\n\n" . "We regret to inform you that the upcoming *CourseName*, scheduled to run from *StartDate* to *EndDate*, " . "has been cancelled due to insufficient delegate registrations.\n\n" . "We sincerely apologise for any inconvenience this may cause. If you would like to be placed on a future course, " . "please let us know and we will gladly assist with the process.\n" . "*PaidRefundParagraph*\n" . "We value your interest in our courses and hope to welcome you to one of our future courses.\n\n" . "Please feel free to reach out should you wish to transfer your registration to another course.\n\n" . "Thank you for your understanding.\n\n" . "With kind regards,\n\n" . "Melissa Jardine"; $subject = isset($_POST['subject']) ? trim((string) $_POST['subject']) : $defaultSubject; $template = isset($_POST['template']) ? (string) $_POST['template'] : $defaultTemplate; $confirmSend = !empty($_POST['confirm_send']); $eligibleAttendees = array(); $skippedAttendees = array(); if (is_array($attendees)) { foreach ($attendees as $attendee) { $email = trim((string) $attendee['EmailAddress']); $cancelled = intval($attendee['Cancelled']) > 0; $emailOk = ($email !== '' && stripos($email, 'no e-mail') !== 0); if ($cancelled || !$emailOk) { $skippedAttendees[] = $attendee; continue; } $eligibleAttendees[] = $attendee; } } if ($_SERVER['REQUEST_METHOD'] === 'POST') { try { $result = $service->queueCourseCancelledEmail(array( 'event_id' => $eventId, 'subject' => $subject, 'template' => $template, 'confirm_send' => $confirmSend ? 1 : 0, 'campaign_label' => 'SCE Course Cancelled', 'online_course_link' => is_array($event) && isset($event['OnlineCourseLink']) ? trim((string) $event['OnlineCourseLink']) : '', )); $successMessage = 'Queued ' . intval($result['queued_count']) . ' messages into mail system (MessageID: ' . intval($result['message_id']) . ').'; } catch (Exception $ex) { $errorMessage = $ex->getMessage(); } } ?> <?php include $_SERVER['DOCUMENT_ROOT'] . '/echasl23/header.php'; ?> <h1>Auto Email — Course Cancelled</h1> <?php if ($eventId <= 0 || !is_array($event) || count($event) <= 0) { ?> <div class="alert alert-danger">Invalid EventID.</div> <p><a class="btn btn-default" href="javascript:history.back();">Back</a></p> <?php } else { ?> <?php if (!$eventCancelled) { ?> <div class="alert alert-warning"> This School Event is not marked as cancelled. Mark Cancelled = Yes on the event before sending this email. </div> <?php } ?> <?php if ($errorMessage !== '') { ?> <div class="alert alert-danger"><?php echo htmlspecialchars($errorMessage); ?></div> <?php } ?> <?php if ($successMessage !== '') { ?> <div class="alert alert-success"><?php echo htmlspecialchars($successMessage); ?></div> <?php } ?> <div class="panel panel-default"> <div class="panel-heading"><b>Event</b></div> <div class="panel-body"> <p><b><?php echo htmlspecialchars((string) $event['EventName']); ?></b></p> <p> <?php echo htmlspecialchars((string) (isset($event['StartDate']) ? $event['StartDate'] : '')); ?> – <?php echo htmlspecialchars((string) (isset($event['EndDate']) ? $event['EndDate'] : '')); ?> </p> <p> Status: <b><?php echo $eventCancelled ? 'Cancelled' : 'Not cancelled'; ?></b> </p> <p> Eligible recipients: <b><?php echo count($eligibleAttendees); ?></b> <?php if (count($skippedAttendees) > 0) { ?> (<?php echo count($skippedAttendees); ?> skipped — cancelled or invalid/missing e-mail) <?php } ?> </p> <p class="help-block"> Paid attendees receive the refund/credit paragraph via <code>*PaidRefundParagraph*</code>; unpaid attendees do not. </p> </div> </div> <form method="post"> <input type="hidden" name="EventID" value="<?php echo intval($eventId); ?>"> <div class="panel panel-default"> <div class="panel-heading"><b>Message Content</b></div> <div class="panel-body"> <div class="form-group"> <label>Subject</label> <input class="form-control" type="text" name="subject" value="<?php echo htmlspecialchars($subject); ?>"> </div> <div class="form-group"> <label>Message Template</label> <textarea class="form-control" name="template" rows="18"><?php echo htmlspecialchars($template); ?></textarea> </div> <p class="help-block"> Placeholders: <code>*FullName*</code>, <code>*FirstName*</code>, <code>*LastName*</code>, <code>*KnownAs*</code>, <code>*ContactLastName*</code>, <code>*CourseName*</code>, <code>*EventName*</code>, <code>*StartDate*</code>, <code>*EndDate*</code>, <code>*StartTime*</code>, <code>*EndTime*</code>, <code>*PaidRefundParagraph*</code> </p> </div> </div> <div class="panel panel-default"> <div class="panel-heading"><b>Recipients (non-cancelled with valid e-mail)</b></div> <div class="panel-body" style="max-height: 420px; overflow: auto;"> <?php if (count($eligibleAttendees) <= 0) { ?> <p class="text-muted">No eligible recipients for this event.</p> <?php } else { ?> <table class="table table-bordered table-striped"> <thead> <tr> <th>Name</th> <th>E-mail</th> <th>Status</th> </tr> </thead> <tbody> <?php foreach ($eligibleAttendees as $attendee) { ?> <tr> <td><?php echo htmlspecialchars(trim((string) $attendee['ContactFirstName'] . ' ' . (string) $attendee['ContactLastName'])); ?></td> <td><?php echo htmlspecialchars(trim((string) $attendee['EmailAddress'])); ?></td> <td> <?php $isPaid = isset($attendee['IsPaid']) && intval($attendee['IsPaid']) === 1; echo 'Ready (' . ($isPaid ? 'Paid — refund paragraph included' : 'Unpaid') . ')'; ?> </td> </tr> <?php } ?> </tbody> </table> <?php } ?> </div> </div> <div class="panel panel-warning"> <div class="panel-heading"><b>Confirmation required</b></div> <div class="panel-body"> <div class="checkbox"> <label> <input type="checkbox" name="confirm_send" value="1" <?php echo $confirmSend ? 'checked' : ''; ?>> I confirm that these emails should be sent to all eligible attendees listed above </label> </div> </div> </div> <button type="submit" class="btn btn-primary" <?php echo (!$eventCancelled || count($eligibleAttendees) <= 0) ? 'disabled' : ''; ?>> Queue messages in mail system </button> <a class="btn btn-default" href="/echasl23/SchoolAttendeeslist.php?showmaster=SchoolEvents&EventID=<?php echo intval($eventId); ?>">Back to attendees</a> <a class="btn btn-default" href="/echasl23/SchoolEventsedit.php?EventID=<?php echo intval($eventId); ?>">Back to event</a> </form> <?php } ?> <?php include $_SERVER['DOCUMENT_ROOT'] . '/echasl23/footer.php'; ?>