| Current Path : /var/www/cesa.co.za/cceconvenors/ |
| Current File : /var/www/cesa.co.za/cceconvenors/cstFutureStudentslist.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 "cstFutureStudentsinfo.php" ?>
<?php include "CCEFacilitatorUsersinfo.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
$cstFutureStudents_list = new ccstFutureStudents_list();
$Page =& $cstFutureStudents_list;
// Page init
$cstFutureStudents_list->Page_Init();
// Page main
$cstFutureStudents_list->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($cstFutureStudents->Export == "") { ?>
<script type="text/javascript">
<!--
// Create page object
var cstFutureStudents_list = new ew_Page("cstFutureStudents_list");
// page properties
cstFutureStudents_list.PageID = "list"; // page ID
cstFutureStudents_list.FormID = "fcstFutureStudentslist"; // form ID
var EW_PAGE_ID = cstFutureStudents_list.PageID; // for backward compatibility
// extend page with Form_CustomValidate function
cstFutureStudents_list.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) { ?>
cstFutureStudents_list.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
cstFutureStudents_list.ValidateRequired = false; // no JavaScript validation
<?php } ?>
//-->
</script>
<script type="text/javascript">
<!--
var ew_DHTMLEditors = [];
//-->
</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 } ?>
<?php if ($cstFutureStudents->Export == "") { ?>
<?php } ?>
<?php
$bSelectLimit = EW_SELECT_LIMIT;
if ($bSelectLimit) {
$cstFutureStudents_list->lTotalRecs = $cstFutureStudents->SelectRecordCount();
} else {
if ($rs = $cstFutureStudents_list->LoadRecordset())
$cstFutureStudents_list->lTotalRecs = $rs->RecordCount();
}
$cstFutureStudents_list->lStartRec = 1;
if ($cstFutureStudents_list->lDisplayRecs <= 0 || ($cstFutureStudents->Export <> "" && $cstFutureStudents->ExportAll)) // Display all records
$cstFutureStudents_list->lDisplayRecs = $cstFutureStudents_list->lTotalRecs;
if (!($cstFutureStudents->Export <> "" && $cstFutureStudents->ExportAll))
$cstFutureStudents_list->SetUpStartRec(); // Set up start record position
if ($bSelectLimit)
$rs = $cstFutureStudents_list->LoadRecordset($cstFutureStudents_list->lStartRec-1, $cstFutureStudents_list->lDisplayRecs);
?>
<p><span class="phpmaker" style="white-space: nowrap;"><?php echo $Language->Phrase("TblTypeCUSTOMVIEW") ?><?php echo $cstFutureStudents->TableCaption() ?>
<?php if ($cstFutureStudents->Export == "" && $cstFutureStudents->CurrentAction == "") { ?>
<a href="<?php echo $cstFutureStudents_list->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 $cstFutureStudents_list->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 $cstFutureStudents_list->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_cstFutureStudents" id="emf_cstFutureStudents" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_cstFutureStudents',hdr:ewLanguage.Phrase('ExportToEmail'),f:document.fcstFutureStudentslist,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 } ?>
</span></p>
<?php if ($Security->IsLoggedIn()) { ?>
<?php if ($cstFutureStudents->Export == "" && $cstFutureStudents->CurrentAction == "") { ?>
<a href="javascript:ew_ToggleSearchPanel(cstFutureStudents_list);" style="text-decoration: none;"><img id="cstFutureStudents_list_SearchImage" src="images/collapse.gif" alt="" width="9" height="9" border="0"></a><span class="phpmaker"> <?php echo $Language->Phrase("Search") ?></span><br>
<div id="cstFutureStudents_list_SearchPanel">
<form name="fcstFutureStudentslistsrch" id="fcstFutureStudentslistsrch" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<input type="hidden" id="t" name="t" value="cstFutureStudents">
<table class="ewBasicSearch">
<tr>
<td><span class="phpmaker">
<input type="text" name="<?php echo EW_TABLE_BASIC_SEARCH ?>" id="<?php echo EW_TABLE_BASIC_SEARCH ?>" size="20" value="<?php echo ew_HtmlEncode($cstFutureStudents->getSessionBasicSearchKeyword()) ?>">
<input type="Submit" name="Submit" id="Submit" value="<?php echo ew_BtnCaption($Language->Phrase("QuickSearchBtn")) ?>">
<a href="<?php echo $cstFutureStudents_list->PageUrl() ?>cmd=reset"><?php echo $Language->Phrase("ShowAll") ?></a>
</span></td>
</tr>
<tr>
<td><span class="phpmaker"><label><input type="radio" name="<?php echo EW_TABLE_BASIC_SEARCH_TYPE ?>" id="<?php echo EW_TABLE_BASIC_SEARCH_TYPE ?>" value=""<?php if ($cstFutureStudents->getSessionBasicSearchType() == "") { ?> checked="checked"<?php } ?>><?php echo $Language->Phrase("ExactPhrase") ?></label> <label><input type="radio" name="<?php echo EW_TABLE_BASIC_SEARCH_TYPE ?>" id="<?php echo EW_TABLE_BASIC_SEARCH_TYPE ?>" value="AND"<?php if ($cstFutureStudents->getSessionBasicSearchType() == "AND") { ?> checked="checked"<?php } ?>><?php echo $Language->Phrase("AllWord") ?></label> <label><input type="radio" name="<?php echo EW_TABLE_BASIC_SEARCH_TYPE ?>" id="<?php echo EW_TABLE_BASIC_SEARCH_TYPE ?>" value="OR"<?php if ($cstFutureStudents->getSessionBasicSearchType() == "OR") { ?> checked="checked"<?php } ?>><?php echo $Language->Phrase("AnyWord") ?></label></span></td>
</tr>
</table>
</form>
</div>
<?php } ?>
<?php } ?>
<?php
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
$cstFutureStudents_list->ShowMessage();
?>
<br>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<?php if ($cstFutureStudents->Export == "") { ?>
<div class="ewGridUpperPanel">
<?php if ($cstFutureStudents->CurrentAction <> "gridadd" && $cstFutureStudents->CurrentAction <> "gridedit") { ?>
<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($cstFutureStudents_list->Pager)) $cstFutureStudents_list->Pager = new cPrevNextPager($cstFutureStudents_list->lStartRec, $cstFutureStudents_list->lDisplayRecs, $cstFutureStudents_list->lTotalRecs) ?>
<?php if ($cstFutureStudents_list->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 ($cstFutureStudents_list->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 ($cstFutureStudents_list->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 $cstFutureStudents_list->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($cstFutureStudents_list->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 ($cstFutureStudents_list->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 $cstFutureStudents_list->Pager->PageCount ?></span></td>
</tr></table>
</td>
<td> </td>
<td>
<span class="phpmaker"><?php echo $Language->Phrase("Record") ?> <?php echo $cstFutureStudents_list->Pager->FromIndex ?> <?php echo $Language->Phrase("To") ?> <?php echo $cstFutureStudents_list->Pager->ToIndex ?> <?php echo $Language->Phrase("Of") ?> <?php echo $cstFutureStudents_list->Pager->RecordCount ?></span>
<?php } else { ?>
<?php if ($cstFutureStudents_list->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>
<?php if ($cstFutureStudents_list->lTotalRecs > 0) { ?>
<td> </td>
<td><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php echo $Language->Phrase("RecordsPerPage") ?> </td><td>
<input type="hidden" id="t" name="t" value="cstFutureStudents">
<select name="<?php echo EW_TABLE_REC_PER_PAGE ?>" id="<?php echo EW_TABLE_REC_PER_PAGE ?>" onchange="this.form.submit();">
<option value="20"<?php if ($cstFutureStudents_list->lDisplayRecs == 20) { ?> selected="selected"<?php } ?>>20</option>
<option value="40"<?php if ($cstFutureStudents_list->lDisplayRecs == 40) { ?> selected="selected"<?php } ?>>40</option>
<option value="60"<?php if ($cstFutureStudents_list->lDisplayRecs == 60) { ?> selected="selected"<?php } ?>>60</option>
<option value="80"<?php if ($cstFutureStudents_list->lDisplayRecs == 80) { ?> selected="selected"<?php } ?>>80</option>
<option value="ALL"<?php if ($cstFutureStudents->getRecordsPerPage() == -1) { ?> selected="selected"<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select></td></tr></table>
</td>
<?php } ?>
</tr>
</table>
</form>
<?php } ?>
<span class="phpmaker">
</span>
</div>
<?php } ?>
<form name="fcstFutureStudentslist" id="fcstFutureStudentslist" class="ewForm" action="" method="post">
<div id="gmp_cstFutureStudents" class="ewGridMiddlePanel">
<?php if ($cstFutureStudents_list->lTotalRecs > 0) { ?>
<table cellspacing="0" rowhighlightclass="ewTableHighlightRow" rowselectclass="ewTableSelectRow" roweditclass="ewTableEditRow" class="ewTable ewTableSeparate">
<?php echo $cstFutureStudents->TableCustomInnerHtml ?>
<thead><!-- Table header -->
<tr class="ewTableHeader">
<?php
// Render list options
$cstFutureStudents_list->RenderListOptions();
// Render list options (header, left)
$cstFutureStudents_list->ListOptions->Render("header", "left");
?>
<?php if ($cstFutureStudents->FirstName->Visible) { // FirstName ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->FirstName) == "") { ?>
<td><?php echo $cstFutureStudents->FirstName->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->FirstName) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->FirstName->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->FirstName->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->FirstName->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->Surname->Visible) { // Surname ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->Surname) == "") { ?>
<td><?php echo $cstFutureStudents->Surname->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->Surname) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->Surname->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->Surname->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->Surname->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->KnownAs->Visible) { // KnownAs ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->KnownAs) == "") { ?>
<td><?php echo $cstFutureStudents->KnownAs->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->KnownAs) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->KnownAs->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->KnownAs->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->KnownAs->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->Organisation->Visible) { // Organisation ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->Organisation) == "") { ?>
<td><?php echo $cstFutureStudents->Organisation->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->Organisation) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->Organisation->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->Organisation->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->Organisation->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->Age->Visible) { // Age ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->Age) == "") { ?>
<td><?php echo $cstFutureStudents->Age->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->Age) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->Age->FldCaption() ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->Age->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->Age->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->Cellphone->Visible) { // Cellphone ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->Cellphone) == "") { ?>
<td><?php echo $cstFutureStudents->Cellphone->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->Cellphone) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->Cellphone->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->Cellphone->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->Cellphone->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->EmailAddress->Visible) { // EmailAddress ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->EmailAddress) == "") { ?>
<td><?php echo $cstFutureStudents->EmailAddress->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->EmailAddress) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->EmailAddress->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->EmailAddress->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->EmailAddress->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->HomeAddress->Visible) { // HomeAddress ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->HomeAddress) == "") { ?>
<td><?php echo $cstFutureStudents->HomeAddress->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->HomeAddress) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->HomeAddress->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->HomeAddress->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->HomeAddress->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->CESAMemberFirm->Visible) { // CESAMemberFirm ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->CESAMemberFirm) == "") { ?>
<td><?php echo $cstFutureStudents->CESAMemberFirm->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->CESAMemberFirm) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->CESAMemberFirm->FldCaption() ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->CESAMemberFirm->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->CESAMemberFirm->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->CESAAccountNo->Visible) { // CESAAccountNo ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->CESAAccountNo) == "") { ?>
<td><?php echo $cstFutureStudents->CESAAccountNo->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->CESAAccountNo) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->CESAAccountNo->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->CESAAccountNo->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->CESAAccountNo->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->MentorFirstName->Visible) { // MentorFirstName ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->MentorFirstName) == "") { ?>
<td><?php echo $cstFutureStudents->MentorFirstName->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->MentorFirstName) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->MentorFirstName->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->MentorFirstName->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->MentorFirstName->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($cstFutureStudents->MentorSurname->Visible) { // MentorSurname ?>
<?php if ($cstFutureStudents->SortUrl($cstFutureStudents->MentorSurname) == "") { ?>
<td><?php echo $cstFutureStudents->MentorSurname->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstFutureStudents->SortUrl($cstFutureStudents->MentorSurname) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstFutureStudents->MentorSurname->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstFutureStudents->MentorSurname->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstFutureStudents->MentorSurname->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php
// Render list options (header, right)
$cstFutureStudents_list->ListOptions->Render("header", "right");
?>
</tr>
</thead>
<?php
if ($cstFutureStudents->ExportAll && $cstFutureStudents->Export <> "") {
$cstFutureStudents_list->lStopRec = $cstFutureStudents_list->lTotalRecs;
} else {
$cstFutureStudents_list->lStopRec = $cstFutureStudents_list->lStartRec + $cstFutureStudents_list->lDisplayRecs - 1; // Set the last record to display
}
$cstFutureStudents_list->lRecCount = $cstFutureStudents_list->lStartRec - 1;
if ($rs && !$rs->EOF) {
$rs->MoveFirst();
if (!$bSelectLimit && $cstFutureStudents_list->lStartRec > 1)
$rs->Move($cstFutureStudents_list->lStartRec - 1);
}
// Initialize aggregate
$cstFutureStudents->RowType = EW_ROWTYPE_AGGREGATEINIT;
$cstFutureStudents_list->RenderRow();
$cstFutureStudents_list->lRowCnt = 0;
while (($cstFutureStudents->CurrentAction == "gridadd" || !$rs->EOF) &&
$cstFutureStudents_list->lRecCount < $cstFutureStudents_list->lStopRec) {
$cstFutureStudents_list->lRecCount++;
if (intval($cstFutureStudents_list->lRecCount) >= intval($cstFutureStudents_list->lStartRec)) {
$cstFutureStudents_list->lRowCnt++;
// Init row class and style
$cstFutureStudents->CssClass = "";
$cstFutureStudents->CssStyle = "";
$cstFutureStudents->RowAttrs = array('onmouseover'=>'ew_MouseOver(event, this);', 'onmouseout'=>'ew_MouseOut(event, this);', 'onclick'=>'ew_Click(event, this);');
if ($cstFutureStudents->CurrentAction == "gridadd") {
$cstFutureStudents_list->LoadDefaultValues(); // Load default values
} else {
$cstFutureStudents_list->LoadRowValues($rs); // Load row values
}
$cstFutureStudents->RowType = EW_ROWTYPE_VIEW; // Render view
// Render row
$cstFutureStudents_list->RenderRow();
// Render list options
$cstFutureStudents_list->RenderListOptions();
?>
<tr<?php echo $cstFutureStudents->RowAttributes() ?>>
<?php
// Render list options (body, left)
$cstFutureStudents_list->ListOptions->Render("body", "left");
?>
<?php if ($cstFutureStudents->FirstName->Visible) { // FirstName ?>
<td<?php echo $cstFutureStudents->FirstName->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->FirstName->ViewAttributes() ?>><?php echo $cstFutureStudents->FirstName->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->Surname->Visible) { // Surname ?>
<td<?php echo $cstFutureStudents->Surname->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->Surname->ViewAttributes() ?>><?php echo $cstFutureStudents->Surname->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->KnownAs->Visible) { // KnownAs ?>
<td<?php echo $cstFutureStudents->KnownAs->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->KnownAs->ViewAttributes() ?>><?php echo $cstFutureStudents->KnownAs->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->Organisation->Visible) { // Organisation ?>
<td<?php echo $cstFutureStudents->Organisation->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->Organisation->ViewAttributes() ?>><?php echo $cstFutureStudents->Organisation->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->Age->Visible) { // Age ?>
<td<?php echo $cstFutureStudents->Age->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->Age->ViewAttributes() ?>><?php echo $cstFutureStudents->Age->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->Cellphone->Visible) { // Cellphone ?>
<td<?php echo $cstFutureStudents->Cellphone->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->Cellphone->ViewAttributes() ?>><?php echo $cstFutureStudents->Cellphone->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->EmailAddress->Visible) { // EmailAddress ?>
<td<?php echo $cstFutureStudents->EmailAddress->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->EmailAddress->ViewAttributes() ?>><?php echo $cstFutureStudents->EmailAddress->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->HomeAddress->Visible) { // HomeAddress ?>
<td<?php echo $cstFutureStudents->HomeAddress->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->HomeAddress->ViewAttributes() ?>><?php echo $cstFutureStudents->HomeAddress->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->CESAMemberFirm->Visible) { // CESAMemberFirm ?>
<td<?php echo $cstFutureStudents->CESAMemberFirm->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->CESAMemberFirm->ViewAttributes() ?>><?php echo $cstFutureStudents->CESAMemberFirm->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->CESAAccountNo->Visible) { // CESAAccountNo ?>
<td<?php echo $cstFutureStudents->CESAAccountNo->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->CESAAccountNo->ViewAttributes() ?>><?php echo $cstFutureStudents->CESAAccountNo->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->MentorFirstName->Visible) { // MentorFirstName ?>
<td<?php echo $cstFutureStudents->MentorFirstName->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->MentorFirstName->ViewAttributes() ?>><?php echo $cstFutureStudents->MentorFirstName->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstFutureStudents->MentorSurname->Visible) { // MentorSurname ?>
<td<?php echo $cstFutureStudents->MentorSurname->CellAttributes() ?>>
<div<?php echo $cstFutureStudents->MentorSurname->ViewAttributes() ?>><?php echo $cstFutureStudents->MentorSurname->ListViewValue() ?></div>
</td>
<?php } ?>
<?php
// Render list options (body, right)
$cstFutureStudents_list->ListOptions->Render("body", "right");
?>
</tr>
<?php
}
if ($cstFutureStudents->CurrentAction <> "gridadd")
$rs->MoveNext();
}
?>
</tbody>
</table>
<?php } ?>
</div>
</form>
<?php
// Close recordset
if ($rs)
$rs->Close();
?>
<?php if ($cstFutureStudents_list->lTotalRecs > 0) { ?>
<?php if ($cstFutureStudents->Export == "") { ?>
<div class="ewGridLowerPanel">
<?php if ($cstFutureStudents->CurrentAction <> "gridadd" && $cstFutureStudents->CurrentAction <> "gridedit") { ?>
<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($cstFutureStudents_list->Pager)) $cstFutureStudents_list->Pager = new cPrevNextPager($cstFutureStudents_list->lStartRec, $cstFutureStudents_list->lDisplayRecs, $cstFutureStudents_list->lTotalRecs) ?>
<?php if ($cstFutureStudents_list->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 ($cstFutureStudents_list->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 ($cstFutureStudents_list->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 $cstFutureStudents_list->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($cstFutureStudents_list->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 ($cstFutureStudents_list->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $cstFutureStudents_list->PageUrl() ?>start=<?php echo $cstFutureStudents_list->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 $cstFutureStudents_list->Pager->PageCount ?></span></td>
</tr></table>
</td>
<td> </td>
<td>
<span class="phpmaker"><?php echo $Language->Phrase("Record") ?> <?php echo $cstFutureStudents_list->Pager->FromIndex ?> <?php echo $Language->Phrase("To") ?> <?php echo $cstFutureStudents_list->Pager->ToIndex ?> <?php echo $Language->Phrase("Of") ?> <?php echo $cstFutureStudents_list->Pager->RecordCount ?></span>
<?php } else { ?>
<?php if ($cstFutureStudents_list->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>
<?php if ($cstFutureStudents_list->lTotalRecs > 0) { ?>
<td> </td>
<td><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php echo $Language->Phrase("RecordsPerPage") ?> </td><td>
<input type="hidden" id="t" name="t" value="cstFutureStudents">
<select name="<?php echo EW_TABLE_REC_PER_PAGE ?>" id="<?php echo EW_TABLE_REC_PER_PAGE ?>" onchange="this.form.submit();">
<option value="20"<?php if ($cstFutureStudents_list->lDisplayRecs == 20) { ?> selected="selected"<?php } ?>>20</option>
<option value="40"<?php if ($cstFutureStudents_list->lDisplayRecs == 40) { ?> selected="selected"<?php } ?>>40</option>
<option value="60"<?php if ($cstFutureStudents_list->lDisplayRecs == 60) { ?> selected="selected"<?php } ?>>60</option>
<option value="80"<?php if ($cstFutureStudents_list->lDisplayRecs == 80) { ?> selected="selected"<?php } ?>>80</option>
<option value="ALL"<?php if ($cstFutureStudents->getRecordsPerPage() == -1) { ?> selected="selected"<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select></td></tr></table>
</td>
<?php } ?>
</tr>
</table>
</form>
<?php } ?>
<?php //if ($cstFutureStudents_list->lTotalRecs > 0) { ?>
<span class="phpmaker">
</span>
<?php //} ?>
</div>
<?php } ?>
<?php } ?>
</td></tr></table>
<?php if ($cstFutureStudents->Export == "" && $cstFutureStudents->CurrentAction == "") { ?>
<?php } ?>
<?php if ($cstFutureStudents->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
$cstFutureStudents_list->Page_Terminate();
?>
<?php
//
// Page class
//
class ccstFutureStudents_list {
// Page ID
var $PageID = 'list';
// Table name
var $TableName = 'cstFutureStudents';
// Page object name
var $PageObjName = 'cstFutureStudents_list';
// Page name
function PageName() {
return ew_CurrentPage();
}
// Page URL
function PageUrl() {
$PageUrl = ew_CurrentPage() . "?";
global $cstFutureStudents;
if ($cstFutureStudents->UseTokenInUrl) $PageUrl .= "t=" . $cstFutureStudents->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, $cstFutureStudents;
if ($cstFutureStudents->UseTokenInUrl) {
if ($objForm)
return ($cstFutureStudents->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($cstFutureStudents->TableVar == $_GET["t"]);
} else {
return TRUE;
}
}
//
// Page class constructor
//
function __construct() {
global $conn, $Language;
// Language object
$Language = new cLanguage();
// Table object (cstFutureStudents)
$GLOBALS["cstFutureStudents"] = new ccstFutureStudents();
// Initialize URLs
$this->ExportPrintUrl = $this->PageUrl() . "export=print";
$this->ExportExcelUrl = $this->PageUrl() . "export=excel";
$this->ExportWordUrl = $this->PageUrl() . "export=word";
$this->ExportHtmlUrl = $this->PageUrl() . "export=html";
$this->ExportXmlUrl = $this->PageUrl() . "export=xml";
$this->ExportCsvUrl = $this->PageUrl() . "export=csv";
$this->AddUrl = $GLOBALS["cstFutureStudents"]->AddUrl();
$this->InlineAddUrl = $this->PageUrl() . "a=add";
$this->GridAddUrl = $this->PageUrl() . "a=gridadd";
$this->GridEditUrl = $this->PageUrl() . "a=gridedit";
$this->MultiDeleteUrl = "cstFutureStudentsdelete.php";
$this->MultiUpdateUrl = "cstFutureStudentsupdate.php";
// Table object (CCEFacilitatorUsers)
$GLOBALS['CCEFacilitatorUsers'] = new cCCEFacilitatorUsers();
// Page ID
if (!defined("EW_PAGE_ID"))
define("EW_PAGE_ID", 'list', TRUE);
// Table name (for backward compatibility)
if (!defined("EW_TABLE_NAME"))
define("EW_TABLE_NAME", 'cstFutureStudents', TRUE);
// Start timer
$GLOBALS["gsTimer"] = new cTimer();
// Open connection
$conn = ew_Connect();
// List options
$this->ListOptions = new cListOptions();
}
//
// Page_Init
//
function Page_Init() {
global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
global $cstFutureStudents;
// Security
$Security = new cAdvancedSecurity();
if (!$Security->IsLoggedIn()) $Security->AutoLogin();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
// Get export parameters
if (@$_GET["export"] <> "") {
$cstFutureStudents->Export = $_GET["export"];
} elseif (ew_IsHttpPost()) {
if (@$_POST["exporttype"] <> "")
$cstFutureStudents->Export = $_POST["exporttype"];
} else {
$cstFutureStudents->setExportReturnUrl(ew_CurrentUrl());
}
$gsExport = $cstFutureStudents->Export; // Get export parameter, used in header
$gsExportFile = $cstFutureStudents->TableVar; // Get export file, used in header
if ($cstFutureStudents->Export == "excel") {
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
}
if ($cstFutureStudents->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();
}
// Class variables
var $ListOptions; // List options
var $lDisplayRecs = 40;
var $lStartRec;
var $lStopRec;
var $lTotalRecs = 0;
var $lRecRange = 10;
var $sSrchWhere = ""; // Search WHERE clause
var $lRecCnt = 0; // Record count
var $lEditRowCnt;
var $lRowCnt;
var $lRowIndex; // Row index
var $lRecPerRow = 0;
var $lColCnt = 0;
var $sDbMasterFilter = ""; // Master filter
var $sDbDetailFilter = ""; // Detail filter
var $bMasterRecordExists;
var $sMultiSelectKey;
var $RestoreSearch;
//
// Page main
//
function Page_Main() {
global $objForm, $Language, $gsSearchError, $Security, $cstFutureStudents;
// Search filters
$sSrchAdvanced = ""; // Advanced search filter
$sSrchBasic = ""; // Basic search filter
$sFilter = "";
if ($this->IsPageRequest()) { // Validate request
// Set up records per page
$this->SetUpDisplayRecs();
// Handle reset command
$this->ResetCmd();
// Set up list options
$this->SetupListOptions();
// Get basic search values
$this->LoadBasicSearchValues();
// Restore search parms from Session
$this->RestoreSearchParms();
// Call Recordset SearchValidated event
$cstFutureStudents->Recordset_SearchValidated();
// Set up sorting order
$this->SetUpSortOrder();
// Get basic search criteria
if ($gsSearchError == "")
$sSrchBasic = $this->BasicSearchWhere();
}
// Restore display records
if ($cstFutureStudents->getRecordsPerPage() <> "") {
$this->lDisplayRecs = $cstFutureStudents->getRecordsPerPage(); // Restore from Session
} else {
$this->lDisplayRecs = 40; // Load default
}
// Load Sorting Order
$this->LoadSortOrder();
// Build search criteria
if ($sSrchAdvanced <> "")
$this->sSrchWhere = ($this->sSrchWhere <> "") ? "(" . $this->sSrchWhere . ") AND (" . $sSrchAdvanced . ")" : $sSrchAdvanced;
if ($sSrchBasic <> "")
$this->sSrchWhere = ($this->sSrchWhere <> "") ? "(" . $this->sSrchWhere . ") AND (" . $sSrchBasic. ")" : $sSrchBasic;
// Call Recordset_Searching event
$cstFutureStudents->Recordset_Searching($this->sSrchWhere);
// Save search criteria
if ($this->sSrchWhere <> "") {
if ($sSrchBasic == "")
$this->ResetBasicSearchParms();
$cstFutureStudents->setSearchWhere($this->sSrchWhere); // Save to Session
if (!$this->RestoreSearch) {
$this->lStartRec = 1; // Reset start record counter
$cstFutureStudents->setStartRecordNumber($this->lStartRec);
}
} else {
$this->sSrchWhere = $cstFutureStudents->getSearchWhere();
}
// Build filter
$sFilter = "";
if ($this->sDbDetailFilter <> "")
$sFilter = ($sFilter <> "") ? "(" . $sFilter . ") AND (" . $this->sDbDetailFilter . ")" : $this->sDbDetailFilter;
if ($this->sSrchWhere <> "")
$sFilter = ($sFilter <> "") ? "(" . $sFilter . ") AND (". $this->sSrchWhere . ")" : $this->sSrchWhere;
// Set up filter in session
$cstFutureStudents->setSessionWhere($sFilter);
$cstFutureStudents->CurrentFilter = "";
// Export data only
if (in_array($cstFutureStudents->Export, array("html","word","excel","xml","csv","email"))) {
$this->ExportData();
if ($cstFutureStudents->Export <> "email")
$this->Page_Terminate(); // Terminate response
exit();
}
}
// Set up number of records displayed per page
function SetUpDisplayRecs() {
global $cstFutureStudents;
$sWrk = @$_GET[EW_TABLE_REC_PER_PAGE];
if ($sWrk <> "") {
if (is_numeric($sWrk)) {
$this->lDisplayRecs = intval($sWrk);
} else {
if (strtolower($sWrk) == "all") { // Display all records
$this->lDisplayRecs = -1;
} else {
$this->lDisplayRecs = 40; // Non-numeric, load default
}
}
$cstFutureStudents->setRecordsPerPage($this->lDisplayRecs); // Save to Session
// Reset start position
$this->lStartRec = 1;
$cstFutureStudents->setStartRecordNumber($this->lStartRec);
}
}
// Return basic search SQL
function BasicSearchSQL($Keyword) {
global $cstFutureStudents;
$sKeyword = ew_AdjustSql($Keyword);
$sWhere = "";
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->Title, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->FirstName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->Surname, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->KnownAs, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->Organisation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->OrganisationType, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->OtherCEFirms, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->StudentNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->ProjectDiscipline, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->IDNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->ECSARegistered, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->ECSACategory, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->ECSANumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->OtherStatutoryBodyName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->OtherStatutoryBodyNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->OtherStatutoryBodyCategory, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->HighestQual, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->AreaDiscipline, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->Telephone, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->Cellphone, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->EmailAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->HomeAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->WorkAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->PostalAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->Designation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->Department, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->CESAMemberFirm, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->CESAAccountNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->VATNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->DietaryRequirements, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->IDFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->CVFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->QualCertificate1, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->QualCertificate2, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->QualCertificate3, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->MemorandumFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->AgreementFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->OrderNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->BookedByName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->BookedByDesignation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->BookedByTelNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->BookedByFaxNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->BookedByCellNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->BookedByEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->WebUsername, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->WebPassword, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->MentorDesig, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->MentorTel, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->MentorCell, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->MentorEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->HRManagerName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->HRManagerDesignation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->HRManagerTelNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->HRManagerCellNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->HRManagerEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->LengthEmploy, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->BlockAccess, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->MentorFirstName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstFutureStudents->MentorSurname, $Keyword);
return $sWhere;
}
// Build basic search SQL
function BuildBasicSearchSql(&$Where, &$Fld, $Keyword) {
$sFldExpression = ($Fld->FldVirtualExpression <> "") ? $Fld->FldVirtualExpression : $Fld->FldExpression;
$lFldDataType = ($Fld->FldIsVirtual) ? EW_DATATYPE_STRING : $Fld->FldDataType;
if ($lFldDataType == EW_DATATYPE_NUMBER) {
$sWrk = $sFldExpression . " = " . ew_QuotedValue($Keyword, $lFldDataType);
} else {
$sWrk = $sFldExpression . " LIKE " . ew_QuotedValue("%" . $Keyword . "%", $lFldDataType);
}
if ($Where <> "") $Where .= " OR ";
$Where .= $sWrk;
}
// Return basic search WHERE clause based on search keyword and type
function BasicSearchWhere() {
global $Security, $cstFutureStudents;
$sSearchStr = "";
$sSearchKeyword = $cstFutureStudents->BasicSearchKeyword;
$sSearchType = $cstFutureStudents->BasicSearchType;
if ($sSearchKeyword <> "") {
$sSearch = trim($sSearchKeyword);
if ($sSearchType <> "") {
while (strpos($sSearch, " ") !== FALSE)
$sSearch = str_replace(" ", " ", $sSearch);
$arKeyword = explode(" ", trim($sSearch));
foreach ($arKeyword as $sKeyword) {
if ($sSearchStr <> "") $sSearchStr .= " " . $sSearchType . " ";
$sSearchStr .= "(" . $this->BasicSearchSQL($sKeyword) . ")";
}
} else {
$sSearchStr = $this->BasicSearchSQL($sSearch);
}
}
if ($sSearchKeyword <> "") {
$cstFutureStudents->setSessionBasicSearchKeyword($sSearchKeyword);
$cstFutureStudents->setSessionBasicSearchType($sSearchType);
}
return $sSearchStr;
}
// Clear all search parameters
function ResetSearchParms() {
global $cstFutureStudents;
// Clear search WHERE clause
$this->sSrchWhere = "";
$cstFutureStudents->setSearchWhere($this->sSrchWhere);
// Clear basic search parameters
$this->ResetBasicSearchParms();
}
// Clear all basic search parameters
function ResetBasicSearchParms() {
global $cstFutureStudents;
$cstFutureStudents->setSessionBasicSearchKeyword("");
$cstFutureStudents->setSessionBasicSearchType("");
}
// Restore all search parameters
function RestoreSearchParms() {
global $cstFutureStudents;
$bRestore = TRUE;
if (@$_GET[EW_TABLE_BASIC_SEARCH] <> "") $bRestore = FALSE;
$this->RestoreSearch = $bRestore;
if ($bRestore) {
// Restore basic search values
$cstFutureStudents->BasicSearchKeyword = $cstFutureStudents->getSessionBasicSearchKeyword();
$cstFutureStudents->BasicSearchType = $cstFutureStudents->getSessionBasicSearchType();
}
}
// Set up sort parameters
function SetUpSortOrder() {
global $cstFutureStudents;
// Check for Ctrl pressed
$bCtrl = (@$_GET["ctrl"] <> "");
// Check for "order" parameter
if (@$_GET["order"] <> "") {
$cstFutureStudents->CurrentOrder = ew_StripSlashes(@$_GET["order"]);
$cstFutureStudents->CurrentOrderType = @$_GET["ordertype"];
$cstFutureStudents->UpdateSort($cstFutureStudents->FirstName, $bCtrl); // FirstName
$cstFutureStudents->UpdateSort($cstFutureStudents->Surname, $bCtrl); // Surname
$cstFutureStudents->UpdateSort($cstFutureStudents->KnownAs, $bCtrl); // KnownAs
$cstFutureStudents->UpdateSort($cstFutureStudents->Organisation, $bCtrl); // Organisation
$cstFutureStudents->UpdateSort($cstFutureStudents->Age, $bCtrl); // Age
$cstFutureStudents->UpdateSort($cstFutureStudents->Cellphone, $bCtrl); // Cellphone
$cstFutureStudents->UpdateSort($cstFutureStudents->EmailAddress, $bCtrl); // EmailAddress
$cstFutureStudents->UpdateSort($cstFutureStudents->HomeAddress, $bCtrl); // HomeAddress
$cstFutureStudents->UpdateSort($cstFutureStudents->CESAMemberFirm, $bCtrl); // CESAMemberFirm
$cstFutureStudents->UpdateSort($cstFutureStudents->CESAAccountNo, $bCtrl); // CESAAccountNo
$cstFutureStudents->UpdateSort($cstFutureStudents->MentorFirstName, $bCtrl); // MentorFirstName
$cstFutureStudents->UpdateSort($cstFutureStudents->MentorSurname, $bCtrl); // MentorSurname
$cstFutureStudents->setStartRecordNumber(1); // Reset start position
}
}
// Load sort order parameters
function LoadSortOrder() {
global $cstFutureStudents;
$sOrderBy = $cstFutureStudents->getSessionOrderBy(); // Get ORDER BY from Session
if ($sOrderBy == "") {
if ($cstFutureStudents->SqlOrderBy() <> "") {
$sOrderBy = $cstFutureStudents->SqlOrderBy();
$cstFutureStudents->setSessionOrderBy($sOrderBy);
}
}
}
// Reset command
// cmd=reset (Reset search parameters)
// cmd=resetall (Reset search and master/detail parameters)
// cmd=resetsort (Reset sort parameters)
function ResetCmd() {
global $cstFutureStudents;
// Get reset command
if (@$_GET["cmd"] <> "") {
$sCmd = $_GET["cmd"];
// Reset search criteria
if (strtolower($sCmd) == "reset" || strtolower($sCmd) == "resetall")
$this->ResetSearchParms();
// Reset sorting order
if (strtolower($sCmd) == "resetsort") {
$sOrderBy = "";
$cstFutureStudents->setSessionOrderBy($sOrderBy);
$cstFutureStudents->FirstName->setSort("");
$cstFutureStudents->Surname->setSort("");
$cstFutureStudents->KnownAs->setSort("");
$cstFutureStudents->Organisation->setSort("");
$cstFutureStudents->Age->setSort("");
$cstFutureStudents->Cellphone->setSort("");
$cstFutureStudents->EmailAddress->setSort("");
$cstFutureStudents->HomeAddress->setSort("");
$cstFutureStudents->CESAMemberFirm->setSort("");
$cstFutureStudents->CESAAccountNo->setSort("");
$cstFutureStudents->MentorFirstName->setSort("");
$cstFutureStudents->MentorSurname->setSort("");
}
// Reset start position
$this->lStartRec = 1;
$cstFutureStudents->setStartRecordNumber($this->lStartRec);
}
}
// Set up list options
function SetupListOptions() {
global $Security, $cstFutureStudents;
// "view"
$this->ListOptions->Add("view");
$item =& $this->ListOptions->Items["view"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->IsLoggedIn();
$item->OnLeft = FALSE;
// Call ListOptions_Load event
$this->ListOptions_Load();
if ($cstFutureStudents->Export <> "" ||
$cstFutureStudents->CurrentAction == "gridadd" ||
$cstFutureStudents->CurrentAction == "gridedit")
$this->ListOptions->HideAllOptions();
}
// Render list options
function RenderListOptions() {
global $Security, $Language, $cstFutureStudents;
$this->ListOptions->LoadDefault();
// "view"
$oListOpt =& $this->ListOptions->Items["view"];
if ($Security->IsLoggedIn() && $oListOpt->Visible)
$oListOpt->Body = "<a href=\"" . $this->ViewUrl . "\">" . "<img src=\"images/view.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("ViewLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("ViewLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . "</a>";
$this->RenderListOptionsExt();
// Call ListOptions_Rendered event
$this->ListOptions_Rendered();
}
function RenderListOptionsExt() {
global $Security, $Language, $cstFutureStudents;
}
// Set up starting record parameters
function SetUpStartRec() {
global $cstFutureStudents;
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];
$cstFutureStudents->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;
}
$cstFutureStudents->setStartRecordNumber($this->lStartRec);
}
}
}
$this->lStartRec = $cstFutureStudents->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
$cstFutureStudents->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
$cstFutureStudents->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
$cstFutureStudents->setStartRecordNumber($this->lStartRec);
}
}
// Load basic search values
function LoadBasicSearchValues() {
global $cstFutureStudents;
$cstFutureStudents->BasicSearchKeyword = @$_GET[EW_TABLE_BASIC_SEARCH];
$cstFutureStudents->BasicSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];
}
// Load recordset
function LoadRecordset($offset = -1, $rowcnt = -1) {
global $conn, $cstFutureStudents;
// Call Recordset Selecting event
$cstFutureStudents->Recordset_Selecting($cstFutureStudents->CurrentFilter);
// Load List page SQL
$sSql = $cstFutureStudents->SelectSQL();
if ($offset > -1 && $rowcnt > -1)
$sSql .= " LIMIT $offset, $rowcnt";
// Load recordset
$rs = ew_LoadRecordset($sSql);
// Call Recordset Selected event
$cstFutureStudents->Recordset_Selected($rs);
return $rs;
}
// Load row based on key values
function LoadRow() {
global $conn, $Security, $cstFutureStudents;
$sFilter = $cstFutureStudents->KeyFilter();
// Call Row Selecting event
$cstFutureStudents->Row_Selecting($sFilter);
// Load SQL based on filter
$cstFutureStudents->CurrentFilter = $sFilter;
$sSql = $cstFutureStudents->SQL();
$res = FALSE;
$rs = ew_LoadRecordset($sSql);
if ($rs && !$rs->EOF) {
$res = TRUE;
$this->LoadRowValues($rs); // Load row values
// Call Row Selected event
$cstFutureStudents->Row_Selected($rs);
$rs->Close();
}
return $res;
}
// Load row values from recordset
function LoadRowValues(&$rs) {
global $conn, $cstFutureStudents;
$cstFutureStudents->CCEStudentID->setDbValue($rs->fields('CCEStudentID'));
$cstFutureStudents->Title->setDbValue($rs->fields('Title'));
$cstFutureStudents->FirstName->setDbValue($rs->fields('FirstName'));
$cstFutureStudents->Surname->setDbValue($rs->fields('Surname'));
$cstFutureStudents->KnownAs->setDbValue($rs->fields('KnownAs'));
$cstFutureStudents->Organisation->setDbValue($rs->fields('Organisation'));
$cstFutureStudents->OrganisationType->setDbValue($rs->fields('OrganisationType'));
$cstFutureStudents->OtherCEFirms->setDbValue($rs->fields('OtherCEFirms'));
$cstFutureStudents->StudentNumber->setDbValue($rs->fields('StudentNumber'));
$cstFutureStudents->CCEFacilitatorID->setDbValue($rs->fields('CCEFacilitatorID'));
$cstFutureStudents->Project->setDbValue($rs->fields('Project'));
$cstFutureStudents->ProjectDiscipline->setDbValue($rs->fields('ProjectDiscipline'));
$cstFutureStudents->IDNumber->setDbValue($rs->fields('IDNumber'));
$cstFutureStudents->ECSARegistered->setDbValue($rs->fields('ECSARegistered'));
$cstFutureStudents->ECSACategory->setDbValue($rs->fields('ECSACategory'));
$cstFutureStudents->ECSANumber->setDbValue($rs->fields('ECSANumber'));
$cstFutureStudents->OtherStatutoryBodyRegistered->setDbValue($rs->fields('OtherStatutoryBodyRegistered'));
$cstFutureStudents->OtherStatutoryBodyName->setDbValue($rs->fields('OtherStatutoryBodyName'));
$cstFutureStudents->OtherStatutoryBodyNumber->setDbValue($rs->fields('OtherStatutoryBodyNumber'));
$cstFutureStudents->OtherStatutoryBodyCategory->setDbValue($rs->fields('OtherStatutoryBodyCategory'));
$cstFutureStudents->Age->setDbValue($rs->fields('Age'));
$cstFutureStudents->HighestQual->setDbValue($rs->fields('HighestQual'));
$cstFutureStudents->AreaDiscipline->setDbValue($rs->fields('AreaDiscipline'));
$cstFutureStudents->Telephone->setDbValue($rs->fields('Telephone'));
$cstFutureStudents->Cellphone->setDbValue($rs->fields('Cellphone'));
$cstFutureStudents->EmailAddress->setDbValue($rs->fields('EmailAddress'));
$cstFutureStudents->HomeAddress->setDbValue($rs->fields('HomeAddress'));
$cstFutureStudents->WorkAddress->setDbValue($rs->fields('WorkAddress'));
$cstFutureStudents->PostalAddress->setDbValue($rs->fields('PostalAddress'));
$cstFutureStudents->Designation->setDbValue($rs->fields('Designation'));
$cstFutureStudents->Department->setDbValue($rs->fields('Department'));
$cstFutureStudents->CESAMemberFirm->setDbValue($rs->fields('CESAMemberFirm'));
$cstFutureStudents->CESAAccountNo->setDbValue($rs->fields('CESAAccountNo'));
$cstFutureStudents->VATNo->setDbValue($rs->fields('VATNo'));
$cstFutureStudents->DietaryRequirements->setDbValue($rs->fields('DietaryRequirements'));
$cstFutureStudents->IDFile->Upload->DbValue = $rs->fields('IDFile');
$cstFutureStudents->CVFile->Upload->DbValue = $rs->fields('CVFile');
$cstFutureStudents->QualCertificate1->Upload->DbValue = $rs->fields('QualCertificate1');
$cstFutureStudents->QualCertificate2->Upload->DbValue = $rs->fields('QualCertificate2');
$cstFutureStudents->QualCertificate3->Upload->DbValue = $rs->fields('QualCertificate3');
$cstFutureStudents->MemorandumFile->Upload->DbValue = $rs->fields('MemorandumFile');
$cstFutureStudents->AgreementFile->Upload->DbValue = $rs->fields('AgreementFile');
$cstFutureStudents->OrderNo->setDbValue($rs->fields('OrderNo'));
$cstFutureStudents->BookedByName->setDbValue($rs->fields('BookedByName'));
$cstFutureStudents->BookedByDesignation->setDbValue($rs->fields('BookedByDesignation'));
$cstFutureStudents->BookedByTelNo->setDbValue($rs->fields('BookedByTelNo'));
$cstFutureStudents->BookedByFaxNo->setDbValue($rs->fields('BookedByFaxNo'));
$cstFutureStudents->BookedByCellNo->setDbValue($rs->fields('BookedByCellNo'));
$cstFutureStudents->BookedByEmail->setDbValue($rs->fields('BookedByEmail'));
$cstFutureStudents->WebUsername->setDbValue($rs->fields('WebUsername'));
$cstFutureStudents->WebPassword->setDbValue($rs->fields('WebPassword'));
$cstFutureStudents->MentorDesig->setDbValue($rs->fields('MentorDesig'));
$cstFutureStudents->MentorTel->setDbValue($rs->fields('MentorTel'));
$cstFutureStudents->MentorCell->setDbValue($rs->fields('MentorCell'));
$cstFutureStudents->MentorEmail->setDbValue($rs->fields('MentorEmail'));
$cstFutureStudents->HRManagerName->setDbValue($rs->fields('HRManagerName'));
$cstFutureStudents->HRManagerDesignation->setDbValue($rs->fields('HRManagerDesignation'));
$cstFutureStudents->HRManagerTelNo->setDbValue($rs->fields('HRManagerTelNo'));
$cstFutureStudents->HRManagerCellNo->setDbValue($rs->fields('HRManagerCellNo'));
$cstFutureStudents->HRManagerEmail->setDbValue($rs->fields('HRManagerEmail'));
$cstFutureStudents->LengthEmploy->setDbValue($rs->fields('LengthEmploy'));
$cstFutureStudents->BlockAccess->setDbValue($rs->fields('BlockAccess'));
$cstFutureStudents->Archived->setDbValue($rs->fields('Archived'));
$cstFutureStudents->MentorFirstName->setDbValue($rs->fields('MentorFirstName'));
$cstFutureStudents->MentorSurname->setDbValue($rs->fields('MentorSurname'));
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $cstFutureStudents;
// Initialize URLs
$this->ViewUrl = $cstFutureStudents->ViewUrl();
$this->EditUrl = $cstFutureStudents->EditUrl();
$this->InlineEditUrl = $cstFutureStudents->InlineEditUrl();
$this->CopyUrl = $cstFutureStudents->CopyUrl();
$this->InlineCopyUrl = $cstFutureStudents->InlineCopyUrl();
$this->DeleteUrl = $cstFutureStudents->DeleteUrl();
// Call Row_Rendering event
$cstFutureStudents->Row_Rendering();
// Common render codes for all row types
// FirstName
$cstFutureStudents->FirstName->CellCssStyle = ""; $cstFutureStudents->FirstName->CellCssClass = "";
$cstFutureStudents->FirstName->CellAttrs = array(); $cstFutureStudents->FirstName->ViewAttrs = array(); $cstFutureStudents->FirstName->EditAttrs = array();
// Surname
$cstFutureStudents->Surname->CellCssStyle = ""; $cstFutureStudents->Surname->CellCssClass = "";
$cstFutureStudents->Surname->CellAttrs = array(); $cstFutureStudents->Surname->ViewAttrs = array(); $cstFutureStudents->Surname->EditAttrs = array();
// KnownAs
$cstFutureStudents->KnownAs->CellCssStyle = ""; $cstFutureStudents->KnownAs->CellCssClass = "";
$cstFutureStudents->KnownAs->CellAttrs = array(); $cstFutureStudents->KnownAs->ViewAttrs = array(); $cstFutureStudents->KnownAs->EditAttrs = array();
// Organisation
$cstFutureStudents->Organisation->CellCssStyle = ""; $cstFutureStudents->Organisation->CellCssClass = "";
$cstFutureStudents->Organisation->CellAttrs = array(); $cstFutureStudents->Organisation->ViewAttrs = array(); $cstFutureStudents->Organisation->EditAttrs = array();
// Age
$cstFutureStudents->Age->CellCssStyle = ""; $cstFutureStudents->Age->CellCssClass = "";
$cstFutureStudents->Age->CellAttrs = array(); $cstFutureStudents->Age->ViewAttrs = array(); $cstFutureStudents->Age->EditAttrs = array();
// Cellphone
$cstFutureStudents->Cellphone->CellCssStyle = ""; $cstFutureStudents->Cellphone->CellCssClass = "";
$cstFutureStudents->Cellphone->CellAttrs = array(); $cstFutureStudents->Cellphone->ViewAttrs = array(); $cstFutureStudents->Cellphone->EditAttrs = array();
// EmailAddress
$cstFutureStudents->EmailAddress->CellCssStyle = ""; $cstFutureStudents->EmailAddress->CellCssClass = "";
$cstFutureStudents->EmailAddress->CellAttrs = array(); $cstFutureStudents->EmailAddress->ViewAttrs = array(); $cstFutureStudents->EmailAddress->EditAttrs = array();
// HomeAddress
$cstFutureStudents->HomeAddress->CellCssStyle = ""; $cstFutureStudents->HomeAddress->CellCssClass = "";
$cstFutureStudents->HomeAddress->CellAttrs = array(); $cstFutureStudents->HomeAddress->ViewAttrs = array(); $cstFutureStudents->HomeAddress->EditAttrs = array();
// CESAMemberFirm
$cstFutureStudents->CESAMemberFirm->CellCssStyle = ""; $cstFutureStudents->CESAMemberFirm->CellCssClass = "";
$cstFutureStudents->CESAMemberFirm->CellAttrs = array(); $cstFutureStudents->CESAMemberFirm->ViewAttrs = array(); $cstFutureStudents->CESAMemberFirm->EditAttrs = array();
// CESAAccountNo
$cstFutureStudents->CESAAccountNo->CellCssStyle = ""; $cstFutureStudents->CESAAccountNo->CellCssClass = "";
$cstFutureStudents->CESAAccountNo->CellAttrs = array(); $cstFutureStudents->CESAAccountNo->ViewAttrs = array(); $cstFutureStudents->CESAAccountNo->EditAttrs = array();
// MentorFirstName
$cstFutureStudents->MentorFirstName->CellCssStyle = ""; $cstFutureStudents->MentorFirstName->CellCssClass = "";
$cstFutureStudents->MentorFirstName->CellAttrs = array(); $cstFutureStudents->MentorFirstName->ViewAttrs = array(); $cstFutureStudents->MentorFirstName->EditAttrs = array();
// MentorSurname
$cstFutureStudents->MentorSurname->CellCssStyle = ""; $cstFutureStudents->MentorSurname->CellCssClass = "";
$cstFutureStudents->MentorSurname->CellAttrs = array(); $cstFutureStudents->MentorSurname->ViewAttrs = array(); $cstFutureStudents->MentorSurname->EditAttrs = array();
if ($cstFutureStudents->RowType == EW_ROWTYPE_VIEW) { // View row
// Title
$cstFutureStudents->Title->ViewValue = $cstFutureStudents->Title->CurrentValue;
$cstFutureStudents->Title->CssStyle = "";
$cstFutureStudents->Title->CssClass = "";
$cstFutureStudents->Title->ViewCustomAttributes = "";
// FirstName
$cstFutureStudents->FirstName->ViewValue = $cstFutureStudents->FirstName->CurrentValue;
$cstFutureStudents->FirstName->CssStyle = "";
$cstFutureStudents->FirstName->CssClass = "";
$cstFutureStudents->FirstName->ViewCustomAttributes = "";
// Surname
$cstFutureStudents->Surname->ViewValue = $cstFutureStudents->Surname->CurrentValue;
$cstFutureStudents->Surname->CssStyle = "";
$cstFutureStudents->Surname->CssClass = "";
$cstFutureStudents->Surname->ViewCustomAttributes = "";
// KnownAs
$cstFutureStudents->KnownAs->ViewValue = $cstFutureStudents->KnownAs->CurrentValue;
$cstFutureStudents->KnownAs->CssStyle = "";
$cstFutureStudents->KnownAs->CssClass = "";
$cstFutureStudents->KnownAs->ViewCustomAttributes = "";
// Organisation
$cstFutureStudents->Organisation->ViewValue = $cstFutureStudents->Organisation->CurrentValue;
$cstFutureStudents->Organisation->CssStyle = "";
$cstFutureStudents->Organisation->CssClass = "";
$cstFutureStudents->Organisation->ViewCustomAttributes = "";
// OrganisationType
$cstFutureStudents->OrganisationType->ViewValue = $cstFutureStudents->OrganisationType->CurrentValue;
$cstFutureStudents->OrganisationType->CssStyle = "";
$cstFutureStudents->OrganisationType->CssClass = "";
$cstFutureStudents->OrganisationType->ViewCustomAttributes = "";
// StudentNumber
$cstFutureStudents->StudentNumber->ViewValue = $cstFutureStudents->StudentNumber->CurrentValue;
$cstFutureStudents->StudentNumber->CssStyle = "";
$cstFutureStudents->StudentNumber->CssClass = "";
$cstFutureStudents->StudentNumber->ViewCustomAttributes = "";
// CCEFacilitatorID
$cstFutureStudents->CCEFacilitatorID->ViewValue = $cstFutureStudents->CCEFacilitatorID->CurrentValue;
$cstFutureStudents->CCEFacilitatorID->CssStyle = "";
$cstFutureStudents->CCEFacilitatorID->CssClass = "";
$cstFutureStudents->CCEFacilitatorID->ViewCustomAttributes = "";
// Project
$cstFutureStudents->Project->ViewValue = $cstFutureStudents->Project->CurrentValue;
$cstFutureStudents->Project->CssStyle = "";
$cstFutureStudents->Project->CssClass = "";
$cstFutureStudents->Project->ViewCustomAttributes = "";
// ProjectDiscipline
$cstFutureStudents->ProjectDiscipline->ViewValue = $cstFutureStudents->ProjectDiscipline->CurrentValue;
$cstFutureStudents->ProjectDiscipline->CssStyle = "";
$cstFutureStudents->ProjectDiscipline->CssClass = "";
$cstFutureStudents->ProjectDiscipline->ViewCustomAttributes = "";
// IDNumber
$cstFutureStudents->IDNumber->ViewValue = $cstFutureStudents->IDNumber->CurrentValue;
$cstFutureStudents->IDNumber->CssStyle = "";
$cstFutureStudents->IDNumber->CssClass = "";
$cstFutureStudents->IDNumber->ViewCustomAttributes = "";
// ECSARegistered
if (strval($cstFutureStudents->ECSARegistered->CurrentValue) <> "") {
switch ($cstFutureStudents->ECSARegistered->CurrentValue) {
case "c":
$cstFutureStudents->ECSARegistered->ViewValue = "Yes - Candidate Engineer";
break;
case "p":
$cstFutureStudents->ECSARegistered->ViewValue = "Yes - Professional Engineer";
break;
case "n":
$cstFutureStudents->ECSARegistered->ViewValue = "No";
break;
case "y":
$cstFutureStudents->ECSARegistered->ViewValue = "Yes";
break;
default:
$cstFutureStudents->ECSARegistered->ViewValue = $cstFutureStudents->ECSARegistered->CurrentValue;
}
} else {
$cstFutureStudents->ECSARegistered->ViewValue = NULL;
}
$cstFutureStudents->ECSARegistered->CssStyle = "";
$cstFutureStudents->ECSARegistered->CssClass = "";
$cstFutureStudents->ECSARegistered->ViewCustomAttributes = "";
// ECSACategory
if (strval($cstFutureStudents->ECSACategory->CurrentValue) <> "") {
$sFilterWrk = "`PicklistValue` = '" . ew_AdjustSql($cstFutureStudents->ECSACategory->CurrentValue) . "'";
$sSqlWrk = "SELECT `PicklistLabel` FROM `Picklists`";
$sWhereWrk = "";
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . "`Picklists`.`PicklistType` = 'ECSA Registration Categories'" . ")";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `DisplayOrder` Asc";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$cstFutureStudents->ECSACategory->ViewValue = $rswrk->fields('PicklistLabel');
$rswrk->Close();
} else {
$cstFutureStudents->ECSACategory->ViewValue = $cstFutureStudents->ECSACategory->CurrentValue;
}
} else {
$cstFutureStudents->ECSACategory->ViewValue = NULL;
}
$cstFutureStudents->ECSACategory->CssStyle = "";
$cstFutureStudents->ECSACategory->CssClass = "";
$cstFutureStudents->ECSACategory->ViewCustomAttributes = "";
// ECSANumber
$cstFutureStudents->ECSANumber->ViewValue = $cstFutureStudents->ECSANumber->CurrentValue;
$cstFutureStudents->ECSANumber->CssStyle = "";
$cstFutureStudents->ECSANumber->CssClass = "";
$cstFutureStudents->ECSANumber->ViewCustomAttributes = "";
// OtherStatutoryBodyRegistered
if (strval($cstFutureStudents->OtherStatutoryBodyRegistered->CurrentValue) <> "") {
switch ($cstFutureStudents->OtherStatutoryBodyRegistered->CurrentValue) {
case "1":
$cstFutureStudents->OtherStatutoryBodyRegistered->ViewValue = "Yes";
break;
case "0":
$cstFutureStudents->OtherStatutoryBodyRegistered->ViewValue = "No";
break;
default:
$cstFutureStudents->OtherStatutoryBodyRegistered->ViewValue = $cstFutureStudents->OtherStatutoryBodyRegistered->CurrentValue;
}
} else {
$cstFutureStudents->OtherStatutoryBodyRegistered->ViewValue = NULL;
}
$cstFutureStudents->OtherStatutoryBodyRegistered->CssStyle = "";
$cstFutureStudents->OtherStatutoryBodyRegistered->CssClass = "";
$cstFutureStudents->OtherStatutoryBodyRegistered->ViewCustomAttributes = "";
// OtherStatutoryBodyName
$cstFutureStudents->OtherStatutoryBodyName->ViewValue = $cstFutureStudents->OtherStatutoryBodyName->CurrentValue;
$cstFutureStudents->OtherStatutoryBodyName->CssStyle = "";
$cstFutureStudents->OtherStatutoryBodyName->CssClass = "";
$cstFutureStudents->OtherStatutoryBodyName->ViewCustomAttributes = "";
// OtherStatutoryBodyNumber
$cstFutureStudents->OtherStatutoryBodyNumber->ViewValue = $cstFutureStudents->OtherStatutoryBodyNumber->CurrentValue;
$cstFutureStudents->OtherStatutoryBodyNumber->CssStyle = "";
$cstFutureStudents->OtherStatutoryBodyNumber->CssClass = "";
$cstFutureStudents->OtherStatutoryBodyNumber->ViewCustomAttributes = "";
// OtherStatutoryBodyCategory
$cstFutureStudents->OtherStatutoryBodyCategory->ViewValue = $cstFutureStudents->OtherStatutoryBodyCategory->CurrentValue;
$cstFutureStudents->OtherStatutoryBodyCategory->CssStyle = "";
$cstFutureStudents->OtherStatutoryBodyCategory->CssClass = "";
$cstFutureStudents->OtherStatutoryBodyCategory->ViewCustomAttributes = "";
// Age
$cstFutureStudents->Age->ViewValue = $cstFutureStudents->Age->CurrentValue;
$cstFutureStudents->Age->CssStyle = "";
$cstFutureStudents->Age->CssClass = "";
$cstFutureStudents->Age->ViewCustomAttributes = "";
// HighestQual
$cstFutureStudents->HighestQual->ViewValue = $cstFutureStudents->HighestQual->CurrentValue;
$cstFutureStudents->HighestQual->CssStyle = "";
$cstFutureStudents->HighestQual->CssClass = "";
$cstFutureStudents->HighestQual->ViewCustomAttributes = "";
// AreaDiscipline
$cstFutureStudents->AreaDiscipline->ViewValue = $cstFutureStudents->AreaDiscipline->CurrentValue;
$cstFutureStudents->AreaDiscipline->CssStyle = "";
$cstFutureStudents->AreaDiscipline->CssClass = "";
$cstFutureStudents->AreaDiscipline->ViewCustomAttributes = "";
// Telephone
$cstFutureStudents->Telephone->ViewValue = $cstFutureStudents->Telephone->CurrentValue;
$cstFutureStudents->Telephone->CssStyle = "";
$cstFutureStudents->Telephone->CssClass = "";
$cstFutureStudents->Telephone->ViewCustomAttributes = "";
// Cellphone
$cstFutureStudents->Cellphone->ViewValue = $cstFutureStudents->Cellphone->CurrentValue;
$cstFutureStudents->Cellphone->CssStyle = "";
$cstFutureStudents->Cellphone->CssClass = "";
$cstFutureStudents->Cellphone->ViewCustomAttributes = "";
// EmailAddress
$cstFutureStudents->EmailAddress->ViewValue = $cstFutureStudents->EmailAddress->CurrentValue;
$cstFutureStudents->EmailAddress->CssStyle = "";
$cstFutureStudents->EmailAddress->CssClass = "";
$cstFutureStudents->EmailAddress->ViewCustomAttributes = "";
// HomeAddress
$cstFutureStudents->HomeAddress->ViewValue = $cstFutureStudents->HomeAddress->CurrentValue;
$cstFutureStudents->HomeAddress->CssStyle = "";
$cstFutureStudents->HomeAddress->CssClass = "";
$cstFutureStudents->HomeAddress->ViewCustomAttributes = "";
// WorkAddress
$cstFutureStudents->WorkAddress->ViewValue = $cstFutureStudents->WorkAddress->CurrentValue;
$cstFutureStudents->WorkAddress->CssStyle = "";
$cstFutureStudents->WorkAddress->CssClass = "";
$cstFutureStudents->WorkAddress->ViewCustomAttributes = "";
// PostalAddress
$cstFutureStudents->PostalAddress->ViewValue = $cstFutureStudents->PostalAddress->CurrentValue;
$cstFutureStudents->PostalAddress->CssStyle = "";
$cstFutureStudents->PostalAddress->CssClass = "";
$cstFutureStudents->PostalAddress->ViewCustomAttributes = "";
// Designation
$cstFutureStudents->Designation->ViewValue = $cstFutureStudents->Designation->CurrentValue;
$cstFutureStudents->Designation->CssStyle = "";
$cstFutureStudents->Designation->CssClass = "";
$cstFutureStudents->Designation->ViewCustomAttributes = "";
// Department
$cstFutureStudents->Department->ViewValue = $cstFutureStudents->Department->CurrentValue;
$cstFutureStudents->Department->CssStyle = "";
$cstFutureStudents->Department->CssClass = "";
$cstFutureStudents->Department->ViewCustomAttributes = "";
// CESAMemberFirm
if (strval($cstFutureStudents->CESAMemberFirm->CurrentValue) <> "") {
switch ($cstFutureStudents->CESAMemberFirm->CurrentValue) {
case "y":
$cstFutureStudents->CESAMemberFirm->ViewValue = "Yes";
break;
case "n":
$cstFutureStudents->CESAMemberFirm->ViewValue = "No";
break;
default:
$cstFutureStudents->CESAMemberFirm->ViewValue = $cstFutureStudents->CESAMemberFirm->CurrentValue;
}
} else {
$cstFutureStudents->CESAMemberFirm->ViewValue = NULL;
}
$cstFutureStudents->CESAMemberFirm->CssStyle = "";
$cstFutureStudents->CESAMemberFirm->CssClass = "";
$cstFutureStudents->CESAMemberFirm->ViewCustomAttributes = "";
// CESAAccountNo
$cstFutureStudents->CESAAccountNo->ViewValue = $cstFutureStudents->CESAAccountNo->CurrentValue;
$cstFutureStudents->CESAAccountNo->CssStyle = "";
$cstFutureStudents->CESAAccountNo->CssClass = "";
$cstFutureStudents->CESAAccountNo->ViewCustomAttributes = "";
// VATNo
$cstFutureStudents->VATNo->ViewValue = $cstFutureStudents->VATNo->CurrentValue;
$cstFutureStudents->VATNo->CssStyle = "";
$cstFutureStudents->VATNo->CssClass = "";
$cstFutureStudents->VATNo->ViewCustomAttributes = "";
// DietaryRequirements
$cstFutureStudents->DietaryRequirements->ViewValue = $cstFutureStudents->DietaryRequirements->CurrentValue;
$cstFutureStudents->DietaryRequirements->CssStyle = "";
$cstFutureStudents->DietaryRequirements->CssClass = "";
$cstFutureStudents->DietaryRequirements->ViewCustomAttributes = "";
// IDFile
if (!ew_Empty($cstFutureStudents->IDFile->Upload->DbValue)) {
$cstFutureStudents->IDFile->ViewValue = $cstFutureStudents->IDFile->Upload->DbValue;
} else {
$cstFutureStudents->IDFile->ViewValue = "";
}
$cstFutureStudents->IDFile->CssStyle = "";
$cstFutureStudents->IDFile->CssClass = "";
$cstFutureStudents->IDFile->ViewCustomAttributes = "";
// CVFile
if (!ew_Empty($cstFutureStudents->CVFile->Upload->DbValue)) {
$cstFutureStudents->CVFile->ViewValue = $cstFutureStudents->CVFile->Upload->DbValue;
} else {
$cstFutureStudents->CVFile->ViewValue = "";
}
$cstFutureStudents->CVFile->CssStyle = "";
$cstFutureStudents->CVFile->CssClass = "";
$cstFutureStudents->CVFile->ViewCustomAttributes = "";
// QualCertificate1
if (!ew_Empty($cstFutureStudents->QualCertificate1->Upload->DbValue)) {
$cstFutureStudents->QualCertificate1->ViewValue = $cstFutureStudents->QualCertificate1->Upload->DbValue;
} else {
$cstFutureStudents->QualCertificate1->ViewValue = "";
}
$cstFutureStudents->QualCertificate1->CssStyle = "";
$cstFutureStudents->QualCertificate1->CssClass = "";
$cstFutureStudents->QualCertificate1->ViewCustomAttributes = "";
// QualCertificate2
if (!ew_Empty($cstFutureStudents->QualCertificate2->Upload->DbValue)) {
$cstFutureStudents->QualCertificate2->ViewValue = $cstFutureStudents->QualCertificate2->Upload->DbValue;
} else {
$cstFutureStudents->QualCertificate2->ViewValue = "";
}
$cstFutureStudents->QualCertificate2->CssStyle = "";
$cstFutureStudents->QualCertificate2->CssClass = "";
$cstFutureStudents->QualCertificate2->ViewCustomAttributes = "";
// QualCertificate3
if (!ew_Empty($cstFutureStudents->QualCertificate3->Upload->DbValue)) {
$cstFutureStudents->QualCertificate3->ViewValue = $cstFutureStudents->QualCertificate3->Upload->DbValue;
} else {
$cstFutureStudents->QualCertificate3->ViewValue = "";
}
$cstFutureStudents->QualCertificate3->CssStyle = "";
$cstFutureStudents->QualCertificate3->CssClass = "";
$cstFutureStudents->QualCertificate3->ViewCustomAttributes = "";
// MemorandumFile
if (!ew_Empty($cstFutureStudents->MemorandumFile->Upload->DbValue)) {
$cstFutureStudents->MemorandumFile->ViewValue = $cstFutureStudents->MemorandumFile->Upload->DbValue;
} else {
$cstFutureStudents->MemorandumFile->ViewValue = "";
}
$cstFutureStudents->MemorandumFile->CssStyle = "";
$cstFutureStudents->MemorandumFile->CssClass = "";
$cstFutureStudents->MemorandumFile->ViewCustomAttributes = "";
// AgreementFile
if (!ew_Empty($cstFutureStudents->AgreementFile->Upload->DbValue)) {
$cstFutureStudents->AgreementFile->ViewValue = $cstFutureStudents->AgreementFile->Upload->DbValue;
} else {
$cstFutureStudents->AgreementFile->ViewValue = "";
}
$cstFutureStudents->AgreementFile->CssStyle = "";
$cstFutureStudents->AgreementFile->CssClass = "";
$cstFutureStudents->AgreementFile->ViewCustomAttributes = "";
// OrderNo
$cstFutureStudents->OrderNo->ViewValue = $cstFutureStudents->OrderNo->CurrentValue;
$cstFutureStudents->OrderNo->CssStyle = "";
$cstFutureStudents->OrderNo->CssClass = "";
$cstFutureStudents->OrderNo->ViewCustomAttributes = "";
// BookedByName
$cstFutureStudents->BookedByName->ViewValue = $cstFutureStudents->BookedByName->CurrentValue;
$cstFutureStudents->BookedByName->CssStyle = "";
$cstFutureStudents->BookedByName->CssClass = "";
$cstFutureStudents->BookedByName->ViewCustomAttributes = "";
// BookedByDesignation
$cstFutureStudents->BookedByDesignation->ViewValue = $cstFutureStudents->BookedByDesignation->CurrentValue;
$cstFutureStudents->BookedByDesignation->CssStyle = "";
$cstFutureStudents->BookedByDesignation->CssClass = "";
$cstFutureStudents->BookedByDesignation->ViewCustomAttributes = "";
// BookedByTelNo
$cstFutureStudents->BookedByTelNo->ViewValue = $cstFutureStudents->BookedByTelNo->CurrentValue;
$cstFutureStudents->BookedByTelNo->CssStyle = "";
$cstFutureStudents->BookedByTelNo->CssClass = "";
$cstFutureStudents->BookedByTelNo->ViewCustomAttributes = "";
// BookedByFaxNo
$cstFutureStudents->BookedByFaxNo->ViewValue = $cstFutureStudents->BookedByFaxNo->CurrentValue;
$cstFutureStudents->BookedByFaxNo->CssStyle = "";
$cstFutureStudents->BookedByFaxNo->CssClass = "";
$cstFutureStudents->BookedByFaxNo->ViewCustomAttributes = "";
// BookedByCellNo
$cstFutureStudents->BookedByCellNo->ViewValue = $cstFutureStudents->BookedByCellNo->CurrentValue;
$cstFutureStudents->BookedByCellNo->CssStyle = "";
$cstFutureStudents->BookedByCellNo->CssClass = "";
$cstFutureStudents->BookedByCellNo->ViewCustomAttributes = "";
// BookedByEmail
$cstFutureStudents->BookedByEmail->ViewValue = $cstFutureStudents->BookedByEmail->CurrentValue;
$cstFutureStudents->BookedByEmail->CssStyle = "";
$cstFutureStudents->BookedByEmail->CssClass = "";
$cstFutureStudents->BookedByEmail->ViewCustomAttributes = "";
// WebUsername
$cstFutureStudents->WebUsername->ViewValue = $cstFutureStudents->WebUsername->CurrentValue;
$cstFutureStudents->WebUsername->CssStyle = "";
$cstFutureStudents->WebUsername->CssClass = "";
$cstFutureStudents->WebUsername->ViewCustomAttributes = "";
// WebPassword
$cstFutureStudents->WebPassword->ViewValue = $cstFutureStudents->WebPassword->CurrentValue;
$cstFutureStudents->WebPassword->CssStyle = "";
$cstFutureStudents->WebPassword->CssClass = "";
$cstFutureStudents->WebPassword->ViewCustomAttributes = "";
// MentorDesig
$cstFutureStudents->MentorDesig->ViewValue = $cstFutureStudents->MentorDesig->CurrentValue;
$cstFutureStudents->MentorDesig->CssStyle = "";
$cstFutureStudents->MentorDesig->CssClass = "";
$cstFutureStudents->MentorDesig->ViewCustomAttributes = "";
// MentorTel
$cstFutureStudents->MentorTel->ViewValue = $cstFutureStudents->MentorTel->CurrentValue;
$cstFutureStudents->MentorTel->CssStyle = "";
$cstFutureStudents->MentorTel->CssClass = "";
$cstFutureStudents->MentorTel->ViewCustomAttributes = "";
// MentorCell
$cstFutureStudents->MentorCell->ViewValue = $cstFutureStudents->MentorCell->CurrentValue;
$cstFutureStudents->MentorCell->CssStyle = "";
$cstFutureStudents->MentorCell->CssClass = "";
$cstFutureStudents->MentorCell->ViewCustomAttributes = "";
// MentorEmail
$cstFutureStudents->MentorEmail->ViewValue = $cstFutureStudents->MentorEmail->CurrentValue;
$cstFutureStudents->MentorEmail->CssStyle = "";
$cstFutureStudents->MentorEmail->CssClass = "";
$cstFutureStudents->MentorEmail->ViewCustomAttributes = "";
// HRManagerName
$cstFutureStudents->HRManagerName->ViewValue = $cstFutureStudents->HRManagerName->CurrentValue;
$cstFutureStudents->HRManagerName->CssStyle = "";
$cstFutureStudents->HRManagerName->CssClass = "";
$cstFutureStudents->HRManagerName->ViewCustomAttributes = "";
// HRManagerDesignation
$cstFutureStudents->HRManagerDesignation->ViewValue = $cstFutureStudents->HRManagerDesignation->CurrentValue;
$cstFutureStudents->HRManagerDesignation->CssStyle = "";
$cstFutureStudents->HRManagerDesignation->CssClass = "";
$cstFutureStudents->HRManagerDesignation->ViewCustomAttributes = "";
// HRManagerTelNo
$cstFutureStudents->HRManagerTelNo->ViewValue = $cstFutureStudents->HRManagerTelNo->CurrentValue;
$cstFutureStudents->HRManagerTelNo->CssStyle = "";
$cstFutureStudents->HRManagerTelNo->CssClass = "";
$cstFutureStudents->HRManagerTelNo->ViewCustomAttributes = "";
// HRManagerCellNo
$cstFutureStudents->HRManagerCellNo->ViewValue = $cstFutureStudents->HRManagerCellNo->CurrentValue;
$cstFutureStudents->HRManagerCellNo->CssStyle = "";
$cstFutureStudents->HRManagerCellNo->CssClass = "";
$cstFutureStudents->HRManagerCellNo->ViewCustomAttributes = "";
// HRManagerEmail
$cstFutureStudents->HRManagerEmail->ViewValue = $cstFutureStudents->HRManagerEmail->CurrentValue;
$cstFutureStudents->HRManagerEmail->CssStyle = "";
$cstFutureStudents->HRManagerEmail->CssClass = "";
$cstFutureStudents->HRManagerEmail->ViewCustomAttributes = "";
// LengthEmploy
$cstFutureStudents->LengthEmploy->ViewValue = $cstFutureStudents->LengthEmploy->CurrentValue;
$cstFutureStudents->LengthEmploy->CssStyle = "";
$cstFutureStudents->LengthEmploy->CssClass = "";
$cstFutureStudents->LengthEmploy->ViewCustomAttributes = "";
// BlockAccess
if (strval($cstFutureStudents->BlockAccess->CurrentValue) <> "") {
switch ($cstFutureStudents->BlockAccess->CurrentValue) {
case "y":
$cstFutureStudents->BlockAccess->ViewValue = "Yes";
break;
case "n":
$cstFutureStudents->BlockAccess->ViewValue = "No";
break;
default:
$cstFutureStudents->BlockAccess->ViewValue = $cstFutureStudents->BlockAccess->CurrentValue;
}
} else {
$cstFutureStudents->BlockAccess->ViewValue = NULL;
}
$cstFutureStudents->BlockAccess->CssStyle = "";
$cstFutureStudents->BlockAccess->CssClass = "";
$cstFutureStudents->BlockAccess->ViewCustomAttributes = "";
// Archived
if (strval($cstFutureStudents->Archived->CurrentValue) <> "") {
switch ($cstFutureStudents->Archived->CurrentValue) {
case "1":
$cstFutureStudents->Archived->ViewValue = "Yes";
break;
case "0":
$cstFutureStudents->Archived->ViewValue = "No";
break;
default:
$cstFutureStudents->Archived->ViewValue = $cstFutureStudents->Archived->CurrentValue;
}
} else {
$cstFutureStudents->Archived->ViewValue = NULL;
}
$cstFutureStudents->Archived->CssStyle = "";
$cstFutureStudents->Archived->CssClass = "";
$cstFutureStudents->Archived->ViewCustomAttributes = "";
// MentorFirstName
$cstFutureStudents->MentorFirstName->ViewValue = $cstFutureStudents->MentorFirstName->CurrentValue;
$cstFutureStudents->MentorFirstName->CssStyle = "";
$cstFutureStudents->MentorFirstName->CssClass = "";
$cstFutureStudents->MentorFirstName->ViewCustomAttributes = "";
// MentorSurname
$cstFutureStudents->MentorSurname->ViewValue = $cstFutureStudents->MentorSurname->CurrentValue;
$cstFutureStudents->MentorSurname->CssStyle = "";
$cstFutureStudents->MentorSurname->CssClass = "";
$cstFutureStudents->MentorSurname->ViewCustomAttributes = "";
// FirstName
$cstFutureStudents->FirstName->HrefValue = "";
$cstFutureStudents->FirstName->TooltipValue = "";
// Surname
$cstFutureStudents->Surname->HrefValue = "";
$cstFutureStudents->Surname->TooltipValue = "";
// KnownAs
$cstFutureStudents->KnownAs->HrefValue = "";
$cstFutureStudents->KnownAs->TooltipValue = "";
// Organisation
$cstFutureStudents->Organisation->HrefValue = "";
$cstFutureStudents->Organisation->TooltipValue = "";
// Age
$cstFutureStudents->Age->HrefValue = "";
$cstFutureStudents->Age->TooltipValue = "";
// Cellphone
$cstFutureStudents->Cellphone->HrefValue = "";
$cstFutureStudents->Cellphone->TooltipValue = "";
// EmailAddress
$cstFutureStudents->EmailAddress->HrefValue = "";
$cstFutureStudents->EmailAddress->TooltipValue = "";
// HomeAddress
$cstFutureStudents->HomeAddress->HrefValue = "";
$cstFutureStudents->HomeAddress->TooltipValue = "";
// CESAMemberFirm
$cstFutureStudents->CESAMemberFirm->HrefValue = "";
$cstFutureStudents->CESAMemberFirm->TooltipValue = "";
// CESAAccountNo
$cstFutureStudents->CESAAccountNo->HrefValue = "";
$cstFutureStudents->CESAAccountNo->TooltipValue = "";
// MentorFirstName
$cstFutureStudents->MentorFirstName->HrefValue = "";
$cstFutureStudents->MentorFirstName->TooltipValue = "";
// MentorSurname
$cstFutureStudents->MentorSurname->HrefValue = "";
$cstFutureStudents->MentorSurname->TooltipValue = "";
}
// Call Row Rendered event
if ($cstFutureStudents->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$cstFutureStudents->Row_Rendered();
}
// Export data in HTML/CSV/Word/Excel/XML/Email format
function ExportData() {
global $cstFutureStudents;
$utf8 = FALSE;
$bSelectLimit = EW_SELECT_LIMIT;
// Load recordset
if ($bSelectLimit) {
$this->lTotalRecs = $cstFutureStudents->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset())
$this->lTotalRecs = $rs->RecordCount();
}
$this->lStartRec = 1;
// Export all
if ($cstFutureStudents->ExportAll) {
$this->lDisplayRecs = $this->lTotalRecs;
$this->lStopRec = $this->lTotalRecs;
} else { // Export one page only
$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 ($bSelectLimit)
$rs = $this->LoadRecordset($this->lStartRec-1, $this->lDisplayRecs);
if (!$rs) {
header("Content-Type:"); // Remove header
header("Content-Disposition:");
$this->ShowMessage();
return;
}
if ($cstFutureStudents->Export == "xml") {
$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
$XmlDoc->AddRoot();
} else {
$ExportDoc = new cExportDocument($cstFutureStudents, "h");
$ExportDoc->ExportHeader();
if ($ExportDoc->Horizontal) { // Horizontal format, write header
$ExportDoc->BeginExportRow();
$ExportDoc->ExportCaption($cstFutureStudents->Title);
$ExportDoc->ExportCaption($cstFutureStudents->FirstName);
$ExportDoc->ExportCaption($cstFutureStudents->Surname);
$ExportDoc->ExportCaption($cstFutureStudents->KnownAs);
$ExportDoc->ExportCaption($cstFutureStudents->Organisation);
$ExportDoc->ExportCaption($cstFutureStudents->OrganisationType);
$ExportDoc->ExportCaption($cstFutureStudents->StudentNumber);
$ExportDoc->ExportCaption($cstFutureStudents->CCEFacilitatorID);
$ExportDoc->ExportCaption($cstFutureStudents->Project);
$ExportDoc->ExportCaption($cstFutureStudents->ProjectDiscipline);
$ExportDoc->ExportCaption($cstFutureStudents->IDNumber);
$ExportDoc->ExportCaption($cstFutureStudents->ECSARegistered);
$ExportDoc->ExportCaption($cstFutureStudents->ECSACategory);
$ExportDoc->ExportCaption($cstFutureStudents->ECSANumber);
$ExportDoc->ExportCaption($cstFutureStudents->OtherStatutoryBodyRegistered);
$ExportDoc->ExportCaption($cstFutureStudents->OtherStatutoryBodyName);
$ExportDoc->ExportCaption($cstFutureStudents->OtherStatutoryBodyNumber);
$ExportDoc->ExportCaption($cstFutureStudents->OtherStatutoryBodyCategory);
$ExportDoc->ExportCaption($cstFutureStudents->Age);
$ExportDoc->ExportCaption($cstFutureStudents->HighestQual);
$ExportDoc->ExportCaption($cstFutureStudents->AreaDiscipline);
$ExportDoc->ExportCaption($cstFutureStudents->Telephone);
$ExportDoc->ExportCaption($cstFutureStudents->Cellphone);
$ExportDoc->ExportCaption($cstFutureStudents->EmailAddress);
$ExportDoc->ExportCaption($cstFutureStudents->HomeAddress);
$ExportDoc->ExportCaption($cstFutureStudents->WorkAddress);
$ExportDoc->ExportCaption($cstFutureStudents->PostalAddress);
$ExportDoc->ExportCaption($cstFutureStudents->Designation);
$ExportDoc->ExportCaption($cstFutureStudents->Department);
$ExportDoc->ExportCaption($cstFutureStudents->CESAMemberFirm);
$ExportDoc->ExportCaption($cstFutureStudents->CESAAccountNo);
$ExportDoc->ExportCaption($cstFutureStudents->VATNo);
$ExportDoc->ExportCaption($cstFutureStudents->DietaryRequirements);
$ExportDoc->ExportCaption($cstFutureStudents->IDFile);
$ExportDoc->ExportCaption($cstFutureStudents->CVFile);
$ExportDoc->ExportCaption($cstFutureStudents->QualCertificate1);
$ExportDoc->ExportCaption($cstFutureStudents->QualCertificate2);
$ExportDoc->ExportCaption($cstFutureStudents->QualCertificate3);
$ExportDoc->ExportCaption($cstFutureStudents->MemorandumFile);
$ExportDoc->ExportCaption($cstFutureStudents->AgreementFile);
$ExportDoc->ExportCaption($cstFutureStudents->OrderNo);
$ExportDoc->ExportCaption($cstFutureStudents->BookedByName);
$ExportDoc->ExportCaption($cstFutureStudents->BookedByDesignation);
$ExportDoc->ExportCaption($cstFutureStudents->BookedByTelNo);
$ExportDoc->ExportCaption($cstFutureStudents->BookedByFaxNo);
$ExportDoc->ExportCaption($cstFutureStudents->BookedByCellNo);
$ExportDoc->ExportCaption($cstFutureStudents->BookedByEmail);
$ExportDoc->ExportCaption($cstFutureStudents->WebUsername);
$ExportDoc->ExportCaption($cstFutureStudents->WebPassword);
$ExportDoc->ExportCaption($cstFutureStudents->MentorDesig);
$ExportDoc->ExportCaption($cstFutureStudents->MentorTel);
$ExportDoc->ExportCaption($cstFutureStudents->MentorCell);
$ExportDoc->ExportCaption($cstFutureStudents->MentorEmail);
$ExportDoc->ExportCaption($cstFutureStudents->HRManagerName);
$ExportDoc->ExportCaption($cstFutureStudents->HRManagerDesignation);
$ExportDoc->ExportCaption($cstFutureStudents->HRManagerTelNo);
$ExportDoc->ExportCaption($cstFutureStudents->HRManagerCellNo);
$ExportDoc->ExportCaption($cstFutureStudents->HRManagerEmail);
$ExportDoc->ExportCaption($cstFutureStudents->LengthEmploy);
$ExportDoc->ExportCaption($cstFutureStudents->BlockAccess);
$ExportDoc->ExportCaption($cstFutureStudents->Archived);
$ExportDoc->ExportCaption($cstFutureStudents->MentorFirstName);
$ExportDoc->ExportCaption($cstFutureStudents->MentorSurname);
$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
$cstFutureStudents->CssClass = "";
$cstFutureStudents->CssStyle = "";
$cstFutureStudents->RowType = EW_ROWTYPE_VIEW; // Render view
$this->RenderRow();
if ($cstFutureStudents->Export == "xml") {
$XmlDoc->AddRow();
$XmlDoc->AddField('Title', $cstFutureStudents->Title->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('FirstName', $cstFutureStudents->FirstName->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Surname', $cstFutureStudents->Surname->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('KnownAs', $cstFutureStudents->KnownAs->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Organisation', $cstFutureStudents->Organisation->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('OrganisationType', $cstFutureStudents->OrganisationType->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('StudentNumber', $cstFutureStudents->StudentNumber->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('CCEFacilitatorID', $cstFutureStudents->CCEFacilitatorID->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Project', $cstFutureStudents->Project->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('ProjectDiscipline', $cstFutureStudents->ProjectDiscipline->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('IDNumber', $cstFutureStudents->IDNumber->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('ECSARegistered', $cstFutureStudents->ECSARegistered->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('ECSACategory', $cstFutureStudents->ECSACategory->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('ECSANumber', $cstFutureStudents->ECSANumber->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyRegistered', $cstFutureStudents->OtherStatutoryBodyRegistered->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyName', $cstFutureStudents->OtherStatutoryBodyName->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyNumber', $cstFutureStudents->OtherStatutoryBodyNumber->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyCategory', $cstFutureStudents->OtherStatutoryBodyCategory->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Age', $cstFutureStudents->Age->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('HighestQual', $cstFutureStudents->HighestQual->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('AreaDiscipline', $cstFutureStudents->AreaDiscipline->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Telephone', $cstFutureStudents->Telephone->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Cellphone', $cstFutureStudents->Cellphone->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('EmailAddress', $cstFutureStudents->EmailAddress->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('HomeAddress', $cstFutureStudents->HomeAddress->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('WorkAddress', $cstFutureStudents->WorkAddress->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('PostalAddress', $cstFutureStudents->PostalAddress->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Designation', $cstFutureStudents->Designation->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Department', $cstFutureStudents->Department->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('CESAMemberFirm', $cstFutureStudents->CESAMemberFirm->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('CESAAccountNo', $cstFutureStudents->CESAAccountNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('VATNo', $cstFutureStudents->VATNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('DietaryRequirements', $cstFutureStudents->DietaryRequirements->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('IDFile', $cstFutureStudents->IDFile->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('CVFile', $cstFutureStudents->CVFile->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate1', $cstFutureStudents->QualCertificate1->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate2', $cstFutureStudents->QualCertificate2->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate3', $cstFutureStudents->QualCertificate3->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('MemorandumFile', $cstFutureStudents->MemorandumFile->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('AgreementFile', $cstFutureStudents->AgreementFile->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('OrderNo', $cstFutureStudents->OrderNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByName', $cstFutureStudents->BookedByName->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByDesignation', $cstFutureStudents->BookedByDesignation->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByTelNo', $cstFutureStudents->BookedByTelNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByFaxNo', $cstFutureStudents->BookedByFaxNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByCellNo', $cstFutureStudents->BookedByCellNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByEmail', $cstFutureStudents->BookedByEmail->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('WebUsername', $cstFutureStudents->WebUsername->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('WebPassword', $cstFutureStudents->WebPassword->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorDesig', $cstFutureStudents->MentorDesig->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorTel', $cstFutureStudents->MentorTel->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorCell', $cstFutureStudents->MentorCell->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorEmail', $cstFutureStudents->MentorEmail->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerName', $cstFutureStudents->HRManagerName->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerDesignation', $cstFutureStudents->HRManagerDesignation->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerTelNo', $cstFutureStudents->HRManagerTelNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerCellNo', $cstFutureStudents->HRManagerCellNo->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerEmail', $cstFutureStudents->HRManagerEmail->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('LengthEmploy', $cstFutureStudents->LengthEmploy->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('BlockAccess', $cstFutureStudents->BlockAccess->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('Archived', $cstFutureStudents->Archived->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorFirstName', $cstFutureStudents->MentorFirstName->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorSurname', $cstFutureStudents->MentorSurname->ExportValue($cstFutureStudents->Export, $cstFutureStudents->ExportOriginalValue));
} else {
$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
$ExportDoc->ExportField($cstFutureStudents->Title);
$ExportDoc->ExportField($cstFutureStudents->FirstName);
$ExportDoc->ExportField($cstFutureStudents->Surname);
$ExportDoc->ExportField($cstFutureStudents->KnownAs);
$ExportDoc->ExportField($cstFutureStudents->Organisation);
$ExportDoc->ExportField($cstFutureStudents->OrganisationType);
$ExportDoc->ExportField($cstFutureStudents->StudentNumber);
$ExportDoc->ExportField($cstFutureStudents->CCEFacilitatorID);
$ExportDoc->ExportField($cstFutureStudents->Project);
$ExportDoc->ExportField($cstFutureStudents->ProjectDiscipline);
$ExportDoc->ExportField($cstFutureStudents->IDNumber);
$ExportDoc->ExportField($cstFutureStudents->ECSARegistered);
$ExportDoc->ExportField($cstFutureStudents->ECSACategory);
$ExportDoc->ExportField($cstFutureStudents->ECSANumber);
$ExportDoc->ExportField($cstFutureStudents->OtherStatutoryBodyRegistered);
$ExportDoc->ExportField($cstFutureStudents->OtherStatutoryBodyName);
$ExportDoc->ExportField($cstFutureStudents->OtherStatutoryBodyNumber);
$ExportDoc->ExportField($cstFutureStudents->OtherStatutoryBodyCategory);
$ExportDoc->ExportField($cstFutureStudents->Age);
$ExportDoc->ExportField($cstFutureStudents->HighestQual);
$ExportDoc->ExportField($cstFutureStudents->AreaDiscipline);
$ExportDoc->ExportField($cstFutureStudents->Telephone);
$ExportDoc->ExportField($cstFutureStudents->Cellphone);
$ExportDoc->ExportField($cstFutureStudents->EmailAddress);
$ExportDoc->ExportField($cstFutureStudents->HomeAddress);
$ExportDoc->ExportField($cstFutureStudents->WorkAddress);
$ExportDoc->ExportField($cstFutureStudents->PostalAddress);
$ExportDoc->ExportField($cstFutureStudents->Designation);
$ExportDoc->ExportField($cstFutureStudents->Department);
$ExportDoc->ExportField($cstFutureStudents->CESAMemberFirm);
$ExportDoc->ExportField($cstFutureStudents->CESAAccountNo);
$ExportDoc->ExportField($cstFutureStudents->VATNo);
$ExportDoc->ExportField($cstFutureStudents->DietaryRequirements);
$ExportDoc->ExportField($cstFutureStudents->IDFile);
$ExportDoc->ExportField($cstFutureStudents->CVFile);
$ExportDoc->ExportField($cstFutureStudents->QualCertificate1);
$ExportDoc->ExportField($cstFutureStudents->QualCertificate2);
$ExportDoc->ExportField($cstFutureStudents->QualCertificate3);
$ExportDoc->ExportField($cstFutureStudents->MemorandumFile);
$ExportDoc->ExportField($cstFutureStudents->AgreementFile);
$ExportDoc->ExportField($cstFutureStudents->OrderNo);
$ExportDoc->ExportField($cstFutureStudents->BookedByName);
$ExportDoc->ExportField($cstFutureStudents->BookedByDesignation);
$ExportDoc->ExportField($cstFutureStudents->BookedByTelNo);
$ExportDoc->ExportField($cstFutureStudents->BookedByFaxNo);
$ExportDoc->ExportField($cstFutureStudents->BookedByCellNo);
$ExportDoc->ExportField($cstFutureStudents->BookedByEmail);
$ExportDoc->ExportField($cstFutureStudents->WebUsername);
$ExportDoc->ExportField($cstFutureStudents->WebPassword);
$ExportDoc->ExportField($cstFutureStudents->MentorDesig);
$ExportDoc->ExportField($cstFutureStudents->MentorTel);
$ExportDoc->ExportField($cstFutureStudents->MentorCell);
$ExportDoc->ExportField($cstFutureStudents->MentorEmail);
$ExportDoc->ExportField($cstFutureStudents->HRManagerName);
$ExportDoc->ExportField($cstFutureStudents->HRManagerDesignation);
$ExportDoc->ExportField($cstFutureStudents->HRManagerTelNo);
$ExportDoc->ExportField($cstFutureStudents->HRManagerCellNo);
$ExportDoc->ExportField($cstFutureStudents->HRManagerEmail);
$ExportDoc->ExportField($cstFutureStudents->LengthEmploy);
$ExportDoc->ExportField($cstFutureStudents->BlockAccess);
$ExportDoc->ExportField($cstFutureStudents->Archived);
$ExportDoc->ExportField($cstFutureStudents->MentorFirstName);
$ExportDoc->ExportField($cstFutureStudents->MentorSurname);
$ExportDoc->EndExportRow();
}
}
$rs->MoveNext();
}
if ($cstFutureStudents->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($cstFutureStudents->Export, array("email", "xml")))
echo "\xEF\xBB\xBF";
// Write debug message if enabled
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
// Output data
if ($cstFutureStudents->Export == "xml") {
header("Content-Type: text/xml");
echo $XmlDoc->XML();
} elseif ($cstFutureStudents->Export == "email") {
$this->ExportEmail($ExportDoc->Text);
$this->Page_Terminate($cstFutureStudents->ExportReturnUrl());
} else {
echo $ExportDoc->Text;
}
}
// Export email
function ExportEmail($EmailContent) {
global $Language, $cstFutureStudents;
$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 ($cstFutureStudents->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 $cstFutureStudents;
// Initialize
$sQry = "export=html";
// Build QueryString for search
if ($cstFutureStudents->getSessionBasicSearchKeyword() <> "") {
$sQry .= "&" . EW_TABLE_BASIC_SEARCH . "=" . $cstFutureStudents->getSessionBasicSearchKeyword() . "&" . EW_TABLE_BASIC_SEARCH_TYPE . "=" . $cstFutureStudents->getSessionBasicSearchType();
}
// Build QueryString for pager
$sQry .= "&" . EW_TABLE_REC_PER_PAGE . "=" . $cstFutureStudents->getRecordsPerPage() . "&" . EW_TABLE_START_REC . "=" . $cstFutureStudents->getStartRecordNumber();
return $sQry;
}
// Add search QueryString
function AddSearchQueryString(&$Qry, &$Fld) {
global $cstFutureStudents;
$FldParm = substr($Fld->FldVar, 2);
$FldSearchValue = $cstFutureStudents->GetAdvancedSearch("x_" . $FldParm);
if (strval($FldSearchValue) <> "") {
$Qry .= "&x_" . $FldParm . "=" . FldSearchValue .
"&z_" . $FldParm . "=" . $cstFutureStudents->GetAdvancedSearch("z_" . $FldParm);
}
$FldSearchValue2 = $cstFutureStudents->GetAdvancedSearch("y_" . $FldParm);
if (strval($FldSearchValue2) <> "") {
$Qry .= "&v_" . $FldParm . "=" . $cstFutureStudents->GetAdvancedSearch("v_" . $FldParm) .
"&y_" . $FldParm . "=" . $FldSearchValue2 .
"&w_" . $FldParm . "=" . $cstFutureStudents->GetAdvancedSearch("w_" . $FldParm);
}
}
// 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";
}
// Form Custom Validate event
function Form_CustomValidate(&$CustomError) {
// Return error message in CustomError
return TRUE;
}
// ListOptions Load event
function ListOptions_Load() {
// Example:
//$this->ListOptions->Add("new");
//$this->ListOptions->Items["new"]->OnLeft = TRUE; // Link on left
//$this->ListOptions->MoveItem("new", 0); // Move to first column
}
// ListOptions Rendered event
function ListOptions_Rendered() {
// Example:
//$this->ListOptions->Items["new"]->Body = "xxx";
}
}
?>