| Current Path : /var/www/cesa.co.za/echasl23/ |
| Current File : /var/www/cesa.co.za/echasl23/CCEStudentslist.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 "CCEStudentsinfo.php" ?>
<?php include "adminusersinfo.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
$CCEStudents_list = new cCCEStudents_list();
$Page =& $CCEStudents_list;
// Page init
$CCEStudents_list->Page_Init();
// Page main
$CCEStudents_list->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($CCEStudents->Export == "") { ?>
<script type="text/javascript">
<!--
// Create page object
var CCEStudents_list = new ew_Page("CCEStudents_list");
// page properties
CCEStudents_list.PageID = "list"; // page ID
CCEStudents_list.FormID = "fCCEStudentslist"; // form ID
var EW_PAGE_ID = CCEStudents_list.PageID; // for backward compatibility
// extend page with Form_CustomValidate function
CCEStudents_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) { ?>
CCEStudents_list.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCEStudents_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 ($CCEStudents->Export == "") { ?>
<?php } ?>
<?php
$bSelectLimit = EW_SELECT_LIMIT;
if ($bSelectLimit) {
$CCEStudents_list->lTotalRecs = $CCEStudents->SelectRecordCount();
} else {
if ($rs = $CCEStudents_list->LoadRecordset())
$CCEStudents_list->lTotalRecs = $rs->RecordCount();
}
$CCEStudents_list->lStartRec = 1;
if ($CCEStudents_list->lDisplayRecs <= 0 || ($CCEStudents->Export <> "" && $CCEStudents->ExportAll)) // Display all records
$CCEStudents_list->lDisplayRecs = $CCEStudents_list->lTotalRecs;
if (!($CCEStudents->Export <> "" && $CCEStudents->ExportAll))
$CCEStudents_list->SetUpStartRec(); // Set up start record position
if ($bSelectLimit)
$rs = $CCEStudents_list->LoadRecordset($CCEStudents_list->lStartRec-1, $CCEStudents_list->lDisplayRecs);
?>
<p><span class="phpmaker" style="white-space: nowrap;"><?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CCEStudents->TableCaption() ?>
<?php if ($CCEStudents->Export == "" && $CCEStudents->CurrentAction == "") { ?>
<a href="<?php echo $CCEStudents_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 $CCEStudents_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 $CCEStudents_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_CCEStudents" id="emf_CCEStudents" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_CCEStudents',hdr:ewLanguage.Phrase('ExportToEmail'),f:document.fCCEStudentslist,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->CanSearch()) { ?>
<?php if ($CCEStudents->Export == "" && $CCEStudents->CurrentAction == "") { ?>
<a href="javascript:ew_ToggleSearchPanel(CCEStudents_list);" style="text-decoration: none;"><img id="CCEStudents_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="CCEStudents_list_SearchPanel">
<form name="fCCEStudentslistsrch" id="fCCEStudentslistsrch" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<input type="hidden" id="t" name="t" value="CCEStudents">
<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($CCEStudents->getSessionBasicSearchKeyword()) ?>">
<input type="Submit" name="Submit" id="Submit" value="<?php echo ew_BtnCaption($Language->Phrase("QuickSearchBtn")) ?>">
<a href="<?php echo $CCEStudents_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 ($CCEStudents->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 ($CCEStudents->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 ($CCEStudents->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();
$CCEStudents_list->ShowMessage();
?>
<br>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<?php if ($CCEStudents->Export == "") { ?>
<div class="ewGridUpperPanel">
<?php if ($CCEStudents->CurrentAction <> "gridadd" && $CCEStudents->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($CCEStudents_list->Pager)) $CCEStudents_list->Pager = new cPrevNextPager($CCEStudents_list->lStartRec, $CCEStudents_list->lDisplayRecs, $CCEStudents_list->lTotalRecs) ?>
<?php if ($CCEStudents_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 ($CCEStudents_list->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 ($CCEStudents_list->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 $CCEStudents_list->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($CCEStudents_list->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 ($CCEStudents_list->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 $CCEStudents_list->Pager->PageCount ?></span></td>
</tr></table>
</td>
<td> </td>
<td>
<span class="phpmaker"><?php echo $Language->Phrase("Record") ?> <?php echo $CCEStudents_list->Pager->FromIndex ?> <?php echo $Language->Phrase("To") ?> <?php echo $CCEStudents_list->Pager->ToIndex ?> <?php echo $Language->Phrase("Of") ?> <?php echo $CCEStudents_list->Pager->RecordCount ?></span>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($CCEStudents_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 } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></span>
<?php } ?>
<?php } ?>
</td>
<?php if ($CCEStudents_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="CCEStudents">
<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 ($CCEStudents_list->lDisplayRecs == 20) { ?> selected="selected"<?php } ?>>20</option>
<option value="40"<?php if ($CCEStudents_list->lDisplayRecs == 40) { ?> selected="selected"<?php } ?>>40</option>
<option value="80"<?php if ($CCEStudents_list->lDisplayRecs == 80) { ?> selected="selected"<?php } ?>>80</option>
<option value="160"<?php if ($CCEStudents_list->lDisplayRecs == 160) { ?> selected="selected"<?php } ?>>160</option>
<option value="ALL"<?php if ($CCEStudents->getRecordsPerPage() == -1) { ?> selected="selected"<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select></td></tr></table>
</td>
<?php } ?>
</tr>
</table>
</form>
<?php } ?>
<span class="phpmaker">
<?php if ($Security->CanAdd()) { ?>
<a href="<?php echo $CCEStudents_list->AddUrl ?>"><?php echo $Language->Phrase("AddLink") ?></a>
<?php } ?>
</span>
</div>
<?php } ?>
<form name="fCCEStudentslist" id="fCCEStudentslist" class="ewForm" action="" method="post">
<div id="gmp_CCEStudents" class="ewGridMiddlePanel">
<?php if ($CCEStudents_list->lTotalRecs > 0) { ?>
<table cellspacing="0" rowhighlightclass="ewTableHighlightRow" rowselectclass="ewTableSelectRow" roweditclass="ewTableEditRow" class="ewTable ewTableSeparate">
<?php echo $CCEStudents->TableCustomInnerHtml ?>
<thead><!-- Table header -->
<tr class="ewTableHeader">
<?php
// Render list options
$CCEStudents_list->RenderListOptions();
// Render list options (header, left)
$CCEStudents_list->ListOptions->Render("header", "left");
?>
<?php if ($CCEStudents->KnownAs->Visible) { // KnownAs ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->KnownAs) == "") { ?>
<td><?php echo $CCEStudents->KnownAs->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->KnownAs) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->KnownAs->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->KnownAs->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->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 ($CCEStudents->FirstName->Visible) { // FirstName ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->FirstName) == "") { ?>
<td><?php echo $CCEStudents->FirstName->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->FirstName) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->FirstName->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->FirstName->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->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 ($CCEStudents->Surname->Visible) { // Surname ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->Surname) == "") { ?>
<td><?php echo $CCEStudents->Surname->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->Surname) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->Surname->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->Surname->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->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 ($CCEStudents->Organisation->Visible) { // Organisation ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->Organisation) == "") { ?>
<td><?php echo $CCEStudents->Organisation->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->Organisation) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->Organisation->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->Organisation->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->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 ($CCEStudents->StudentNumber->Visible) { // StudentNumber ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->StudentNumber) == "") { ?>
<td><?php echo $CCEStudents->StudentNumber->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->StudentNumber) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->StudentNumber->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->StudentNumber->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->StudentNumber->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($CCEStudents->OtherStatutoryBodyCategory->Visible) { // OtherStatutoryBodyCategory ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->OtherStatutoryBodyCategory) == "") { ?>
<td><?php echo $CCEStudents->OtherStatutoryBodyCategory->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->OtherStatutoryBodyCategory) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->OtherStatutoryBodyCategory->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->OtherStatutoryBodyCategory->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->OtherStatutoryBodyCategory->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
</div></td>
<?php } ?>
<?php } ?>
<?php if ($CCEStudents->Age->Visible) { // Age ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->Age) == "") { ?>
<td><?php echo $CCEStudents->Age->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->Age) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->Age->FldCaption() ?></td><td style="width: 10px;"><?php if ($CCEStudents->Age->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->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 ($CCEStudents->Cellphone->Visible) { // Cellphone ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->Cellphone) == "") { ?>
<td><?php echo $CCEStudents->Cellphone->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->Cellphone) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->Cellphone->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->Cellphone->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->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 ($CCEStudents->EmailAddress->Visible) { // EmailAddress ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->EmailAddress) == "") { ?>
<td><?php echo $CCEStudents->EmailAddress->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->EmailAddress) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->EmailAddress->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($CCEStudents->EmailAddress->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->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 ($CCEStudents->BlockAccess->Visible) { // BlockAccess ?>
<?php if ($CCEStudents->SortUrl($CCEStudents->BlockAccess) == "") { ?>
<td><?php echo $CCEStudents->BlockAccess->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $CCEStudents->SortUrl($CCEStudents->BlockAccess) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $CCEStudents->BlockAccess->FldCaption() ?></td><td style="width: 10px;"><?php if ($CCEStudents->BlockAccess->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($CCEStudents->BlockAccess->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)
$CCEStudents_list->ListOptions->Render("header", "right");
?>
</tr>
</thead>
<?php
if ($CCEStudents->ExportAll && $CCEStudents->Export <> "") {
$CCEStudents_list->lStopRec = $CCEStudents_list->lTotalRecs;
} else {
$CCEStudents_list->lStopRec = $CCEStudents_list->lStartRec + $CCEStudents_list->lDisplayRecs - 1; // Set the last record to display
}
$CCEStudents_list->lRecCount = $CCEStudents_list->lStartRec - 1;
if ($rs && !$rs->EOF) {
$rs->MoveFirst();
if (!$bSelectLimit && $CCEStudents_list->lStartRec > 1)
$rs->Move($CCEStudents_list->lStartRec - 1);
}
// Initialize aggregate
$CCEStudents->RowType = EW_ROWTYPE_AGGREGATEINIT;
$CCEStudents_list->RenderRow();
$CCEStudents_list->lRowCnt = 0;
while (($CCEStudents->CurrentAction == "gridadd" || !$rs->EOF) &&
$CCEStudents_list->lRecCount < $CCEStudents_list->lStopRec) {
$CCEStudents_list->lRecCount++;
if (intval($CCEStudents_list->lRecCount) >= intval($CCEStudents_list->lStartRec)) {
$CCEStudents_list->lRowCnt++;
// Init row class and style
$CCEStudents->CssClass = "";
$CCEStudents->CssStyle = "";
$CCEStudents->RowAttrs = array('onmouseover'=>'ew_MouseOver(event, this);', 'onmouseout'=>'ew_MouseOut(event, this);', 'onclick'=>'ew_Click(event, this);');
if ($CCEStudents->CurrentAction == "gridadd") {
$CCEStudents_list->LoadDefaultValues(); // Load default values
} else {
$CCEStudents_list->LoadRowValues($rs); // Load row values
}
$CCEStudents->RowType = EW_ROWTYPE_VIEW; // Render view
// Render row
$CCEStudents_list->RenderRow();
// Render list options
$CCEStudents_list->RenderListOptions();
?>
<tr<?php echo $CCEStudents->RowAttributes() ?>>
<?php
// Render list options (body, left)
$CCEStudents_list->ListOptions->Render("body", "left");
?>
<?php if ($CCEStudents->KnownAs->Visible) { // KnownAs ?>
<td<?php echo $CCEStudents->KnownAs->CellAttributes() ?>>
<div<?php echo $CCEStudents->KnownAs->ViewAttributes() ?>><?php echo $CCEStudents->KnownAs->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->FirstName->Visible) { // FirstName ?>
<td<?php echo $CCEStudents->FirstName->CellAttributes() ?>>
<div<?php echo $CCEStudents->FirstName->ViewAttributes() ?>><?php echo $CCEStudents->FirstName->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->Surname->Visible) { // Surname ?>
<td<?php echo $CCEStudents->Surname->CellAttributes() ?>>
<div<?php echo $CCEStudents->Surname->ViewAttributes() ?>><?php echo $CCEStudents->Surname->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->Organisation->Visible) { // Organisation ?>
<td<?php echo $CCEStudents->Organisation->CellAttributes() ?>>
<div<?php echo $CCEStudents->Organisation->ViewAttributes() ?>><?php echo $CCEStudents->Organisation->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->StudentNumber->Visible) { // StudentNumber ?>
<td<?php echo $CCEStudents->StudentNumber->CellAttributes() ?>>
<div<?php echo $CCEStudents->StudentNumber->ViewAttributes() ?>><?php echo $CCEStudents->StudentNumber->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->OtherStatutoryBodyCategory->Visible) { // OtherStatutoryBodyCategory ?>
<td<?php echo $CCEStudents->OtherStatutoryBodyCategory->CellAttributes() ?>>
<div<?php echo $CCEStudents->OtherStatutoryBodyCategory->ViewAttributes() ?>><?php echo $CCEStudents->OtherStatutoryBodyCategory->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->Age->Visible) { // Age ?>
<td<?php echo $CCEStudents->Age->CellAttributes() ?>>
<div<?php echo $CCEStudents->Age->ViewAttributes() ?>><?php echo $CCEStudents->Age->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->Cellphone->Visible) { // Cellphone ?>
<td<?php echo $CCEStudents->Cellphone->CellAttributes() ?>>
<div<?php echo $CCEStudents->Cellphone->ViewAttributes() ?>><?php echo $CCEStudents->Cellphone->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->EmailAddress->Visible) { // EmailAddress ?>
<td<?php echo $CCEStudents->EmailAddress->CellAttributes() ?>>
<div<?php echo $CCEStudents->EmailAddress->ViewAttributes() ?>><?php echo $CCEStudents->EmailAddress->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($CCEStudents->BlockAccess->Visible) { // BlockAccess ?>
<td<?php echo $CCEStudents->BlockAccess->CellAttributes() ?>>
<div<?php echo $CCEStudents->BlockAccess->ViewAttributes() ?>><?php echo $CCEStudents->BlockAccess->ListViewValue() ?></div>
</td>
<?php } ?>
<?php
// Render list options (body, right)
$CCEStudents_list->ListOptions->Render("body", "right");
?>
</tr>
<?php
}
if ($CCEStudents->CurrentAction <> "gridadd")
$rs->MoveNext();
}
?>
</tbody>
</table>
<?php } ?>
</div>
</form>
<?php
// Close recordset
if ($rs)
$rs->Close();
?>
<?php if ($CCEStudents_list->lTotalRecs > 0) { ?>
<?php if ($CCEStudents->Export == "") { ?>
<div class="ewGridLowerPanel">
<?php if ($CCEStudents->CurrentAction <> "gridadd" && $CCEStudents->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($CCEStudents_list->Pager)) $CCEStudents_list->Pager = new cPrevNextPager($CCEStudents_list->lStartRec, $CCEStudents_list->lDisplayRecs, $CCEStudents_list->lTotalRecs) ?>
<?php if ($CCEStudents_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 ($CCEStudents_list->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 ($CCEStudents_list->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 $CCEStudents_list->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($CCEStudents_list->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 ($CCEStudents_list->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $CCEStudents_list->PageUrl() ?>start=<?php echo $CCEStudents_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 $CCEStudents_list->Pager->PageCount ?></span></td>
</tr></table>
</td>
<td> </td>
<td>
<span class="phpmaker"><?php echo $Language->Phrase("Record") ?> <?php echo $CCEStudents_list->Pager->FromIndex ?> <?php echo $Language->Phrase("To") ?> <?php echo $CCEStudents_list->Pager->ToIndex ?> <?php echo $Language->Phrase("Of") ?> <?php echo $CCEStudents_list->Pager->RecordCount ?></span>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($CCEStudents_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 } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></span>
<?php } ?>
<?php } ?>
</td>
<?php if ($CCEStudents_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="CCEStudents">
<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 ($CCEStudents_list->lDisplayRecs == 20) { ?> selected="selected"<?php } ?>>20</option>
<option value="40"<?php if ($CCEStudents_list->lDisplayRecs == 40) { ?> selected="selected"<?php } ?>>40</option>
<option value="80"<?php if ($CCEStudents_list->lDisplayRecs == 80) { ?> selected="selected"<?php } ?>>80</option>
<option value="160"<?php if ($CCEStudents_list->lDisplayRecs == 160) { ?> selected="selected"<?php } ?>>160</option>
<option value="ALL"<?php if ($CCEStudents->getRecordsPerPage() == -1) { ?> selected="selected"<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select></td></tr></table>
</td>
<?php } ?>
</tr>
</table>
</form>
<?php } ?>
<?php //if ($CCEStudents_list->lTotalRecs > 0) { ?>
<span class="phpmaker">
<?php if ($Security->CanAdd()) { ?>
<a href="<?php echo $CCEStudents_list->AddUrl ?>"><?php echo $Language->Phrase("AddLink") ?></a>
<?php } ?>
</span>
<?php //} ?>
</div>
<?php } ?>
<?php } ?>
</td></tr></table>
<?php if ($CCEStudents->Export == "" && $CCEStudents->CurrentAction == "") { ?>
<?php } ?>
<?php if ($CCEStudents->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
$CCEStudents_list->Page_Terminate();
?>
<?php
//
// Page class
//
class cCCEStudents_list {
// Page ID
var $PageID = 'list';
// Table name
var $TableName = 'CCEStudents';
// Page object name
var $PageObjName = 'CCEStudents_list';
// Page name
function PageName() {
return ew_CurrentPage();
}
// Page URL
function PageUrl() {
$PageUrl = ew_CurrentPage() . "?";
global $CCEStudents;
if ($CCEStudents->UseTokenInUrl) $PageUrl .= "t=" . $CCEStudents->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, $CCEStudents;
if ($CCEStudents->UseTokenInUrl) {
if ($objForm)
return ($CCEStudents->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($CCEStudents->TableVar == $_GET["t"]);
} else {
return TRUE;
}
}
//
// Page class constructor
//
function __construct() {
global $conn, $Language;
// Language object
$Language = new cLanguage();
// Table object (CCEStudents)
$GLOBALS["CCEStudents"] = new cCCEStudents();
// 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["CCEStudents"]->AddUrl();
$this->InlineAddUrl = $this->PageUrl() . "a=add";
$this->GridAddUrl = $this->PageUrl() . "a=gridadd";
$this->GridEditUrl = $this->PageUrl() . "a=gridedit";
$this->MultiDeleteUrl = "CCEStudentsdelete.php";
$this->MultiUpdateUrl = "CCEStudentsupdate.php";
// Table object (adminusers)
$GLOBALS['adminusers'] = new cadminusers();
// 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", 'CCEStudents', 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 $CCEStudents;
// User profile
$UserProfile = new cUserProfile();
$UserProfile->LoadProfile(@$_SESSION[EW_SESSION_USER_PROFILE]);
// Security
$Security = new cAdvancedSecurity();
if (IsPasswordExpired())
$this->Page_Terminate("changepwd.php");
if (!$Security->IsLoggedIn()) $Security->AutoLogin();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
$Security->TablePermission_Loading();
$Security->LoadCurrentUserLevel($this->TableName);
$Security->TablePermission_Loaded();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
if (!$Security->CanList()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
$Security->UserID_Loading();
if ($Security->IsLoggedIn()) $Security->LoadUserID();
$Security->UserID_Loaded();
// Get export parameters
if (@$_GET["export"] <> "") {
$CCEStudents->Export = $_GET["export"];
} elseif (ew_IsHttpPost()) {
if (@$_POST["exporttype"] <> "")
$CCEStudents->Export = $_POST["exporttype"];
} else {
$CCEStudents->setExportReturnUrl(ew_CurrentUrl());
}
$gsExport = $CCEStudents->Export; // Get export parameter, used in header
$gsExportFile = $CCEStudents->TableVar; // Get export file, used in header
if ($CCEStudents->Export == "excel") {
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
}
if ($CCEStudents->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, $CCEStudents;
// 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
$CCEStudents->Recordset_SearchValidated();
// Set up sorting order
$this->SetUpSortOrder();
// Get basic search criteria
if ($gsSearchError == "")
$sSrchBasic = $this->BasicSearchWhere();
}
// Restore display records
if ($CCEStudents->getRecordsPerPage() <> "") {
$this->lDisplayRecs = $CCEStudents->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
$CCEStudents->Recordset_Searching($this->sSrchWhere);
// Save search criteria
if ($this->sSrchWhere <> "") {
if ($sSrchBasic == "")
$this->ResetBasicSearchParms();
$CCEStudents->setSearchWhere($this->sSrchWhere); // Save to Session
if (!$this->RestoreSearch) {
$this->lStartRec = 1; // Reset start record counter
$CCEStudents->setStartRecordNumber($this->lStartRec);
}
} else {
$this->sSrchWhere = $CCEStudents->getSearchWhere();
}
// Build filter
$sFilter = "";
if (!$Security->CanList())
$sFilter = "(0=1)"; // Filter all records
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
$CCEStudents->setSessionWhere($sFilter);
$CCEStudents->CurrentFilter = "";
// Export data only
if (in_array($CCEStudents->Export, array("html","word","excel","xml","csv","email"))) {
$this->ExportData();
if ($CCEStudents->Export <> "email")
$this->Page_Terminate(); // Terminate response
exit();
}
}
// Set up number of records displayed per page
function SetUpDisplayRecs() {
global $CCEStudents;
$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
}
}
$CCEStudents->setRecordsPerPage($this->lDisplayRecs); // Save to Session
// Reset start position
$this->lStartRec = 1;
$CCEStudents->setStartRecordNumber($this->lStartRec);
}
}
// Return basic search SQL
function BasicSearchSQL($Keyword) {
global $CCEStudents;
$sKeyword = ew_AdjustSql($Keyword);
$sWhere = "";
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->KnownAs, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->FirstName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->Surname, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->Organisation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->OrganisationType, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->Designation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->Department, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->StudentNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ProjectDiscipline, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ProjectCode, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->IDNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ECSARegistered, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ECSACategory, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ECSANumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->OtherStatutoryBodyName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->OtherStatutoryBodyNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->OtherStatutoryBodyCategory, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->CESAMemberFirm, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->OtherCEFirms, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->HighestQual, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->AreaDiscipline, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->Telephone, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->Cellphone, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->EmailAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->EmailAddress2, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->HomeAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->WorkAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->PostalAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->CESAAccountNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->VATNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->DietaryRequirements, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->OrderNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->BookedByName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->BookedByDesignation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->BookedByTelNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->BookedByFaxNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->BookedByCellNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->BookedByEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->WebUsername, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->WebPassword, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->MentorFirstName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->MentorSurname, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->MentorCompany, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->MentorDesig, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->MentorTel, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->MentorCell, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->MentorEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->HRManagerName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->HRManagerDesignation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->HRManagerTelNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->HRManagerCellNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->HRManagerEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->LengthEmploy, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ResponsiblePayment, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->BlockAccess, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ReasonForLeaving, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ReasonNotAccepted, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ResultComments, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->ResultStatus, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $CCEStudents->CancelledReason, $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, $CCEStudents;
$sSearchStr = "";
if (!$Security->CanSearch()) return "";
$sSearchKeyword = $CCEStudents->BasicSearchKeyword;
$sSearchType = $CCEStudents->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 <> "") {
$CCEStudents->setSessionBasicSearchKeyword($sSearchKeyword);
$CCEStudents->setSessionBasicSearchType($sSearchType);
}
return $sSearchStr;
}
// Clear all search parameters
function ResetSearchParms() {
global $CCEStudents;
// Clear search WHERE clause
$this->sSrchWhere = "";
$CCEStudents->setSearchWhere($this->sSrchWhere);
// Clear basic search parameters
$this->ResetBasicSearchParms();
}
// Clear all basic search parameters
function ResetBasicSearchParms() {
global $CCEStudents;
$CCEStudents->setSessionBasicSearchKeyword("");
$CCEStudents->setSessionBasicSearchType("");
}
// Restore all search parameters
function RestoreSearchParms() {
global $CCEStudents;
$bRestore = TRUE;
if (@$_GET[EW_TABLE_BASIC_SEARCH] <> "") $bRestore = FALSE;
$this->RestoreSearch = $bRestore;
if ($bRestore) {
// Restore basic search values
$CCEStudents->BasicSearchKeyword = $CCEStudents->getSessionBasicSearchKeyword();
$CCEStudents->BasicSearchType = $CCEStudents->getSessionBasicSearchType();
}
}
// Set up sort parameters
function SetUpSortOrder() {
global $CCEStudents;
// Check for Ctrl pressed
$bCtrl = (@$_GET["ctrl"] <> "");
// Check for "order" parameter
if (@$_GET["order"] <> "") {
$CCEStudents->CurrentOrder = ew_StripSlashes(@$_GET["order"]);
$CCEStudents->CurrentOrderType = @$_GET["ordertype"];
$CCEStudents->UpdateSort($CCEStudents->KnownAs, $bCtrl); // KnownAs
$CCEStudents->UpdateSort($CCEStudents->FirstName, $bCtrl); // FirstName
$CCEStudents->UpdateSort($CCEStudents->Surname, $bCtrl); // Surname
$CCEStudents->UpdateSort($CCEStudents->Organisation, $bCtrl); // Organisation
$CCEStudents->UpdateSort($CCEStudents->StudentNumber, $bCtrl); // StudentNumber
$CCEStudents->UpdateSort($CCEStudents->OtherStatutoryBodyCategory, $bCtrl); // OtherStatutoryBodyCategory
$CCEStudents->UpdateSort($CCEStudents->Age, $bCtrl); // Age
$CCEStudents->UpdateSort($CCEStudents->Cellphone, $bCtrl); // Cellphone
$CCEStudents->UpdateSort($CCEStudents->EmailAddress, $bCtrl); // EmailAddress
$CCEStudents->UpdateSort($CCEStudents->BlockAccess, $bCtrl); // BlockAccess
$CCEStudents->setStartRecordNumber(1); // Reset start position
}
}
// Load sort order parameters
function LoadSortOrder() {
global $CCEStudents;
$sOrderBy = $CCEStudents->getSessionOrderBy(); // Get ORDER BY from Session
if ($sOrderBy == "") {
if ($CCEStudents->SqlOrderBy() <> "") {
$sOrderBy = $CCEStudents->SqlOrderBy();
$CCEStudents->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 $CCEStudents;
// 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 = "";
$CCEStudents->setSessionOrderBy($sOrderBy);
$CCEStudents->KnownAs->setSort("");
$CCEStudents->FirstName->setSort("");
$CCEStudents->Surname->setSort("");
$CCEStudents->Organisation->setSort("");
$CCEStudents->StudentNumber->setSort("");
$CCEStudents->OtherStatutoryBodyCategory->setSort("");
$CCEStudents->Age->setSort("");
$CCEStudents->Cellphone->setSort("");
$CCEStudents->EmailAddress->setSort("");
$CCEStudents->BlockAccess->setSort("");
}
// Reset start position
$this->lStartRec = 1;
$CCEStudents->setStartRecordNumber($this->lStartRec);
}
}
// Set up list options
function SetupListOptions() {
global $Security, $CCEStudents;
// "view"
$this->ListOptions->Add("view");
$item =& $this->ListOptions->Items["view"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->CanView();
$item->OnLeft = FALSE;
// "edit"
$this->ListOptions->Add("edit");
$item =& $this->ListOptions->Items["edit"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->CanEdit();
$item->OnLeft = FALSE;
// "copy"
$this->ListOptions->Add("copy");
$item =& $this->ListOptions->Items["copy"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->CanAdd();
$item->OnLeft = FALSE;
// "delete"
$this->ListOptions->Add("delete");
$item =& $this->ListOptions->Items["delete"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->CanDelete();
$item->OnLeft = FALSE;
// Call ListOptions_Load event
$this->ListOptions_Load();
if ($CCEStudents->Export <> "" ||
$CCEStudents->CurrentAction == "gridadd" ||
$CCEStudents->CurrentAction == "gridedit")
$this->ListOptions->HideAllOptions();
}
// Render list options
function RenderListOptions() {
global $Security, $Language, $CCEStudents;
$this->ListOptions->LoadDefault();
// "view"
$oListOpt =& $this->ListOptions->Items["view"];
if ($Security->CanView() && $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>";
// "edit"
$oListOpt =& $this->ListOptions->Items["edit"];
if ($Security->CanEdit() && $oListOpt->Visible) {
$oListOpt->Body = "<a href=\"" . $this->EditUrl . "\">" . "<img src=\"images/edit.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("EditLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("EditLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . "</a>";
}
// "copy"
$oListOpt =& $this->ListOptions->Items["copy"];
if ($Security->CanAdd() && $oListOpt->Visible) {
$oListOpt->Body = "<a href=\"" . $this->CopyUrl . "\">" . "<img src=\"images/copy.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("CopyLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("CopyLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . "</a>";
}
// "delete"
$oListOpt =& $this->ListOptions->Items["delete"];
if ($Security->CanDelete() && $oListOpt->Visible)
$oListOpt->Body = "<a" . "" . " href=\"" . $this->DeleteUrl . "\">" . "<img src=\"images/delete.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("DeleteLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("DeleteLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . "</a>";
$this->RenderListOptionsExt();
// Call ListOptions_Rendered event
$this->ListOptions_Rendered();
}
function RenderListOptionsExt() {
global $Security, $Language, $CCEStudents;
}
// Set up starting record parameters
function SetUpStartRec() {
global $CCEStudents;
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];
$CCEStudents->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;
}
$CCEStudents->setStartRecordNumber($this->lStartRec);
}
}
}
$this->lStartRec = $CCEStudents->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
$CCEStudents->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
$CCEStudents->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
$CCEStudents->setStartRecordNumber($this->lStartRec);
}
}
// Load basic search values
function LoadBasicSearchValues() {
global $CCEStudents;
$CCEStudents->BasicSearchKeyword = @$_GET[EW_TABLE_BASIC_SEARCH];
$CCEStudents->BasicSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];
}
// Load recordset
function LoadRecordset($offset = -1, $rowcnt = -1) {
global $conn, $CCEStudents;
// Call Recordset Selecting event
$CCEStudents->Recordset_Selecting($CCEStudents->CurrentFilter);
// Load List page SQL
$sSql = $CCEStudents->SelectSQL();
if ($offset > -1 && $rowcnt > -1)
$sSql .= " LIMIT $offset, $rowcnt";
// Load recordset
$rs = ew_LoadRecordset($sSql);
// Call Recordset Selected event
$CCEStudents->Recordset_Selected($rs);
return $rs;
}
// Load row based on key values
function LoadRow() {
global $conn, $Security, $CCEStudents;
$sFilter = $CCEStudents->KeyFilter();
// Call Row Selecting event
$CCEStudents->Row_Selecting($sFilter);
// Load SQL based on filter
$CCEStudents->CurrentFilter = $sFilter;
$sSql = $CCEStudents->SQL();
$res = FALSE;
$rs = ew_LoadRecordset($sSql);
if ($rs && !$rs->EOF) {
$res = TRUE;
$this->LoadRowValues($rs); // Load row values
// Call Row Selected event
$CCEStudents->Row_Selected($rs);
$rs->Close();
}
return $res;
}
// Load row values from recordset
function LoadRowValues(&$rs) {
global $conn, $CCEStudents;
$CCEStudents->CCEStudentID->setDbValue($rs->fields('CCEStudentID'));
$CCEStudents->KnownAs->setDbValue($rs->fields('KnownAs'));
$CCEStudents->FirstName->setDbValue($rs->fields('FirstName'));
$CCEStudents->Surname->setDbValue($rs->fields('Surname'));
$CCEStudents->Organisation->setDbValue($rs->fields('Organisation'));
$CCEStudents->OrganisationType->setDbValue($rs->fields('OrganisationType'));
$CCEStudents->Designation->setDbValue($rs->fields('Designation'));
$CCEStudents->Department->setDbValue($rs->fields('Department'));
$CCEStudents->StudentNumber->setDbValue($rs->fields('StudentNumber'));
$CCEStudents->CCEFacilitatorID->setDbValue($rs->fields('CCEFacilitatorID'));
$CCEStudents->Project->setDbValue($rs->fields('Project'));
$CCEStudents->ProjectDiscipline->setDbValue($rs->fields('ProjectDiscipline'));
$CCEStudents->ProjectCode->setDbValue($rs->fields('ProjectCode'));
$CCEStudents->IDNumber->setDbValue($rs->fields('IDNumber'));
$CCEStudents->ECSARegistered->setDbValue($rs->fields('ECSARegistered'));
$CCEStudents->ECSACategory->setDbValue($rs->fields('ECSACategory'));
$CCEStudents->ECSANumber->setDbValue($rs->fields('ECSANumber'));
$CCEStudents->OtherStatutoryBodyRegistered->setDbValue($rs->fields('OtherStatutoryBodyRegistered'));
$CCEStudents->OtherStatutoryBodyName->setDbValue($rs->fields('OtherStatutoryBodyName'));
$CCEStudents->OtherStatutoryBodyNumber->setDbValue($rs->fields('OtherStatutoryBodyNumber'));
$CCEStudents->OtherStatutoryBodyCategory->setDbValue($rs->fields('OtherStatutoryBodyCategory'));
$CCEStudents->CESAMemberFirm->setDbValue($rs->fields('CESAMemberFirm'));
$CCEStudents->OtherCEFirms->setDbValue($rs->fields('OtherCEFirms'));
$CCEStudents->Age->setDbValue($rs->fields('Age'));
$CCEStudents->HighestQual->setDbValue($rs->fields('HighestQual'));
$CCEStudents->AreaDiscipline->setDbValue($rs->fields('AreaDiscipline'));
$CCEStudents->Telephone->setDbValue($rs->fields('Telephone'));
$CCEStudents->Cellphone->setDbValue($rs->fields('Cellphone'));
$CCEStudents->EmailAddress->setDbValue($rs->fields('EmailAddress'));
$CCEStudents->EmailAddress2->setDbValue($rs->fields('EmailAddress2'));
$CCEStudents->HomeAddress->setDbValue($rs->fields('HomeAddress'));
$CCEStudents->WorkAddress->setDbValue($rs->fields('WorkAddress'));
$CCEStudents->PostalAddress->setDbValue($rs->fields('PostalAddress'));
$CCEStudents->CESAAccountNo->setDbValue($rs->fields('CESAAccountNo'));
$CCEStudents->VATNo->setDbValue($rs->fields('VATNo'));
$CCEStudents->DietaryRequirements->setDbValue($rs->fields('DietaryRequirements'));
$CCEStudents->OrderNo->setDbValue($rs->fields('OrderNo'));
$CCEStudents->BookedByName->setDbValue($rs->fields('BookedByName'));
$CCEStudents->BookedByDesignation->setDbValue($rs->fields('BookedByDesignation'));
$CCEStudents->BookedByTelNo->setDbValue($rs->fields('BookedByTelNo'));
$CCEStudents->BookedByFaxNo->setDbValue($rs->fields('BookedByFaxNo'));
$CCEStudents->BookedByCellNo->setDbValue($rs->fields('BookedByCellNo'));
$CCEStudents->BookedByEmail->setDbValue($rs->fields('BookedByEmail'));
$CCEStudents->WebUsername->setDbValue($rs->fields('WebUsername'));
$CCEStudents->WebPassword->setDbValue($rs->fields('WebPassword'));
$CCEStudents->MentorFirstName->setDbValue($rs->fields('MentorFirstName'));
$CCEStudents->MentorSurname->setDbValue($rs->fields('MentorSurname'));
$CCEStudents->MentorCompany->setDbValue($rs->fields('MentorCompany'));
$CCEStudents->MentorDesig->setDbValue($rs->fields('MentorDesig'));
$CCEStudents->MentorTel->setDbValue($rs->fields('MentorTel'));
$CCEStudents->MentorCell->setDbValue($rs->fields('MentorCell'));
$CCEStudents->MentorEmail->setDbValue($rs->fields('MentorEmail'));
$CCEStudents->HRManagerName->setDbValue($rs->fields('HRManagerName'));
$CCEStudents->HRManagerDesignation->setDbValue($rs->fields('HRManagerDesignation'));
$CCEStudents->HRManagerTelNo->setDbValue($rs->fields('HRManagerTelNo'));
$CCEStudents->HRManagerCellNo->setDbValue($rs->fields('HRManagerCellNo'));
$CCEStudents->HRManagerEmail->setDbValue($rs->fields('HRManagerEmail'));
$CCEStudents->LengthEmploy->setDbValue($rs->fields('LengthEmploy'));
$CCEStudents->ResponsiblePayment->setDbValue($rs->fields('ResponsiblePayment'));
$CCEStudents->BlockAccess->setDbValue($rs->fields('BlockAccess'));
$CCEStudents->Accepted->setDbValue($rs->fields('Accepted'));
$CCEStudents->Archived->setDbValue($rs->fields('Archived'));
$CCEStudents->Achieved->setDbValue($rs->fields('Achieved'));
$CCEStudents->ReasonForLeaving->setDbValue($rs->fields('ReasonForLeaving'));
$CCEStudents->ReasonNotAccepted->setDbValue($rs->fields('ReasonNotAccepted'));
$CCEStudents->ResultComments->setDbValue($rs->fields('ResultComments'));
$CCEStudents->ResultStatus->setDbValue($rs->fields('ResultStatus'));
$CCEStudents->Cancelled->setDbValue($rs->fields('Cancelled'));
$CCEStudents->CancelledReason->setDbValue($rs->fields('CancelledReason'));
$CCEStudents->CVFile->Upload->DbValue = $rs->fields('CVFile');
$CCEStudents->Title->setDbValue($rs->fields('Title'));
$CCEStudents->QualCertificate1->setDbValue($rs->fields('QualCertificate1'));
$CCEStudents->QualCertificate2->setDbValue($rs->fields('QualCertificate2'));
$CCEStudents->QualCertificate3->setDbValue($rs->fields('QualCertificate3'));
$CCEStudents->MemorandumFile->setDbValue($rs->fields('MemorandumFile'));
$CCEStudents->AgreementFile->setDbValue($rs->fields('AgreementFile'));
$CCEStudents->ResultLetter->setDbValue($rs->fields('ResultLetter'));
$CCEStudents->IDFile->setDbValue($rs->fields('IDFile'));
$CCEStudents->PhotoFile->setDbValue($rs->fields('PhotoFile'));
$CCEStudents->SABTACOMemberFirm->setDbValue($rs->fields('SABTACOMemberFirm'));
$CCEStudents->PreferredCourierAddress->setDbValue($rs->fields('PreferredCourierAddress'));
$CCEStudents->MotivationalLetter->setDbValue($rs->fields('MotivationalLetter'));
$CCEStudents->MentorName->setDbValue($rs->fields('MentorName'));
$CCEStudents->ModulesEnrolled->setDbValue($rs->fields('ModulesEnrolled'));
$CCEStudents->Trimester1Report->Upload->DbValue = $rs->fields('Trimester1Report');
$CCEStudents->Trimester2Report->Upload->DbValue = $rs->fields('Trimester2Report');
$CCEStudents->Trimester3Report->Upload->DbValue = $rs->fields('Trimester3Report');
$CCEStudents->ExamResultLetter->Upload->DbValue = $rs->fields('ExamResultLetter');
$CCEStudents->SupplementalExamLetter->Upload->DbValue = $rs->fields('SupplementalExamLetter');
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $CCEStudents;
// Initialize URLs
$this->ViewUrl = $CCEStudents->ViewUrl();
$this->EditUrl = $CCEStudents->EditUrl();
$this->InlineEditUrl = $CCEStudents->InlineEditUrl();
$this->CopyUrl = $CCEStudents->CopyUrl();
$this->InlineCopyUrl = $CCEStudents->InlineCopyUrl();
$this->DeleteUrl = $CCEStudents->DeleteUrl();
// Call Row_Rendering event
$CCEStudents->Row_Rendering();
// Common render codes for all row types
// KnownAs
$CCEStudents->KnownAs->CellCssStyle = ""; $CCEStudents->KnownAs->CellCssClass = "";
$CCEStudents->KnownAs->CellAttrs = array(); $CCEStudents->KnownAs->ViewAttrs = array(); $CCEStudents->KnownAs->EditAttrs = array();
// FirstName
$CCEStudents->FirstName->CellCssStyle = ""; $CCEStudents->FirstName->CellCssClass = "";
$CCEStudents->FirstName->CellAttrs = array(); $CCEStudents->FirstName->ViewAttrs = array(); $CCEStudents->FirstName->EditAttrs = array();
// Surname
$CCEStudents->Surname->CellCssStyle = ""; $CCEStudents->Surname->CellCssClass = "";
$CCEStudents->Surname->CellAttrs = array(); $CCEStudents->Surname->ViewAttrs = array(); $CCEStudents->Surname->EditAttrs = array();
// Organisation
$CCEStudents->Organisation->CellCssStyle = ""; $CCEStudents->Organisation->CellCssClass = "";
$CCEStudents->Organisation->CellAttrs = array(); $CCEStudents->Organisation->ViewAttrs = array(); $CCEStudents->Organisation->EditAttrs = array();
// StudentNumber
$CCEStudents->StudentNumber->CellCssStyle = ""; $CCEStudents->StudentNumber->CellCssClass = "";
$CCEStudents->StudentNumber->CellAttrs = array(); $CCEStudents->StudentNumber->ViewAttrs = array(); $CCEStudents->StudentNumber->EditAttrs = array();
// OtherStatutoryBodyCategory
$CCEStudents->OtherStatutoryBodyCategory->CellCssStyle = ""; $CCEStudents->OtherStatutoryBodyCategory->CellCssClass = "";
$CCEStudents->OtherStatutoryBodyCategory->CellAttrs = array(); $CCEStudents->OtherStatutoryBodyCategory->ViewAttrs = array(); $CCEStudents->OtherStatutoryBodyCategory->EditAttrs = array();
// Age
$CCEStudents->Age->CellCssStyle = ""; $CCEStudents->Age->CellCssClass = "";
$CCEStudents->Age->CellAttrs = array(); $CCEStudents->Age->ViewAttrs = array(); $CCEStudents->Age->EditAttrs = array();
// Cellphone
$CCEStudents->Cellphone->CellCssStyle = ""; $CCEStudents->Cellphone->CellCssClass = "";
$CCEStudents->Cellphone->CellAttrs = array(); $CCEStudents->Cellphone->ViewAttrs = array(); $CCEStudents->Cellphone->EditAttrs = array();
// EmailAddress
$CCEStudents->EmailAddress->CellCssStyle = ""; $CCEStudents->EmailAddress->CellCssClass = "";
$CCEStudents->EmailAddress->CellAttrs = array(); $CCEStudents->EmailAddress->ViewAttrs = array(); $CCEStudents->EmailAddress->EditAttrs = array();
// BlockAccess
$CCEStudents->BlockAccess->CellCssStyle = ""; $CCEStudents->BlockAccess->CellCssClass = "";
$CCEStudents->BlockAccess->CellAttrs = array(); $CCEStudents->BlockAccess->ViewAttrs = array(); $CCEStudents->BlockAccess->EditAttrs = array();
if ($CCEStudents->RowType == EW_ROWTYPE_VIEW) { // View row
// CCEStudentID
$CCEStudents->CCEStudentID->ViewValue = $CCEStudents->CCEStudentID->CurrentValue;
$CCEStudents->CCEStudentID->CssStyle = "";
$CCEStudents->CCEStudentID->CssClass = "";
$CCEStudents->CCEStudentID->ViewCustomAttributes = "";
// KnownAs
$CCEStudents->KnownAs->ViewValue = $CCEStudents->KnownAs->CurrentValue;
$CCEStudents->KnownAs->CssStyle = "";
$CCEStudents->KnownAs->CssClass = "";
$CCEStudents->KnownAs->ViewCustomAttributes = "";
// FirstName
$CCEStudents->FirstName->ViewValue = $CCEStudents->FirstName->CurrentValue;
$CCEStudents->FirstName->CssStyle = "";
$CCEStudents->FirstName->CssClass = "";
$CCEStudents->FirstName->ViewCustomAttributes = "";
// Surname
$CCEStudents->Surname->ViewValue = $CCEStudents->Surname->CurrentValue;
$CCEStudents->Surname->CssStyle = "";
$CCEStudents->Surname->CssClass = "";
$CCEStudents->Surname->ViewCustomAttributes = "";
// Organisation
$CCEStudents->Organisation->ViewValue = $CCEStudents->Organisation->CurrentValue;
$CCEStudents->Organisation->CssStyle = "";
$CCEStudents->Organisation->CssClass = "";
$CCEStudents->Organisation->ViewCustomAttributes = "";
// OrganisationType
$CCEStudents->OrganisationType->ViewValue = $CCEStudents->OrganisationType->CurrentValue;
$CCEStudents->OrganisationType->CssStyle = "";
$CCEStudents->OrganisationType->CssClass = "";
$CCEStudents->OrganisationType->ViewCustomAttributes = "";
// Designation
$CCEStudents->Designation->ViewValue = $CCEStudents->Designation->CurrentValue;
$CCEStudents->Designation->CssStyle = "";
$CCEStudents->Designation->CssClass = "";
$CCEStudents->Designation->ViewCustomAttributes = "";
// Department
$CCEStudents->Department->ViewValue = $CCEStudents->Department->CurrentValue;
$CCEStudents->Department->CssStyle = "";
$CCEStudents->Department->CssClass = "";
$CCEStudents->Department->ViewCustomAttributes = "";
// StudentNumber
$CCEStudents->StudentNumber->ViewValue = $CCEStudents->StudentNumber->CurrentValue;
$CCEStudents->StudentNumber->CssStyle = "";
$CCEStudents->StudentNumber->CssClass = "";
$CCEStudents->StudentNumber->ViewCustomAttributes = "";
// CCEFacilitatorID
$CCEStudents->CCEFacilitatorID->ViewValue = $CCEStudents->CCEFacilitatorID->CurrentValue;
if (strval($CCEStudents->CCEFacilitatorID->CurrentValue) <> "") {
$sFilterWrk = "`FacilitatorID` = " . ew_AdjustSql($CCEStudents->CCEFacilitatorID->CurrentValue) . "";
$sSqlWrk = "SELECT `FacilitatorName` FROM `CCEFacilitators`";
$sWhereWrk = "";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `FacilitatorName` Asc";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$CCEStudents->CCEFacilitatorID->ViewValue = $rswrk->fields('FacilitatorName');
$rswrk->Close();
} else {
$CCEStudents->CCEFacilitatorID->ViewValue = $CCEStudents->CCEFacilitatorID->CurrentValue;
}
} else {
$CCEStudents->CCEFacilitatorID->ViewValue = NULL;
}
$CCEStudents->CCEFacilitatorID->CssStyle = "";
$CCEStudents->CCEFacilitatorID->CssClass = "";
$CCEStudents->CCEFacilitatorID->ViewCustomAttributes = "";
// Project
$CCEStudents->Project->ViewValue = $CCEStudents->Project->CurrentValue;
if (strval($CCEStudents->Project->CurrentValue) <> "") {
$sFilterWrk = "`CCEProjectID` = " . ew_AdjustSql($CCEStudents->Project->CurrentValue) . "";
$sSqlWrk = "SELECT `Project` FROM `CCEProjects`";
$sWhereWrk = "";
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
$CCEStudents->Project->ViewValue = $rswrk->fields('Project');
$rswrk->Close();
} else {
$CCEStudents->Project->ViewValue = $CCEStudents->Project->CurrentValue;
}
} else {
$CCEStudents->Project->ViewValue = NULL;
}
$CCEStudents->Project->CssStyle = "";
$CCEStudents->Project->CssClass = "";
$CCEStudents->Project->ViewCustomAttributes = "";
// ProjectDiscipline
$CCEStudents->ProjectDiscipline->ViewValue = $CCEStudents->ProjectDiscipline->CurrentValue;
$CCEStudents->ProjectDiscipline->CssStyle = "";
$CCEStudents->ProjectDiscipline->CssClass = "";
$CCEStudents->ProjectDiscipline->ViewCustomAttributes = "";
// ProjectCode
$CCEStudents->ProjectCode->ViewValue = $CCEStudents->ProjectCode->CurrentValue;
$CCEStudents->ProjectCode->CssStyle = "";
$CCEStudents->ProjectCode->CssClass = "";
$CCEStudents->ProjectCode->ViewCustomAttributes = "";
// IDNumber
$CCEStudents->IDNumber->ViewValue = $CCEStudents->IDNumber->CurrentValue;
$CCEStudents->IDNumber->CssStyle = "";
$CCEStudents->IDNumber->CssClass = "";
$CCEStudents->IDNumber->ViewCustomAttributes = "";
// ECSARegistered
if (strval($CCEStudents->ECSARegistered->CurrentValue) <> "") {
switch ($CCEStudents->ECSARegistered->CurrentValue) {
case "n":
$CCEStudents->ECSARegistered->ViewValue = "No";
break;
case "y":
$CCEStudents->ECSARegistered->ViewValue = "Yes";
break;
default:
$CCEStudents->ECSARegistered->ViewValue = $CCEStudents->ECSARegistered->CurrentValue;
}
} else {
$CCEStudents->ECSARegistered->ViewValue = NULL;
}
$CCEStudents->ECSARegistered->CssStyle = "";
$CCEStudents->ECSARegistered->CssClass = "";
$CCEStudents->ECSARegistered->ViewCustomAttributes = "";
// ECSACategory
if (strval($CCEStudents->ECSACategory->CurrentValue) <> "") {
$sFilterWrk = "`PicklistValue` = '" . ew_AdjustSql($CCEStudents->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
$CCEStudents->ECSACategory->ViewValue = $rswrk->fields('PicklistLabel');
$rswrk->Close();
} else {
$CCEStudents->ECSACategory->ViewValue = $CCEStudents->ECSACategory->CurrentValue;
}
} else {
$CCEStudents->ECSACategory->ViewValue = NULL;
}
$CCEStudents->ECSACategory->CssStyle = "";
$CCEStudents->ECSACategory->CssClass = "";
$CCEStudents->ECSACategory->ViewCustomAttributes = "";
// ECSANumber
$CCEStudents->ECSANumber->ViewValue = $CCEStudents->ECSANumber->CurrentValue;
$CCEStudents->ECSANumber->CssStyle = "";
$CCEStudents->ECSANumber->CssClass = "";
$CCEStudents->ECSANumber->ViewCustomAttributes = "";
// OtherStatutoryBodyRegistered
if (strval($CCEStudents->OtherStatutoryBodyRegistered->CurrentValue) <> "") {
switch ($CCEStudents->OtherStatutoryBodyRegistered->CurrentValue) {
case "1":
$CCEStudents->OtherStatutoryBodyRegistered->ViewValue = "Yes";
break;
case "0":
$CCEStudents->OtherStatutoryBodyRegistered->ViewValue = "No";
break;
default:
$CCEStudents->OtherStatutoryBodyRegistered->ViewValue = $CCEStudents->OtherStatutoryBodyRegistered->CurrentValue;
}
} else {
$CCEStudents->OtherStatutoryBodyRegistered->ViewValue = NULL;
}
$CCEStudents->OtherStatutoryBodyRegistered->CssStyle = "";
$CCEStudents->OtherStatutoryBodyRegistered->CssClass = "";
$CCEStudents->OtherStatutoryBodyRegistered->ViewCustomAttributes = "";
// OtherStatutoryBodyName
$CCEStudents->OtherStatutoryBodyName->ViewValue = $CCEStudents->OtherStatutoryBodyName->CurrentValue;
$CCEStudents->OtherStatutoryBodyName->CssStyle = "";
$CCEStudents->OtherStatutoryBodyName->CssClass = "";
$CCEStudents->OtherStatutoryBodyName->ViewCustomAttributes = "";
// OtherStatutoryBodyNumber
$CCEStudents->OtherStatutoryBodyNumber->ViewValue = $CCEStudents->OtherStatutoryBodyNumber->CurrentValue;
$CCEStudents->OtherStatutoryBodyNumber->CssStyle = "";
$CCEStudents->OtherStatutoryBodyNumber->CssClass = "";
$CCEStudents->OtherStatutoryBodyNumber->ViewCustomAttributes = "";
// OtherStatutoryBodyCategory
$CCEStudents->OtherStatutoryBodyCategory->ViewValue = $CCEStudents->OtherStatutoryBodyCategory->CurrentValue;
$CCEStudents->OtherStatutoryBodyCategory->CssStyle = "";
$CCEStudents->OtherStatutoryBodyCategory->CssClass = "";
$CCEStudents->OtherStatutoryBodyCategory->ViewCustomAttributes = "";
// CESAMemberFirm
if (strval($CCEStudents->CESAMemberFirm->CurrentValue) <> "") {
switch ($CCEStudents->CESAMemberFirm->CurrentValue) {
case "n":
$CCEStudents->CESAMemberFirm->ViewValue = "No";
break;
case "y":
$CCEStudents->CESAMemberFirm->ViewValue = "Yes";
break;
default:
$CCEStudents->CESAMemberFirm->ViewValue = $CCEStudents->CESAMemberFirm->CurrentValue;
}
} else {
$CCEStudents->CESAMemberFirm->ViewValue = NULL;
}
$CCEStudents->CESAMemberFirm->CssStyle = "";
$CCEStudents->CESAMemberFirm->CssClass = "";
$CCEStudents->CESAMemberFirm->ViewCustomAttributes = "";
// Age
$CCEStudents->Age->ViewValue = $CCEStudents->Age->CurrentValue;
$CCEStudents->Age->CssStyle = "";
$CCEStudents->Age->CssClass = "";
$CCEStudents->Age->ViewCustomAttributes = "";
// HighestQual
$CCEStudents->HighestQual->ViewValue = $CCEStudents->HighestQual->CurrentValue;
$CCEStudents->HighestQual->CssStyle = "";
$CCEStudents->HighestQual->CssClass = "";
$CCEStudents->HighestQual->ViewCustomAttributes = "";
// AreaDiscipline
$CCEStudents->AreaDiscipline->ViewValue = $CCEStudents->AreaDiscipline->CurrentValue;
$CCEStudents->AreaDiscipline->CssStyle = "";
$CCEStudents->AreaDiscipline->CssClass = "";
$CCEStudents->AreaDiscipline->ViewCustomAttributes = "";
// Telephone
$CCEStudents->Telephone->ViewValue = $CCEStudents->Telephone->CurrentValue;
$CCEStudents->Telephone->CssStyle = "";
$CCEStudents->Telephone->CssClass = "";
$CCEStudents->Telephone->ViewCustomAttributes = "";
// Cellphone
$CCEStudents->Cellphone->ViewValue = $CCEStudents->Cellphone->CurrentValue;
$CCEStudents->Cellphone->CssStyle = "";
$CCEStudents->Cellphone->CssClass = "";
$CCEStudents->Cellphone->ViewCustomAttributes = "";
// EmailAddress
$CCEStudents->EmailAddress->ViewValue = $CCEStudents->EmailAddress->CurrentValue;
$CCEStudents->EmailAddress->CssStyle = "";
$CCEStudents->EmailAddress->CssClass = "";
$CCEStudents->EmailAddress->ViewCustomAttributes = "";
// EmailAddress2
$CCEStudents->EmailAddress2->ViewValue = $CCEStudents->EmailAddress2->CurrentValue;
$CCEStudents->EmailAddress2->CssStyle = "";
$CCEStudents->EmailAddress2->CssClass = "";
$CCEStudents->EmailAddress2->ViewCustomAttributes = "";
// CESAAccountNo
$CCEStudents->CESAAccountNo->ViewValue = $CCEStudents->CESAAccountNo->CurrentValue;
$CCEStudents->CESAAccountNo->CssStyle = "";
$CCEStudents->CESAAccountNo->CssClass = "";
$CCEStudents->CESAAccountNo->ViewCustomAttributes = "";
// VATNo
$CCEStudents->VATNo->ViewValue = $CCEStudents->VATNo->CurrentValue;
$CCEStudents->VATNo->CssStyle = "";
$CCEStudents->VATNo->CssClass = "";
$CCEStudents->VATNo->ViewCustomAttributes = "";
// DietaryRequirements
$CCEStudents->DietaryRequirements->ViewValue = $CCEStudents->DietaryRequirements->CurrentValue;
$CCEStudents->DietaryRequirements->CssStyle = "";
$CCEStudents->DietaryRequirements->CssClass = "";
$CCEStudents->DietaryRequirements->ViewCustomAttributes = "";
// OrderNo
$CCEStudents->OrderNo->ViewValue = $CCEStudents->OrderNo->CurrentValue;
$CCEStudents->OrderNo->CssStyle = "";
$CCEStudents->OrderNo->CssClass = "";
$CCEStudents->OrderNo->ViewCustomAttributes = "";
// BookedByName
$CCEStudents->BookedByName->ViewValue = $CCEStudents->BookedByName->CurrentValue;
$CCEStudents->BookedByName->CssStyle = "";
$CCEStudents->BookedByName->CssClass = "";
$CCEStudents->BookedByName->ViewCustomAttributes = "";
// BookedByDesignation
$CCEStudents->BookedByDesignation->ViewValue = $CCEStudents->BookedByDesignation->CurrentValue;
$CCEStudents->BookedByDesignation->CssStyle = "";
$CCEStudents->BookedByDesignation->CssClass = "";
$CCEStudents->BookedByDesignation->ViewCustomAttributes = "";
// BookedByTelNo
$CCEStudents->BookedByTelNo->ViewValue = $CCEStudents->BookedByTelNo->CurrentValue;
$CCEStudents->BookedByTelNo->CssStyle = "";
$CCEStudents->BookedByTelNo->CssClass = "";
$CCEStudents->BookedByTelNo->ViewCustomAttributes = "";
// BookedByFaxNo
$CCEStudents->BookedByFaxNo->ViewValue = $CCEStudents->BookedByFaxNo->CurrentValue;
$CCEStudents->BookedByFaxNo->CssStyle = "";
$CCEStudents->BookedByFaxNo->CssClass = "";
$CCEStudents->BookedByFaxNo->ViewCustomAttributes = "";
// BookedByCellNo
$CCEStudents->BookedByCellNo->ViewValue = $CCEStudents->BookedByCellNo->CurrentValue;
$CCEStudents->BookedByCellNo->CssStyle = "";
$CCEStudents->BookedByCellNo->CssClass = "";
$CCEStudents->BookedByCellNo->ViewCustomAttributes = "";
// BookedByEmail
$CCEStudents->BookedByEmail->ViewValue = $CCEStudents->BookedByEmail->CurrentValue;
$CCEStudents->BookedByEmail->CssStyle = "";
$CCEStudents->BookedByEmail->CssClass = "";
$CCEStudents->BookedByEmail->ViewCustomAttributes = "";
// WebUsername
$CCEStudents->WebUsername->ViewValue = $CCEStudents->WebUsername->CurrentValue;
$CCEStudents->WebUsername->CssStyle = "";
$CCEStudents->WebUsername->CssClass = "";
$CCEStudents->WebUsername->ViewCustomAttributes = "";
// WebPassword
$CCEStudents->WebPassword->ViewValue = $CCEStudents->WebPassword->CurrentValue;
$CCEStudents->WebPassword->CssStyle = "";
$CCEStudents->WebPassword->CssClass = "";
$CCEStudents->WebPassword->ViewCustomAttributes = "";
// MentorFirstName
$CCEStudents->MentorFirstName->ViewValue = $CCEStudents->MentorFirstName->CurrentValue;
$CCEStudents->MentorFirstName->CssStyle = "";
$CCEStudents->MentorFirstName->CssClass = "";
$CCEStudents->MentorFirstName->ViewCustomAttributes = "";
// MentorSurname
$CCEStudents->MentorSurname->ViewValue = $CCEStudents->MentorSurname->CurrentValue;
$CCEStudents->MentorSurname->CssStyle = "";
$CCEStudents->MentorSurname->CssClass = "";
$CCEStudents->MentorSurname->ViewCustomAttributes = "";
// MentorCompany
$CCEStudents->MentorCompany->ViewValue = $CCEStudents->MentorCompany->CurrentValue;
$CCEStudents->MentorCompany->CssStyle = "";
$CCEStudents->MentorCompany->CssClass = "";
$CCEStudents->MentorCompany->ViewCustomAttributes = "";
// MentorDesig
$CCEStudents->MentorDesig->ViewValue = $CCEStudents->MentorDesig->CurrentValue;
$CCEStudents->MentorDesig->CssStyle = "";
$CCEStudents->MentorDesig->CssClass = "";
$CCEStudents->MentorDesig->ViewCustomAttributes = "";
// MentorTel
$CCEStudents->MentorTel->ViewValue = $CCEStudents->MentorTel->CurrentValue;
$CCEStudents->MentorTel->CssStyle = "";
$CCEStudents->MentorTel->CssClass = "";
$CCEStudents->MentorTel->ViewCustomAttributes = "";
// MentorCell
$CCEStudents->MentorCell->ViewValue = $CCEStudents->MentorCell->CurrentValue;
$CCEStudents->MentorCell->CssStyle = "";
$CCEStudents->MentorCell->CssClass = "";
$CCEStudents->MentorCell->ViewCustomAttributes = "";
// MentorEmail
$CCEStudents->MentorEmail->ViewValue = $CCEStudents->MentorEmail->CurrentValue;
$CCEStudents->MentorEmail->CssStyle = "";
$CCEStudents->MentorEmail->CssClass = "";
$CCEStudents->MentorEmail->ViewCustomAttributes = "";
// HRManagerName
$CCEStudents->HRManagerName->ViewValue = $CCEStudents->HRManagerName->CurrentValue;
$CCEStudents->HRManagerName->CssStyle = "";
$CCEStudents->HRManagerName->CssClass = "";
$CCEStudents->HRManagerName->ViewCustomAttributes = "";
// HRManagerDesignation
$CCEStudents->HRManagerDesignation->ViewValue = $CCEStudents->HRManagerDesignation->CurrentValue;
$CCEStudents->HRManagerDesignation->CssStyle = "";
$CCEStudents->HRManagerDesignation->CssClass = "";
$CCEStudents->HRManagerDesignation->ViewCustomAttributes = "";
// HRManagerTelNo
$CCEStudents->HRManagerTelNo->ViewValue = $CCEStudents->HRManagerTelNo->CurrentValue;
$CCEStudents->HRManagerTelNo->CssStyle = "";
$CCEStudents->HRManagerTelNo->CssClass = "";
$CCEStudents->HRManagerTelNo->ViewCustomAttributes = "";
// HRManagerCellNo
$CCEStudents->HRManagerCellNo->ViewValue = $CCEStudents->HRManagerCellNo->CurrentValue;
$CCEStudents->HRManagerCellNo->CssStyle = "";
$CCEStudents->HRManagerCellNo->CssClass = "";
$CCEStudents->HRManagerCellNo->ViewCustomAttributes = "";
// HRManagerEmail
$CCEStudents->HRManagerEmail->ViewValue = $CCEStudents->HRManagerEmail->CurrentValue;
$CCEStudents->HRManagerEmail->CssStyle = "";
$CCEStudents->HRManagerEmail->CssClass = "";
$CCEStudents->HRManagerEmail->ViewCustomAttributes = "";
// LengthEmploy
$CCEStudents->LengthEmploy->ViewValue = $CCEStudents->LengthEmploy->CurrentValue;
$CCEStudents->LengthEmploy->CssStyle = "";
$CCEStudents->LengthEmploy->CssClass = "";
$CCEStudents->LengthEmploy->ViewCustomAttributes = "";
// ResponsiblePayment
$CCEStudents->ResponsiblePayment->ViewValue = $CCEStudents->ResponsiblePayment->CurrentValue;
$CCEStudents->ResponsiblePayment->CssStyle = "";
$CCEStudents->ResponsiblePayment->CssClass = "";
$CCEStudents->ResponsiblePayment->ViewCustomAttributes = "";
// BlockAccess
if (strval($CCEStudents->BlockAccess->CurrentValue) <> "") {
switch ($CCEStudents->BlockAccess->CurrentValue) {
case "y":
$CCEStudents->BlockAccess->ViewValue = "Yes";
break;
case "n":
$CCEStudents->BlockAccess->ViewValue = "No";
break;
default:
$CCEStudents->BlockAccess->ViewValue = $CCEStudents->BlockAccess->CurrentValue;
}
} else {
$CCEStudents->BlockAccess->ViewValue = NULL;
}
$CCEStudents->BlockAccess->CssStyle = "";
$CCEStudents->BlockAccess->CssClass = "";
$CCEStudents->BlockAccess->ViewCustomAttributes = "";
// Accepted
if (strval($CCEStudents->Accepted->CurrentValue) <> "") {
switch ($CCEStudents->Accepted->CurrentValue) {
case "1":
$CCEStudents->Accepted->ViewValue = "Yes";
break;
case "0":
$CCEStudents->Accepted->ViewValue = "No";
break;
default:
$CCEStudents->Accepted->ViewValue = $CCEStudents->Accepted->CurrentValue;
}
} else {
$CCEStudents->Accepted->ViewValue = NULL;
}
$CCEStudents->Accepted->CssStyle = "";
$CCEStudents->Accepted->CssClass = "";
$CCEStudents->Accepted->ViewCustomAttributes = "";
// Archived
if (strval($CCEStudents->Archived->CurrentValue) <> "") {
switch ($CCEStudents->Archived->CurrentValue) {
case "1":
$CCEStudents->Archived->ViewValue = "Yes";
break;
case "0":
$CCEStudents->Archived->ViewValue = "No";
break;
default:
$CCEStudents->Archived->ViewValue = $CCEStudents->Archived->CurrentValue;
}
} else {
$CCEStudents->Archived->ViewValue = NULL;
}
$CCEStudents->Archived->CssStyle = "";
$CCEStudents->Archived->CssClass = "";
$CCEStudents->Archived->ViewCustomAttributes = "";
// Achieved
if (strval($CCEStudents->Achieved->CurrentValue) <> "") {
switch ($CCEStudents->Achieved->CurrentValue) {
case "1":
$CCEStudents->Achieved->ViewValue = "Yes";
break;
case "0":
$CCEStudents->Achieved->ViewValue = "No";
break;
default:
$CCEStudents->Achieved->ViewValue = $CCEStudents->Achieved->CurrentValue;
}
} else {
$CCEStudents->Achieved->ViewValue = NULL;
}
$CCEStudents->Achieved->CssStyle = "";
$CCEStudents->Achieved->CssClass = "";
$CCEStudents->Achieved->ViewCustomAttributes = "";
// ResultStatus
if (strval($CCEStudents->ResultStatus->CurrentValue) <> "") {
switch ($CCEStudents->ResultStatus->CurrentValue) {
case "":
$CCEStudents->ResultStatus->ViewValue = "No Result Yet";
break;
case "P":
$CCEStudents->ResultStatus->ViewValue = "Passed";
break;
case "S":
$CCEStudents->ResultStatus->ViewValue = "Pending Supplementary Exams";
break;
default:
$CCEStudents->ResultStatus->ViewValue = $CCEStudents->ResultStatus->CurrentValue;
}
} else {
$CCEStudents->ResultStatus->ViewValue = NULL;
}
$CCEStudents->ResultStatus->CssStyle = "";
$CCEStudents->ResultStatus->CssClass = "";
$CCEStudents->ResultStatus->ViewCustomAttributes = "";
// Cancelled
if (strval($CCEStudents->Cancelled->CurrentValue) <> "") {
switch ($CCEStudents->Cancelled->CurrentValue) {
case "1":
$CCEStudents->Cancelled->ViewValue = "Cancelled";
break;
case "0":
$CCEStudents->Cancelled->ViewValue = "Not Cancelled";
break;
default:
$CCEStudents->Cancelled->ViewValue = $CCEStudents->Cancelled->CurrentValue;
}
} else {
$CCEStudents->Cancelled->ViewValue = NULL;
}
$CCEStudents->Cancelled->CssStyle = "";
$CCEStudents->Cancelled->CssClass = "";
$CCEStudents->Cancelled->ViewCustomAttributes = "";
// CancelledReason
$CCEStudents->CancelledReason->ViewValue = $CCEStudents->CancelledReason->CurrentValue;
$CCEStudents->CancelledReason->CssStyle = "";
$CCEStudents->CancelledReason->CssClass = "";
$CCEStudents->CancelledReason->ViewCustomAttributes = "";
// CVFile
if (!ew_Empty($CCEStudents->CVFile->Upload->DbValue)) {
$CCEStudents->CVFile->ViewValue = $CCEStudents->CVFile->Upload->DbValue;
} else {
$CCEStudents->CVFile->ViewValue = "";
}
$CCEStudents->CVFile->CssStyle = "";
$CCEStudents->CVFile->CssClass = "";
$CCEStudents->CVFile->ViewCustomAttributes = "";
// Title
$CCEStudents->Title->ViewValue = $CCEStudents->Title->CurrentValue;
$CCEStudents->Title->CssStyle = "";
$CCEStudents->Title->CssClass = "";
$CCEStudents->Title->ViewCustomAttributes = "";
// QualCertificate1
$CCEStudents->QualCertificate1->ViewValue = $CCEStudents->QualCertificate1->CurrentValue;
$CCEStudents->QualCertificate1->CssStyle = "";
$CCEStudents->QualCertificate1->CssClass = "";
$CCEStudents->QualCertificate1->ViewCustomAttributes = "";
// QualCertificate2
$CCEStudents->QualCertificate2->ViewValue = $CCEStudents->QualCertificate2->CurrentValue;
$CCEStudents->QualCertificate2->CssStyle = "";
$CCEStudents->QualCertificate2->CssClass = "";
$CCEStudents->QualCertificate2->ViewCustomAttributes = "";
// QualCertificate3
$CCEStudents->QualCertificate3->ViewValue = $CCEStudents->QualCertificate3->CurrentValue;
$CCEStudents->QualCertificate3->CssStyle = "";
$CCEStudents->QualCertificate3->CssClass = "";
$CCEStudents->QualCertificate3->ViewCustomAttributes = "";
// MemorandumFile
$CCEStudents->MemorandumFile->ViewValue = $CCEStudents->MemorandumFile->CurrentValue;
$CCEStudents->MemorandumFile->CssStyle = "";
$CCEStudents->MemorandumFile->CssClass = "";
$CCEStudents->MemorandumFile->ViewCustomAttributes = "";
// AgreementFile
$CCEStudents->AgreementFile->ViewValue = $CCEStudents->AgreementFile->CurrentValue;
$CCEStudents->AgreementFile->CssStyle = "";
$CCEStudents->AgreementFile->CssClass = "";
$CCEStudents->AgreementFile->ViewCustomAttributes = "";
// ResultLetter
$CCEStudents->ResultLetter->ViewValue = $CCEStudents->ResultLetter->CurrentValue;
$CCEStudents->ResultLetter->CssStyle = "";
$CCEStudents->ResultLetter->CssClass = "";
$CCEStudents->ResultLetter->ViewCustomAttributes = "";
// IDFile
$CCEStudents->IDFile->ViewValue = $CCEStudents->IDFile->CurrentValue;
$CCEStudents->IDFile->CssStyle = "";
$CCEStudents->IDFile->CssClass = "";
$CCEStudents->IDFile->ViewCustomAttributes = "";
// PhotoFile
$CCEStudents->PhotoFile->ViewValue = $CCEStudents->PhotoFile->CurrentValue;
$CCEStudents->PhotoFile->CssStyle = "";
$CCEStudents->PhotoFile->CssClass = "";
$CCEStudents->PhotoFile->ViewCustomAttributes = "";
// SABTACOMemberFirm
$CCEStudents->SABTACOMemberFirm->ViewValue = $CCEStudents->SABTACOMemberFirm->CurrentValue;
$CCEStudents->SABTACOMemberFirm->CssStyle = "";
$CCEStudents->SABTACOMemberFirm->CssClass = "";
$CCEStudents->SABTACOMemberFirm->ViewCustomAttributes = "";
// PreferredCourierAddress
$CCEStudents->PreferredCourierAddress->ViewValue = $CCEStudents->PreferredCourierAddress->CurrentValue;
$CCEStudents->PreferredCourierAddress->CssStyle = "";
$CCEStudents->PreferredCourierAddress->CssClass = "";
$CCEStudents->PreferredCourierAddress->ViewCustomAttributes = "";
// MotivationalLetter
$CCEStudents->MotivationalLetter->ViewValue = $CCEStudents->MotivationalLetter->CurrentValue;
$CCEStudents->MotivationalLetter->CssStyle = "";
$CCEStudents->MotivationalLetter->CssClass = "";
$CCEStudents->MotivationalLetter->ViewCustomAttributes = "";
// MentorName
$CCEStudents->MentorName->ViewValue = $CCEStudents->MentorName->CurrentValue;
$CCEStudents->MentorName->CssStyle = "";
$CCEStudents->MentorName->CssClass = "";
$CCEStudents->MentorName->ViewCustomAttributes = "";
// ModulesEnrolled
$CCEStudents->ModulesEnrolled->ViewValue = $CCEStudents->ModulesEnrolled->CurrentValue;
$CCEStudents->ModulesEnrolled->CssStyle = "";
$CCEStudents->ModulesEnrolled->CssClass = "";
$CCEStudents->ModulesEnrolled->ViewCustomAttributes = "";
// Trimester1Report
if (!ew_Empty($CCEStudents->Trimester1Report->Upload->DbValue)) {
$CCEStudents->Trimester1Report->ViewValue = $CCEStudents->Trimester1Report->Upload->DbValue;
} else {
$CCEStudents->Trimester1Report->ViewValue = "";
}
$CCEStudents->Trimester1Report->CssStyle = "";
$CCEStudents->Trimester1Report->CssClass = "";
$CCEStudents->Trimester1Report->ViewCustomAttributes = "";
// Trimester2Report
if (!ew_Empty($CCEStudents->Trimester2Report->Upload->DbValue)) {
$CCEStudents->Trimester2Report->ViewValue = $CCEStudents->Trimester2Report->Upload->DbValue;
} else {
$CCEStudents->Trimester2Report->ViewValue = "";
}
$CCEStudents->Trimester2Report->CssStyle = "";
$CCEStudents->Trimester2Report->CssClass = "";
$CCEStudents->Trimester2Report->ViewCustomAttributes = "";
// Trimester3Report
if (!ew_Empty($CCEStudents->Trimester3Report->Upload->DbValue)) {
$CCEStudents->Trimester3Report->ViewValue = $CCEStudents->Trimester3Report->Upload->DbValue;
} else {
$CCEStudents->Trimester3Report->ViewValue = "";
}
$CCEStudents->Trimester3Report->CssStyle = "";
$CCEStudents->Trimester3Report->CssClass = "";
$CCEStudents->Trimester3Report->ViewCustomAttributes = "";
// ExamResultLetter
if (!ew_Empty($CCEStudents->ExamResultLetter->Upload->DbValue)) {
$CCEStudents->ExamResultLetter->ViewValue = $CCEStudents->ExamResultLetter->Upload->DbValue;
} else {
$CCEStudents->ExamResultLetter->ViewValue = "";
}
$CCEStudents->ExamResultLetter->CssStyle = "";
$CCEStudents->ExamResultLetter->CssClass = "";
$CCEStudents->ExamResultLetter->ViewCustomAttributes = "";
// SupplementalExamLetter
if (!ew_Empty($CCEStudents->SupplementalExamLetter->Upload->DbValue)) {
$CCEStudents->SupplementalExamLetter->ViewValue = $CCEStudents->SupplementalExamLetter->Upload->DbValue;
} else {
$CCEStudents->SupplementalExamLetter->ViewValue = "";
}
$CCEStudents->SupplementalExamLetter->CssStyle = "";
$CCEStudents->SupplementalExamLetter->CssClass = "";
$CCEStudents->SupplementalExamLetter->ViewCustomAttributes = "";
// KnownAs
$CCEStudents->KnownAs->HrefValue = "";
$CCEStudents->KnownAs->TooltipValue = "";
// FirstName
$CCEStudents->FirstName->HrefValue = "";
$CCEStudents->FirstName->TooltipValue = "";
// Surname
$CCEStudents->Surname->HrefValue = "";
$CCEStudents->Surname->TooltipValue = "";
// Organisation
$CCEStudents->Organisation->HrefValue = "";
$CCEStudents->Organisation->TooltipValue = "";
// StudentNumber
$CCEStudents->StudentNumber->HrefValue = "";
$CCEStudents->StudentNumber->TooltipValue = "";
// OtherStatutoryBodyCategory
$CCEStudents->OtherStatutoryBodyCategory->HrefValue = "";
$CCEStudents->OtherStatutoryBodyCategory->TooltipValue = "";
// Age
$CCEStudents->Age->HrefValue = "";
$CCEStudents->Age->TooltipValue = "";
// Cellphone
$CCEStudents->Cellphone->HrefValue = "";
$CCEStudents->Cellphone->TooltipValue = "";
// EmailAddress
$CCEStudents->EmailAddress->HrefValue = "";
$CCEStudents->EmailAddress->TooltipValue = "";
// BlockAccess
$CCEStudents->BlockAccess->HrefValue = "";
$CCEStudents->BlockAccess->TooltipValue = "";
}
// Call Row Rendered event
if ($CCEStudents->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$CCEStudents->Row_Rendered();
}
// Export data in HTML/CSV/Word/Excel/XML/Email format
function ExportData() {
global $CCEStudents;
$utf8 = FALSE;
$bSelectLimit = EW_SELECT_LIMIT;
// Load recordset
if ($bSelectLimit) {
$this->lTotalRecs = $CCEStudents->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset())
$this->lTotalRecs = $rs->RecordCount();
}
$this->lStartRec = 1;
// Export all
if ($CCEStudents->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 ($CCEStudents->Export == "xml") {
$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
$XmlDoc->AddRoot();
} else {
$ExportDoc = new cExportDocument($CCEStudents, "h");
$ExportDoc->ExportHeader();
if ($ExportDoc->Horizontal) { // Horizontal format, write header
$ExportDoc->BeginExportRow();
$ExportDoc->ExportCaption($CCEStudents->CCEStudentID);
$ExportDoc->ExportCaption($CCEStudents->KnownAs);
$ExportDoc->ExportCaption($CCEStudents->FirstName);
$ExportDoc->ExportCaption($CCEStudents->Surname);
$ExportDoc->ExportCaption($CCEStudents->Organisation);
$ExportDoc->ExportCaption($CCEStudents->OrganisationType);
$ExportDoc->ExportCaption($CCEStudents->Designation);
$ExportDoc->ExportCaption($CCEStudents->Department);
$ExportDoc->ExportCaption($CCEStudents->StudentNumber);
$ExportDoc->ExportCaption($CCEStudents->CCEFacilitatorID);
$ExportDoc->ExportCaption($CCEStudents->Project);
$ExportDoc->ExportCaption($CCEStudents->ProjectDiscipline);
$ExportDoc->ExportCaption($CCEStudents->ProjectCode);
$ExportDoc->ExportCaption($CCEStudents->IDNumber);
$ExportDoc->ExportCaption($CCEStudents->ECSARegistered);
$ExportDoc->ExportCaption($CCEStudents->ECSACategory);
$ExportDoc->ExportCaption($CCEStudents->ECSANumber);
$ExportDoc->ExportCaption($CCEStudents->OtherStatutoryBodyRegistered);
$ExportDoc->ExportCaption($CCEStudents->OtherStatutoryBodyName);
$ExportDoc->ExportCaption($CCEStudents->OtherStatutoryBodyNumber);
$ExportDoc->ExportCaption($CCEStudents->OtherStatutoryBodyCategory);
$ExportDoc->ExportCaption($CCEStudents->CESAMemberFirm);
$ExportDoc->ExportCaption($CCEStudents->Age);
$ExportDoc->ExportCaption($CCEStudents->HighestQual);
$ExportDoc->ExportCaption($CCEStudents->AreaDiscipline);
$ExportDoc->ExportCaption($CCEStudents->Telephone);
$ExportDoc->ExportCaption($CCEStudents->Cellphone);
$ExportDoc->ExportCaption($CCEStudents->EmailAddress);
$ExportDoc->ExportCaption($CCEStudents->EmailAddress2);
$ExportDoc->ExportCaption($CCEStudents->CESAAccountNo);
$ExportDoc->ExportCaption($CCEStudents->VATNo);
$ExportDoc->ExportCaption($CCEStudents->DietaryRequirements);
$ExportDoc->ExportCaption($CCEStudents->OrderNo);
$ExportDoc->ExportCaption($CCEStudents->BookedByName);
$ExportDoc->ExportCaption($CCEStudents->BookedByDesignation);
$ExportDoc->ExportCaption($CCEStudents->BookedByTelNo);
$ExportDoc->ExportCaption($CCEStudents->BookedByFaxNo);
$ExportDoc->ExportCaption($CCEStudents->BookedByCellNo);
$ExportDoc->ExportCaption($CCEStudents->BookedByEmail);
$ExportDoc->ExportCaption($CCEStudents->WebUsername);
$ExportDoc->ExportCaption($CCEStudents->WebPassword);
$ExportDoc->ExportCaption($CCEStudents->MentorFirstName);
$ExportDoc->ExportCaption($CCEStudents->MentorSurname);
$ExportDoc->ExportCaption($CCEStudents->MentorCompany);
$ExportDoc->ExportCaption($CCEStudents->MentorDesig);
$ExportDoc->ExportCaption($CCEStudents->MentorTel);
$ExportDoc->ExportCaption($CCEStudents->MentorCell);
$ExportDoc->ExportCaption($CCEStudents->MentorEmail);
$ExportDoc->ExportCaption($CCEStudents->HRManagerName);
$ExportDoc->ExportCaption($CCEStudents->HRManagerDesignation);
$ExportDoc->ExportCaption($CCEStudents->HRManagerTelNo);
$ExportDoc->ExportCaption($CCEStudents->HRManagerCellNo);
$ExportDoc->ExportCaption($CCEStudents->HRManagerEmail);
$ExportDoc->ExportCaption($CCEStudents->LengthEmploy);
$ExportDoc->ExportCaption($CCEStudents->ResponsiblePayment);
$ExportDoc->ExportCaption($CCEStudents->BlockAccess);
$ExportDoc->ExportCaption($CCEStudents->Accepted);
$ExportDoc->ExportCaption($CCEStudents->Archived);
$ExportDoc->ExportCaption($CCEStudents->Achieved);
$ExportDoc->ExportCaption($CCEStudents->ResultStatus);
$ExportDoc->ExportCaption($CCEStudents->Cancelled);
$ExportDoc->ExportCaption($CCEStudents->CancelledReason);
$ExportDoc->ExportCaption($CCEStudents->CVFile);
$ExportDoc->ExportCaption($CCEStudents->Title);
$ExportDoc->ExportCaption($CCEStudents->QualCertificate1);
$ExportDoc->ExportCaption($CCEStudents->QualCertificate2);
$ExportDoc->ExportCaption($CCEStudents->QualCertificate3);
$ExportDoc->ExportCaption($CCEStudents->MemorandumFile);
$ExportDoc->ExportCaption($CCEStudents->AgreementFile);
$ExportDoc->ExportCaption($CCEStudents->ResultLetter);
$ExportDoc->ExportCaption($CCEStudents->IDFile);
$ExportDoc->ExportCaption($CCEStudents->PhotoFile);
$ExportDoc->ExportCaption($CCEStudents->SABTACOMemberFirm);
$ExportDoc->ExportCaption($CCEStudents->PreferredCourierAddress);
$ExportDoc->ExportCaption($CCEStudents->MotivationalLetter);
$ExportDoc->ExportCaption($CCEStudents->MentorName);
$ExportDoc->ExportCaption($CCEStudents->ModulesEnrolled);
$ExportDoc->ExportCaption($CCEStudents->Trimester1Report);
$ExportDoc->ExportCaption($CCEStudents->Trimester2Report);
$ExportDoc->ExportCaption($CCEStudents->Trimester3Report);
$ExportDoc->ExportCaption($CCEStudents->ExamResultLetter);
$ExportDoc->ExportCaption($CCEStudents->SupplementalExamLetter);
$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
$CCEStudents->CssClass = "";
$CCEStudents->CssStyle = "";
$CCEStudents->RowType = EW_ROWTYPE_VIEW; // Render view
$this->RenderRow();
if ($CCEStudents->Export == "xml") {
$XmlDoc->AddRow();
$XmlDoc->AddField('CCEStudentID', $CCEStudents->CCEStudentID->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('KnownAs', $CCEStudents->KnownAs->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('FirstName', $CCEStudents->FirstName->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Surname', $CCEStudents->Surname->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Organisation', $CCEStudents->Organisation->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('OrganisationType', $CCEStudents->OrganisationType->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Designation', $CCEStudents->Designation->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Department', $CCEStudents->Department->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('StudentNumber', $CCEStudents->StudentNumber->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('CCEFacilitatorID', $CCEStudents->CCEFacilitatorID->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Project', $CCEStudents->Project->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ProjectDiscipline', $CCEStudents->ProjectDiscipline->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ProjectCode', $CCEStudents->ProjectCode->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('IDNumber', $CCEStudents->IDNumber->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ECSARegistered', $CCEStudents->ECSARegistered->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ECSACategory', $CCEStudents->ECSACategory->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ECSANumber', $CCEStudents->ECSANumber->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyRegistered', $CCEStudents->OtherStatutoryBodyRegistered->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyName', $CCEStudents->OtherStatutoryBodyName->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyNumber', $CCEStudents->OtherStatutoryBodyNumber->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('OtherStatutoryBodyCategory', $CCEStudents->OtherStatutoryBodyCategory->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('CESAMemberFirm', $CCEStudents->CESAMemberFirm->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Age', $CCEStudents->Age->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('HighestQual', $CCEStudents->HighestQual->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('AreaDiscipline', $CCEStudents->AreaDiscipline->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Telephone', $CCEStudents->Telephone->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Cellphone', $CCEStudents->Cellphone->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('EmailAddress', $CCEStudents->EmailAddress->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('EmailAddress2', $CCEStudents->EmailAddress2->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('CESAAccountNo', $CCEStudents->CESAAccountNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('VATNo', $CCEStudents->VATNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('DietaryRequirements', $CCEStudents->DietaryRequirements->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('OrderNo', $CCEStudents->OrderNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByName', $CCEStudents->BookedByName->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByDesignation', $CCEStudents->BookedByDesignation->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByTelNo', $CCEStudents->BookedByTelNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByFaxNo', $CCEStudents->BookedByFaxNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByCellNo', $CCEStudents->BookedByCellNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByEmail', $CCEStudents->BookedByEmail->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('WebUsername', $CCEStudents->WebUsername->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('WebPassword', $CCEStudents->WebPassword->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorFirstName', $CCEStudents->MentorFirstName->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorSurname', $CCEStudents->MentorSurname->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorCompany', $CCEStudents->MentorCompany->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorDesig', $CCEStudents->MentorDesig->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorTel', $CCEStudents->MentorTel->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorCell', $CCEStudents->MentorCell->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorEmail', $CCEStudents->MentorEmail->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerName', $CCEStudents->HRManagerName->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerDesignation', $CCEStudents->HRManagerDesignation->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerTelNo', $CCEStudents->HRManagerTelNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerCellNo', $CCEStudents->HRManagerCellNo->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerEmail', $CCEStudents->HRManagerEmail->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('LengthEmploy', $CCEStudents->LengthEmploy->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ResponsiblePayment', $CCEStudents->ResponsiblePayment->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('BlockAccess', $CCEStudents->BlockAccess->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Accepted', $CCEStudents->Accepted->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Archived', $CCEStudents->Archived->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Achieved', $CCEStudents->Achieved->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ResultStatus', $CCEStudents->ResultStatus->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Cancelled', $CCEStudents->Cancelled->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('CancelledReason', $CCEStudents->CancelledReason->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('CVFile', $CCEStudents->CVFile->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Title', $CCEStudents->Title->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate1', $CCEStudents->QualCertificate1->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate2', $CCEStudents->QualCertificate2->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate3', $CCEStudents->QualCertificate3->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MemorandumFile', $CCEStudents->MemorandumFile->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('AgreementFile', $CCEStudents->AgreementFile->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ResultLetter', $CCEStudents->ResultLetter->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('IDFile', $CCEStudents->IDFile->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('PhotoFile', $CCEStudents->PhotoFile->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('SABTACOMemberFirm', $CCEStudents->SABTACOMemberFirm->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('PreferredCourierAddress', $CCEStudents->PreferredCourierAddress->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MotivationalLetter', $CCEStudents->MotivationalLetter->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorName', $CCEStudents->MentorName->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ModulesEnrolled', $CCEStudents->ModulesEnrolled->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Trimester1Report', $CCEStudents->Trimester1Report->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Trimester2Report', $CCEStudents->Trimester2Report->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('Trimester3Report', $CCEStudents->Trimester3Report->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('ExamResultLetter', $CCEStudents->ExamResultLetter->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
$XmlDoc->AddField('SupplementalExamLetter', $CCEStudents->SupplementalExamLetter->ExportValue($CCEStudents->Export, $CCEStudents->ExportOriginalValue));
} else {
$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
$ExportDoc->ExportField($CCEStudents->CCEStudentID);
$ExportDoc->ExportField($CCEStudents->KnownAs);
$ExportDoc->ExportField($CCEStudents->FirstName);
$ExportDoc->ExportField($CCEStudents->Surname);
$ExportDoc->ExportField($CCEStudents->Organisation);
$ExportDoc->ExportField($CCEStudents->OrganisationType);
$ExportDoc->ExportField($CCEStudents->Designation);
$ExportDoc->ExportField($CCEStudents->Department);
$ExportDoc->ExportField($CCEStudents->StudentNumber);
$ExportDoc->ExportField($CCEStudents->CCEFacilitatorID);
$ExportDoc->ExportField($CCEStudents->Project);
$ExportDoc->ExportField($CCEStudents->ProjectDiscipline);
$ExportDoc->ExportField($CCEStudents->ProjectCode);
$ExportDoc->ExportField($CCEStudents->IDNumber);
$ExportDoc->ExportField($CCEStudents->ECSARegistered);
$ExportDoc->ExportField($CCEStudents->ECSACategory);
$ExportDoc->ExportField($CCEStudents->ECSANumber);
$ExportDoc->ExportField($CCEStudents->OtherStatutoryBodyRegistered);
$ExportDoc->ExportField($CCEStudents->OtherStatutoryBodyName);
$ExportDoc->ExportField($CCEStudents->OtherStatutoryBodyNumber);
$ExportDoc->ExportField($CCEStudents->OtherStatutoryBodyCategory);
$ExportDoc->ExportField($CCEStudents->CESAMemberFirm);
$ExportDoc->ExportField($CCEStudents->Age);
$ExportDoc->ExportField($CCEStudents->HighestQual);
$ExportDoc->ExportField($CCEStudents->AreaDiscipline);
$ExportDoc->ExportField($CCEStudents->Telephone);
$ExportDoc->ExportField($CCEStudents->Cellphone);
$ExportDoc->ExportField($CCEStudents->EmailAddress);
$ExportDoc->ExportField($CCEStudents->EmailAddress2);
$ExportDoc->ExportField($CCEStudents->CESAAccountNo);
$ExportDoc->ExportField($CCEStudents->VATNo);
$ExportDoc->ExportField($CCEStudents->DietaryRequirements);
$ExportDoc->ExportField($CCEStudents->OrderNo);
$ExportDoc->ExportField($CCEStudents->BookedByName);
$ExportDoc->ExportField($CCEStudents->BookedByDesignation);
$ExportDoc->ExportField($CCEStudents->BookedByTelNo);
$ExportDoc->ExportField($CCEStudents->BookedByFaxNo);
$ExportDoc->ExportField($CCEStudents->BookedByCellNo);
$ExportDoc->ExportField($CCEStudents->BookedByEmail);
$ExportDoc->ExportField($CCEStudents->WebUsername);
$ExportDoc->ExportField($CCEStudents->WebPassword);
$ExportDoc->ExportField($CCEStudents->MentorFirstName);
$ExportDoc->ExportField($CCEStudents->MentorSurname);
$ExportDoc->ExportField($CCEStudents->MentorCompany);
$ExportDoc->ExportField($CCEStudents->MentorDesig);
$ExportDoc->ExportField($CCEStudents->MentorTel);
$ExportDoc->ExportField($CCEStudents->MentorCell);
$ExportDoc->ExportField($CCEStudents->MentorEmail);
$ExportDoc->ExportField($CCEStudents->HRManagerName);
$ExportDoc->ExportField($CCEStudents->HRManagerDesignation);
$ExportDoc->ExportField($CCEStudents->HRManagerTelNo);
$ExportDoc->ExportField($CCEStudents->HRManagerCellNo);
$ExportDoc->ExportField($CCEStudents->HRManagerEmail);
$ExportDoc->ExportField($CCEStudents->LengthEmploy);
$ExportDoc->ExportField($CCEStudents->ResponsiblePayment);
$ExportDoc->ExportField($CCEStudents->BlockAccess);
$ExportDoc->ExportField($CCEStudents->Accepted);
$ExportDoc->ExportField($CCEStudents->Archived);
$ExportDoc->ExportField($CCEStudents->Achieved);
$ExportDoc->ExportField($CCEStudents->ResultStatus);
$ExportDoc->ExportField($CCEStudents->Cancelled);
$ExportDoc->ExportField($CCEStudents->CancelledReason);
$ExportDoc->ExportField($CCEStudents->CVFile);
$ExportDoc->ExportField($CCEStudents->Title);
$ExportDoc->ExportField($CCEStudents->QualCertificate1);
$ExportDoc->ExportField($CCEStudents->QualCertificate2);
$ExportDoc->ExportField($CCEStudents->QualCertificate3);
$ExportDoc->ExportField($CCEStudents->MemorandumFile);
$ExportDoc->ExportField($CCEStudents->AgreementFile);
$ExportDoc->ExportField($CCEStudents->ResultLetter);
$ExportDoc->ExportField($CCEStudents->IDFile);
$ExportDoc->ExportField($CCEStudents->PhotoFile);
$ExportDoc->ExportField($CCEStudents->SABTACOMemberFirm);
$ExportDoc->ExportField($CCEStudents->PreferredCourierAddress);
$ExportDoc->ExportField($CCEStudents->MotivationalLetter);
$ExportDoc->ExportField($CCEStudents->MentorName);
$ExportDoc->ExportField($CCEStudents->ModulesEnrolled);
$ExportDoc->ExportField($CCEStudents->Trimester1Report);
$ExportDoc->ExportField($CCEStudents->Trimester2Report);
$ExportDoc->ExportField($CCEStudents->Trimester3Report);
$ExportDoc->ExportField($CCEStudents->ExamResultLetter);
$ExportDoc->ExportField($CCEStudents->SupplementalExamLetter);
$ExportDoc->EndExportRow();
}
}
$rs->MoveNext();
}
if ($CCEStudents->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($CCEStudents->Export, array("email", "xml")))
echo "\xEF\xBB\xBF";
// Write debug message if enabled
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
// Output data
if ($CCEStudents->Export == "xml") {
header("Content-Type: text/xml");
echo $XmlDoc->XML();
} elseif ($CCEStudents->Export == "email") {
$this->ExportEmail($ExportDoc->Text);
$this->Page_Terminate($CCEStudents->ExportReturnUrl());
} else {
echo $ExportDoc->Text;
}
}
// Export email
function ExportEmail($EmailContent) {
global $Language, $CCEStudents;
$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 ($CCEStudents->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 $CCEStudents;
// Initialize
$sQry = "export=html";
// Build QueryString for search
if ($CCEStudents->getSessionBasicSearchKeyword() <> "") {
$sQry .= "&" . EW_TABLE_BASIC_SEARCH . "=" . $CCEStudents->getSessionBasicSearchKeyword() . "&" . EW_TABLE_BASIC_SEARCH_TYPE . "=" . $CCEStudents->getSessionBasicSearchType();
}
// Build QueryString for pager
$sQry .= "&" . EW_TABLE_REC_PER_PAGE . "=" . $CCEStudents->getRecordsPerPage() . "&" . EW_TABLE_START_REC . "=" . $CCEStudents->getStartRecordNumber();
return $sQry;
}
// Add search QueryString
function AddSearchQueryString(&$Qry, &$Fld) {
global $CCEStudents;
$FldParm = substr($Fld->FldVar, 2);
$FldSearchValue = $CCEStudents->GetAdvancedSearch("x_" . $FldParm);
if (strval($FldSearchValue) <> "") {
$Qry .= "&x_" . $FldParm . "=" . FldSearchValue .
"&z_" . $FldParm . "=" . $CCEStudents->GetAdvancedSearch("z_" . $FldParm);
}
$FldSearchValue2 = $CCEStudents->GetAdvancedSearch("y_" . $FldParm);
if (strval($FldSearchValue2) <> "") {
$Qry .= "&v_" . $FldParm . "=" . $CCEStudents->GetAdvancedSearch("v_" . $FldParm) .
"&y_" . $FldParm . "=" . $FldSearchValue2 .
"&w_" . $FldParm . "=" . $CCEStudents->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";
}
}
?>