Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/crons/
Upload File :
Current File : /var/www/cesa.co.za/crons/ad-reminders.php

<?php

/*
 * Check what training material is expiring in the next 60 days and send notifications
 */

ini_set('display_errors', 1);
error_reporting(E_ALL);

if (!isset($_SERVER['DOCUMENT_ROOT']) || strlen($_SERVER['DOCUMENT_ROOT']) <= 0) {
    $_SERVER['DOCUMENT_ROOT'] = str_replace('/crons', '', getcwd());
}

include_once($_SERVER['DOCUMENT_ROOT'] . "/cfg/config.php");
include_once($_SERVER['DOCUMENT_ROOT'] . "/php/includes/maill.php");

//echo EW_CONN_HOST . '<br />';
$conni = mysqli_connect(EW_CONN_HOST, EW_CONN_USER, EW_CONN_PASS, EW_CONN_DB);

include_once($_SERVER['DOCUMENT_ROOT'] . "/cesanet/inc_shared.php");

$memberFirmsObj = new MemberFirm($sqlf);

$memberFirms = $memberFirmsObj->getADNotComplete();

echo count($memberFirms) . '<br />';
//exit;

foreach ($memberFirms as $memberFirm) {

    echo $memberFirm['FirmName'] . '; ' . $memberFirm['ContactInitials'] . ' ' . $memberFirm['ContactSurname'] . '; ' . $memberFirm['Email'] . '<br />';

    $memberFirm['Email'] = 'test@igotafrica.com';

//    maill(
//            trim($memberFirm['Email']),
//            'Your CESA Unemployed Practitioner Entry has Expired',
//            '<p>Dear ' . $memberFirm['ContactInitials'] . ' ' . $memberFirm['ContactSurname'] . '</p>'
//            . '<p>We hope this message finds you well. As part of our annual compliance process, we kindly request all members to submit their Annual Declaration Forms by the specified deadline.</p>'
//            . '<p>Important Details:</p>'
//            . '<p>Submission Deadline: 22 May 2024</p>'
//            . '<p>Purpose: The annual declaration form ensures accurate reporting of membership, transformation relevant information.</p>'
//            . '<p>How to Submit:</p>'
//            . '<p>Log in to your account on our platform https://www.cesa.co.za/login/ .</p>'
//            . '<p>Your timely submission helps us maintain accurate records and ensures compliance with legal requirements. If you have any questions or need assistance, please don’t hesitate to reach out to our support team.</p>'
//            . '<p>Thank you for your cooperation!</p>'
//            . '<p>Many thanks and kind regards,</p>'
//            . '<p>CESA Team<br />'
//            . 'Email: <a href="mailto:gillian@cesa.co.za">gillian@cesa.co.za</a><br />'
//            . 'Website: <a href="https://www.cesa.co.za">www.cesa.co.za</a></p>',
//            null,
//            array(
//                'bcc' => array('godfrey@cesa.co.za', 'cesa-notify@igotafrica.com', 'gillian@cesa.co.za'),
//                'from-name' => 'CESA',
//                'from-address' => 'godfrey@cesa.co.za',
//                'isHTML' => true
//            )
//    );
//    $memberFirmsObj->updateReminderSent($memberFirm);
}

echo 'DONE!<br />';