Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/crons/
Upload File :
Current File : /var/www/cesa.co.za/crons/sce-send-certificates.php

<?php

ini_set('display_errors', 1);
error_reporting(E_ALL);
//header('Content-type: text/json');

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

include_once($_SERVER['DOCUMENT_ROOT'] . "/ADOdb/adodb.inc.php");
include_once($_SERVER['DOCUMENT_ROOT'] . "/vendor/autoload.php");
include_once($_SERVER['DOCUMENT_ROOT'] . "/cfg/config.php");
include_once($_SERVER['DOCUMENT_ROOT'] . "/php/inc_db.php");
include_once($_SERVER['DOCUMENT_ROOT'] . "/cesanet/inc_shared.php");

$schoolAttendees = new SchoolAttendees($sqlf);

try {
    $schoolAttendees->sendAllAttendeeCertificates();
} catch (Exception $e) {
    echo $e->getMessage();
}

if (isset($conni) && is_object($conni)) {
    mysqli_close($conni);
}