| Current Path : /var/www/cesa.co.za/cpdadmin/ |
| Current File : /var/www/cesa.co.za/cpdadmin/CPDAssessorsview.php |
<?php
session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include "ewcfg7.php" ?>
<?php include "ewmysql7.php" ?>
<?php include "phpfn7.php" ?>
<?php include "CPDAssessorsinfo.php" ?>
<?php include "CPDAdminUsersinfo.php" ?>
<?php include "userfn7.php" ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Always modified
header("Cache-Control: private, no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
<?php
// Create page object
$CPDAssessors_view = new cCPDAssessors_view();
$Page =& $CPDAssessors_view;
// Page init
$CPDAssessors_view->Page_Init();
// Page main
$CPDAssessors_view->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($CPDAssessors->Export == "") { ?>
<script type="text/javascript">
<!--
// Create page object
var CPDAssessors_view = new ew_Page("CPDAssessors_view");
// page properties
CPDAssessors_view.PageID = "view"; // page ID
CPDAssessors_view.FormID = "fCPDAssessorsview"; // form ID
var EW_PAGE_ID = CPDAssessors_view.PageID; // for backward compatibility
// extend page with Form_CustomValidate function
CPDAssessors_view.Form_CustomValidate =
function(fobj) { // DO NOT CHANGE THIS LINE!
// Your custom validation code here, return false if invalid.
return true;
}
<?php if (EW_CLIENT_VALIDATE) { ?>
CPDAssessors_view.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CPDAssessors_view.ValidateRequired = false; // no JavaScript validation
<?php } ?>
//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
// Write your client script here, no need to add script tags.
// To include another .js script, use:
// ew_ClientScriptInclude("my_javascript.js");
//-->
</script>
<?php } ?>
<p><span class="phpmaker"><?php echo $Language->Phrase("View") ?> <?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CPDAssessors->TableCaption() ?>
<?php if ($CPDAssessors->Export == "") { ?>
<a href="<?php echo $CPDAssessors_view->ExportPrintUrl ?>"><img src="images/print.gif" alt="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" title="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" width="16" height="16" border="0"></a>
<a href="<?php echo $CPDAssessors_view->ExportExcelUrl ?>"><img src='images/exportxls.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' width='16' height='16' border='0'></a>
<a href="<?php echo $CPDAssessors_view->ExportWordUrl ?>"><img src='images/exportdoc.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' width='16' height='16' border='0'></a>
<a name="emf_CPDAssessors" id="emf_CPDAssessors" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_CPDAssessors',hdr:ewLanguage.Phrase('ExportToEmail'),key:<?php echo ew_ArrayToJsonAttr($CPDAssessors_view->arRecKey) ?>,sel:false});"><img src='images/exportemail.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' width='16' height='16' border='0'></a>
<?php } ?>
<br><br>
<?php if ($CPDAssessors->Export == "") { ?>
<a href="<?php echo $CPDAssessors_view->ListUrl ?>"><?php echo $Language->Phrase("BackToList") ?></a>
<?php if ($Security->IsLoggedIn()) { ?>
<a href="<?php echo $CPDAssessors_view->AddUrl ?>"><?php echo $Language->Phrase("ViewPageAddLink") ?></a>
<?php } ?>
<?php if ($Security->IsLoggedIn()) { ?>
<a href="<?php echo $CPDAssessors_view->EditUrl ?>"><?php echo $Language->Phrase("ViewPageEditLink") ?></a>
<?php } ?>
<?php if ($Security->IsLoggedIn()) { ?>
<a href="<?php echo $CPDAssessors_view->CopyUrl ?>"><?php echo $Language->Phrase("ViewPageCopyLink") ?></a>
<?php } ?>
<?php if ($Security->IsLoggedIn()) { ?>
<a href="<?php echo $CPDAssessors_view->DeleteUrl ?>"><?php echo $Language->Phrase("ViewPageDeleteLink") ?></a>
<?php } ?>
<?php } ?>
</span></p>
<?php
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
$CPDAssessors_view->ShowMessage();
?>
<p>
<?php if ($CPDAssessors->Export == "") { ?>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
<tr>
<td nowrap>
<?php if (!isset($CPDAssessors_view->Pager)) $CPDAssessors_view->Pager = new cPrevNextPager($CPDAssessors_view->lStartRec, $CPDAssessors_view->lDisplayRecs, $CPDAssessors_view->lTotalRecs) ?>
<?php if ($CPDAssessors_view->Pager->RecordCount > 0) { ?>
<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?> </span></td>
<!--first page button-->
<?php if ($CPDAssessors_view->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--previous page button-->
<?php if ($CPDAssessors_view->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--current page number-->
<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $CPDAssessors_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($CPDAssessors_view->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--last page button-->
<?php if ($CPDAssessors_view->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<td><span class="phpmaker"> <?php echo $Language->Phrase("of") ?> <?php echo $CPDAssessors_view->Pager->PageCount ?></span></td>
</tr></table>
<?php } else { ?>
<?php if ($CPDAssessors_view->sSrchWhere == "0=101") { ?>
<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
<?php } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
<?php } ?>
<?php } ?>
</td>
</tr>
</table>
</form>
<br>
<?php } ?>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table cellspacing="0" class="ewTable">
<?php if ($CPDAssessors->Title->Visible) { // Title ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Title->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Title->CellAttributes() ?>>
<div<?php echo $CPDAssessors->Title->ViewAttributes() ?>><?php echo $CPDAssessors->Title->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->KnownAs->Visible) { // KnownAs ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->KnownAs->FldCaption() ?></td>
<td<?php echo $CPDAssessors->KnownAs->CellAttributes() ?>>
<div<?php echo $CPDAssessors->KnownAs->ViewAttributes() ?>><?php echo $CPDAssessors->KnownAs->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->FirstName->Visible) { // FirstName ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->FirstName->FldCaption() ?></td>
<td<?php echo $CPDAssessors->FirstName->CellAttributes() ?>>
<div<?php echo $CPDAssessors->FirstName->ViewAttributes() ?>><?php echo $CPDAssessors->FirstName->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Surname->Visible) { // Surname ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Surname->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Surname->CellAttributes() ?>>
<div<?php echo $CPDAssessors->Surname->ViewAttributes() ?>><?php echo $CPDAssessors->Surname->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Designation->Visible) { // Designation ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Designation->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Designation->CellAttributes() ?>>
<div<?php echo $CPDAssessors->Designation->ViewAttributes() ?>><?php echo $CPDAssessors->Designation->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Department->Visible) { // Department ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Department->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Department->CellAttributes() ?>>
<div<?php echo $CPDAssessors->Department->ViewAttributes() ?>><?php echo $CPDAssessors->Department->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Organisation->Visible) { // Organisation ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Organisation->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Organisation->CellAttributes() ?>>
<div<?php echo $CPDAssessors->Organisation->ViewAttributes() ?>><?php echo $CPDAssessors->Organisation->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->PostalAddress->Visible) { // PostalAddress ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->PostalAddress->FldCaption() ?></td>
<td<?php echo $CPDAssessors->PostalAddress->CellAttributes() ?>>
<div<?php echo $CPDAssessors->PostalAddress->ViewAttributes() ?>><?php echo $CPDAssessors->PostalAddress->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->PhysicalAddress->Visible) { // PhysicalAddress ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->PhysicalAddress->FldCaption() ?></td>
<td<?php echo $CPDAssessors->PhysicalAddress->CellAttributes() ?>>
<div<?php echo $CPDAssessors->PhysicalAddress->ViewAttributes() ?>><?php echo $CPDAssessors->PhysicalAddress->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->CellNumber->Visible) { // CellNumber ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->CellNumber->FldCaption() ?></td>
<td<?php echo $CPDAssessors->CellNumber->CellAttributes() ?>>
<div<?php echo $CPDAssessors->CellNumber->ViewAttributes() ?>><?php echo $CPDAssessors->CellNumber->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->EmailAddress->Visible) { // EmailAddress ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->EmailAddress->FldCaption() ?></td>
<td<?php echo $CPDAssessors->EmailAddress->CellAttributes() ?>>
<div<?php echo $CPDAssessors->EmailAddress->ViewAttributes() ?>><?php echo $CPDAssessors->EmailAddress->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->ProfessionalCouncil->Visible) { // ProfessionalCouncil ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->ProfessionalCouncil->FldCaption() ?></td>
<td<?php echo $CPDAssessors->ProfessionalCouncil->CellAttributes() ?>>
<div<?php echo $CPDAssessors->ProfessionalCouncil->ViewAttributes() ?>><?php echo $CPDAssessors->ProfessionalCouncil->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->ProfRegNo->Visible) { // ProfRegNo ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->ProfRegNo->FldCaption() ?></td>
<td<?php echo $CPDAssessors->ProfRegNo->CellAttributes() ?>>
<div<?php echo $CPDAssessors->ProfRegNo->ViewAttributes() ?>><?php echo $CPDAssessors->ProfRegNo->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->CVFile->Visible) { // CVFile ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->CVFile->FldCaption() ?></td>
<td<?php echo $CPDAssessors->CVFile->CellAttributes() ?>>
<?php if ($CPDAssessors->CVFile->HrefValue <> "" || $CPDAssessors->CVFile->TooltipValue <> "") { ?>
<?php if (!empty($CPDAssessors->CVFile->Upload->DbValue)) { ?>
<a href="<?php echo $CPDAssessors->CVFile->HrefValue ?>"><?php echo $CPDAssessors->CVFile->ViewValue ?></a>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } else { ?>
<?php if (!empty($CPDAssessors->CVFile->Upload->DbValue)) { ?>
<?php echo $CPDAssessors->CVFile->ViewValue ?>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->QualificationFile->Visible) { // QualificationFile ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->QualificationFile->FldCaption() ?></td>
<td<?php echo $CPDAssessors->QualificationFile->CellAttributes() ?>>
<?php if ($CPDAssessors->QualificationFile->HrefValue <> "" || $CPDAssessors->QualificationFile->TooltipValue <> "") { ?>
<?php if (!empty($CPDAssessors->QualificationFile->Upload->DbValue)) { ?>
<a href="<?php echo $CPDAssessors->QualificationFile->HrefValue ?>"><?php echo $CPDAssessors->QualificationFile->ViewValue ?></a>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } else { ?>
<?php if (!empty($CPDAssessors->QualificationFile->Upload->DbValue)) { ?>
<?php echo $CPDAssessors->QualificationFile->ViewValue ?>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->NDAFile->Visible) { // NDAFile ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->NDAFile->FldCaption() ?></td>
<td<?php echo $CPDAssessors->NDAFile->CellAttributes() ?>>
<?php if ($CPDAssessors->NDAFile->HrefValue <> "" || $CPDAssessors->NDAFile->TooltipValue <> "") { ?>
<?php if (!empty($CPDAssessors->NDAFile->Upload->DbValue)) { ?>
<a href="<?php echo $CPDAssessors->NDAFile->HrefValue ?>"><?php echo $CPDAssessors->NDAFile->ViewValue ?></a>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } else { ?>
<?php if (!empty($CPDAssessors->NDAFile->Upload->DbValue)) { ?>
<?php echo $CPDAssessors->NDAFile->ViewValue ?>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->adminusername->Visible) { // adminusername ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->adminusername->FldCaption() ?></td>
<td<?php echo $CPDAssessors->adminusername->CellAttributes() ?>>
<div<?php echo $CPDAssessors->adminusername->ViewAttributes() ?>><?php echo $CPDAssessors->adminusername->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->DateUpdated->Visible) { // DateUpdated ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->DateUpdated->FldCaption() ?></td>
<td<?php echo $CPDAssessors->DateUpdated->CellAttributes() ?>>
<div<?php echo $CPDAssessors->DateUpdated->ViewAttributes() ?>><?php echo $CPDAssessors->DateUpdated->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Active->Visible) { // Active ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Active->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Active->CellAttributes() ?>>
<div<?php echo $CPDAssessors->Active->ViewAttributes() ?>><?php echo $CPDAssessors->Active->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->DocumentName1->Visible) { // DocumentName1 ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->DocumentName1->FldCaption() ?></td>
<td<?php echo $CPDAssessors->DocumentName1->CellAttributes() ?>>
<div<?php echo $CPDAssessors->DocumentName1->ViewAttributes() ?>><?php echo $CPDAssessors->DocumentName1->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Document1->Visible) { // Document1 ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Document1->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Document1->CellAttributes() ?>>
<?php if ($CPDAssessors->Document1->HrefValue <> "" || $CPDAssessors->Document1->TooltipValue <> "") { ?>
<?php if (!empty($CPDAssessors->Document1->Upload->DbValue)) { ?>
<a href="<?php echo $CPDAssessors->Document1->HrefValue ?>"><?php echo $CPDAssessors->Document1->ViewValue ?></a>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } else { ?>
<?php if (!empty($CPDAssessors->Document1->Upload->DbValue)) { ?>
<?php echo $CPDAssessors->Document1->ViewValue ?>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->DocumentName2->Visible) { // DocumentName2 ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->DocumentName2->FldCaption() ?></td>
<td<?php echo $CPDAssessors->DocumentName2->CellAttributes() ?>>
<div<?php echo $CPDAssessors->DocumentName2->ViewAttributes() ?>><?php echo $CPDAssessors->DocumentName2->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Document2->Visible) { // Document2 ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Document2->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Document2->CellAttributes() ?>>
<?php if ($CPDAssessors->Document2->HrefValue <> "" || $CPDAssessors->Document2->TooltipValue <> "") { ?>
<?php if (!empty($CPDAssessors->Document2->Upload->DbValue)) { ?>
<a href="<?php echo $CPDAssessors->Document2->HrefValue ?>"><?php echo $CPDAssessors->Document2->ViewValue ?></a>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } else { ?>
<?php if (!empty($CPDAssessors->Document2->Upload->DbValue)) { ?>
<?php echo $CPDAssessors->Document2->ViewValue ?>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->DocumentName3->Visible) { // DocumentName3 ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->DocumentName3->FldCaption() ?></td>
<td<?php echo $CPDAssessors->DocumentName3->CellAttributes() ?>>
<div<?php echo $CPDAssessors->DocumentName3->ViewAttributes() ?>><?php echo $CPDAssessors->DocumentName3->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CPDAssessors->Document3->Visible) { // Document3 ?>
<tr<?php echo $CPDAssessors->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CPDAssessors->Document3->FldCaption() ?></td>
<td<?php echo $CPDAssessors->Document3->CellAttributes() ?>>
<?php if ($CPDAssessors->Document3->HrefValue <> "" || $CPDAssessors->Document3->TooltipValue <> "") { ?>
<?php if (!empty($CPDAssessors->Document3->Upload->DbValue)) { ?>
<a href="<?php echo $CPDAssessors->Document3->HrefValue ?>"><?php echo $CPDAssessors->Document3->ViewValue ?></a>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } else { ?>
<?php if (!empty($CPDAssessors->Document3->Upload->DbValue)) { ?>
<?php echo $CPDAssessors->Document3->ViewValue ?>
<?php } elseif (!in_array($CPDAssessors->CurrentAction, array("I", "edit", "gridedit"))) { ?>
<?php } ?>
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if ($CPDAssessors->Export == "") { ?>
<br>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
<tr>
<td nowrap>
<?php if (!isset($CPDAssessors_view->Pager)) $CPDAssessors_view->Pager = new cPrevNextPager($CPDAssessors_view->lStartRec, $CPDAssessors_view->lDisplayRecs, $CPDAssessors_view->lTotalRecs) ?>
<?php if ($CPDAssessors_view->Pager->RecordCount > 0) { ?>
<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?> </span></td>
<!--first page button-->
<?php if ($CPDAssessors_view->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--previous page button-->
<?php if ($CPDAssessors_view->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--current page number-->
<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $CPDAssessors_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($CPDAssessors_view->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--last page button-->
<?php if ($CPDAssessors_view->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $CPDAssessors_view->PageUrl() ?>start=<?php echo $CPDAssessors_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<td><span class="phpmaker"> <?php echo $Language->Phrase("of") ?> <?php echo $CPDAssessors_view->Pager->PageCount ?></span></td>
</tr></table>
<?php } else { ?>
<?php if ($CPDAssessors_view->sSrchWhere == "0=101") { ?>
<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
<?php } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
<?php } ?>
<?php } ?>
</td>
</tr>
</table>
</form>
<?php } ?>
<p>
<?php if ($CPDAssessors->Export == "") { ?>
<script language="JavaScript" type="text/javascript">
<!--
// Write your table-specific startup script here
// document.write("page loaded");
//-->
</script>
<?php } ?>
<?php include "footer.php" ?>
<?php
$CPDAssessors_view->Page_Terminate();
?>
<?php
//
// Page class
//
class cCPDAssessors_view {
// Page ID
var $PageID = 'view';
// Table name
var $TableName = 'CPDAssessors';
// Page object name
var $PageObjName = 'CPDAssessors_view';
// Page name
function PageName() {
return ew_CurrentPage();
}
// Page URL
function PageUrl() {
$PageUrl = ew_CurrentPage() . "?";
global $CPDAssessors;
if ($CPDAssessors->UseTokenInUrl) $PageUrl .= "t=" . $CPDAssessors->TableVar . "&"; // Add page token
return $PageUrl;
}
// Page URLs
var $AddUrl;
var $EditUrl;
var $CopyUrl;
var $DeleteUrl;
var $ViewUrl;
var $ListUrl;
// Export URLs
var $ExportPrintUrl;
var $ExportHtmlUrl;
var $ExportExcelUrl;
var $ExportWordUrl;
var $ExportXmlUrl;
var $ExportCsvUrl;
// Update URLs
var $InlineAddUrl;
var $InlineCopyUrl;
var $InlineEditUrl;
var $GridAddUrl;
var $GridEditUrl;
var $MultiDeleteUrl;
var $MultiUpdateUrl;
// Message
function getMessage() {
return @$_SESSION[EW_SESSION_MESSAGE];
}
function setMessage($v) {
if (@$_SESSION[EW_SESSION_MESSAGE] <> "") { // Append
$_SESSION[EW_SESSION_MESSAGE] .= "<br>" . $v;
} else {
$_SESSION[EW_SESSION_MESSAGE] = $v;
}
}
// Show message
function ShowMessage() {
$sMessage = $this->getMessage();
$this->Message_Showing($sMessage);
if ($sMessage <> "") { // Message in Session, display
echo "<p><span class=\"ewMessage\">" . $sMessage . "</span></p>";
$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
}
}
// Validate page request
function IsPageRequest() {
global $objForm, $CPDAssessors;
if ($CPDAssessors->UseTokenInUrl) {
if ($objForm)
return ($CPDAssessors->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($CPDAssessors->TableVar == $_GET["t"]);
} else {
return TRUE;
}
}
//
// Page class constructor
//
function __construct() {
global $conn, $Language;
// Language object
$Language = new cLanguage();
// Table object (CPDAssessors)
$GLOBALS["CPDAssessors"] = new cCPDAssessors();
// Table object (CPDAdminUsers)
$GLOBALS['CPDAdminUsers'] = new cCPDAdminUsers();
// Page ID
if (!defined("EW_PAGE_ID"))
define("EW_PAGE_ID", 'view', TRUE);
// Table name (for backward compatibility)
if (!defined("EW_TABLE_NAME"))
define("EW_TABLE_NAME", 'CPDAssessors', TRUE);
// Start timer
$GLOBALS["gsTimer"] = new cTimer();
// Open connection
$conn = ew_Connect();
}
//
// Page_Init
//
function Page_Init() {
global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
global $CPDAssessors;
// User profile
$UserProfile = new cUserProfile();
$UserProfile->LoadProfile(@$_SESSION[EW_SESSION_USER_PROFILE]);
// Security
$Security = new cAdvancedSecurity();
if (IsPasswordExpired())
$this->Page_Terminate("changepwd.php");
if (!$Security->IsLoggedIn()) $Security->AutoLogin();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
// Get export parameters
if (@$_GET["export"] <> "") {
$CPDAssessors->Export = $_GET["export"];
} elseif (ew_IsHttpPost()) {
if (@$_POST["exporttype"] <> "")
$CPDAssessors->Export = $_POST["exporttype"];
} else {
$CPDAssessors->setExportReturnUrl(ew_CurrentUrl());
}
$gsExport = $CPDAssessors->Export; // Get export parameter, used in header
$gsExportFile = $CPDAssessors->TableVar; // Get export file, used in header
if (@$_GET["CPDAssessorID"] <> "") {
if ($gsExportFile <> "") $gsExportFile .= "_";
$gsExportFile .= ew_StripSlashes($_GET["CPDAssessorID"]);
}
if ($CPDAssessors->Export == "excel") {
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
}
if ($CPDAssessors->Export == "word") {
header('Content-Type: application/vnd.ms-word');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.doc');
}
// Global Page Loading event (in userfn*.php)
Page_Loading();
// Page Load event
$this->Page_Load();
}
//
// Page_Terminate
//
function Page_Terminate($url = "") {
global $conn;
// Page Unload event
$this->Page_Unload();
// Global Page Unloaded event (in userfn*.php)
Page_Unloaded();
// Close connection
$conn->Close();
// Go to URL if specified
$this->Page_Redirecting($url);
if ($url <> "") {
if (!EW_DEBUG_ENABLED && ob_get_length())
ob_end_clean();
header("Location: " . $url);
}
exit();
}
var $lDisplayRecs = 1;
var $lStartRec;
var $lStopRec;
var $lTotalRecs = 0;
var $lRecRange = 10;
var $lRecCnt;
var $arRecKey = array();
//
// Page main
//
function Page_Main() {
global $Language, $CPDAssessors;
// Load current record
$bLoadCurrentRecord = FALSE;
$sReturnUrl = "";
$bMatchRecord = FALSE;
if ($this->IsPageRequest()) { // Validate request
if (@$_GET["CPDAssessorID"] <> "") {
$CPDAssessors->CPDAssessorID->setQueryStringValue($_GET["CPDAssessorID"]);
$this->arRecKey["CPDAssessorID"] = $CPDAssessors->CPDAssessorID->QueryStringValue;
} else {
$bLoadCurrentRecord = TRUE;
}
// Get action
$CPDAssessors->CurrentAction = "I"; // Display form
switch ($CPDAssessors->CurrentAction) {
case "I": // Get a record to display
$this->lStartRec = 1; // Initialize start position
if ($rs = $this->LoadRecordset()) // Load records
$this->lTotalRecs = $rs->RecordCount(); // Get record count
if ($this->lTotalRecs <= 0) { // No record found
$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
$this->Page_Terminate("CPDAssessorslist.php"); // Return to list page
} elseif ($bLoadCurrentRecord) { // Load current record position
$this->SetUpStartRec(); // Set up start record position
// Point to current record
if (intval($this->lStartRec) <= intval($this->lTotalRecs)) {
$bMatchRecord = TRUE;
$rs->Move($this->lStartRec-1);
}
} else { // Match key values
while (!$rs->EOF) {
if (strval($CPDAssessors->CPDAssessorID->CurrentValue) == strval($rs->fields('CPDAssessorID'))) {
$CPDAssessors->setStartRecordNumber($this->lStartRec); // Save record position
$bMatchRecord = TRUE;
break;
} else {
$this->lStartRec++;
$rs->MoveNext();
}
}
}
if (!$bMatchRecord) {
$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
$sReturnUrl = "CPDAssessorslist.php"; // No matching record, return to list
} else {
$this->LoadRowValues($rs); // Load row values
}
}
// Export data only
if (in_array($CPDAssessors->Export, array("html","word","excel","xml","csv","email"))) {
$this->ExportData();
if ($CPDAssessors->Export <> "email")
$this->Page_Terminate(); // Terminate response
exit();
}
} else {
$sReturnUrl = "CPDAssessorslist.php"; // Not page request, return to list
}
if ($sReturnUrl <> "")
$this->Page_Terminate($sReturnUrl);
// Render row
$CPDAssessors->RowType = EW_ROWTYPE_VIEW;
$this->RenderRow();
}
// Set up starting record parameters
function SetUpStartRec() {
global $CPDAssessors;
if ($this->lDisplayRecs == 0)
return;
if ($this->IsPageRequest()) { // Validate request
if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter
$this->lStartRec = $_GET[EW_TABLE_START_REC];
$CPDAssessors->setStartRecordNumber($this->lStartRec);
} elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") {
$this->nPageNo = $_GET[EW_TABLE_PAGE_NO];
if (is_numeric($this->nPageNo)) {
$this->lStartRec = ($this->nPageNo-1)*$this->lDisplayRecs+1;
if ($this->lStartRec <= 0) {
$this->lStartRec = 1;
} elseif ($this->lStartRec >= intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1) {
$this->lStartRec = intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1;
}
$CPDAssessors->setStartRecordNumber($this->lStartRec);
}
}
}
$this->lStartRec = $CPDAssessors->getStartRecordNumber();
// Check if correct start record counter
if (!is_numeric($this->lStartRec) || $this->lStartRec == "") { // Avoid invalid start record counter
$this->lStartRec = 1; // Reset start record counter
$CPDAssessors->setStartRecordNumber($this->lStartRec);
} elseif (intval($this->lStartRec) > intval($this->lTotalRecs)) { // Avoid starting record > total records
$this->lStartRec = intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1; // Point to last page first record
$CPDAssessors->setStartRecordNumber($this->lStartRec);
} elseif (($this->lStartRec-1) % $this->lDisplayRecs <> 0) {
$this->lStartRec = intval(($this->lStartRec-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1; // Point to page boundary
$CPDAssessors->setStartRecordNumber($this->lStartRec);
}
}
// Load recordset
function LoadRecordset($offset = -1, $rowcnt = -1) {
global $conn, $CPDAssessors;
// Call Recordset Selecting event
$CPDAssessors->Recordset_Selecting($CPDAssessors->CurrentFilter);
// Load List page SQL
$sSql = $CPDAssessors->SelectSQL();
if ($offset > -1 && $rowcnt > -1)
$sSql .= " LIMIT $offset, $rowcnt";
// Load recordset
$rs = ew_LoadRecordset($sSql);
// Call Recordset Selected event
$CPDAssessors->Recordset_Selected($rs);
return $rs;
}
// Load row based on key values
function LoadRow() {
global $conn, $Security, $CPDAssessors;
$sFilter = $CPDAssessors->KeyFilter();
// Call Row Selecting event
$CPDAssessors->Row_Selecting($sFilter);
// Load SQL based on filter
$CPDAssessors->CurrentFilter = $sFilter;
$sSql = $CPDAssessors->SQL();
$res = FALSE;
$rs = ew_LoadRecordset($sSql);
if ($rs && !$rs->EOF) {
$res = TRUE;
$this->LoadRowValues($rs); // Load row values
// Call Row Selected event
$CPDAssessors->Row_Selected($rs);
$rs->Close();
}
return $res;
}
// Load row values from recordset
function LoadRowValues(&$rs) {
global $conn, $CPDAssessors;
$CPDAssessors->CPDAssessorID->setDbValue($rs->fields('CPDAssessorID'));
$CPDAssessors->Title->setDbValue($rs->fields('Title'));
$CPDAssessors->KnownAs->setDbValue($rs->fields('KnownAs'));
$CPDAssessors->FirstName->setDbValue($rs->fields('FirstName'));
$CPDAssessors->Surname->setDbValue($rs->fields('Surname'));
$CPDAssessors->Designation->setDbValue($rs->fields('Designation'));
$CPDAssessors->Department->setDbValue($rs->fields('Department'));
$CPDAssessors->Organisation->setDbValue($rs->fields('Organisation'));
$CPDAssessors->PostalAddress->setDbValue($rs->fields('PostalAddress'));
$CPDAssessors->PhysicalAddress->setDbValue($rs->fields('PhysicalAddress'));
$CPDAssessors->CellNumber->setDbValue($rs->fields('CellNumber'));
$CPDAssessors->EmailAddress->setDbValue($rs->fields('EmailAddress'));
$CPDAssessors->ProfessionalCouncil->setDbValue($rs->fields('ProfessionalCouncil'));
$CPDAssessors->ProfRegNo->setDbValue($rs->fields('ProfRegNo'));
$CPDAssessors->CVFile->Upload->DbValue = $rs->fields('CVFile');
$CPDAssessors->QualificationFile->Upload->DbValue = $rs->fields('QualificationFile');
$CPDAssessors->NDAFile->Upload->DbValue = $rs->fields('NDAFile');
$CPDAssessors->adminusername->setDbValue($rs->fields('adminusername'));
$CPDAssessors->DateUpdated->setDbValue($rs->fields('DateUpdated'));
$CPDAssessors->Active->setDbValue($rs->fields('Active'));
$CPDAssessors->DocumentName1->setDbValue($rs->fields('DocumentName1'));
$CPDAssessors->Document1->Upload->DbValue = $rs->fields('Document1');
$CPDAssessors->DocumentName2->setDbValue($rs->fields('DocumentName2'));
$CPDAssessors->Document2->Upload->DbValue = $rs->fields('Document2');
$CPDAssessors->DocumentName3->setDbValue($rs->fields('DocumentName3'));
$CPDAssessors->Document3->Upload->DbValue = $rs->fields('Document3');
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $CPDAssessors;
// Initialize URLs
$this->ExportPrintUrl = $this->PageUrl() . "export=print&" . "CPDAssessorID=" . urlencode($CPDAssessors->CPDAssessorID->CurrentValue);
$this->ExportHtmlUrl = $this->PageUrl() . "export=html&" . "CPDAssessorID=" . urlencode($CPDAssessors->CPDAssessorID->CurrentValue);
$this->ExportExcelUrl = $this->PageUrl() . "export=excel&" . "CPDAssessorID=" . urlencode($CPDAssessors->CPDAssessorID->CurrentValue);
$this->ExportWordUrl = $this->PageUrl() . "export=word&" . "CPDAssessorID=" . urlencode($CPDAssessors->CPDAssessorID->CurrentValue);
$this->ExportXmlUrl = $this->PageUrl() . "export=xml&" . "CPDAssessorID=" . urlencode($CPDAssessors->CPDAssessorID->CurrentValue);
$this->ExportCsvUrl = $this->PageUrl() . "export=csv&" . "CPDAssessorID=" . urlencode($CPDAssessors->CPDAssessorID->CurrentValue);
$this->AddUrl = $CPDAssessors->AddUrl();
$this->EditUrl = $CPDAssessors->EditUrl();
$this->CopyUrl = $CPDAssessors->CopyUrl();
$this->DeleteUrl = $CPDAssessors->DeleteUrl();
$this->ListUrl = $CPDAssessors->ListUrl();
// Call Row_Rendering event
$CPDAssessors->Row_Rendering();
// Common render codes for all row types
// Title
$CPDAssessors->Title->CellCssStyle = ""; $CPDAssessors->Title->CellCssClass = "";
$CPDAssessors->Title->CellAttrs = array(); $CPDAssessors->Title->ViewAttrs = array(); $CPDAssessors->Title->EditAttrs = array();
// KnownAs
$CPDAssessors->KnownAs->CellCssStyle = ""; $CPDAssessors->KnownAs->CellCssClass = "";
$CPDAssessors->KnownAs->CellAttrs = array(); $CPDAssessors->KnownAs->ViewAttrs = array(); $CPDAssessors->KnownAs->EditAttrs = array();
// FirstName
$CPDAssessors->FirstName->CellCssStyle = ""; $CPDAssessors->FirstName->CellCssClass = "";
$CPDAssessors->FirstName->CellAttrs = array(); $CPDAssessors->FirstName->ViewAttrs = array(); $CPDAssessors->FirstName->EditAttrs = array();
// Surname
$CPDAssessors->Surname->CellCssStyle = ""; $CPDAssessors->Surname->CellCssClass = "";
$CPDAssessors->Surname->CellAttrs = array(); $CPDAssessors->Surname->ViewAttrs = array(); $CPDAssessors->Surname->EditAttrs = array();
// Designation
$CPDAssessors->Designation->CellCssStyle = ""; $CPDAssessors->Designation->CellCssClass = "";
$CPDAssessors->Designation->CellAttrs = array(); $CPDAssessors->Designation->ViewAttrs = array(); $CPDAssessors->Designation->EditAttrs = array();
// Department
$CPDAssessors->Department->CellCssStyle = ""; $CPDAssessors->Department->CellCssClass = "";
$CPDAssessors->Department->CellAttrs = array(); $CPDAssessors->Department->ViewAttrs = array(); $CPDAssessors->Department->EditAttrs = array();
// Organisation
$CPDAssessors->Organisation->CellCssStyle = ""; $CPDAssessors->Organisation->CellCssClass = "";
$CPDAssessors->Organisation->CellAttrs = array(); $CPDAssessors->Organisation->ViewAttrs = array(); $CPDAssessors->Organisation->EditAttrs = array();
// PostalAddress
$CPDAssessors->PostalAddress->CellCssStyle = ""; $CPDAssessors->PostalAddress->CellCssClass = "";
$CPDAssessors->PostalAddress->CellAttrs = array(); $CPDAssessors->PostalAddress->ViewAttrs = array(); $CPDAssessors->PostalAddress->EditAttrs = array();
// PhysicalAddress
$CPDAssessors->PhysicalAddress->CellCssStyle = ""; $CPDAssessors->PhysicalAddress->CellCssClass = "";
$CPDAssessors->PhysicalAddress->CellAttrs = array(); $CPDAssessors->PhysicalAddress->ViewAttrs = array(); $CPDAssessors->PhysicalAddress->EditAttrs = array();
// CellNumber
$CPDAssessors->CellNumber->CellCssStyle = ""; $CPDAssessors->CellNumber->CellCssClass = "";
$CPDAssessors->CellNumber->CellAttrs = array(); $CPDAssessors->CellNumber->ViewAttrs = array(); $CPDAssessors->CellNumber->EditAttrs = array();
// EmailAddress
$CPDAssessors->EmailAddress->CellCssStyle = ""; $CPDAssessors->EmailAddress->CellCssClass = "";
$CPDAssessors->EmailAddress->CellAttrs = array(); $CPDAssessors->EmailAddress->ViewAttrs = array(); $CPDAssessors->EmailAddress->EditAttrs = array();
// ProfessionalCouncil
$CPDAssessors->ProfessionalCouncil->CellCssStyle = ""; $CPDAssessors->ProfessionalCouncil->CellCssClass = "";
$CPDAssessors->ProfessionalCouncil->CellAttrs = array(); $CPDAssessors->ProfessionalCouncil->ViewAttrs = array(); $CPDAssessors->ProfessionalCouncil->EditAttrs = array();
// ProfRegNo
$CPDAssessors->ProfRegNo->CellCssStyle = ""; $CPDAssessors->ProfRegNo->CellCssClass = "";
$CPDAssessors->ProfRegNo->CellAttrs = array(); $CPDAssessors->ProfRegNo->ViewAttrs = array(); $CPDAssessors->ProfRegNo->EditAttrs = array();
// CVFile
$CPDAssessors->CVFile->CellCssStyle = ""; $CPDAssessors->CVFile->CellCssClass = "";
$CPDAssessors->CVFile->CellAttrs = array(); $CPDAssessors->CVFile->ViewAttrs = array(); $CPDAssessors->CVFile->EditAttrs = array();
// QualificationFile
$CPDAssessors->QualificationFile->CellCssStyle = ""; $CPDAssessors->QualificationFile->CellCssClass = "";
$CPDAssessors->QualificationFile->CellAttrs = array(); $CPDAssessors->QualificationFile->ViewAttrs = array(); $CPDAssessors->QualificationFile->EditAttrs = array();
// NDAFile
$CPDAssessors->NDAFile->CellCssStyle = ""; $CPDAssessors->NDAFile->CellCssClass = "";
$CPDAssessors->NDAFile->CellAttrs = array(); $CPDAssessors->NDAFile->ViewAttrs = array(); $CPDAssessors->NDAFile->EditAttrs = array();
// adminusername
$CPDAssessors->adminusername->CellCssStyle = ""; $CPDAssessors->adminusername->CellCssClass = "";
$CPDAssessors->adminusername->CellAttrs = array(); $CPDAssessors->adminusername->ViewAttrs = array(); $CPDAssessors->adminusername->EditAttrs = array();
// DateUpdated
$CPDAssessors->DateUpdated->CellCssStyle = ""; $CPDAssessors->DateUpdated->CellCssClass = "";
$CPDAssessors->DateUpdated->CellAttrs = array(); $CPDAssessors->DateUpdated->ViewAttrs = array(); $CPDAssessors->DateUpdated->EditAttrs = array();
// Active
$CPDAssessors->Active->CellCssStyle = ""; $CPDAssessors->Active->CellCssClass = "";
$CPDAssessors->Active->CellAttrs = array(); $CPDAssessors->Active->ViewAttrs = array(); $CPDAssessors->Active->EditAttrs = array();
// DocumentName1
$CPDAssessors->DocumentName1->CellCssStyle = ""; $CPDAssessors->DocumentName1->CellCssClass = "";
$CPDAssessors->DocumentName1->CellAttrs = array(); $CPDAssessors->DocumentName1->ViewAttrs = array(); $CPDAssessors->DocumentName1->EditAttrs = array();
// Document1
$CPDAssessors->Document1->CellCssStyle = ""; $CPDAssessors->Document1->CellCssClass = "";
$CPDAssessors->Document1->CellAttrs = array(); $CPDAssessors->Document1->ViewAttrs = array(); $CPDAssessors->Document1->EditAttrs = array();
// DocumentName2
$CPDAssessors->DocumentName2->CellCssStyle = ""; $CPDAssessors->DocumentName2->CellCssClass = "";
$CPDAssessors->DocumentName2->CellAttrs = array(); $CPDAssessors->DocumentName2->ViewAttrs = array(); $CPDAssessors->DocumentName2->EditAttrs = array();
// Document2
$CPDAssessors->Document2->CellCssStyle = ""; $CPDAssessors->Document2->CellCssClass = "";
$CPDAssessors->Document2->CellAttrs = array(); $CPDAssessors->Document2->ViewAttrs = array(); $CPDAssessors->Document2->EditAttrs = array();
// DocumentName3
$CPDAssessors->DocumentName3->CellCssStyle = ""; $CPDAssessors->DocumentName3->CellCssClass = "";
$CPDAssessors->DocumentName3->CellAttrs = array(); $CPDAssessors->DocumentName3->ViewAttrs = array(); $CPDAssessors->DocumentName3->EditAttrs = array();
// Document3
$CPDAssessors->Document3->CellCssStyle = ""; $CPDAssessors->Document3->CellCssClass = "";
$CPDAssessors->Document3->CellAttrs = array(); $CPDAssessors->Document3->ViewAttrs = array(); $CPDAssessors->Document3->EditAttrs = array();
if ($CPDAssessors->RowType == EW_ROWTYPE_VIEW) { // View row
// CPDAssessorID
$CPDAssessors->CPDAssessorID->ViewValue = $CPDAssessors->CPDAssessorID->CurrentValue;
$CPDAssessors->CPDAssessorID->CssStyle = "";
$CPDAssessors->CPDAssessorID->CssClass = "";
$CPDAssessors->CPDAssessorID->ViewCustomAttributes = "";
// Title
$CPDAssessors->Title->ViewValue = $CPDAssessors->Title->CurrentValue;
$CPDAssessors->Title->CssStyle = "";
$CPDAssessors->Title->CssClass = "";
$CPDAssessors->Title->ViewCustomAttributes = "";
// KnownAs
$CPDAssessors->KnownAs->ViewValue = $CPDAssessors->KnownAs->CurrentValue;
$CPDAssessors->KnownAs->CssStyle = "";
$CPDAssessors->KnownAs->CssClass = "";
$CPDAssessors->KnownAs->ViewCustomAttributes = "";
// FirstName
$CPDAssessors->FirstName->ViewValue = $CPDAssessors->FirstName->CurrentValue;
$CPDAssessors->FirstName->CssStyle = "";
$CPDAssessors->FirstName->CssClass = "";
$CPDAssessors->FirstName->ViewCustomAttributes = "";
// Surname
$CPDAssessors->Surname->ViewValue = $CPDAssessors->Surname->CurrentValue;
$CPDAssessors->Surname->CssStyle = "";
$CPDAssessors->Surname->CssClass = "";
$CPDAssessors->Surname->ViewCustomAttributes = "";
// Designation
$CPDAssessors->Designation->ViewValue = $CPDAssessors->Designation->CurrentValue;
$CPDAssessors->Designation->CssStyle = "";
$CPDAssessors->Designation->CssClass = "";
$CPDAssessors->Designation->ViewCustomAttributes = "";
// Department
$CPDAssessors->Department->ViewValue = $CPDAssessors->Department->CurrentValue;
$CPDAssessors->Department->CssStyle = "";
$CPDAssessors->Department->CssClass = "";
$CPDAssessors->Department->ViewCustomAttributes = "";
// Organisation
$CPDAssessors->Organisation->ViewValue = $CPDAssessors->Organisation->CurrentValue;
$CPDAssessors->Organisation->CssStyle = "";
$CPDAssessors->Organisation->CssClass = "";
$CPDAssessors->Organisation->ViewCustomAttributes = "";
// PostalAddress
$CPDAssessors->PostalAddress->ViewValue = $CPDAssessors->PostalAddress->CurrentValue;
$CPDAssessors->PostalAddress->CssStyle = "";
$CPDAssessors->PostalAddress->CssClass = "";
$CPDAssessors->PostalAddress->ViewCustomAttributes = "";
// PhysicalAddress
$CPDAssessors->PhysicalAddress->ViewValue = $CPDAssessors->PhysicalAddress->CurrentValue;
$CPDAssessors->PhysicalAddress->CssStyle = "";
$CPDAssessors->PhysicalAddress->CssClass = "";
$CPDAssessors->PhysicalAddress->ViewCustomAttributes = "";
// CellNumber
$CPDAssessors->CellNumber->ViewValue = $CPDAssessors->CellNumber->CurrentValue;
$CPDAssessors->CellNumber->CssStyle = "";
$CPDAssessors->CellNumber->CssClass = "";
$CPDAssessors->CellNumber->ViewCustomAttributes = "";
// EmailAddress
$CPDAssessors->EmailAddress->ViewValue = $CPDAssessors->EmailAddress->CurrentValue;
$CPDAssessors->EmailAddress->CssStyle = "";
$CPDAssessors->EmailAddress->CssClass = "";
$CPDAssessors->EmailAddress->ViewCustomAttributes = "";
// ProfessionalCouncil
$CPDAssessors->ProfessionalCouncil->ViewValue = $CPDAssessors->ProfessionalCouncil->CurrentValue;
$CPDAssessors->ProfessionalCouncil->CssStyle = "";
$CPDAssessors->ProfessionalCouncil->CssClass = "";
$CPDAssessors->ProfessionalCouncil->ViewCustomAttributes = "";
// ProfRegNo
$CPDAssessors->ProfRegNo->ViewValue = $CPDAssessors->ProfRegNo->CurrentValue;
$CPDAssessors->ProfRegNo->CssStyle = "";
$CPDAssessors->ProfRegNo->CssClass = "";
$CPDAssessors->ProfRegNo->ViewCustomAttributes = "";
// CVFile
if (!ew_Empty($CPDAssessors->CVFile->Upload->DbValue)) {
$CPDAssessors->CVFile->ViewValue = $CPDAssessors->CVFile->Upload->DbValue;
} else {
$CPDAssessors->CVFile->ViewValue = "";
}
$CPDAssessors->CVFile->CssStyle = "";
$CPDAssessors->CVFile->CssClass = "";
$CPDAssessors->CVFile->ViewCustomAttributes = "";
// QualificationFile
if (!ew_Empty($CPDAssessors->QualificationFile->Upload->DbValue)) {
$CPDAssessors->QualificationFile->ViewValue = $CPDAssessors->QualificationFile->Upload->DbValue;
} else {
$CPDAssessors->QualificationFile->ViewValue = "";
}
$CPDAssessors->QualificationFile->CssStyle = "";
$CPDAssessors->QualificationFile->CssClass = "";
$CPDAssessors->QualificationFile->ViewCustomAttributes = "";
// NDAFile
if (!ew_Empty($CPDAssessors->NDAFile->Upload->DbValue)) {
$CPDAssessors->NDAFile->ViewValue = $CPDAssessors->NDAFile->Upload->DbValue;
} else {
$CPDAssessors->NDAFile->ViewValue = "";
}
$CPDAssessors->NDAFile->CssStyle = "";
$CPDAssessors->NDAFile->CssClass = "";
$CPDAssessors->NDAFile->ViewCustomAttributes = "";
// adminusername
if (strval($CPDAssessors->adminusername->CurrentValue) <> "") {
$sFilterWrk = "`adminusername` = '" . ew_AdjustSql($CPDAssessors->adminusername->CurrentValue) . "'";
$sSqlWrk = "SELECT `adminusername` FROM `CPDAdminUsers`";
$sWhereWrk = "";
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . "`level`=11" . ")";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$CPDAssessors->adminusername->ViewValue = $rswrk->fields('adminusername');
$rswrk->Close();
} else {
$CPDAssessors->adminusername->ViewValue = $CPDAssessors->adminusername->CurrentValue;
}
} else {
$CPDAssessors->adminusername->ViewValue = NULL;
}
$CPDAssessors->adminusername->CssStyle = "";
$CPDAssessors->adminusername->CssClass = "";
$CPDAssessors->adminusername->ViewCustomAttributes = "";
// DateUpdated
$CPDAssessors->DateUpdated->ViewValue = $CPDAssessors->DateUpdated->CurrentValue;
$CPDAssessors->DateUpdated->ViewValue = ew_FormatDateTime($CPDAssessors->DateUpdated->ViewValue, 5);
$CPDAssessors->DateUpdated->CssStyle = "";
$CPDAssessors->DateUpdated->CssClass = "";
$CPDAssessors->DateUpdated->ViewCustomAttributes = "";
// Active
if (strval($CPDAssessors->Active->CurrentValue) <> "") {
switch ($CPDAssessors->Active->CurrentValue) {
case "1":
$CPDAssessors->Active->ViewValue = "Yes";
break;
case "0":
$CPDAssessors->Active->ViewValue = "No";
break;
default:
$CPDAssessors->Active->ViewValue = $CPDAssessors->Active->CurrentValue;
}
} else {
$CPDAssessors->Active->ViewValue = NULL;
}
$CPDAssessors->Active->CssStyle = "";
$CPDAssessors->Active->CssClass = "";
$CPDAssessors->Active->ViewCustomAttributes = "";
// DocumentName1
$CPDAssessors->DocumentName1->ViewValue = $CPDAssessors->DocumentName1->CurrentValue;
$CPDAssessors->DocumentName1->CssStyle = "";
$CPDAssessors->DocumentName1->CssClass = "";
$CPDAssessors->DocumentName1->ViewCustomAttributes = "";
// Document1
if (!ew_Empty($CPDAssessors->Document1->Upload->DbValue)) {
$CPDAssessors->Document1->ViewValue = $CPDAssessors->Document1->Upload->DbValue;
} else {
$CPDAssessors->Document1->ViewValue = "";
}
$CPDAssessors->Document1->CssStyle = "";
$CPDAssessors->Document1->CssClass = "";
$CPDAssessors->Document1->ViewCustomAttributes = "";
// DocumentName2
$CPDAssessors->DocumentName2->ViewValue = $CPDAssessors->DocumentName2->CurrentValue;
$CPDAssessors->DocumentName2->CssStyle = "";
$CPDAssessors->DocumentName2->CssClass = "";
$CPDAssessors->DocumentName2->ViewCustomAttributes = "";
// Document2
if (!ew_Empty($CPDAssessors->Document2->Upload->DbValue)) {
$CPDAssessors->Document2->ViewValue = $CPDAssessors->Document2->Upload->DbValue;
} else {
$CPDAssessors->Document2->ViewValue = "";
}
$CPDAssessors->Document2->CssStyle = "";
$CPDAssessors->Document2->CssClass = "";
$CPDAssessors->Document2->ViewCustomAttributes = "";
// DocumentName3
$CPDAssessors->DocumentName3->ViewValue = $CPDAssessors->DocumentName3->CurrentValue;
$CPDAssessors->DocumentName3->CssStyle = "";
$CPDAssessors->DocumentName3->CssClass = "";
$CPDAssessors->DocumentName3->ViewCustomAttributes = "";
// Document3
if (!ew_Empty($CPDAssessors->Document3->Upload->DbValue)) {
$CPDAssessors->Document3->ViewValue = $CPDAssessors->Document3->Upload->DbValue;
} else {
$CPDAssessors->Document3->ViewValue = "";
}
$CPDAssessors->Document3->CssStyle = "";
$CPDAssessors->Document3->CssClass = "";
$CPDAssessors->Document3->ViewCustomAttributes = "";
// Title
$CPDAssessors->Title->HrefValue = "";
$CPDAssessors->Title->TooltipValue = "";
// KnownAs
$CPDAssessors->KnownAs->HrefValue = "";
$CPDAssessors->KnownAs->TooltipValue = "";
// FirstName
$CPDAssessors->FirstName->HrefValue = "";
$CPDAssessors->FirstName->TooltipValue = "";
// Surname
$CPDAssessors->Surname->HrefValue = "";
$CPDAssessors->Surname->TooltipValue = "";
// Designation
$CPDAssessors->Designation->HrefValue = "";
$CPDAssessors->Designation->TooltipValue = "";
// Department
$CPDAssessors->Department->HrefValue = "";
$CPDAssessors->Department->TooltipValue = "";
// Organisation
$CPDAssessors->Organisation->HrefValue = "";
$CPDAssessors->Organisation->TooltipValue = "";
// PostalAddress
$CPDAssessors->PostalAddress->HrefValue = "";
$CPDAssessors->PostalAddress->TooltipValue = "";
// PhysicalAddress
$CPDAssessors->PhysicalAddress->HrefValue = "";
$CPDAssessors->PhysicalAddress->TooltipValue = "";
// CellNumber
$CPDAssessors->CellNumber->HrefValue = "";
$CPDAssessors->CellNumber->TooltipValue = "";
// EmailAddress
$CPDAssessors->EmailAddress->HrefValue = "";
$CPDAssessors->EmailAddress->TooltipValue = "";
// ProfessionalCouncil
$CPDAssessors->ProfessionalCouncil->HrefValue = "";
$CPDAssessors->ProfessionalCouncil->TooltipValue = "";
// ProfRegNo
$CPDAssessors->ProfRegNo->HrefValue = "";
$CPDAssessors->ProfRegNo->TooltipValue = "";
// CVFile
if (!ew_Empty($CPDAssessors->CVFile->Upload->DbValue)) {
$CPDAssessors->CVFile->HrefValue = ew_UploadPathEx(FALSE, $CPDAssessors->CVFile->UploadPath) . ((!empty($CPDAssessors->CVFile->ViewValue)) ? $CPDAssessors->CVFile->ViewValue : $CPDAssessors->CVFile->CurrentValue);
if ($CPDAssessors->Export <> "") $CPDAssessors->CVFile->HrefValue = ew_ConvertFullUrl($CPDAssessors->CVFile->HrefValue);
} else {
$CPDAssessors->CVFile->HrefValue = "";
}
$CPDAssessors->CVFile->TooltipValue = "";
// QualificationFile
if (!ew_Empty($CPDAssessors->QualificationFile->Upload->DbValue)) {
$CPDAssessors->QualificationFile->HrefValue = ew_UploadPathEx(FALSE, $CPDAssessors->QualificationFile->UploadPath) . ((!empty($CPDAssessors->QualificationFile->ViewValue)) ? $CPDAssessors->QualificationFile->ViewValue : $CPDAssessors->QualificationFile->CurrentValue);
if ($CPDAssessors->Export <> "") $CPDAssessors->QualificationFile->HrefValue = ew_ConvertFullUrl($CPDAssessors->QualificationFile->HrefValue);
} else {
$CPDAssessors->QualificationFile->HrefValue = "";
}
$CPDAssessors->QualificationFile->TooltipValue = "";
// NDAFile
if (!ew_Empty($CPDAssessors->NDAFile->Upload->DbValue)) {
$CPDAssessors->NDAFile->HrefValue = ew_UploadPathEx(FALSE, $CPDAssessors->NDAFile->UploadPath) . ((!empty($CPDAssessors->NDAFile->ViewValue)) ? $CPDAssessors->NDAFile->ViewValue : $CPDAssessors->NDAFile->CurrentValue);
if ($CPDAssessors->Export <> "") $CPDAssessors->NDAFile->HrefValue = ew_ConvertFullUrl($CPDAssessors->NDAFile->HrefValue);
} else {
$CPDAssessors->NDAFile->HrefValue = "";
}
$CPDAssessors->NDAFile->TooltipValue = "";
// adminusername
$CPDAssessors->adminusername->HrefValue = "";
$CPDAssessors->adminusername->TooltipValue = "";
// DateUpdated
$CPDAssessors->DateUpdated->HrefValue = "";
$CPDAssessors->DateUpdated->TooltipValue = "";
// Active
$CPDAssessors->Active->HrefValue = "";
$CPDAssessors->Active->TooltipValue = "";
// DocumentName1
$CPDAssessors->DocumentName1->HrefValue = "";
$CPDAssessors->DocumentName1->TooltipValue = "";
// Document1
if (!ew_Empty($CPDAssessors->Document1->Upload->DbValue)) {
$CPDAssessors->Document1->HrefValue = ew_UploadPathEx(FALSE, $CPDAssessors->Document1->UploadPath) . ((!empty($CPDAssessors->Document1->ViewValue)) ? $CPDAssessors->Document1->ViewValue : $CPDAssessors->Document1->CurrentValue);
if ($CPDAssessors->Export <> "") $CPDAssessors->Document1->HrefValue = ew_ConvertFullUrl($CPDAssessors->Document1->HrefValue);
} else {
$CPDAssessors->Document1->HrefValue = "";
}
$CPDAssessors->Document1->TooltipValue = "";
// DocumentName2
$CPDAssessors->DocumentName2->HrefValue = "";
$CPDAssessors->DocumentName2->TooltipValue = "";
// Document2
if (!ew_Empty($CPDAssessors->Document2->Upload->DbValue)) {
$CPDAssessors->Document2->HrefValue = ew_UploadPathEx(FALSE, $CPDAssessors->Document2->UploadPath) . ((!empty($CPDAssessors->Document2->ViewValue)) ? $CPDAssessors->Document2->ViewValue : $CPDAssessors->Document2->CurrentValue);
if ($CPDAssessors->Export <> "") $CPDAssessors->Document2->HrefValue = ew_ConvertFullUrl($CPDAssessors->Document2->HrefValue);
} else {
$CPDAssessors->Document2->HrefValue = "";
}
$CPDAssessors->Document2->TooltipValue = "";
// DocumentName3
$CPDAssessors->DocumentName3->HrefValue = "";
$CPDAssessors->DocumentName3->TooltipValue = "";
// Document3
if (!ew_Empty($CPDAssessors->Document3->Upload->DbValue)) {
$CPDAssessors->Document3->HrefValue = ew_UploadPathEx(FALSE, $CPDAssessors->Document3->UploadPath) . ((!empty($CPDAssessors->Document3->ViewValue)) ? $CPDAssessors->Document3->ViewValue : $CPDAssessors->Document3->CurrentValue);
if ($CPDAssessors->Export <> "") $CPDAssessors->Document3->HrefValue = ew_ConvertFullUrl($CPDAssessors->Document3->HrefValue);
} else {
$CPDAssessors->Document3->HrefValue = "";
}
$CPDAssessors->Document3->TooltipValue = "";
}
// Call Row Rendered event
if ($CPDAssessors->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$CPDAssessors->Row_Rendered();
}
// Export data in HTML/CSV/Word/Excel/XML/Email format
function ExportData() {
global $CPDAssessors;
$utf8 = FALSE;
$bSelectLimit = FALSE;
// Load recordset
if ($bSelectLimit) {
$this->lTotalRecs = $CPDAssessors->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset())
$this->lTotalRecs = $rs->RecordCount();
}
$this->lStartRec = 1;
$this->SetUpStartRec(); // Set up start record position
// Set the last record to display
if ($this->lDisplayRecs < 0) {
$this->lStopRec = $this->lTotalRecs;
} else {
$this->lStopRec = $this->lStartRec + $this->lDisplayRecs - 1;
}
if (!$rs) {
header("Content-Type:"); // Remove header
header("Content-Disposition:");
$this->ShowMessage();
return;
}
if ($CPDAssessors->Export == "xml") {
$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
$XmlDoc->AddRoot();
} else {
$ExportDoc = new cExportDocument($CPDAssessors, "v");
$ExportDoc->ExportHeader();
if ($ExportDoc->Horizontal) { // Horizontal format, write header
$ExportDoc->BeginExportRow();
$ExportDoc->ExportCaption($CPDAssessors->CPDAssessorID);
$ExportDoc->ExportCaption($CPDAssessors->Title);
$ExportDoc->ExportCaption($CPDAssessors->KnownAs);
$ExportDoc->ExportCaption($CPDAssessors->FirstName);
$ExportDoc->ExportCaption($CPDAssessors->Surname);
$ExportDoc->ExportCaption($CPDAssessors->Designation);
$ExportDoc->ExportCaption($CPDAssessors->Department);
$ExportDoc->ExportCaption($CPDAssessors->Organisation);
$ExportDoc->ExportCaption($CPDAssessors->CellNumber);
$ExportDoc->ExportCaption($CPDAssessors->EmailAddress);
$ExportDoc->ExportCaption($CPDAssessors->ProfessionalCouncil);
$ExportDoc->ExportCaption($CPDAssessors->ProfRegNo);
$ExportDoc->ExportCaption($CPDAssessors->CVFile);
$ExportDoc->ExportCaption($CPDAssessors->QualificationFile);
$ExportDoc->ExportCaption($CPDAssessors->NDAFile);
$ExportDoc->ExportCaption($CPDAssessors->adminusername);
$ExportDoc->ExportCaption($CPDAssessors->DateUpdated);
$ExportDoc->ExportCaption($CPDAssessors->Active);
$ExportDoc->ExportCaption($CPDAssessors->DocumentName1);
$ExportDoc->ExportCaption($CPDAssessors->Document1);
$ExportDoc->ExportCaption($CPDAssessors->DocumentName2);
$ExportDoc->ExportCaption($CPDAssessors->Document2);
$ExportDoc->ExportCaption($CPDAssessors->DocumentName3);
$ExportDoc->ExportCaption($CPDAssessors->Document3);
$ExportDoc->EndExportRow();
}
}
// Move to first record
$this->lRecCnt = $this->lStartRec - 1;
if (!$rs->EOF) {
$rs->MoveFirst();
if (!$bSelectLimit && $this->lStartRec > 1)
$rs->Move($this->lStartRec - 1);
}
while (!$rs->EOF && $this->lRecCnt < $this->lStopRec) {
$this->lRecCnt++;
if (intval($this->lRecCnt) >= intval($this->lStartRec)) {
$this->LoadRowValues($rs);
// Render row
$CPDAssessors->CssClass = "";
$CPDAssessors->CssStyle = "";
$CPDAssessors->RowType = EW_ROWTYPE_VIEW; // Render view
$this->RenderRow();
if ($CPDAssessors->Export == "xml") {
$XmlDoc->AddRow();
$XmlDoc->AddField('CPDAssessorID', $CPDAssessors->CPDAssessorID->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Title', $CPDAssessors->Title->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('KnownAs', $CPDAssessors->KnownAs->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('FirstName', $CPDAssessors->FirstName->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Surname', $CPDAssessors->Surname->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Designation', $CPDAssessors->Designation->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Department', $CPDAssessors->Department->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Organisation', $CPDAssessors->Organisation->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('CellNumber', $CPDAssessors->CellNumber->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('EmailAddress', $CPDAssessors->EmailAddress->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('ProfessionalCouncil', $CPDAssessors->ProfessionalCouncil->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('ProfRegNo', $CPDAssessors->ProfRegNo->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('CVFile', $CPDAssessors->CVFile->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('QualificationFile', $CPDAssessors->QualificationFile->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('NDAFile', $CPDAssessors->NDAFile->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('adminusername', $CPDAssessors->adminusername->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('DateUpdated', $CPDAssessors->DateUpdated->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Active', $CPDAssessors->Active->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('DocumentName1', $CPDAssessors->DocumentName1->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Document1', $CPDAssessors->Document1->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('DocumentName2', $CPDAssessors->DocumentName2->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Document2', $CPDAssessors->Document2->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('DocumentName3', $CPDAssessors->DocumentName3->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
$XmlDoc->AddField('Document3', $CPDAssessors->Document3->ExportValue($CPDAssessors->Export, $CPDAssessors->ExportOriginalValue));
} else {
$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
$ExportDoc->ExportField($CPDAssessors->CPDAssessorID);
$ExportDoc->ExportField($CPDAssessors->Title);
$ExportDoc->ExportField($CPDAssessors->KnownAs);
$ExportDoc->ExportField($CPDAssessors->FirstName);
$ExportDoc->ExportField($CPDAssessors->Surname);
$ExportDoc->ExportField($CPDAssessors->Designation);
$ExportDoc->ExportField($CPDAssessors->Department);
$ExportDoc->ExportField($CPDAssessors->Organisation);
$ExportDoc->ExportField($CPDAssessors->CellNumber);
$ExportDoc->ExportField($CPDAssessors->EmailAddress);
$ExportDoc->ExportField($CPDAssessors->ProfessionalCouncil);
$ExportDoc->ExportField($CPDAssessors->ProfRegNo);
$ExportDoc->ExportField($CPDAssessors->CVFile);
$ExportDoc->ExportField($CPDAssessors->QualificationFile);
$ExportDoc->ExportField($CPDAssessors->NDAFile);
$ExportDoc->ExportField($CPDAssessors->adminusername);
$ExportDoc->ExportField($CPDAssessors->DateUpdated);
$ExportDoc->ExportField($CPDAssessors->Active);
$ExportDoc->ExportField($CPDAssessors->DocumentName1);
$ExportDoc->ExportField($CPDAssessors->Document1);
$ExportDoc->ExportField($CPDAssessors->DocumentName2);
$ExportDoc->ExportField($CPDAssessors->Document2);
$ExportDoc->ExportField($CPDAssessors->DocumentName3);
$ExportDoc->ExportField($CPDAssessors->Document3);
$ExportDoc->EndExportRow();
}
}
$rs->MoveNext();
}
if ($CPDAssessors->Export <> "xml")
$ExportDoc->ExportFooter();
// Close recordset
$rs->Close();
// Clean output buffer
if (!EW_DEBUG_ENABLED && ob_get_length())
ob_end_clean();
// Write BOM if utf-8
if ($utf8 && !in_array($CPDAssessors->Export, array("email", "xml")))
echo "\xEF\xBB\xBF";
// Write debug message if enabled
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
// Output data
if ($CPDAssessors->Export == "xml") {
header("Content-Type: text/xml");
echo $XmlDoc->XML();
} elseif ($CPDAssessors->Export == "email") {
$this->ExportEmail($ExportDoc->Text);
$this->Page_Terminate($CPDAssessors->ExportReturnUrl());
} else {
echo $ExportDoc->Text;
}
}
// Export email
function ExportEmail($EmailContent) {
global $Language, $CPDAssessors;
$sSender = @$_GET["sender"];
$sRecipient = @$_GET["recipient"];
$sCc = @$_GET["cc"];
$sBcc = @$_GET["bcc"];
$sContentType = @$_GET["contenttype"];
// Subject
$sSubject = ew_StripSlashes(@$_GET["subject"]);
$sEmailSubject = $sSubject;
// Message
$sContent = ew_StripSlashes(@$_GET["message"]);
$sEmailMessage = $sContent;
// Check sender
if ($sSender == "") {
$this->setMessage($Language->Phrase("EnterSenderEmail"));
return;
}
if (!ew_CheckEmail($sSender)) {
$this->setMessage($Language->Phrase("EnterProperSenderEmail"));
return;
}
// Check recipient
if (!ew_CheckEmailList($sRecipient, EW_MAX_EMAIL_RECIPIENT)) {
$this->setMessage($Language->Phrase("EnterProperRecipientEmail"));
return;
}
// Check cc
if (!ew_CheckEmailList($sCc, EW_MAX_EMAIL_RECIPIENT)) {
$this->setMessage($Language->Phrase("EnterProperCcEmail"));
return;
}
// Check bcc
if (!ew_CheckEmailList($sBcc, EW_MAX_EMAIL_RECIPIENT)) {
$this->setMessage($Language->Phrase("EnterProperBccEmail"));
return;
}
// Check email sent count
if (!isset($_SESSION[EW_EXPORT_EMAIL_COUNTER]))
$_SESSION[EW_EXPORT_EMAIL_COUNTER] = 0;
if (intval($_SESSION[EW_EXPORT_EMAIL_COUNTER]) > EW_MAX_EMAIL_SENT_COUNT) {
$this->setMessage($Language->Phrase("ExceedMaxEmailExport"));
return;
}
if ($sEmailMessage <> "") {
$sEmailMessage = ew_RemoveXSS($sEmailMessage);
$sEmailMessage .= ($sContentType == "url") ? "\r\n\r\n" : "<br><br>";
}
if ($sContentType == "url") {
$sUrl = ew_ConvertFullUrl(ew_CurrentPage() . "?" . $this->ExportQueryString());
$sEmailMessage .= $sUrl; // send URL only
} else {
$sEmailMessage .= $EmailContent; // send HTML
}
// Send email
$Email = new cEmail();
$Email->Sender = $sSender; // Sender
$Email->Recipient = $sRecipient; // Recipient
$Email->Cc = $sCc; // Cc
$Email->Bcc = $sBcc; // Bcc
$Email->Subject = $sEmailSubject; // Subject
$Email->Content = $sEmailMessage; // Content
$Email->Format = ($sContentType == "url") ? "text" : "html";
$Email->Charset = EW_EMAIL_CHARSET;
$EventArgs = array();
$bEmailSent = FALSE;
if ($CPDAssessors->Email_Sending($Email, $EventArgs))
$bEmailSent = $Email->Send();
// Check email sent status
if ($bEmailSent) {
// Update email sent count
$_SESSION[EW_EXPORT_EMAIL_COUNTER]++;
// Sent email success
$this->setMessage($Language->Phrase("SendEmailSuccess"));
} else {
// Sent email failure
$this->setMessage($Email->SendErrDescription);
}
}
// Export QueryString
function ExportQueryString() {
global $CPDAssessors;
// Initialize
$sQry = "export=html";
// Add record key QueryString
$sQry .= "&" . substr($CPDAssessors->KeyUrl("", ""), 1);
return $sQry;
}
// Page Load event
function Page_Load() {
//echo "Page Load";
}
// Page Unload event
function Page_Unload() {
//echo "Page Unload";
}
// Page Redirecting event
function Page_Redirecting(&$url) {
// Example:
//$url = "your URL";
}
// Message Showing event
function Message_Showing(&$msg) {
// Example:
//$msg = "your new message";
}
}
?>