| Current Path : /var/www/cesa.co.za/php/ |
| Current File : /var/www/cesa.co.za/php/resendcpdform.php |
<?php
include_once("inc_db.php");
require_once $_SERVER['DOCUMENT_ROOT'] . '/phpmailer/PHPMailer.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/phpmailer/SMTP.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/phpmailer/Exception.php';
use PHPMailer\PHPMailer\PHPMailer;
function XMail($to, $subject, $msg, $from, $CC, $type) {
$mail = new PHPMailer;
//$mail->Mailer = "mail";
$mail->Mailer = "smtp";
$mail->Host = "relay.aitonline.co.za";
$mail->Port = 587;
$mail->Username = "mail@cesa.co.za";
$mail->Password = "c3SAmail!@!";
$mail->SMTPDebug = false;
$mail->SMTPAuth = true;
if ($type == "html")
$mail->IsHTML(true);
$mail->From = $from;
$mail->FromName = $from;
$arrto = explode(",", $to);
for ($i = 0; $i < count($arrto); $i++) {
$mail->AddAddress($arrto[$i]);
}
$mail->Subject = $subject;
$mail->Body = $msg;
if (!$mail->Send())
echo $mail->ErrorInfo;
}
//$sAccredNum="CESA-891-07/2019";
//$sAccredNum="CESA-890-07/2019";
//$sAccredNum="CESA-889-07/2019";
//$sAccredNum="CESA-888-10/2016";
$sql = "SELECT TrainingMaterial.*, SchoolProviders.ProviderName, SchoolProviders.Designation,
SchoolProviders.PostalAddress, SchoolProviders.FaxNumber, SchoolProviders.VATNumber
FROM TrainingMaterial, SchoolProviders
WHERE TrainingMaterial.ProviderID=SchoolProviders.ProviderID
";
//$sql.=" AND AccredNum='".$sAccredNum."'";
$sql .= "ORDER BY TrainingMaterial.MaterialID DESC
LIMIT 0,20";
$rec = mysql_query($sql);
while ($row = mysql_fetch_assoc($rec)) {
$sForm = '
<h3>APPLICATION FOR APPROVAL OF A CONTINUING PROFESSIONAL DEVELOPMENT (CPD) ACTIVITY</h3>
<p>Please complete the on-line application form and hand deliver or courier the following:
<ul><li>One hard copy of all the training material, including PowerPoint presentations and handouts, which will be used for the event.</li>
<li>A CD/DVD of all the training material, including PowerPoint presentations and handouts, which will be used for the event. [This is the achive copy]</li>
<li>Proof of payment</li>
<li>CV of trainer/s</li>
<li>A copy of a blank evaluation form for obtaining feedback from participants for rating of the relevance, quality and effectiveness of the event.</li>
</ul>
To: CESA, Building 9, Kildrummy Office Park, c/o Witkoppen and Umhlanga Rd, Paulshof, Johannesburg</p>
<p>
';
$sForm .= '
<table border="1" cellpadding="5" cellspacing="0">
<tbody>
<tr><td colspan=2><p style="font-weight: bold">BODY APPLYING FOR ACTIVITY APPROVAL IN TERMS OF ECSA CPD POLICY</p>
</td>
</tr>
<tr>
<td width="233"><p>Name of Training Provider:</p></td>
<td width="338"><p>' . $row["ProviderName"] . '
</p></td>
</tr>
<tr>
<td><p>Responsible Person:</p></td>
<td>' . $row["ContactPerson"] . '
</td>
</tr>
<tr>
<td><p>Designation:</p></td>
<td><p>
' . $row["Designation"] . '
</p></td>
</tr>
<tr>
<td valign="top"><p>Postal Address:</p></td>
<td><p>' . $row["PostalAddress"] . '
</p> </td>
</tr>
<tr>
<td><p>Telephone number:</p></td>
<td><p>' . $row["ContactTel"] . '
</p></td>
</tr>
<tr>
<td><p>Cell No. :</p></td>
<td><p>' . $row["ContactCell"] . '
</p></td>
</tr>
<tr>
<td><p>Fax number:</p></td>
<td><p>' . $row["FaxNumber"] . '
</p></td>
</tr>
<tr>
<td><p>E-mail address:</p></td>
<td><p>
' . $row["ContactEmail"] . '
</p></td>
</tr>
<tr>
<td><p>Company Vat Registration Number:</p></td>
<td><p>
' . $row["VATNumber"] . '
</p></td>
</tr>
<tr><td colspan=2><p style="font-weight: bold">DETAILS OF ACTIVITY</p></td></tr>
<tr>
<td width="222"><p>Course Name: (Name on Certificate)</p></td>
<td width="349"><p>
' . $row["Subject"] . '
</p></td>
</tr>
<tr>
<td valign="top"><p>Name/s of Presenter/s:</p>
<p>NB Presenter CVs must be emailed to <a href="mailto:blessings@cesa.co.za">blessings@cesa.co.za</a></p></td>
<td><p>
1.
' . $row["Presenter1"] . '
<br />
2.
' . $row["Presenter2"] . '
<br />
3.
' . $row["Presenter3"] . '
<br />
</p></td>
</tr>
<tr>
<td><p>Duration of Activity and cost of course: (Hours / Days)</p></td>
<td><p>
' . $row["Duration"] . ' ' . $row["DurationUnit"] . '
</p></td>
</tr>
<tr>
<td><p>Nature of the activity:</p></td>
<td><p>
' . $row["Level"] . '
</p></td>
</tr>
<tr>
<td><p>Pitched at NQF Level: (if applicable)</p></td>
<td><p>
' . $row["NQFLevel"] . '
</p></td>
</tr>
<tr>
<td valign="top"><p>Description of Course:</p></td>
<td>' . $row["EventDescription"] . '</td>
</tr>
<tr>
<td><p>Is the activity promoting a product?</p></td>
<td><p>' . $row["Promotion"] . '
</p></td>
</tr>
<tr>
<td><p>Starting date (if a conference or site visit):</p></td>
<td><p>' . date("Y-m-d", strtotime($row["StartDate"])) . '
</p></td>
</tr>
</tbody>
</table>
<br />
<p style="font-weight: bold">MOTIVATION FOR ACTIVITY TO BE APPROVED:</p>
<p>
' . $row["Motivation"] . '
</p><hr>
';
$sForm .= '
<p>Evaluation forms for obtaining feedback from participants for rating of the relevance, quality and effectiveness of the activity, must be provided.</p>
<p>
I, on behalf of the
Training Provider body as specified above, hereby certify that I am fully aware of the CESA policy on the selection and appointment of training providers and the statutory requirements of continuing professional development as described in the ECSA Policy Document and undertake to comply with the requirements of serving as an approved provider for this activity.</p>';
echo $sForm;
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: brenda@cesa.co.za' . "\r\n";
// $headers .= 'CC: pummy@cesa.co.za' . "\r\n";
// $headers .= 'CC: blessings@cesa.co.za' . "\r\n";
// $sSendFormTo = "brenda@cesa.co.za";
$sSendFormTo = "blessings@cesa.co.za";
XMail($sSendFormTo, $sAccredNum . " APPLICATION FOR APPROVAL OF A CONTINUING PROFESSIONAL DEVELOPMENT (CPD) ACTIVITY", $sForm, "brenda@cesa.co.za", "", "html");
}
?>