| Current Path : /var/www/cesa.co.za/php/ |
| Current File : /var/www/cesa.co.za/php/annualdeclaration.php |
<?php
// ini_set('display_errors', 1);
// error_reporting(E_ALL);
session_start();
$sessid = session_id();
include_once("memberauth.php");
include_once('inc_db.php');
// $urlauthparams = "PHPSESSID=".htmlspecialchars($sessid)."&u=".$GLOBALS['user']->name;
// $urlauthparams = "u=" . crypt($GLOBALS['user']->name, $GLOBALS['user']->name);
$query = "SELECT DISTINCT user_login.username, tblMemberFirms.FirmID
FROM user_login, OfficeContacts, tblMemberFirmOffices, tblMemberFirms
WHERE (user_login.contact_id = OfficeContacts.ContactsID)
AND OfficeContacts.OfficeID=tblMemberFirmOffices.OfficeID
AND tblMemberFirmOffices.FirmID=tblMemberFirms.FirmID
AND (tblMemberFirms.MemberStatus='Member'
OR (tblMemberFirms.MemberStatus='Testing' AND tblMemberFirms.FirmID = 1312))
AND user_login.sessionid='" . $sessid . "' ";
// echo 'Debug info. Please ignore. ' . $query;
$result = mysqli_query($conni, $query);
if ($row = mysqli_fetch_assoc($result)) {
$MemberFirmID = $row["FirmID"];
$urlauthparams = "u=" . md5($row["username"]);
$DeclarationYear = date('Y');
?>
<style>
.annualdec a {
color: blue !important;
}
</style>
<div class="annualdec">
<p>Welcome to the Annual Declaration Section.</p>
<hr />
<p><strong><em>QUICK LINKS</em></strong></p>
<p>Please note that Parts 1 and 2 are compulsory and must be completed to receive your annual CESA membership certificate.</p>
<p><strong><em>Annual Declaration Part 1 - Firm Company Information, Transformation, Offices Inside and Outside South Africa, Fields of Expertise<br>
</em>Required by 23 February 2026</strong></p>
<ol>
<li><a href="https://cesa-wordpress-files-uploads.storage.googleapis.com/wp-content/uploads/2026/01/22115922/CESA_Form2-Annual_Declaration.pdf" target="_blank">Annual Declaration Part 1 PDF to Complete</a></li>
<li><a href="https://cesa-wordpress-files-uploads.storage.googleapis.com/wp-content/uploads/2026/01/22115924/Quality-of-CESA-Service.pdf" target="_blank">Annual Declaration of Quality of CESA Service PDF to Complete</a></li>
<!-- <li><a href="/members/AnnualDeclaration_Part1/annualGENERIC4.php?<?php echo $urlauthparams; ?>" target="_blank">Annual Declaration Part 1 Online Update</a></li> -->
</ol>
<p><strong><em>Annual Declaration Part 2 - CESA Management System Declarations (MSDs)</em></strong></p>
<ol>
<?php
if (strpos($_SERVER['HTTP_HOST'], 'devstage.co.za') > 0) {
$declarationLink = "/php/adecquestionnaire.php";
} else {
$declarationLink = "/management-system-declarations/";
}
?>
<li><a href="https://cesa-wordpress-files-uploads.storage.googleapis.com/wp-content/uploads/2026/01/22115923/CESA-FIMS_MSD_202601.pdf"
target="_blank">MSD: FIDIC Integrity Management System (FIMS) Questionnaire</a>
<?php
/*
$nowDate = new DateTime();
$sql = "SELECT af.*,
(SELECT aa.Answer
FROM ADQAnswers aa
WHERE aa.ADQFirmID = af.ADQFirmID
ORDER BY aa.ADQuestionID LIMIT 1) AS Certified
FROM ADQFirms af
WHERE af.ADQID=1 AND af.FirmID=" . $MemberFirmID . " AND af.DateCompleted IS NOT NULL
AND af.AuditYear = " . $DeclarationYear . "
ORDER BY af.DateCompleted DESC LIMIT 1";
$recADQ = mysqli_query($conni, $sql);
if ($rowADQ = mysqli_fetch_assoc($recADQ)) {
echo " - <i>Completed on " . date("Y-m-d", strtotime($rowADQ["DateCompleted"]));
if (!empty($rowADQ["ScorePerc"]))
echo ", score " . $rowADQ["ScorePerc"] . "%";
elseif ($rowADQ["Certified"] == 'Yes')
echo ", score 100%";
echo "</i>";
}
*/
?>
</li>
<li><a href="https://cesa-wordpress-files-uploads.storage.googleapis.com/wp-content/uploads/2026/01/22115919/CESA-QMS_MSD_202601.pdf"
target="_blank">MSD: FIDIC Quality Management System (QMS) Questionnaire</a>
<?php
/*
$sql = "SELECT af.*,
(SELECT aa.Answer
FROM ADQAnswers aa
WHERE aa.ADQFirmID = af.ADQFirmID
ORDER BY aa.ADQuestionID LIMIT 1) AS Certified
FROM ADQFirms af
WHERE af.ADQID=2 AND af.FirmID=" . $MemberFirmID . " AND af.DateCompleted IS NOT NULL
AND af.AuditYear = " . $DeclarationYear . "
ORDER BY af.DateCompleted DESC LIMIT 1";
// $sql = "SELECT * FROM ADQFirms WHERE ADQID=2 AND FirmID=" . $MemberFirmID . " AND DateCompleted IS NOT NULL ORDER BY DateCompleted DESC LIMIT 1";
$recADQ = mysqli_query($conni, $sql);
if ($rowADQ = mysqli_fetch_assoc($recADQ)) {
echo " - <i>Completed on " . $rowADQ["DateCompleted"];
if (!empty($rowADQ["ScorePerc"]))
echo ", score " . $rowADQ["ScorePerc"] . "%";
elseif ($rowADQ["Certified"] == 'Yes')
echo ", score 100%";
echo "</i>";
}
*/
?>
</li>
<li><a href="https://cesa-wordpress-files-uploads.storage.googleapis.com/wp-content/uploads/2026/01/22115920/CESA-PSM_MSD_202601.pdf"
target="_blank">MSD: FIDIC Project Sustainability Management System (PSM) Questionnaire</a>
<?php
/*
$sql = "SELECT af.*,
(SELECT aa.Answer
FROM ADQAnswers aa
WHERE aa.ADQFirmID = af.ADQFirmID
ORDER BY aa.ADQuestionID LIMIT 1) AS Certified
FROM ADQFirms af
WHERE af.ADQID=3 AND af.FirmID=" . $MemberFirmID . " AND af.DateCompleted IS NOT NULL
AND af.AuditYear = " . $DeclarationYear . "
ORDER BY af.DateCompleted DESC LIMIT 1";
// $sql = "SELECT * FROM ADQFirms WHERE ADQID=3 AND FirmID=" . $MemberFirmID . " AND DateCompleted IS NOT NULL ORDER BY DateCompleted DESC LIMIT 1";
$recADQ = mysqli_query($conni, $sql);
if ($rowADQ = mysqli_fetch_assoc($recADQ)) {
echo " - <i>Completed on " . $rowADQ["DateCompleted"];
if (!empty($rowADQ["ScorePerc"]))
echo ", score " . $rowADQ["ScorePerc"] . "%";
elseif ($rowADQ["Certified"] == 'Yes')
echo ", score 100%";
echo "</i>";
}
*/
?>
</li>
</ol>
<!-- <p><strong><em>Annual Declaration Part 3 - Details of Principals and
Professional Staff</em></strong></p>
<ol>
<li>
<a href="/members/AnnualDeclaration_Part1/annualpart2.php?<?php echo $urlauthparams; ?>" target="_blank">
Annual Declaration Part 3 Online Update</a>
</li>
</ol>
<hr />
<p><strong><em>WHAT TO SUBMIT</em></strong></p>
<p>Please note that the Annual Declaration can be submitted in
three parts.</p>
<p><strong>Part 1 to be signed by the Mandated Principal and submitted to CESA by 21 February 2025.</strong></p>
<p>Part 2 consists of the three management system declarations.</p>
<p>Part 3 contains
of the details of all principals and professional staff.</p>
<hr /> -->
<p><strong><em>HOW TO SUBMIT</em></strong></p>
<p>The Annual Declaration can be completed online, or you can print out a pre-filled hard copy and submit by email.</p>
<p><i>Please take a look at the following pages before continuing:</i><br />
<a href="/public_downloads/code_of_conduct.pdf" target="_blank">Code Of Conduct</a><br />
<a href="/members/AnnualDeclaration/docs/explanatory_notes.pdf" target="_blank">Explanatory Notes </a>
</p>
<!-- <table border="0" cellpadding="0" cellspacing="1" width="100%">
<tbody>
<tr>
<td bgcolor="#336699"><i><b>
<font color="#ffffff">Online Section:</font>
</b></i></td>
</tr>
<tr>
<td align="left" valign="top">
<p>We have an online facility where you can complete your annual declaration directly on the website. This means less paper and costs. Please follow the instructions on each page carefully.</p>
<ol>
<li><a href="/members/AnnualDeclaration_Part1/annualGENERIC4.php?<?php echo $urlauthparams; ?>" target="_blank">Part 1: required by 21 February 2025. Click here to begin your online update of Part 1.</a></li>
<li><a href="/members/AnnualDeclaration_Part1/annualpart2.php?<?php echo $urlauthparams; ?>" target="_blank">Part
3: Details of all principals and professional staff.</a></li>
</ol>
</td>
</tr>
</tbody>
</table><br />
<table border="0" cellpadding="0" cellspacing="1" width="100%">
<tbody>
<tr>
<td bgcolor="#336699"><i><b>
<font color="#ffffff">Printable Documentation:</font>
</b></i></td>
</tr>
<tr>
<td align="left" valign="top">
<p><i><b>You Can Still Print Your Documentation:</b></i><br />
If you prefer to complete a printed version of the Annual Declaration a downloadable version appears below. This reflects the current information available in our database for your firm. Please amend any incorrect information by entering the correct information in the appropriate shaded areas. Please complete blank forms for any new branch offices.</p>
<p><i><b>Please note this declaration must be signed by the Mandated Principal of the firm, and returned to:</b><br />
Consulting Engineers of South Africa<br />
PO Box 68482<br />
Bryanston<br />
2021 </i></p>
<p><b><i>How To Print:</i></b><br />
You can use the right hand button on the mouse to click on any open space and then select the Print function.</p>
<ol>
<li><a href="/members/AnnualDeclaration_Part1/annualDecMain.php?<?php echo $urlauthparams; ?>" target="_blank">Annual Declaration Part 1 - Printable Version - Click Here</a></li>
<li>
<a href="/public_downloads/20201209_CESA_FIMS_MSD_Final.pdf" target="_blank">FIDIC Integrity Management System (FIMS) Questionnaire</a>
<?php
$sql = "SELECT *
FROM ADQFirms
WHERE ADQID=1 AND FirmID=" . $MemberFirmID . " AND DateCompleted IS NOT NULL
AND ADQFirms.AuditYear = " . $DeclarationYear . "";
$recADQ = mysqli_query($conni, $sql);
if ($rowADQ = mysqli_fetch_assoc($recADQ)) {
echo " - <i>Completed on " . date("Y-m-d", strtotime($rowADQ["DateCompleted"]));
if (!empty($rowADQ["ScorePerc"]))
echo ", score " . $rowADQ["ScorePerc"] . "%";
echo "</i>";
}
?>
</li>
<li>
<a href="/public_downloads/20201209_CESA_QMS_MSD_Final.pdf" target="_blank">FIDIC Quality Management System (QMS) Questionnaire</a>
<?php
$sql = "SELECT *
FROM ADQFirms
WHERE ADQID=2 AND FirmID=" . $MemberFirmID . " AND DateCompleted IS NOT NULL
AND ADQFirms.AuditYear = " . $DeclarationYear . "";
$recADQ = mysqli_query($conni, $sql);
if ($rowADQ = mysqli_fetch_assoc($recADQ)) {
echo " - <i>Completed on " . $rowADQ["DateCompleted"];
if (!empty($rowADQ["ScorePerc"]))
echo ", score " . $rowADQ["ScorePerc"] . "%";
echo "</i>";
}
?>
</li>
<li>
<a href="/public_downloads/20201209_CESA_PSM_MSD_Final.pdf" target="_blank">FIDIC Project Sustainability Management System (PSM) Questionnaire</a>
<?php
$sql = "SELECT *
FROM ADQFirms
WHERE ADQID=3 AND FirmID=" . $MemberFirmID . " AND DateCompleted IS NOT NULL
AND ADQFirms.AuditYear = " . $DeclarationYear . "";
$recADQ = mysqli_query($conni, $sql);
if ($rowADQ = mysqli_fetch_assoc($recADQ)) {
echo " - <i>Completed on " . $rowADQ["DateCompleted"];
if (!empty($rowADQ["ScorePerc"]))
echo ", score " . $rowADQ["ScorePerc"] . "%";
echo "</i>";
}
?>
</li>
<li>
<a href="/members/AnnualDeclaration_Part1/annualDecPart2.php?<?php echo $urlauthparams; ?>">Annual Declaration Part
3 - Printable Version - Click Here</a>
</li>
</ol>
</td>
</tr>
</tbody>
</table>
-->
</div>
<?php
} else {
?>
<p>You are not authorised to access the Annual Declaration section.</p>
<?php
}