| Current Path : /var/www/cesa.co.za/ccmadmin/ |
| Current File : /var/www/cesa.co.za/ccmadmin/cstArchivedMentorsview.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 "cstArchivedMentorsinfo.php" ?>
<?php include "CCMUsersinfo.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
$cstArchivedMentors_view = new ccstArchivedMentors_view();
$Page =& $cstArchivedMentors_view;
// Page init
$cstArchivedMentors_view->Page_Init();
// Page main
$cstArchivedMentors_view->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($cstArchivedMentors->Export == "") { ?>
<script type="text/javascript">
<!--
// Create page object
var cstArchivedMentors_view = new ew_Page("cstArchivedMentors_view");
// page properties
cstArchivedMentors_view.PageID = "view"; // page ID
cstArchivedMentors_view.FormID = "fcstArchivedMentorsview"; // form ID
var EW_PAGE_ID = cstArchivedMentors_view.PageID; // for backward compatibility
// extend page with Form_CustomValidate function
cstArchivedMentors_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) { ?>
cstArchivedMentors_view.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
cstArchivedMentors_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("TblTypeCUSTOMVIEW") ?><?php echo $cstArchivedMentors->TableCaption() ?>
<?php if ($cstArchivedMentors->Export == "") { ?>
<a href="<?php echo $cstArchivedMentors_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 $cstArchivedMentors_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 $cstArchivedMentors_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_cstArchivedMentors" id="emf_cstArchivedMentors" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_cstArchivedMentors',hdr:ewLanguage.Phrase('ExportToEmail'),key:<?php echo ew_ArrayToJsonAttr($cstArchivedMentors_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 ($cstArchivedMentors->Export == "") { ?>
<a href="<?php echo $cstArchivedMentors_view->ListUrl ?>"><?php echo $Language->Phrase("BackToList") ?></a>
<?php if ($Security->CanEdit()) { ?>
<a href="<?php echo $cstArchivedMentors_view->EditUrl ?>"><?php echo $Language->Phrase("ViewPageEditLink") ?></a>
<?php } ?>
<?php } ?>
</span></p>
<?php
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
$cstArchivedMentors_view->ShowMessage();
?>
<p>
<?php if ($cstArchivedMentors->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($cstArchivedMentors_view->Pager)) $cstArchivedMentors_view->Pager = new cPrevNextPager($cstArchivedMentors_view->lStartRec, $cstArchivedMentors_view->lDisplayRecs, $cstArchivedMentors_view->lTotalRecs) ?>
<?php if ($cstArchivedMentors_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 ($cstArchivedMentors_view->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 ($cstArchivedMentors_view->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 $cstArchivedMentors_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($cstArchivedMentors_view->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 ($cstArchivedMentors_view->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 $cstArchivedMentors_view->Pager->PageCount ?></span></td>
</tr></table>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($cstArchivedMentors_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 } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></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 ($cstArchivedMentors->CCMMentorID->Visible) { // CCMMentorID ?>
<tr<?php echo $cstArchivedMentors->CCMMentorID->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->CCMMentorID->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->CCMMentorID->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->CCMMentorID->ViewAttributes() ?>><?php echo $cstArchivedMentors->CCMMentorID->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Organisation->Visible) { // Organisation ?>
<tr<?php echo $cstArchivedMentors->Organisation->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Organisation->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Organisation->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Organisation->ViewAttributes() ?>><?php echo $cstArchivedMentors->Organisation->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Title->Visible) { // Title ?>
<tr<?php echo $cstArchivedMentors->Title->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Title->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Title->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Title->ViewAttributes() ?>><?php echo $cstArchivedMentors->Title->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->FirstName->Visible) { // FirstName ?>
<tr<?php echo $cstArchivedMentors->FirstName->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->FirstName->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->FirstName->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->FirstName->ViewAttributes() ?>><?php echo $cstArchivedMentors->FirstName->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Surname->Visible) { // Surname ?>
<tr<?php echo $cstArchivedMentors->Surname->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Surname->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Surname->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Surname->ViewAttributes() ?>><?php echo $cstArchivedMentors->Surname->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->KnownAs->Visible) { // KnownAs ?>
<tr<?php echo $cstArchivedMentors->KnownAs->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->KnownAs->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->KnownAs->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->KnownAs->ViewAttributes() ?>><?php echo $cstArchivedMentors->KnownAs->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->IDNumber->Visible) { // IDNumber ?>
<tr<?php echo $cstArchivedMentors->IDNumber->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->IDNumber->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->IDNumber->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->IDNumber->ViewAttributes() ?>><?php echo $cstArchivedMentors->IDNumber->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->CategoryReg->Visible) { // CategoryReg ?>
<tr<?php echo $cstArchivedMentors->CategoryReg->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->CategoryReg->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->CategoryReg->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->CategoryReg->ViewAttributes() ?>><?php echo $cstArchivedMentors->CategoryReg->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->ProfessionalCouncil->Visible) { // ProfessionalCouncil ?>
<tr<?php echo $cstArchivedMentors->ProfessionalCouncil->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->ProfessionalCouncil->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->ProfessionalCouncil->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->ProfessionalCouncil->ViewAttributes() ?>><?php echo $cstArchivedMentors->ProfessionalCouncil->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->CouncilRegNumber->Visible) { // CouncilRegNumber ?>
<tr<?php echo $cstArchivedMentors->CouncilRegNumber->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->CouncilRegNumber->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->CouncilRegNumber->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->CouncilRegNumber->ViewAttributes() ?>><?php echo $cstArchivedMentors->CouncilRegNumber->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Telephone->Visible) { // Telephone ?>
<tr<?php echo $cstArchivedMentors->Telephone->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Telephone->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Telephone->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Telephone->ViewAttributes() ?>><?php echo $cstArchivedMentors->Telephone->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Cellphone->Visible) { // Cellphone ?>
<tr<?php echo $cstArchivedMentors->Cellphone->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Cellphone->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Cellphone->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Cellphone->ViewAttributes() ?>><?php echo $cstArchivedMentors->Cellphone->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->EmailAddress->Visible) { // EmailAddress ?>
<tr<?php echo $cstArchivedMentors->EmailAddress->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->EmailAddress->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->EmailAddress->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->EmailAddress->ViewAttributes() ?>><?php echo $cstArchivedMentors->EmailAddress->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->WorkAddress->Visible) { // WorkAddress ?>
<tr<?php echo $cstArchivedMentors->WorkAddress->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->WorkAddress->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->WorkAddress->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->WorkAddress->ViewAttributes() ?>><?php echo $cstArchivedMentors->WorkAddress->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->PostalAddress->Visible) { // PostalAddress ?>
<tr<?php echo $cstArchivedMentors->PostalAddress->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->PostalAddress->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->PostalAddress->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->PostalAddress->ViewAttributes() ?>><?php echo $cstArchivedMentors->PostalAddress->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->EducationalInst->Visible) { // EducationalInst ?>
<tr<?php echo $cstArchivedMentors->EducationalInst->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->EducationalInst->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->EducationalInst->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->EducationalInst->ViewAttributes() ?>><?php echo $cstArchivedMentors->EducationalInst->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Qualifications->Visible) { // Qualifications ?>
<tr<?php echo $cstArchivedMentors->Qualifications->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Qualifications->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Qualifications->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Qualifications->ViewAttributes() ?>><?php echo $cstArchivedMentors->Qualifications->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->CVFile->Visible) { // CVFile ?>
<tr<?php echo $cstArchivedMentors->CVFile->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->CVFile->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->CVFile->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->CVFile->ViewAttributes() ?>><?php echo $cstArchivedMentors->CVFile->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->MentorUndertaking->Visible) { // MentorUndertaking ?>
<tr<?php echo $cstArchivedMentors->MentorUndertaking->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->MentorUndertaking->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->MentorUndertaking->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->MentorUndertaking->ViewAttributes() ?>><?php echo $cstArchivedMentors->MentorUndertaking->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->CandUUndertaking->Visible) { // CandUUndertaking ?>
<tr<?php echo $cstArchivedMentors->CandUUndertaking->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->CandUUndertaking->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->CandUUndertaking->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->CandUUndertaking->ViewAttributes() ?>><?php echo $cstArchivedMentors->CandUUndertaking->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->WebUsername->Visible) { // WebUsername ?>
<tr<?php echo $cstArchivedMentors->WebUsername->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->WebUsername->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->WebUsername->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->WebUsername->ViewAttributes() ?>><?php echo $cstArchivedMentors->WebUsername->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->WebPassword->Visible) { // WebPassword ?>
<tr<?php echo $cstArchivedMentors->WebPassword->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->WebPassword->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->WebPassword->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->WebPassword->ViewAttributes() ?>><?php echo $cstArchivedMentors->WebPassword->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->BlockAccess->Visible) { // BlockAccess ?>
<tr<?php echo $cstArchivedMentors->BlockAccess->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->BlockAccess->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->BlockAccess->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->BlockAccess->ViewAttributes() ?>><?php echo $cstArchivedMentors->BlockAccess->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Initials->Visible) { // Initials ?>
<tr<?php echo $cstArchivedMentors->Initials->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Initials->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Initials->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Initials->ViewAttributes() ?>><?php echo $cstArchivedMentors->Initials->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Archived->Visible) { // Archived ?>
<tr<?php echo $cstArchivedMentors->Archived->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Archived->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Archived->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Archived->ViewAttributes() ?>><?php echo $cstArchivedMentors->Archived->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Designation->Visible) { // Designation ?>
<tr<?php echo $cstArchivedMentors->Designation->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Designation->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Designation->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Designation->ViewAttributes() ?>><?php echo $cstArchivedMentors->Designation->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Prof_Reg_No->Visible) { // Prof Reg No ?>
<tr<?php echo $cstArchivedMentors->Prof_Reg_No->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Prof_Reg_No->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Prof_Reg_No->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Prof_Reg_No->ViewAttributes() ?>><?php echo $cstArchivedMentors->Prof_Reg_No->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($cstArchivedMentors->Reg_No->Visible) { // Reg No ?>
<tr<?php echo $cstArchivedMentors->Reg_No->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $cstArchivedMentors->Reg_No->FldCaption() ?></td>
<td<?php echo $cstArchivedMentors->Reg_No->CellAttributes() ?>>
<div<?php echo $cstArchivedMentors->Reg_No->ViewAttributes() ?>><?php echo $cstArchivedMentors->Reg_No->ViewValue ?></div></td>
</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if ($cstArchivedMentors->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($cstArchivedMentors_view->Pager)) $cstArchivedMentors_view->Pager = new cPrevNextPager($cstArchivedMentors_view->lStartRec, $cstArchivedMentors_view->lDisplayRecs, $cstArchivedMentors_view->lTotalRecs) ?>
<?php if ($cstArchivedMentors_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 ($cstArchivedMentors_view->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 ($cstArchivedMentors_view->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 $cstArchivedMentors_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($cstArchivedMentors_view->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 ($cstArchivedMentors_view->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedMentors_view->PageUrl() ?>start=<?php echo $cstArchivedMentors_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 $cstArchivedMentors_view->Pager->PageCount ?></span></td>
</tr></table>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($cstArchivedMentors_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 } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></span>
<?php } ?>
<?php } ?>
</td>
</tr>
</table>
</form>
<?php } ?>
<p>
<?php if ($cstArchivedMentors->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
$cstArchivedMentors_view->Page_Terminate();
?>
<?php
//
// Page class
//
class ccstArchivedMentors_view {
// Page ID
var $PageID = 'view';
// Table name
var $TableName = 'cstArchivedMentors';
// Page object name
var $PageObjName = 'cstArchivedMentors_view';
// Page name
function PageName() {
return ew_CurrentPage();
}
// Page URL
function PageUrl() {
$PageUrl = ew_CurrentPage() . "?";
global $cstArchivedMentors;
if ($cstArchivedMentors->UseTokenInUrl) $PageUrl .= "t=" . $cstArchivedMentors->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, $cstArchivedMentors;
if ($cstArchivedMentors->UseTokenInUrl) {
if ($objForm)
return ($cstArchivedMentors->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($cstArchivedMentors->TableVar == $_GET["t"]);
} else {
return TRUE;
}
}
//
// Page class constructor
//
function ccstArchivedMentors_view() {
global $conn, $Language;
// Language object
$Language = new cLanguage();
// Table object (cstArchivedMentors)
$GLOBALS["cstArchivedMentors"] = new ccstArchivedMentors();
// Table object (CCMUsers)
$GLOBALS['CCMUsers'] = new cCCMUsers();
// 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", 'cstArchivedMentors', 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 $cstArchivedMentors;
// Security
$Security = new cAdvancedSecurity();
if (!$Security->IsLoggedIn()) $Security->AutoLogin();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
$Security->TablePermission_Loading();
$Security->LoadCurrentUserLevel($this->TableName);
$Security->TablePermission_Loaded();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
if (!$Security->CanView()) {
$Security->SaveLastUrl();
$this->Page_Terminate("cstArchivedMentorslist.php");
}
// Get export parameters
if (@$_GET["export"] <> "") {
$cstArchivedMentors->Export = $_GET["export"];
} elseif (ew_IsHttpPost()) {
if (@$_POST["exporttype"] <> "")
$cstArchivedMentors->Export = $_POST["exporttype"];
} else {
$cstArchivedMentors->setExportReturnUrl(ew_CurrentUrl());
}
$gsExport = $cstArchivedMentors->Export; // Get export parameter, used in header
$gsExportFile = $cstArchivedMentors->TableVar; // Get export file, used in header
if (@$_GET["CCMMentorID"] <> "") {
if ($gsExportFile <> "") $gsExportFile .= "_";
$gsExportFile .= ew_StripSlashes($_GET["CCMMentorID"]);
}
if ($cstArchivedMentors->Export == "excel") {
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
}
if ($cstArchivedMentors->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, $cstArchivedMentors;
// Load current record
$bLoadCurrentRecord = FALSE;
$sReturnUrl = "";
$bMatchRecord = FALSE;
if ($this->IsPageRequest()) { // Validate request
if (@$_GET["CCMMentorID"] <> "") {
$cstArchivedMentors->CCMMentorID->setQueryStringValue($_GET["CCMMentorID"]);
$this->arRecKey["CCMMentorID"] = $cstArchivedMentors->CCMMentorID->QueryStringValue;
} else {
$bLoadCurrentRecord = TRUE;
}
// Get action
$cstArchivedMentors->CurrentAction = "I"; // Display form
switch ($cstArchivedMentors->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("cstArchivedMentorslist.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($cstArchivedMentors->CCMMentorID->CurrentValue) == strval($rs->fields('CCMMentorID'))) {
$cstArchivedMentors->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 = "cstArchivedMentorslist.php"; // No matching record, return to list
} else {
$this->LoadRowValues($rs); // Load row values
}
}
// Export data only
if (in_array($cstArchivedMentors->Export, array("html","word","excel","xml","csv","email"))) {
$this->ExportData();
if ($cstArchivedMentors->Export <> "email")
$this->Page_Terminate(); // Terminate response
exit();
}
} else {
$sReturnUrl = "cstArchivedMentorslist.php"; // Not page request, return to list
}
if ($sReturnUrl <> "")
$this->Page_Terminate($sReturnUrl);
// Render row
$cstArchivedMentors->RowType = EW_ROWTYPE_VIEW;
$this->RenderRow();
}
// Set up starting record parameters
function SetUpStartRec() {
global $cstArchivedMentors;
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];
$cstArchivedMentors->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;
}
$cstArchivedMentors->setStartRecordNumber($this->lStartRec);
}
}
}
$this->lStartRec = $cstArchivedMentors->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
$cstArchivedMentors->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
$cstArchivedMentors->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
$cstArchivedMentors->setStartRecordNumber($this->lStartRec);
}
}
// Load recordset
function LoadRecordset($offset = -1, $rowcnt = -1) {
global $conn, $cstArchivedMentors;
// Call Recordset Selecting event
$cstArchivedMentors->Recordset_Selecting($cstArchivedMentors->CurrentFilter);
// Load List page SQL
$sSql = $cstArchivedMentors->SelectSQL();
if ($offset > -1 && $rowcnt > -1)
$sSql .= " LIMIT $offset, $rowcnt";
// Load recordset
$rs = ew_LoadRecordset($sSql);
// Call Recordset Selected event
$cstArchivedMentors->Recordset_Selected($rs);
return $rs;
}
// Load row based on key values
function LoadRow() {
global $conn, $Security, $cstArchivedMentors;
$sFilter = $cstArchivedMentors->KeyFilter();
// Call Row Selecting event
$cstArchivedMentors->Row_Selecting($sFilter);
// Load SQL based on filter
$cstArchivedMentors->CurrentFilter = $sFilter;
$sSql = $cstArchivedMentors->SQL();
$res = FALSE;
$rs = ew_LoadRecordset($sSql);
if ($rs && !$rs->EOF) {
$res = TRUE;
$this->LoadRowValues($rs); // Load row values
// Call Row Selected event
$cstArchivedMentors->Row_Selected($rs);
$rs->Close();
}
return $res;
}
// Load row values from recordset
function LoadRowValues(&$rs) {
global $conn, $cstArchivedMentors;
$cstArchivedMentors->CCMMentorID->setDbValue($rs->fields('CCMMentorID'));
$cstArchivedMentors->Organisation->setDbValue($rs->fields('Organisation'));
$cstArchivedMentors->Title->setDbValue($rs->fields('Title'));
$cstArchivedMentors->FirstName->setDbValue($rs->fields('FirstName'));
$cstArchivedMentors->Surname->setDbValue($rs->fields('Surname'));
$cstArchivedMentors->KnownAs->setDbValue($rs->fields('KnownAs'));
$cstArchivedMentors->IDNumber->setDbValue($rs->fields('IDNumber'));
$cstArchivedMentors->CategoryReg->setDbValue($rs->fields('CategoryReg'));
$cstArchivedMentors->ProfessionalCouncil->setDbValue($rs->fields('ProfessionalCouncil'));
$cstArchivedMentors->CouncilRegNumber->setDbValue($rs->fields('CouncilRegNumber'));
$cstArchivedMentors->Telephone->setDbValue($rs->fields('Telephone'));
$cstArchivedMentors->Cellphone->setDbValue($rs->fields('Cellphone'));
$cstArchivedMentors->EmailAddress->setDbValue($rs->fields('EmailAddress'));
$cstArchivedMentors->WorkAddress->setDbValue($rs->fields('WorkAddress'));
$cstArchivedMentors->PostalAddress->setDbValue($rs->fields('PostalAddress'));
$cstArchivedMentors->EducationalInst->setDbValue($rs->fields('EducationalInst'));
$cstArchivedMentors->Qualifications->setDbValue($rs->fields('Qualifications'));
$cstArchivedMentors->CVFile->setDbValue($rs->fields('CVFile'));
$cstArchivedMentors->MentorUndertaking->setDbValue($rs->fields('MentorUndertaking'));
$cstArchivedMentors->CandUUndertaking->setDbValue($rs->fields('CandUUndertaking'));
$cstArchivedMentors->WebUsername->setDbValue($rs->fields('WebUsername'));
$cstArchivedMentors->WebPassword->setDbValue($rs->fields('WebPassword'));
$cstArchivedMentors->BlockAccess->setDbValue($rs->fields('BlockAccess'));
$cstArchivedMentors->Initials->setDbValue($rs->fields('Initials'));
$cstArchivedMentors->Archived->setDbValue($rs->fields('Archived'));
$cstArchivedMentors->Designation->setDbValue($rs->fields('Designation'));
$cstArchivedMentors->Prof_Reg_No->setDbValue($rs->fields('Prof Reg No'));
$cstArchivedMentors->Reg_No->setDbValue($rs->fields('Reg No'));
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $cstArchivedMentors;
// Initialize URLs
$this->ExportPrintUrl = $this->PageUrl() . "export=print&" . "CCMMentorID=" . urlencode($cstArchivedMentors->CCMMentorID->CurrentValue);
$this->ExportHtmlUrl = $this->PageUrl() . "export=html&" . "CCMMentorID=" . urlencode($cstArchivedMentors->CCMMentorID->CurrentValue);
$this->ExportExcelUrl = $this->PageUrl() . "export=excel&" . "CCMMentorID=" . urlencode($cstArchivedMentors->CCMMentorID->CurrentValue);
$this->ExportWordUrl = $this->PageUrl() . "export=word&" . "CCMMentorID=" . urlencode($cstArchivedMentors->CCMMentorID->CurrentValue);
$this->ExportXmlUrl = $this->PageUrl() . "export=xml&" . "CCMMentorID=" . urlencode($cstArchivedMentors->CCMMentorID->CurrentValue);
$this->ExportCsvUrl = $this->PageUrl() . "export=csv&" . "CCMMentorID=" . urlencode($cstArchivedMentors->CCMMentorID->CurrentValue);
$this->AddUrl = $cstArchivedMentors->AddUrl();
$this->EditUrl = $cstArchivedMentors->EditUrl();
$this->CopyUrl = $cstArchivedMentors->CopyUrl();
$this->DeleteUrl = $cstArchivedMentors->DeleteUrl();
$this->ListUrl = $cstArchivedMentors->ListUrl();
// Call Row_Rendering event
$cstArchivedMentors->Row_Rendering();
// Common render codes for all row types
// CCMMentorID
$cstArchivedMentors->CCMMentorID->CellCssStyle = ""; $cstArchivedMentors->CCMMentorID->CellCssClass = "";
$cstArchivedMentors->CCMMentorID->CellAttrs = array(); $cstArchivedMentors->CCMMentorID->ViewAttrs = array(); $cstArchivedMentors->CCMMentorID->EditAttrs = array();
// Organisation
$cstArchivedMentors->Organisation->CellCssStyle = ""; $cstArchivedMentors->Organisation->CellCssClass = "";
$cstArchivedMentors->Organisation->CellAttrs = array(); $cstArchivedMentors->Organisation->ViewAttrs = array(); $cstArchivedMentors->Organisation->EditAttrs = array();
// Title
$cstArchivedMentors->Title->CellCssStyle = ""; $cstArchivedMentors->Title->CellCssClass = "";
$cstArchivedMentors->Title->CellAttrs = array(); $cstArchivedMentors->Title->ViewAttrs = array(); $cstArchivedMentors->Title->EditAttrs = array();
// FirstName
$cstArchivedMentors->FirstName->CellCssStyle = ""; $cstArchivedMentors->FirstName->CellCssClass = "";
$cstArchivedMentors->FirstName->CellAttrs = array(); $cstArchivedMentors->FirstName->ViewAttrs = array(); $cstArchivedMentors->FirstName->EditAttrs = array();
// Surname
$cstArchivedMentors->Surname->CellCssStyle = ""; $cstArchivedMentors->Surname->CellCssClass = "";
$cstArchivedMentors->Surname->CellAttrs = array(); $cstArchivedMentors->Surname->ViewAttrs = array(); $cstArchivedMentors->Surname->EditAttrs = array();
// KnownAs
$cstArchivedMentors->KnownAs->CellCssStyle = ""; $cstArchivedMentors->KnownAs->CellCssClass = "";
$cstArchivedMentors->KnownAs->CellAttrs = array(); $cstArchivedMentors->KnownAs->ViewAttrs = array(); $cstArchivedMentors->KnownAs->EditAttrs = array();
// IDNumber
$cstArchivedMentors->IDNumber->CellCssStyle = ""; $cstArchivedMentors->IDNumber->CellCssClass = "";
$cstArchivedMentors->IDNumber->CellAttrs = array(); $cstArchivedMentors->IDNumber->ViewAttrs = array(); $cstArchivedMentors->IDNumber->EditAttrs = array();
// CategoryReg
$cstArchivedMentors->CategoryReg->CellCssStyle = ""; $cstArchivedMentors->CategoryReg->CellCssClass = "";
$cstArchivedMentors->CategoryReg->CellAttrs = array(); $cstArchivedMentors->CategoryReg->ViewAttrs = array(); $cstArchivedMentors->CategoryReg->EditAttrs = array();
// ProfessionalCouncil
$cstArchivedMentors->ProfessionalCouncil->CellCssStyle = ""; $cstArchivedMentors->ProfessionalCouncil->CellCssClass = "";
$cstArchivedMentors->ProfessionalCouncil->CellAttrs = array(); $cstArchivedMentors->ProfessionalCouncil->ViewAttrs = array(); $cstArchivedMentors->ProfessionalCouncil->EditAttrs = array();
// CouncilRegNumber
$cstArchivedMentors->CouncilRegNumber->CellCssStyle = ""; $cstArchivedMentors->CouncilRegNumber->CellCssClass = "";
$cstArchivedMentors->CouncilRegNumber->CellAttrs = array(); $cstArchivedMentors->CouncilRegNumber->ViewAttrs = array(); $cstArchivedMentors->CouncilRegNumber->EditAttrs = array();
// Telephone
$cstArchivedMentors->Telephone->CellCssStyle = ""; $cstArchivedMentors->Telephone->CellCssClass = "";
$cstArchivedMentors->Telephone->CellAttrs = array(); $cstArchivedMentors->Telephone->ViewAttrs = array(); $cstArchivedMentors->Telephone->EditAttrs = array();
// Cellphone
$cstArchivedMentors->Cellphone->CellCssStyle = ""; $cstArchivedMentors->Cellphone->CellCssClass = "";
$cstArchivedMentors->Cellphone->CellAttrs = array(); $cstArchivedMentors->Cellphone->ViewAttrs = array(); $cstArchivedMentors->Cellphone->EditAttrs = array();
// EmailAddress
$cstArchivedMentors->EmailAddress->CellCssStyle = ""; $cstArchivedMentors->EmailAddress->CellCssClass = "";
$cstArchivedMentors->EmailAddress->CellAttrs = array(); $cstArchivedMentors->EmailAddress->ViewAttrs = array(); $cstArchivedMentors->EmailAddress->EditAttrs = array();
// WorkAddress
$cstArchivedMentors->WorkAddress->CellCssStyle = ""; $cstArchivedMentors->WorkAddress->CellCssClass = "";
$cstArchivedMentors->WorkAddress->CellAttrs = array(); $cstArchivedMentors->WorkAddress->ViewAttrs = array(); $cstArchivedMentors->WorkAddress->EditAttrs = array();
// PostalAddress
$cstArchivedMentors->PostalAddress->CellCssStyle = ""; $cstArchivedMentors->PostalAddress->CellCssClass = "";
$cstArchivedMentors->PostalAddress->CellAttrs = array(); $cstArchivedMentors->PostalAddress->ViewAttrs = array(); $cstArchivedMentors->PostalAddress->EditAttrs = array();
// EducationalInst
$cstArchivedMentors->EducationalInst->CellCssStyle = ""; $cstArchivedMentors->EducationalInst->CellCssClass = "";
$cstArchivedMentors->EducationalInst->CellAttrs = array(); $cstArchivedMentors->EducationalInst->ViewAttrs = array(); $cstArchivedMentors->EducationalInst->EditAttrs = array();
// Qualifications
$cstArchivedMentors->Qualifications->CellCssStyle = ""; $cstArchivedMentors->Qualifications->CellCssClass = "";
$cstArchivedMentors->Qualifications->CellAttrs = array(); $cstArchivedMentors->Qualifications->ViewAttrs = array(); $cstArchivedMentors->Qualifications->EditAttrs = array();
// CVFile
$cstArchivedMentors->CVFile->CellCssStyle = ""; $cstArchivedMentors->CVFile->CellCssClass = "";
$cstArchivedMentors->CVFile->CellAttrs = array(); $cstArchivedMentors->CVFile->ViewAttrs = array(); $cstArchivedMentors->CVFile->EditAttrs = array();
// MentorUndertaking
$cstArchivedMentors->MentorUndertaking->CellCssStyle = ""; $cstArchivedMentors->MentorUndertaking->CellCssClass = "";
$cstArchivedMentors->MentorUndertaking->CellAttrs = array(); $cstArchivedMentors->MentorUndertaking->ViewAttrs = array(); $cstArchivedMentors->MentorUndertaking->EditAttrs = array();
// CandUUndertaking
$cstArchivedMentors->CandUUndertaking->CellCssStyle = ""; $cstArchivedMentors->CandUUndertaking->CellCssClass = "";
$cstArchivedMentors->CandUUndertaking->CellAttrs = array(); $cstArchivedMentors->CandUUndertaking->ViewAttrs = array(); $cstArchivedMentors->CandUUndertaking->EditAttrs = array();
// WebUsername
$cstArchivedMentors->WebUsername->CellCssStyle = ""; $cstArchivedMentors->WebUsername->CellCssClass = "";
$cstArchivedMentors->WebUsername->CellAttrs = array(); $cstArchivedMentors->WebUsername->ViewAttrs = array(); $cstArchivedMentors->WebUsername->EditAttrs = array();
// WebPassword
$cstArchivedMentors->WebPassword->CellCssStyle = ""; $cstArchivedMentors->WebPassword->CellCssClass = "";
$cstArchivedMentors->WebPassword->CellAttrs = array(); $cstArchivedMentors->WebPassword->ViewAttrs = array(); $cstArchivedMentors->WebPassword->EditAttrs = array();
// BlockAccess
$cstArchivedMentors->BlockAccess->CellCssStyle = ""; $cstArchivedMentors->BlockAccess->CellCssClass = "";
$cstArchivedMentors->BlockAccess->CellAttrs = array(); $cstArchivedMentors->BlockAccess->ViewAttrs = array(); $cstArchivedMentors->BlockAccess->EditAttrs = array();
// Initials
$cstArchivedMentors->Initials->CellCssStyle = ""; $cstArchivedMentors->Initials->CellCssClass = "";
$cstArchivedMentors->Initials->CellAttrs = array(); $cstArchivedMentors->Initials->ViewAttrs = array(); $cstArchivedMentors->Initials->EditAttrs = array();
// Archived
$cstArchivedMentors->Archived->CellCssStyle = ""; $cstArchivedMentors->Archived->CellCssClass = "";
$cstArchivedMentors->Archived->CellAttrs = array(); $cstArchivedMentors->Archived->ViewAttrs = array(); $cstArchivedMentors->Archived->EditAttrs = array();
// Designation
$cstArchivedMentors->Designation->CellCssStyle = ""; $cstArchivedMentors->Designation->CellCssClass = "";
$cstArchivedMentors->Designation->CellAttrs = array(); $cstArchivedMentors->Designation->ViewAttrs = array(); $cstArchivedMentors->Designation->EditAttrs = array();
// Prof Reg No
$cstArchivedMentors->Prof_Reg_No->CellCssStyle = ""; $cstArchivedMentors->Prof_Reg_No->CellCssClass = "";
$cstArchivedMentors->Prof_Reg_No->CellAttrs = array(); $cstArchivedMentors->Prof_Reg_No->ViewAttrs = array(); $cstArchivedMentors->Prof_Reg_No->EditAttrs = array();
// Reg No
$cstArchivedMentors->Reg_No->CellCssStyle = ""; $cstArchivedMentors->Reg_No->CellCssClass = "";
$cstArchivedMentors->Reg_No->CellAttrs = array(); $cstArchivedMentors->Reg_No->ViewAttrs = array(); $cstArchivedMentors->Reg_No->EditAttrs = array();
if ($cstArchivedMentors->RowType == EW_ROWTYPE_VIEW) { // View row
// CCMMentorID
$cstArchivedMentors->CCMMentorID->ViewValue = $cstArchivedMentors->CCMMentorID->CurrentValue;
$cstArchivedMentors->CCMMentorID->CssStyle = "";
$cstArchivedMentors->CCMMentorID->CssClass = "";
$cstArchivedMentors->CCMMentorID->ViewCustomAttributes = "";
// Organisation
$cstArchivedMentors->Organisation->ViewValue = $cstArchivedMentors->Organisation->CurrentValue;
$cstArchivedMentors->Organisation->CssStyle = "";
$cstArchivedMentors->Organisation->CssClass = "";
$cstArchivedMentors->Organisation->ViewCustomAttributes = "";
// Title
$cstArchivedMentors->Title->ViewValue = $cstArchivedMentors->Title->CurrentValue;
$cstArchivedMentors->Title->CssStyle = "";
$cstArchivedMentors->Title->CssClass = "";
$cstArchivedMentors->Title->ViewCustomAttributes = "";
// FirstName
$cstArchivedMentors->FirstName->ViewValue = $cstArchivedMentors->FirstName->CurrentValue;
$cstArchivedMentors->FirstName->CssStyle = "";
$cstArchivedMentors->FirstName->CssClass = "";
$cstArchivedMentors->FirstName->ViewCustomAttributes = "";
// Surname
$cstArchivedMentors->Surname->ViewValue = $cstArchivedMentors->Surname->CurrentValue;
$cstArchivedMentors->Surname->CssStyle = "";
$cstArchivedMentors->Surname->CssClass = "";
$cstArchivedMentors->Surname->ViewCustomAttributes = "";
// KnownAs
$cstArchivedMentors->KnownAs->ViewValue = $cstArchivedMentors->KnownAs->CurrentValue;
$cstArchivedMentors->KnownAs->CssStyle = "";
$cstArchivedMentors->KnownAs->CssClass = "";
$cstArchivedMentors->KnownAs->ViewCustomAttributes = "";
// IDNumber
$cstArchivedMentors->IDNumber->ViewValue = $cstArchivedMentors->IDNumber->CurrentValue;
$cstArchivedMentors->IDNumber->CssStyle = "";
$cstArchivedMentors->IDNumber->CssClass = "";
$cstArchivedMentors->IDNumber->ViewCustomAttributes = "";
// CategoryReg
$cstArchivedMentors->CategoryReg->ViewValue = $cstArchivedMentors->CategoryReg->CurrentValue;
$cstArchivedMentors->CategoryReg->CssStyle = "";
$cstArchivedMentors->CategoryReg->CssClass = "";
$cstArchivedMentors->CategoryReg->ViewCustomAttributes = "";
// ProfessionalCouncil
$cstArchivedMentors->ProfessionalCouncil->ViewValue = $cstArchivedMentors->ProfessionalCouncil->CurrentValue;
$cstArchivedMentors->ProfessionalCouncil->CssStyle = "";
$cstArchivedMentors->ProfessionalCouncil->CssClass = "";
$cstArchivedMentors->ProfessionalCouncil->ViewCustomAttributes = "";
// CouncilRegNumber
$cstArchivedMentors->CouncilRegNumber->ViewValue = $cstArchivedMentors->CouncilRegNumber->CurrentValue;
$cstArchivedMentors->CouncilRegNumber->CssStyle = "";
$cstArchivedMentors->CouncilRegNumber->CssClass = "";
$cstArchivedMentors->CouncilRegNumber->ViewCustomAttributes = "";
// Telephone
$cstArchivedMentors->Telephone->ViewValue = $cstArchivedMentors->Telephone->CurrentValue;
$cstArchivedMentors->Telephone->CssStyle = "";
$cstArchivedMentors->Telephone->CssClass = "";
$cstArchivedMentors->Telephone->ViewCustomAttributes = "";
// Cellphone
$cstArchivedMentors->Cellphone->ViewValue = $cstArchivedMentors->Cellphone->CurrentValue;
$cstArchivedMentors->Cellphone->CssStyle = "";
$cstArchivedMentors->Cellphone->CssClass = "";
$cstArchivedMentors->Cellphone->ViewCustomAttributes = "";
// EmailAddress
$cstArchivedMentors->EmailAddress->ViewValue = $cstArchivedMentors->EmailAddress->CurrentValue;
$cstArchivedMentors->EmailAddress->CssStyle = "";
$cstArchivedMentors->EmailAddress->CssClass = "";
$cstArchivedMentors->EmailAddress->ViewCustomAttributes = "";
// WorkAddress
$cstArchivedMentors->WorkAddress->ViewValue = $cstArchivedMentors->WorkAddress->CurrentValue;
$cstArchivedMentors->WorkAddress->CssStyle = "";
$cstArchivedMentors->WorkAddress->CssClass = "";
$cstArchivedMentors->WorkAddress->ViewCustomAttributes = "";
// PostalAddress
$cstArchivedMentors->PostalAddress->ViewValue = $cstArchivedMentors->PostalAddress->CurrentValue;
$cstArchivedMentors->PostalAddress->CssStyle = "";
$cstArchivedMentors->PostalAddress->CssClass = "";
$cstArchivedMentors->PostalAddress->ViewCustomAttributes = "";
// EducationalInst
$cstArchivedMentors->EducationalInst->ViewValue = $cstArchivedMentors->EducationalInst->CurrentValue;
$cstArchivedMentors->EducationalInst->CssStyle = "";
$cstArchivedMentors->EducationalInst->CssClass = "";
$cstArchivedMentors->EducationalInst->ViewCustomAttributes = "";
// Qualifications
$cstArchivedMentors->Qualifications->ViewValue = $cstArchivedMentors->Qualifications->CurrentValue;
$cstArchivedMentors->Qualifications->CssStyle = "";
$cstArchivedMentors->Qualifications->CssClass = "";
$cstArchivedMentors->Qualifications->ViewCustomAttributes = "";
// CVFile
$cstArchivedMentors->CVFile->ViewValue = $cstArchivedMentors->CVFile->CurrentValue;
$cstArchivedMentors->CVFile->CssStyle = "";
$cstArchivedMentors->CVFile->CssClass = "";
$cstArchivedMentors->CVFile->ViewCustomAttributes = "";
// MentorUndertaking
$cstArchivedMentors->MentorUndertaking->ViewValue = $cstArchivedMentors->MentorUndertaking->CurrentValue;
$cstArchivedMentors->MentorUndertaking->CssStyle = "";
$cstArchivedMentors->MentorUndertaking->CssClass = "";
$cstArchivedMentors->MentorUndertaking->ViewCustomAttributes = "";
// CandUUndertaking
$cstArchivedMentors->CandUUndertaking->ViewValue = $cstArchivedMentors->CandUUndertaking->CurrentValue;
$cstArchivedMentors->CandUUndertaking->CssStyle = "";
$cstArchivedMentors->CandUUndertaking->CssClass = "";
$cstArchivedMentors->CandUUndertaking->ViewCustomAttributes = "";
// WebUsername
$cstArchivedMentors->WebUsername->ViewValue = $cstArchivedMentors->WebUsername->CurrentValue;
$cstArchivedMentors->WebUsername->CssStyle = "";
$cstArchivedMentors->WebUsername->CssClass = "";
$cstArchivedMentors->WebUsername->ViewCustomAttributes = "";
// WebPassword
$cstArchivedMentors->WebPassword->ViewValue = $cstArchivedMentors->WebPassword->CurrentValue;
$cstArchivedMentors->WebPassword->CssStyle = "";
$cstArchivedMentors->WebPassword->CssClass = "";
$cstArchivedMentors->WebPassword->ViewCustomAttributes = "";
// BlockAccess
if (strval($cstArchivedMentors->BlockAccess->CurrentValue) <> "") {
switch ($cstArchivedMentors->BlockAccess->CurrentValue) {
case "y":
$cstArchivedMentors->BlockAccess->ViewValue = "Yes";
break;
case "n":
$cstArchivedMentors->BlockAccess->ViewValue = "No";
break;
default:
$cstArchivedMentors->BlockAccess->ViewValue = $cstArchivedMentors->BlockAccess->CurrentValue;
}
} else {
$cstArchivedMentors->BlockAccess->ViewValue = NULL;
}
$cstArchivedMentors->BlockAccess->CssStyle = "";
$cstArchivedMentors->BlockAccess->CssClass = "";
$cstArchivedMentors->BlockAccess->ViewCustomAttributes = "";
// Initials
$cstArchivedMentors->Initials->ViewValue = $cstArchivedMentors->Initials->CurrentValue;
$cstArchivedMentors->Initials->CssStyle = "";
$cstArchivedMentors->Initials->CssClass = "";
$cstArchivedMentors->Initials->ViewCustomAttributes = "";
// Archived
if (strval($cstArchivedMentors->Archived->CurrentValue) <> "") {
switch ($cstArchivedMentors->Archived->CurrentValue) {
case "1":
$cstArchivedMentors->Archived->ViewValue = "Yes";
break;
case "0":
$cstArchivedMentors->Archived->ViewValue = "No";
break;
default:
$cstArchivedMentors->Archived->ViewValue = $cstArchivedMentors->Archived->CurrentValue;
}
} else {
$cstArchivedMentors->Archived->ViewValue = NULL;
}
$cstArchivedMentors->Archived->CssStyle = "";
$cstArchivedMentors->Archived->CssClass = "";
$cstArchivedMentors->Archived->ViewCustomAttributes = "";
// Designation
$cstArchivedMentors->Designation->ViewValue = $cstArchivedMentors->Designation->CurrentValue;
$cstArchivedMentors->Designation->CssStyle = "";
$cstArchivedMentors->Designation->CssClass = "";
$cstArchivedMentors->Designation->ViewCustomAttributes = "";
// Prof Reg No
$cstArchivedMentors->Prof_Reg_No->ViewValue = $cstArchivedMentors->Prof_Reg_No->CurrentValue;
$cstArchivedMentors->Prof_Reg_No->CssStyle = "";
$cstArchivedMentors->Prof_Reg_No->CssClass = "";
$cstArchivedMentors->Prof_Reg_No->ViewCustomAttributes = "";
// Reg No
$cstArchivedMentors->Reg_No->ViewValue = $cstArchivedMentors->Reg_No->CurrentValue;
$cstArchivedMentors->Reg_No->CssStyle = "";
$cstArchivedMentors->Reg_No->CssClass = "";
$cstArchivedMentors->Reg_No->ViewCustomAttributes = "";
// CCMMentorID
$cstArchivedMentors->CCMMentorID->HrefValue = "";
$cstArchivedMentors->CCMMentorID->TooltipValue = "";
// Organisation
$cstArchivedMentors->Organisation->HrefValue = "";
$cstArchivedMentors->Organisation->TooltipValue = "";
// Title
$cstArchivedMentors->Title->HrefValue = "";
$cstArchivedMentors->Title->TooltipValue = "";
// FirstName
$cstArchivedMentors->FirstName->HrefValue = "";
$cstArchivedMentors->FirstName->TooltipValue = "";
// Surname
$cstArchivedMentors->Surname->HrefValue = "";
$cstArchivedMentors->Surname->TooltipValue = "";
// KnownAs
$cstArchivedMentors->KnownAs->HrefValue = "";
$cstArchivedMentors->KnownAs->TooltipValue = "";
// IDNumber
$cstArchivedMentors->IDNumber->HrefValue = "";
$cstArchivedMentors->IDNumber->TooltipValue = "";
// CategoryReg
$cstArchivedMentors->CategoryReg->HrefValue = "";
$cstArchivedMentors->CategoryReg->TooltipValue = "";
// ProfessionalCouncil
$cstArchivedMentors->ProfessionalCouncil->HrefValue = "";
$cstArchivedMentors->ProfessionalCouncil->TooltipValue = "";
// CouncilRegNumber
$cstArchivedMentors->CouncilRegNumber->HrefValue = "";
$cstArchivedMentors->CouncilRegNumber->TooltipValue = "";
// Telephone
$cstArchivedMentors->Telephone->HrefValue = "";
$cstArchivedMentors->Telephone->TooltipValue = "";
// Cellphone
$cstArchivedMentors->Cellphone->HrefValue = "";
$cstArchivedMentors->Cellphone->TooltipValue = "";
// EmailAddress
$cstArchivedMentors->EmailAddress->HrefValue = "";
$cstArchivedMentors->EmailAddress->TooltipValue = "";
// WorkAddress
$cstArchivedMentors->WorkAddress->HrefValue = "";
$cstArchivedMentors->WorkAddress->TooltipValue = "";
// PostalAddress
$cstArchivedMentors->PostalAddress->HrefValue = "";
$cstArchivedMentors->PostalAddress->TooltipValue = "";
// EducationalInst
$cstArchivedMentors->EducationalInst->HrefValue = "";
$cstArchivedMentors->EducationalInst->TooltipValue = "";
// Qualifications
$cstArchivedMentors->Qualifications->HrefValue = "";
$cstArchivedMentors->Qualifications->TooltipValue = "";
// CVFile
$cstArchivedMentors->CVFile->HrefValue = "";
$cstArchivedMentors->CVFile->TooltipValue = "";
// MentorUndertaking
$cstArchivedMentors->MentorUndertaking->HrefValue = "";
$cstArchivedMentors->MentorUndertaking->TooltipValue = "";
// CandUUndertaking
$cstArchivedMentors->CandUUndertaking->HrefValue = "";
$cstArchivedMentors->CandUUndertaking->TooltipValue = "";
// WebUsername
$cstArchivedMentors->WebUsername->HrefValue = "";
$cstArchivedMentors->WebUsername->TooltipValue = "";
// WebPassword
$cstArchivedMentors->WebPassword->HrefValue = "";
$cstArchivedMentors->WebPassword->TooltipValue = "";
// BlockAccess
$cstArchivedMentors->BlockAccess->HrefValue = "";
$cstArchivedMentors->BlockAccess->TooltipValue = "";
// Initials
$cstArchivedMentors->Initials->HrefValue = "";
$cstArchivedMentors->Initials->TooltipValue = "";
// Archived
$cstArchivedMentors->Archived->HrefValue = "";
$cstArchivedMentors->Archived->TooltipValue = "";
// Designation
$cstArchivedMentors->Designation->HrefValue = "";
$cstArchivedMentors->Designation->TooltipValue = "";
// Prof Reg No
$cstArchivedMentors->Prof_Reg_No->HrefValue = "";
$cstArchivedMentors->Prof_Reg_No->TooltipValue = "";
// Reg No
$cstArchivedMentors->Reg_No->HrefValue = "";
$cstArchivedMentors->Reg_No->TooltipValue = "";
}
// Call Row Rendered event
if ($cstArchivedMentors->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$cstArchivedMentors->Row_Rendered();
}
// Export data in HTML/CSV/Word/Excel/XML/Email format
function ExportData() {
global $cstArchivedMentors;
$utf8 = FALSE;
$bSelectLimit = FALSE;
// Load recordset
if ($bSelectLimit) {
$this->lTotalRecs = $cstArchivedMentors->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 ($cstArchivedMentors->Export == "xml") {
$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
$XmlDoc->AddRoot();
} else {
$ExportDoc = new cExportDocument($cstArchivedMentors, "v");
$ExportDoc->ExportHeader();
if ($ExportDoc->Horizontal) { // Horizontal format, write header
$ExportDoc->BeginExportRow();
$ExportDoc->ExportCaption($cstArchivedMentors->CCMMentorID);
$ExportDoc->ExportCaption($cstArchivedMentors->Organisation);
$ExportDoc->ExportCaption($cstArchivedMentors->Title);
$ExportDoc->ExportCaption($cstArchivedMentors->FirstName);
$ExportDoc->ExportCaption($cstArchivedMentors->Surname);
$ExportDoc->ExportCaption($cstArchivedMentors->KnownAs);
$ExportDoc->ExportCaption($cstArchivedMentors->IDNumber);
$ExportDoc->ExportCaption($cstArchivedMentors->CategoryReg);
$ExportDoc->ExportCaption($cstArchivedMentors->ProfessionalCouncil);
$ExportDoc->ExportCaption($cstArchivedMentors->CouncilRegNumber);
$ExportDoc->ExportCaption($cstArchivedMentors->Telephone);
$ExportDoc->ExportCaption($cstArchivedMentors->Cellphone);
$ExportDoc->ExportCaption($cstArchivedMentors->EmailAddress);
$ExportDoc->ExportCaption($cstArchivedMentors->EducationalInst);
$ExportDoc->ExportCaption($cstArchivedMentors->CVFile);
$ExportDoc->ExportCaption($cstArchivedMentors->MentorUndertaking);
$ExportDoc->ExportCaption($cstArchivedMentors->CandUUndertaking);
$ExportDoc->ExportCaption($cstArchivedMentors->WebUsername);
$ExportDoc->ExportCaption($cstArchivedMentors->WebPassword);
$ExportDoc->ExportCaption($cstArchivedMentors->BlockAccess);
$ExportDoc->ExportCaption($cstArchivedMentors->Initials);
$ExportDoc->ExportCaption($cstArchivedMentors->Archived);
$ExportDoc->ExportCaption($cstArchivedMentors->Designation);
$ExportDoc->ExportCaption($cstArchivedMentors->Prof_Reg_No);
$ExportDoc->ExportCaption($cstArchivedMentors->Reg_No);
$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
$cstArchivedMentors->CssClass = "";
$cstArchivedMentors->CssStyle = "";
$cstArchivedMentors->RowType = EW_ROWTYPE_VIEW; // Render view
$this->RenderRow();
if ($cstArchivedMentors->Export == "xml") {
$XmlDoc->AddRow();
$XmlDoc->AddField('CCMMentorID', $cstArchivedMentors->CCMMentorID->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Organisation', $cstArchivedMentors->Organisation->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Title', $cstArchivedMentors->Title->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('FirstName', $cstArchivedMentors->FirstName->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Surname', $cstArchivedMentors->Surname->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('KnownAs', $cstArchivedMentors->KnownAs->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('IDNumber', $cstArchivedMentors->IDNumber->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('CategoryReg', $cstArchivedMentors->CategoryReg->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('ProfessionalCouncil', $cstArchivedMentors->ProfessionalCouncil->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('CouncilRegNumber', $cstArchivedMentors->CouncilRegNumber->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Telephone', $cstArchivedMentors->Telephone->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Cellphone', $cstArchivedMentors->Cellphone->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('EmailAddress', $cstArchivedMentors->EmailAddress->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('EducationalInst', $cstArchivedMentors->EducationalInst->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('CVFile', $cstArchivedMentors->CVFile->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('MentorUndertaking', $cstArchivedMentors->MentorUndertaking->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('CandUUndertaking', $cstArchivedMentors->CandUUndertaking->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('WebUsername', $cstArchivedMentors->WebUsername->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('WebPassword', $cstArchivedMentors->WebPassword->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('BlockAccess', $cstArchivedMentors->BlockAccess->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Initials', $cstArchivedMentors->Initials->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Archived', $cstArchivedMentors->Archived->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Designation', $cstArchivedMentors->Designation->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Prof_Reg_No', $cstArchivedMentors->Prof_Reg_No->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
$XmlDoc->AddField('Reg_No', $cstArchivedMentors->Reg_No->ExportValue($cstArchivedMentors->Export, $cstArchivedMentors->ExportOriginalValue));
} else {
$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
$ExportDoc->ExportField($cstArchivedMentors->CCMMentorID);
$ExportDoc->ExportField($cstArchivedMentors->Organisation);
$ExportDoc->ExportField($cstArchivedMentors->Title);
$ExportDoc->ExportField($cstArchivedMentors->FirstName);
$ExportDoc->ExportField($cstArchivedMentors->Surname);
$ExportDoc->ExportField($cstArchivedMentors->KnownAs);
$ExportDoc->ExportField($cstArchivedMentors->IDNumber);
$ExportDoc->ExportField($cstArchivedMentors->CategoryReg);
$ExportDoc->ExportField($cstArchivedMentors->ProfessionalCouncil);
$ExportDoc->ExportField($cstArchivedMentors->CouncilRegNumber);
$ExportDoc->ExportField($cstArchivedMentors->Telephone);
$ExportDoc->ExportField($cstArchivedMentors->Cellphone);
$ExportDoc->ExportField($cstArchivedMentors->EmailAddress);
$ExportDoc->ExportField($cstArchivedMentors->EducationalInst);
$ExportDoc->ExportField($cstArchivedMentors->CVFile);
$ExportDoc->ExportField($cstArchivedMentors->MentorUndertaking);
$ExportDoc->ExportField($cstArchivedMentors->CandUUndertaking);
$ExportDoc->ExportField($cstArchivedMentors->WebUsername);
$ExportDoc->ExportField($cstArchivedMentors->WebPassword);
$ExportDoc->ExportField($cstArchivedMentors->BlockAccess);
$ExportDoc->ExportField($cstArchivedMentors->Initials);
$ExportDoc->ExportField($cstArchivedMentors->Archived);
$ExportDoc->ExportField($cstArchivedMentors->Designation);
$ExportDoc->ExportField($cstArchivedMentors->Prof_Reg_No);
$ExportDoc->ExportField($cstArchivedMentors->Reg_No);
$ExportDoc->EndExportRow();
}
}
$rs->MoveNext();
}
if ($cstArchivedMentors->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($cstArchivedMentors->Export, array("email", "xml")))
echo "\xEF\xBB\xBF";
// Write debug message if enabled
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
// Output data
if ($cstArchivedMentors->Export == "xml") {
header("Content-Type: text/xml");
echo $XmlDoc->XML();
} elseif ($cstArchivedMentors->Export == "email") {
$this->ExportEmail($ExportDoc->Text);
$this->Page_Terminate($cstArchivedMentors->ExportReturnUrl());
} else {
echo $ExportDoc->Text;
}
}
// Export email
function ExportEmail($EmailContent) {
global $Language, $cstArchivedMentors;
$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 ($cstArchivedMentors->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 $cstArchivedMentors;
// Initialize
$sQry = "export=html";
// Add record key QueryString
$sQry .= "&" . substr($cstArchivedMentors->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";
}
}
?>