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(); 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; $mode = isset($_REQUEST['mode']) ? trim((string) $_REQUEST['mode']) : 'tba'; if ($mode !== 'dates') { $mode = 'tba'; } $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; $remembered = SchoolAttendeeBulkMailerService::getRememberedOriginalEventDates($eventId); $defaultOriginalStart = ($remembered && !empty($remembered['StartDate'])) ? (string) $remembered['StartDate'] : (is_array($event) && isset($event['StartDate']) ? (string) $event['StartDate'] : ''); $defaultOriginalEnd = ($remembered && !empty($remembered['EndDate'])) ? (string) $remembered['EndDate'] : (is_array($event) && isset($event['EndDate']) ? (string) $event['EndDate'] : ''); $defaultNewStart = is_array($event) && isset($event['StartDate']) ? (string) $event['StartDate'] : ''; $defaultNewEnd = is_array($event) && isset($event['EndDate']) ? (string) $event['EndDate'] : ''; $originalStartDate = isset($_POST['original_start_date']) ? trim((string) $_POST['original_start_date']) : $defaultOriginalStart; $originalEndDate = isset($_POST['original_end_date']) ? trim((string) $_POST['original_end_date']) : $defaultOriginalEnd; $newStartDate = isset($_POST['new_start_date']) ? trim((string) $_POST['new_start_date']) : $defaultNewStart; $newEndDate = isset($_POST['new_end_date']) ? trim((string) $_POST['new_end_date']) : $defaultNewEnd; if ($mode === 'dates') { $defaultSubject = 'Course Postponed – New Dates Confirmed'; $defaultTemplate = "Dear *FullName*\n\n" . "We wish to inform you that the upcoming *CourseName*, originally scheduled from *OriginalStartDate* to *OriginalEndDate*, " . "has been postponed. The course will now run from *NewStartDate* to *NewEndDate*.\n\n" . "We sincerely apologise for any inconvenience this change may cause and appreciate your understanding. " . "Your registration remains valid for the new dates; however, if the revised schedule does not suit you, " . "please feel free to contact us to discuss alternative arrangements.\n\n" . "We remain committed to delivering high-quality training and look forward to your participation.\n\n" . "Thank you for your continued support and interest in our courses.\n\n" . "With kind regards,\n\n" . "Melissa Jardine"; $pageTitle = 'Auto Email — Course Postponed (new dates)'; $campaignLabel = 'SCE Course Postponed (new dates)'; } else { $defaultSubject = 'Course Postponed – Dates to be Advised'; $defaultTemplate = "Dear *FullName*\n\n" . "We wish to inform you that the upcoming *CourseName*, originally scheduled from *StartDate* to *EndDate*, " . "has been postponed. At this stage, no new dates have been set.\n\n" . "In the meantime, please let us know if you would prefer to wait for the new dates before deciding to attend the next course, " . "or transfer your registration to another course, or discuss alternative arrangements such as a refund.\n\n" . "We sincerely apologise for any inconvenience this may cause and appreciate your understanding. " . "Once revised dates are confirmed, we will notify you promptly.\n\n" . "Thank you for your continued interest in our courses.\n\n" . "With kind regards,\n\n" . "Melissa Jardine"; $pageTitle = 'Auto Email — Course Postponed (dates to be advised)'; $campaignLabel = 'SCE Course Postponed (dates TBA)'; } $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->queueCoursePostponedEmail(array( 'event_id' => $eventId, 'mode' => $mode, 'subject' => $subject, 'template' => $template, 'confirm_send' => $confirmSend ? 1 : 0, 'campaign_label' => $campaignLabel, 'original_start_date' => $originalStartDate, 'original_end_date' => $originalEndDate, 'new_start_date' => $newStartDate, 'new_end_date' => $newEndDate, '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><?php echo htmlspecialchars($pageTitle); ?></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 marked cancelled. Use the Course Cancelled email unless you still need a postponement notice. </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> Current schedule: <?php echo htmlspecialchars((string) (isset($event['StartDate']) ? $event['StartDate'] : '')); ?> – <?php echo htmlspecialchars((string) (isset($event['EndDate']) ? $event['EndDate'] : '')); ?> </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> <?php if ($mode === 'tba') { ?> <p class="help-block">Use this notice when the course is postponed and no new dates have been set.</p> <?php } else { ?> <p class="help-block"> Suggested flow: edit the School Event schedule first, then send this postponement notice. Original dates are remembered from this login session if you opened the event edit page before changing dates. </p> <?php } ?> </div> </div> <form method="post"> <input type="hidden" name="EventID" value="<?php echo intval($eventId); ?>"> <input type="hidden" name="mode" value="<?php echo htmlspecialchars($mode); ?>"> <?php if ($mode === 'dates') { ?> <div class="panel panel-default"> <div class="panel-heading"><b>Original and new dates</b></div> <div class="panel-body"> <div class="form-group"> <label>Original start date</label> <input class="form-control" type="text" name="original_start_date" value="<?php echo htmlspecialchars($originalStartDate); ?>"> </div> <div class="form-group"> <label>Original end date</label> <input class="form-control" type="text" name="original_end_date" value="<?php echo htmlspecialchars($originalEndDate); ?>"> </div> <div class="form-group"> <label>New start date</label> <input class="form-control" type="text" name="new_start_date" value="<?php echo htmlspecialchars($newStartDate); ?>"> </div> <div class="form-group"> <label>New end date</label> <input class="form-control" type="text" name="new_end_date" value="<?php echo htmlspecialchars($newEndDate); ?>"> </div> </div> </div> <?php } ?> <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="16"><?php echo htmlspecialchars($template); ?></textarea> </div> <p class="help-block"> Placeholders: <code>*FullName*</code>, <code>*CourseName*</code>, <code>*EventName*</code>, <code>*StartDate*</code>, <code>*EndDate*</code><?php if ($mode === 'dates') { echo ', <code>*OriginalStartDate*</code>, <code>*OriginalEndDate*</code>, <code>*NewStartDate*</code>, <code>*NewEndDate*</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> </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> </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 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'; ?>