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 /
includes /
Delete
Unzip
Name
Size
Permission
Date
Action
error_handling
[ DIR ]
drwxr-sr-x
2025-07-07 15:54
mail
[ DIR ]
drwxr-sr-x
2025-06-14 11:17
ADQAnswers.php
3.16
KB
-rw-r--r--
2026-06-03 05:55
ADQAudit.php
6.51
KB
-rw-r--r--
2026-06-03 05:55
ADQAuditAnswers.php
1.21
KB
-rw-r--r--
2026-06-03 05:55
ADQFirms.php
18.41
KB
-rw-r--r--
2025-12-31 10:56
ADQuestionnairesAnswers.php
1.05
KB
-rw-r--r--
2026-06-03 05:55
ADQuestionnairesAudit.php
2.01
KB
-rw-r--r--
2026-06-03 05:55
ADecQuestionnaires.php
3.31
KB
-rw-r--r--
2026-06-03 05:55
ADecQuestions.php
541
B
-rw-r--r--
2026-06-03 05:55
ADec_Contacts.php
1.61
KB
-rw-r--r--
2026-06-03 05:55
ADec_OfficeContacts.php
7.43
KB
-rw-r--r--
2026-06-03 05:55
ADec_PIUnderwriters.php
742
B
-rw-r--r--
2026-06-03 05:55
ADec_Transformation.php
817
B
-rw-r--r--
2026-06-03 05:55
ADec_tblMemberFirmOffices.php
1.49
KB
-rw-r--r--
2026-06-03 05:55
ADec_tblMemberFirmSkills.php
2.38
KB
-rw-r--r--
2026-06-03 05:55
ADec_tblMemberFirms.php
19.37
KB
-rw-r--r--
2026-06-03 05:55
AnonRespondees.php
4.25
KB
-rw-r--r--
2026-06-05 11:41
AwardsEntries.php
2.4
KB
-rw-r--r--
2026-06-06 10:48
BaseTableClass.php
950
B
-rw-r--r--
2026-04-26 08:24
BatchJob.php
4.46
KB
-rw-r--r--
2026-06-03 05:55
BceAssignmentFeedbackFormsReportService.php
6.77
KB
-rw-r--r--
2026-05-25 13:06
CCEAssignment.php
12.44
KB
-rw-r--r--
2026-05-26 14:26
CCEAssignmentMarking.php
26.26
KB
-rw-r--r--
2026-08-14 12:06
CCEBooks.php
524
B
-rw-r--r--
2026-06-03 05:55
CCEConvenorAuth.php
3.06
KB
-rw-r--r--
2026-08-19 11:18
CCECourseSchedules.php
579
B
-rw-r--r--
2026-06-03 05:55
CCEDocCategories.php
529
B
-rw-r--r--
2026-06-03 05:55
CCEDocuments.php
8.15
KB
-rw-r--r--
2026-08-20 12:16
CCEExam.php
15.87
KB
-rw-r--r--
2026-06-03 06:35
CCEExamQuestion.php
1.76
KB
-rw-r--r--
2026-06-03 05:55
CCEFacilitatorUser.php
931
B
-rw-r--r--
2026-06-03 05:55
CCEMessageLog.php
951
B
-rw-r--r--
2026-06-03 05:55
CCEMessages.php
8.88
KB
-rw-r--r--
2026-07-01 13:20
CCEModuleMarksService.php
7.16
KB
-rw-r--r--
2026-05-26 10:30
CCEModules.php
1.16
KB
-rw-r--r--
2026-06-03 05:55
CCEResourceGroups.php
591
B
-rw-r--r--
2026-06-03 05:55
CCEResources.php
896
B
-rw-r--r--
2026-06-03 05:55
CCESetup.php
256
B
-rw-r--r--
2026-02-09 16:20
CCEStAssigExtension.php
2.07
KB
-rw-r--r--
2026-06-03 05:55
CCEStAssigExtensionRequest.php
6.65
KB
-rw-r--r--
2026-06-03 05:55
CCEStudentAssignment.php
16.61
KB
-rw-r--r--
2026-07-15 14:44
CCEStudentCourses.php
611
B
-rw-r--r--
2026-06-03 05:55
CCEStudentDisplayOrder.php
4.96
KB
-rw-r--r--
2026-05-26 09:32
CCEStudents.php
8.4
KB
-rw-r--r--
2026-08-19 11:18
CCETemplates.php
896
B
-rw-r--r--
2026-06-03 05:55
CCEWeeklySessions.php
2.27
KB
-rw-r--r--
2026-02-09 16:25
CPDSPReview.php
624
B
-rw-r--r--
2026-06-03 05:55
CPDServiceProvider.php
4.57
KB
-rw-r--r--
2026-06-12 11:48
CPDTrainingMaterial.php
3.96
KB
-rw-r--r--
2026-06-12 11:48
CceUploadedFileService.php
34.9
KB
-rw-r--r--
2026-06-24 12:03
Certificates.php
8.93
KB
-rw-r--r--
2026-08-18 15:42
Contact.php
690
B
-rw-r--r--
2026-06-03 05:55
ErrorLog.php
1.22
KB
-rw-r--r--
2026-08-24 10:12
EventSchedules.php
5.39
KB
-rw-r--r--
2025-12-20 10:03
FileUploads.php
2.1
KB
-rw-r--r--
2026-06-03 05:55
HTMLHelper.php
17.2
KB
-rw-r--r--
2026-06-03 05:55
KeyValue.php
4.9
KB
-rw-r--r--
2026-04-25 09:34
Mailer.php
12.78
KB
-rw-r--r--
2026-07-15 09:50
MarketingAttendees.php
36.87
KB
-rw-r--r--
2026-08-14 12:06
MarketingPayments.php
2.52
KB
-rw-r--r--
2026-06-03 05:55
MemberContact.php
1.04
KB
-rw-r--r--
2026-06-03 05:55
MemberFirm.php
17.71
KB
-rw-r--r--
2026-06-03 05:55
MemberFirmOffices.php
752
B
-rw-r--r--
2026-06-03 05:55
MemberFirmSkill.php
18.04
KB
-rw-r--r--
2026-06-03 05:55
MemberPortalTransformationProxy.php
4.44
KB
-rw-r--r--
2026-05-20 09:08
MemberPortalUrls.php
1.82
KB
-rw-r--r--
2026-05-20 09:53
MsgAttachFileService.php
4.92
KB
-rw-r--r--
2026-06-22 08:37
OfficeContact.php
1.01
KB
-rw-r--r--
2026-06-03 05:55
Picklists.php
539
B
-rw-r--r--
2026-06-03 05:55
Questionnaires.php
849
B
-rw-r--r--
2026-01-23 12:39
SchoolAttendeeBulkMailerService.php
34.26
KB
-rw-r--r--
2026-08-11 10:45
SchoolAttendees.php
73.21
KB
-rw-r--r--
2026-08-11 10:45
SchoolCourses.php
7.98
KB
-rw-r--r--
2026-08-19 11:59
SchoolEvents.php
45.54
KB
-rw-r--r--
2026-08-18 15:42
SchoolPayments.php
4.48
KB
-rw-r--r--
2026-04-13 09:33
SchoolPresenters.php
1.86
KB
-rw-r--r--
2026-01-23 12:43
SchoolWeeksCoursesDashboardProxy.php
10.69
KB
-rw-r--r--
2026-08-14 12:32
TrainingProvider.php
8.06
KB
-rw-r--r--
2026-01-23 12:43
TrainingProviderDoc.php
554
B
-rw-r--r--
2026-06-03 05:55
Transformation.php
10.87
KB
-rw-r--r--
2026-05-13 09:36
UnempPractitioners.php
1.43
KB
-rw-r--r--
2026-06-03 05:55
Utils.php
13.72
KB
-rw-r--r--
2026-07-23 07:28
WeeklySessionsParser.php
7.87
KB
-rw-r--r--
2026-02-09 16:20
cceMessageAttachmentUpload.inc.php
5.12
KB
-rw-r--r--
2026-06-03 05:55
cceMessageEditor.inc.php
9.26
KB
-rw-r--r--
2026-07-01 13:20
cce_file_download_endpoint.php
1.75
KB
-rw-r--r--
2026-06-24 08:38
cstUnreadMessages.php
2.1
KB
-rw-r--r--
2026-07-01 13:20
cstWeeksCourses.php
1.84
KB
-rw-r--r--
2026-08-14 12:06
load_phpmailer.php
742
B
-rw-r--r--
2026-07-17 14:57
maill.php
19.45
KB
-rw-r--r--
2026-08-19 12:23
require_ewmysql.php
1.2
KB
-rw-r--r--
2026-08-24 10:12
sqlFunctions.php
10.48
KB
-rw-r--r--
2026-08-24 10:12
Save
Rename
<?php /* * Contact otto@igotafrica.com for license informatrion */ /** * Help to send mails * * @author otto@igotafrica.com */ class Mailer { public static function getMCCredentials() { return array( 'api_key' => 'julia@xe.co.za:f47413d314ebbe6d12a07f057628b68a-us13', ); } /** * Sanitize a mailbox address before validation. * Empty check first; then strip whitespace and collapse repeated dots. * For "Name <addr>" forms, display-name spaces are kept; only the address is cleaned. * * @param mixed $email * @return string sanitized address (or "Name <addr>"), empty if nothing usable remains */ public static function sanitizeEmailAddress($email) { if (!is_string($email)) { return ''; } $email = trim($email); if ($email === '') { return ''; } if (preg_match('/^(.*)<([^>]+)>\s*$/u', $email, $matches)) { $name = trim($matches[1]); $address = self::sanitizeMailboxPart(trim($matches[2])); if ($address === '') { return ''; } return $name !== '' ? $name . ' <' . $address . '>' : $address; } return self::sanitizeMailboxPart($email); } /** * Clean mailbox-only string: whitespace, SA TLD comma typos, consecutive dots. * * @param string $mailbox * @return string */ private static function sanitizeMailboxPart($mailbox) { if (!is_string($mailbox)) { return ''; } $mailbox = trim($mailbox); if ($mailbox === '') { return ''; } $mailbox = preg_replace('/[\s\x{00A0}]+/u', '', $mailbox); if ($mailbox === null || $mailbox === '') { return ''; } $mailbox = self::repairSouthAfricanTldCommaTypos($mailbox); // pamela@aseda.co..za → pamela@aseda.co.za $mailbox = preg_replace('/\.{2,}/', '.', $mailbox); // Trim stray dots at ends / next to @ $mailbox = trim($mailbox, '.'); $mailbox = str_replace(array('@.', '.@'), array('@', '@'), $mailbox); if ($mailbox === '' || strpos($mailbox, '@') === false) { return ''; } return $mailbox; } /** * Repair SA TLD typos where a comma was typed instead of a dot before the country code. * Example: user@globtek.co,za → user@globtek.co.za * * @param mixed $value * @return string */ public static function repairSouthAfricanTldCommaTypos($value) { if (!is_string($value) || $value === '') { return is_string($value) ? $value : ''; } return preg_replace('/\.(co|org|net|gov|ac|edu),za\b/i', '.$1.za', $value); } /** * Whether the value is a syntactically valid mailbox address. * Sanitize first, then reject empty, then validate. * * @param mixed $email * @return bool */ public static function isValidEmailAddress($email) { if (!is_string($email)) { return false; } // Empty check first (before heavier sanitize work on named forms) if (trim($email) === '') { return false; } $mailbox = self::sanitizeEmailAddress($email); if (strpos($mailbox, '<') !== false) { if (preg_match('/<([^>]+)>/', $mailbox, $matches)) { $mailbox = self::sanitizeMailboxPart($matches[1]); } else { return false; } } if ($mailbox === '' || strpos($mailbox, '@') === false) { return false; } return filter_var($mailbox, FILTER_VALIDATE_EMAIL) !== false; } /** * Split a recipient string or list into unique non-empty raw parts after TLD typo repair. * Empty / whitespace-only segments (e.g. from "a@b.com,,c@d.com") are dropped. * * @param mixed $to * @return array */ public static function parseRecipientList($to) { if (is_array($to)) { $merged = array(); foreach ($to as $item) { $merged = array_merge($merged, self::parseRecipientList($item)); } return array_values(array_unique($merged)); } if (!is_string($to) && !is_numeric($to)) { return array(); } $to = self::repairSouthAfricanTldCommaTypos((string) $to); $parts = preg_split('/\s*[,;]\s*/', $to, -1, PREG_SPLIT_NO_EMPTY); if (!is_array($parts)) { return array(); } $result = array(); foreach ($parts as $part) { $part = trim($part); // Also treat NBSP-only / whitespace-only as empty $stripped = preg_replace('/[\s\x{00A0}]+/u', '', $part); if ($part === '' || $stripped === null || $stripped === '') { continue; } $result[] = $part; } return array_values(array_unique($result)); } /** * Sanitize and validate a recipient; returns mailbox only, or empty if invalid. * Optional by-ref $displayName is filled when input is "Name <addr>". * * @param mixed $email * @param string|null $displayName * @return string */ public static function normalizeEmailAddress($email, &$displayName = null) { $displayName = ''; if (!is_string($email) || trim($email) === '') { return ''; } $sanitized = self::sanitizeEmailAddress($email); if ($sanitized === '') { return ''; } $mailbox = $sanitized; if (strpos($sanitized, '<') !== false) { $rcptArr = explode('<', $sanitized, 2); $displayName = trim($rcptArr[0]); $mailbox = self::sanitizeEmailAddress(str_replace('>', '', $rcptArr[1])); } // Sanitize already applied; empty check then validate if ($mailbox === '' || !self::isValidEmailAddress($mailbox)) { $displayName = ''; return ''; } return $mailbox; } public static function extractHeaders($rawHeaders) { $lines = explode("\n", $rawHeaders); $return = array(); foreach ($lines as $line) { $lineData = explode(': ', $line); if ($lineData[0] == 'From') { $nameFrom = explode('<', $lineData[1]); if (count($nameFrom) > 0) { $return['from-name'] = trim($nameFrom[0]); $return['from-address'] = str_replace('>', '', $nameFrom[1]); } else { $return['from-address'] = $lineData[1]; } } elseif ($lineData[0] == 'Reply-To') { $return['reply-to-address'] = $lineData[1]; } elseif ($lineData[0] == 'Content-Type') { $return['content-type'] = trim(substr($rawHeaders, strpos($rawHeaders, 'Content-Type') + 13)); } elseif ($lineData[0] == 'Content-Type') { $return['confirm-read'] = true; } } return $return; } /** * Escape text for iCalendar (RFC 5545): backslash, semicolon, comma, newline. * Outlook and other clients require this for SUMMARY, DESCRIPTION, LOCATION. */ public static function escapeIcalText($value) { if ($value === null || $value === '') { return ''; } return str_replace(array('\\', ';', ',', "\r\n", "\n", "\r"), array('\\\\', '\\;', '\\,', '\\n', '\\n', '\\n'), $value); } /** * Build RFC 5545 / Outlook-compatible .ics calendar invite. * Event times are interpreted as South Africa (Africa/Johannesburg, UTC+2) * and converted to UTC in the .ics so Outlook and other clients show the correct local time. */ public static function getCalendarInviteUid($marketingEvent, $eventAttendee) { $eventId = isset($marketingEvent['EventID']) ? intval($marketingEvent['EventID']) : 0; $attendeeId = isset($eventAttendee['AttendeeID']) ? intval($eventAttendee['AttendeeID']) : 0; if ($eventId > 0 && $attendeeId > 0) { return 'marketing-event-' . $eventId . '-attendee-' . $attendeeId . '@cesa.co.za'; } return md5(uniqid(mt_rand(), true)) . '@cesa.co.za'; } public static function getICalText($marketingEvent, $eventAttendee, $options = array()) { $isUpdate = !empty($options['isUpdate']); $changeMessage = isset($options['changeMessage']) ? trim((string) $options['changeMessage']) : ''; $sequence = isset($options['sequence']) ? intval($options['sequence']) : ($isUpdate ? time() : 0); $uid = isset($options['uid']) && strlen($options['uid']) > 0 ? $options['uid'] : self::getCalendarInviteUid($marketingEvent, $eventAttendee); $tzSA = new \DateTimeZone('Africa/Johannesburg'); $tzUTC = new \DateTimeZone('UTC'); $startDateTime = new \DateTime($marketingEvent['StartDate'] . ' ' . $marketingEvent['StartTime'], $tzSA); $endDateTime = new \DateTime($marketingEvent['EndDate'] . ' ' . $marketingEvent['EndTime'], $tzSA); $startDateTime->setTimezone($tzUTC); $endDateTime->setTimezone($tzUTC); $venue = isset($marketingEvent['Venue']) ? $marketingEvent['Venue'] : ''; if (isset($marketingEvent['City']) && strlen($marketingEvent['City']) > 0) { $venue .= ($venue !== '' ? ', ' : '') . $marketingEvent['City']; } if (isset($marketingEvent['Province']) && strlen($marketingEvent['Province']) > 0) { $venue .= ($venue !== '' ? ', ' : '') . $marketingEvent['Province']; } $summary = isset($marketingEvent['EventName']) ? $marketingEvent['EventName'] : ''; $description = isset($marketingEvent['EventDescription']) ? $marketingEvent['EventDescription'] : ''; if ($isUpdate) { $description = 'This event has been updated.' . ($description !== '' ? "\n\n" . $description : ''); } if ($changeMessage !== '') { $description .= ($description !== '' ? "\n\n" : '') . $changeMessage; } $attendeeName = trim(($eventAttendee['ContactFirstName'] ?? '') . ' ' . ($eventAttendee['ContactLastName'] ?? '')); $text = "BEGIN:VCALENDAR\r\n" . "VERSION:2.0\r\n" . "PRODID:-//CESA//events/NONSGML v1.0//EN\r\n" . "CALSCALE:GREGORIAN\r\n" . "METHOD:REQUEST\r\n" . "BEGIN:VTIMEZONE\r\n" . "TZID:Africa/Johannesburg\r\n" . "BEGIN:STANDARD\r\n" . "DTSTART:19700101T000000\r\n" . "TZOFFSETFROM:+0200\r\n" . "TZOFFSETTO:+0200\r\n" . "TZNAME:SAST\r\n" . "END:STANDARD\r\n" . "END:VTIMEZONE\r\n" . "BEGIN:VTIMEZONE\r\n" . "TZID:UTC\r\n" . "BEGIN:STANDARD\r\n" . "DTSTART:19700101T000000Z\r\n" . "TZOFFSETFROM:+0000\r\n" . "TZOFFSETTO:+0000\r\n" . "TZNAME:UTC\r\n" . "END:STANDARD\r\n" . "END:VTIMEZONE\r\n" . "BEGIN:VEVENT\r\n" . "UID:" . $uid . "\r\n" . "SEQUENCE:" . $sequence . "\r\n" . "DTSTAMP:" . gmdate('Ymd\THis\Z') . "\r\n" . "DTSTART:" . $startDateTime->format('Ymd\THis\Z') . "\r\n" . "DTEND:" . $endDateTime->format('Ymd\THis\Z') . "\r\n" . "SUMMARY:" . self::escapeIcalText($summary) . "\r\n" . "ORGANIZER;CN=CESA:mailto:events@cesa.co.za\r\n" . "LOCATION:" . self::escapeIcalText($venue) . "\r\n" . "DESCRIPTION:" . self::escapeIcalText($description) . "\r\n"; if (isset($marketingEvent['BannerImgURL']) && strlen($marketingEvent['BannerImgURL']) > 0) { $eventBanner = @file_get_contents($marketingEvent['BannerImgURL']); if ($eventBanner !== false && strlen($eventBanner) > 0) { $fileName = basename($marketingEvent['BannerImgURL']); $text .= "ATTACH;ENCODING=BASE64;VALUE=BINARY;X-FILENAME=" . $fileName . ":" . base64_encode($eventBanner) . "\r\n"; } } if (false) { // Add URL for event later $text .= "URL;VALUE=URI:https://www.redacted.com" . "\r\n"; } $attendeeCn = $attendeeName !== '' ? ';CN="' . str_replace(array('\\', '"'), array('\\\\', '\\"'), $attendeeName) . '"' : ''; $text .= "ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE" . $attendeeCn . ";X-NUM-GUESTS=0:MAILTO:" . $eventAttendee['EmailAddress'] . "\r\n" . "END:VEVENT\r\n" . "END:VCALENDAR\r\n"; return $text; } }