| Current Path : /var/www/cesa.co.za/cceadmin/ |
| Current File : /var/www/cesa.co.za/cceadmin/cstArchivedStudentslist.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 "cstArchivedStudentsinfo.php" ?>
<?php include "CCEUsersinfo.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
$cstArchivedStudents_list = new ccstArchivedStudents_list();
$Page =& $cstArchivedStudents_list;
// Page init
$cstArchivedStudents_list->Page_Init();
// Page main
$cstArchivedStudents_list->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($cstArchivedStudents->Export == "") { ?>
<script type="text/javascript">
<!--
// Create page object
var cstArchivedStudents_list = new ew_Page("cstArchivedStudents_list");
// page properties
cstArchivedStudents_list.PageID = "list"; // page ID
cstArchivedStudents_list.FormID = "fcstArchivedStudentslist"; // form ID
var EW_PAGE_ID = cstArchivedStudents_list.PageID; // for backward compatibility
// extend page with Form_CustomValidate function
cstArchivedStudents_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) { ?>
cstArchivedStudents_list.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
cstArchivedStudents_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 ($cstArchivedStudents->Export == "") { ?>
<?php } ?>
<?php
$bSelectLimit = EW_SELECT_LIMIT;
if ($bSelectLimit) {
$cstArchivedStudents_list->lTotalRecs = $cstArchivedStudents->SelectRecordCount();
} else {
if ($rs = $cstArchivedStudents_list->LoadRecordset())
$cstArchivedStudents_list->lTotalRecs = $rs->RecordCount();
}
$cstArchivedStudents_list->lStartRec = 1;
if ($cstArchivedStudents_list->lDisplayRecs <= 0 || ($cstArchivedStudents->Export <> "" && $cstArchivedStudents->ExportAll)) // Display all records
$cstArchivedStudents_list->lDisplayRecs = $cstArchivedStudents_list->lTotalRecs;
if (!($cstArchivedStudents->Export <> "" && $cstArchivedStudents->ExportAll))
$cstArchivedStudents_list->SetUpStartRec(); // Set up start record position
if ($bSelectLimit)
$rs = $cstArchivedStudents_list->LoadRecordset($cstArchivedStudents_list->lStartRec-1, $cstArchivedStudents_list->lDisplayRecs);
?>
<p><span class="phpmaker" style="white-space: nowrap;"><?php echo $Language->Phrase("TblTypeCUSTOMVIEW") ?><?php echo $cstArchivedStudents->TableCaption() ?>
<?php if ($cstArchivedStudents->Export == "" && $cstArchivedStudents->CurrentAction == "") { ?>
<a href="<?php echo $cstArchivedStudents_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 $cstArchivedStudents_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 $cstArchivedStudents_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_cstArchivedStudents" id="emf_cstArchivedStudents" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_cstArchivedStudents',hdr:ewLanguage.Phrase('ExportToEmail'),f:document.fcstArchivedStudentslist,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 ($cstArchivedStudents->Export == "" && $cstArchivedStudents->CurrentAction == "") { ?>
<a href="javascript:ew_ToggleSearchPanel(cstArchivedStudents_list);" style="text-decoration: none;"><img id="cstArchivedStudents_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="cstArchivedStudents_list_SearchPanel">
<form name="fcstArchivedStudentslistsrch" id="fcstArchivedStudentslistsrch" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<input type="hidden" id="t" name="t" value="cstArchivedStudents">
<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($cstArchivedStudents->getSessionBasicSearchKeyword()) ?>">
<input type="Submit" name="Submit" id="Submit" value="<?php echo ew_BtnCaption($Language->Phrase("QuickSearchBtn")) ?>">
<a href="<?php echo $cstArchivedStudents_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 ($cstArchivedStudents->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 ($cstArchivedStudents->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 ($cstArchivedStudents->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();
$cstArchivedStudents_list->ShowMessage();
?>
<br>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<?php if ($cstArchivedStudents->Export == "") { ?>
<div class="ewGridUpperPanel">
<?php if ($cstArchivedStudents->CurrentAction <> "gridadd" && $cstArchivedStudents->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($cstArchivedStudents_list->Pager)) $cstArchivedStudents_list->Pager = new cPrevNextPager($cstArchivedStudents_list->lStartRec, $cstArchivedStudents_list->lDisplayRecs, $cstArchivedStudents_list->lTotalRecs) ?>
<?php if ($cstArchivedStudents_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 ($cstArchivedStudents_list->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 ($cstArchivedStudents_list->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 $cstArchivedStudents_list->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($cstArchivedStudents_list->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 ($cstArchivedStudents_list->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 $cstArchivedStudents_list->Pager->PageCount ?></span></td>
</tr></table>
</td>
<td> </td>
<td>
<span class="phpmaker"><?php echo $Language->Phrase("Record") ?> <?php echo $cstArchivedStudents_list->Pager->FromIndex ?> <?php echo $Language->Phrase("To") ?> <?php echo $cstArchivedStudents_list->Pager->ToIndex ?> <?php echo $Language->Phrase("Of") ?> <?php echo $cstArchivedStudents_list->Pager->RecordCount ?></span>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($cstArchivedStudents_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>
</tr>
</table>
</form>
<?php } ?>
<span class="phpmaker">
</span>
</div>
<?php } ?>
<form name="fcstArchivedStudentslist" id="fcstArchivedStudentslist" class="ewForm" action="" method="post">
<div id="gmp_cstArchivedStudents" class="ewGridMiddlePanel">
<?php if ($cstArchivedStudents_list->lTotalRecs > 0) { ?>
<table cellspacing="0" rowhighlightclass="ewTableHighlightRow" rowselectclass="ewTableSelectRow" roweditclass="ewTableEditRow" class="ewTable ewTableSeparate">
<?php echo $cstArchivedStudents->TableCustomInnerHtml ?>
<thead><!-- Table header -->
<tr class="ewTableHeader">
<?php
// Render list options
$cstArchivedStudents_list->RenderListOptions();
// Render list options (header, left)
$cstArchivedStudents_list->ListOptions->Render("header", "left");
?>
<?php if ($cstArchivedStudents->FirstName->Visible) { // FirstName ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->FirstName) == "") { ?>
<td><?php echo $cstArchivedStudents->FirstName->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->FirstName) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->FirstName->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->FirstName->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->Surname->Visible) { // Surname ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->Surname) == "") { ?>
<td><?php echo $cstArchivedStudents->Surname->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->Surname) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->Surname->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->Surname->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->KnownAs->Visible) { // KnownAs ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->KnownAs) == "") { ?>
<td><?php echo $cstArchivedStudents->KnownAs->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->KnownAs) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->KnownAs->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->KnownAs->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->Organisation->Visible) { // Organisation ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->Organisation) == "") { ?>
<td><?php echo $cstArchivedStudents->Organisation->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->Organisation) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->Organisation->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->Organisation->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->StudentNumber->Visible) { // StudentNumber ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->StudentNumber) == "") { ?>
<td><?php echo $cstArchivedStudents->StudentNumber->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->StudentNumber) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->StudentNumber->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->StudentNumber->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->Age->Visible) { // Age ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->Age) == "") { ?>
<td><?php echo $cstArchivedStudents->Age->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->Age) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->Age->FldCaption() ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->Age->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->Cellphone->Visible) { // Cellphone ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->Cellphone) == "") { ?>
<td><?php echo $cstArchivedStudents->Cellphone->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->Cellphone) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->Cellphone->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->Cellphone->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->EmailAddress->Visible) { // EmailAddress ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->EmailAddress) == "") { ?>
<td><?php echo $cstArchivedStudents->EmailAddress->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->EmailAddress) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->EmailAddress->FldCaption() ?><?php echo $Language->Phrase("SrchLegend") ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->EmailAddress->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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 ($cstArchivedStudents->BlockAccess->Visible) { // BlockAccess ?>
<?php if ($cstArchivedStudents->SortUrl($cstArchivedStudents->BlockAccess) == "") { ?>
<td><?php echo $cstArchivedStudents->BlockAccess->FldCaption() ?></td>
<?php } else { ?>
<td><div class="ewPointer" onmousedown="ew_Sort(event,'<?php echo $cstArchivedStudents->SortUrl($cstArchivedStudents->BlockAccess) ?>',2);">
<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $cstArchivedStudents->BlockAccess->FldCaption() ?></td><td style="width: 10px;"><?php if ($cstArchivedStudents->BlockAccess->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($cstArchivedStudents->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)
$cstArchivedStudents_list->ListOptions->Render("header", "right");
?>
</tr>
</thead>
<?php
if ($cstArchivedStudents->ExportAll && $cstArchivedStudents->Export <> "") {
$cstArchivedStudents_list->lStopRec = $cstArchivedStudents_list->lTotalRecs;
} else {
$cstArchivedStudents_list->lStopRec = $cstArchivedStudents_list->lStartRec + $cstArchivedStudents_list->lDisplayRecs - 1; // Set the last record to display
}
$cstArchivedStudents_list->lRecCount = $cstArchivedStudents_list->lStartRec - 1;
if ($rs && !$rs->EOF) {
$rs->MoveFirst();
if (!$bSelectLimit && $cstArchivedStudents_list->lStartRec > 1)
$rs->Move($cstArchivedStudents_list->lStartRec - 1);
}
// Initialize aggregate
$cstArchivedStudents->RowType = EW_ROWTYPE_AGGREGATEINIT;
$cstArchivedStudents_list->RenderRow();
$cstArchivedStudents_list->lRowCnt = 0;
while (($cstArchivedStudents->CurrentAction == "gridadd" || !$rs->EOF) &&
$cstArchivedStudents_list->lRecCount < $cstArchivedStudents_list->lStopRec) {
$cstArchivedStudents_list->lRecCount++;
if (intval($cstArchivedStudents_list->lRecCount) >= intval($cstArchivedStudents_list->lStartRec)) {
$cstArchivedStudents_list->lRowCnt++;
// Init row class and style
$cstArchivedStudents->CssClass = "";
$cstArchivedStudents->CssStyle = "";
$cstArchivedStudents->RowAttrs = array('onmouseover'=>'ew_MouseOver(event, this);', 'onmouseout'=>'ew_MouseOut(event, this);', 'onclick'=>'ew_Click(event, this);');
if ($cstArchivedStudents->CurrentAction == "gridadd") {
$cstArchivedStudents_list->LoadDefaultValues(); // Load default values
} else {
$cstArchivedStudents_list->LoadRowValues($rs); // Load row values
}
$cstArchivedStudents->RowType = EW_ROWTYPE_VIEW; // Render view
// Render row
$cstArchivedStudents_list->RenderRow();
// Render list options
$cstArchivedStudents_list->RenderListOptions();
?>
<tr<?php echo $cstArchivedStudents->RowAttributes() ?>>
<?php
// Render list options (body, left)
$cstArchivedStudents_list->ListOptions->Render("body", "left");
?>
<?php if ($cstArchivedStudents->FirstName->Visible) { // FirstName ?>
<td<?php echo $cstArchivedStudents->FirstName->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->FirstName->ViewAttributes() ?>><?php echo $cstArchivedStudents->FirstName->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->Surname->Visible) { // Surname ?>
<td<?php echo $cstArchivedStudents->Surname->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->Surname->ViewAttributes() ?>><?php echo $cstArchivedStudents->Surname->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->KnownAs->Visible) { // KnownAs ?>
<td<?php echo $cstArchivedStudents->KnownAs->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->KnownAs->ViewAttributes() ?>><?php echo $cstArchivedStudents->KnownAs->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->Organisation->Visible) { // Organisation ?>
<td<?php echo $cstArchivedStudents->Organisation->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->Organisation->ViewAttributes() ?>><?php echo $cstArchivedStudents->Organisation->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->StudentNumber->Visible) { // StudentNumber ?>
<td<?php echo $cstArchivedStudents->StudentNumber->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->StudentNumber->ViewAttributes() ?>><?php echo $cstArchivedStudents->StudentNumber->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->Age->Visible) { // Age ?>
<td<?php echo $cstArchivedStudents->Age->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->Age->ViewAttributes() ?>><?php echo $cstArchivedStudents->Age->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->Cellphone->Visible) { // Cellphone ?>
<td<?php echo $cstArchivedStudents->Cellphone->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->Cellphone->ViewAttributes() ?>><?php echo $cstArchivedStudents->Cellphone->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->EmailAddress->Visible) { // EmailAddress ?>
<td<?php echo $cstArchivedStudents->EmailAddress->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->EmailAddress->ViewAttributes() ?>><?php echo $cstArchivedStudents->EmailAddress->ListViewValue() ?></div>
</td>
<?php } ?>
<?php if ($cstArchivedStudents->BlockAccess->Visible) { // BlockAccess ?>
<td<?php echo $cstArchivedStudents->BlockAccess->CellAttributes() ?>>
<div<?php echo $cstArchivedStudents->BlockAccess->ViewAttributes() ?>><?php echo $cstArchivedStudents->BlockAccess->ListViewValue() ?></div>
</td>
<?php } ?>
<?php
// Render list options (body, right)
$cstArchivedStudents_list->ListOptions->Render("body", "right");
?>
</tr>
<?php
}
if ($cstArchivedStudents->CurrentAction <> "gridadd")
$rs->MoveNext();
}
?>
</tbody>
</table>
<?php } ?>
</div>
</form>
<?php
// Close recordset
if ($rs)
$rs->Close();
?>
<?php if ($cstArchivedStudents_list->lTotalRecs > 0) { ?>
<?php if ($cstArchivedStudents->Export == "") { ?>
<div class="ewGridLowerPanel">
<?php if ($cstArchivedStudents->CurrentAction <> "gridadd" && $cstArchivedStudents->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($cstArchivedStudents_list->Pager)) $cstArchivedStudents_list->Pager = new cPrevNextPager($cstArchivedStudents_list->lStartRec, $cstArchivedStudents_list->lDisplayRecs, $cstArchivedStudents_list->lTotalRecs) ?>
<?php if ($cstArchivedStudents_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 ($cstArchivedStudents_list->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 ($cstArchivedStudents_list->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 $cstArchivedStudents_list->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($cstArchivedStudents_list->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 ($cstArchivedStudents_list->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $cstArchivedStudents_list->PageUrl() ?>start=<?php echo $cstArchivedStudents_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 $cstArchivedStudents_list->Pager->PageCount ?></span></td>
</tr></table>
</td>
<td> </td>
<td>
<span class="phpmaker"><?php echo $Language->Phrase("Record") ?> <?php echo $cstArchivedStudents_list->Pager->FromIndex ?> <?php echo $Language->Phrase("To") ?> <?php echo $cstArchivedStudents_list->Pager->ToIndex ?> <?php echo $Language->Phrase("Of") ?> <?php echo $cstArchivedStudents_list->Pager->RecordCount ?></span>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($cstArchivedStudents_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>
</tr>
</table>
</form>
<?php } ?>
<?php //if ($cstArchivedStudents_list->lTotalRecs > 0) { ?>
<span class="phpmaker">
</span>
<?php //} ?>
</div>
<?php } ?>
<?php } ?>
</td></tr></table>
<?php if ($cstArchivedStudents->Export == "" && $cstArchivedStudents->CurrentAction == "") { ?>
<?php } ?>
<?php if ($cstArchivedStudents->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
$cstArchivedStudents_list->Page_Terminate();
?>
<?php
//
// Page class
//
class ccstArchivedStudents_list {
// Page ID
var $PageID = 'list';
// Table name
var $TableName = 'cstArchivedStudents';
// Page object name
var $PageObjName = 'cstArchivedStudents_list';
// Page name
function PageName() {
return ew_CurrentPage();
}
// Page URL
function PageUrl() {
$PageUrl = ew_CurrentPage() . "?";
global $cstArchivedStudents;
if ($cstArchivedStudents->UseTokenInUrl) $PageUrl .= "t=" . $cstArchivedStudents->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, $cstArchivedStudents;
if ($cstArchivedStudents->UseTokenInUrl) {
if ($objForm)
return ($cstArchivedStudents->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($cstArchivedStudents->TableVar == $_GET["t"]);
} else {
return TRUE;
}
}
//
// Page class constructor
//
function __construct() {
global $conn, $Language;
// Language object
$Language = new cLanguage();
// Table object (cstArchivedStudents)
$GLOBALS["cstArchivedStudents"] = new ccstArchivedStudents();
// 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["cstArchivedStudents"]->AddUrl();
$this->InlineAddUrl = $this->PageUrl() . "a=add";
$this->GridAddUrl = $this->PageUrl() . "a=gridadd";
$this->GridEditUrl = $this->PageUrl() . "a=gridedit";
$this->MultiDeleteUrl = "cstArchivedStudentsdelete.php";
$this->MultiUpdateUrl = "cstArchivedStudentsupdate.php";
// Table object (CCEUsers)
$GLOBALS['CCEUsers'] = new cCCEUsers();
// 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", 'cstArchivedStudents', 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 $cstArchivedStudents;
// Security
$Security = new cAdvancedSecurity();
if (!$Security->IsLoggedIn()) $Security->AutoLogin();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
$Security->TablePermission_Loading();
$Security->LoadCurrentUserLevel($this->TableName);
$Security->TablePermission_Loaded();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
if (!$Security->CanList()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
// Get export parameters
if (@$_GET["export"] <> "") {
$cstArchivedStudents->Export = $_GET["export"];
} elseif (ew_IsHttpPost()) {
if (@$_POST["exporttype"] <> "")
$cstArchivedStudents->Export = $_POST["exporttype"];
} else {
$cstArchivedStudents->setExportReturnUrl(ew_CurrentUrl());
}
$gsExport = $cstArchivedStudents->Export; // Get export parameter, used in header
$gsExportFile = $cstArchivedStudents->TableVar; // Get export file, used in header
if ($cstArchivedStudents->Export == "excel") {
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
}
if ($cstArchivedStudents->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 = 20;
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, $cstArchivedStudents;
// Search filters
$sSrchAdvanced = ""; // Advanced search filter
$sSrchBasic = ""; // Basic search filter
$sFilter = "";
if ($this->IsPageRequest()) { // Validate request
// 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
$cstArchivedStudents->Recordset_SearchValidated();
// Set up sorting order
$this->SetUpSortOrder();
// Get basic search criteria
if ($gsSearchError == "")
$sSrchBasic = $this->BasicSearchWhere();
}
// Restore display records
if ($cstArchivedStudents->getRecordsPerPage() <> "") {
$this->lDisplayRecs = $cstArchivedStudents->getRecordsPerPage(); // Restore from Session
} else {
$this->lDisplayRecs = 20; // 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
$cstArchivedStudents->Recordset_Searching($this->sSrchWhere);
// Save search criteria
if ($this->sSrchWhere <> "") {
if ($sSrchBasic == "")
$this->ResetBasicSearchParms();
$cstArchivedStudents->setSearchWhere($this->sSrchWhere); // Save to Session
if (!$this->RestoreSearch) {
$this->lStartRec = 1; // Reset start record counter
$cstArchivedStudents->setStartRecordNumber($this->lStartRec);
}
} else {
$this->sSrchWhere = $cstArchivedStudents->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
$cstArchivedStudents->setSessionWhere($sFilter);
$cstArchivedStudents->CurrentFilter = "";
// Export data only
if (in_array($cstArchivedStudents->Export, array("html","word","excel","xml","csv","email"))) {
$this->ExportData();
if ($cstArchivedStudents->Export <> "email")
$this->Page_Terminate(); // Terminate response
exit();
}
}
// Return basic search SQL
function BasicSearchSQL($Keyword) {
global $cstArchivedStudents;
$sKeyword = ew_AdjustSql($Keyword);
$sWhere = "";
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->Title, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->FirstName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->Surname, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->KnownAs, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->Organisation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->OrganisationType, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->StudentNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->ProjectDiscipline, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->IDNumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->ECSANumber, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->HighestQual, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->AreaDiscipline, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->Telephone, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->Cellphone, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->EmailAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->HomeAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->WorkAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->PostalAddress, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->Designation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->Department, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->CESAAccountNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->VATNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->DietaryRequirements, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->CVFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->IDFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->QualCertificate1, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->QualCertificate2, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->QualCertificate3, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->MemorandumFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->AgreementFile, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->OrderNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->BookedByName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->BookedByDesignation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->BookedByTelNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->BookedByFaxNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->BookedByCellNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->BookedByEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->WebUsername, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->WebPassword, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->MentorName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->MentorDesig, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->MentorTel, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->MentorCell, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->MentorEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->HRManagerName, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->HRManagerDesignation, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->HRManagerTelNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->HRManagerCellNo, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->HRManagerEmail, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->LengthEmploy, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->BlockAccess, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->ReasonForLeaving, $Keyword);
$this->BuildBasicSearchSQL($sWhere, $cstArchivedStudents->ResultLetter, $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, $cstArchivedStudents;
$sSearchStr = "";
if (!$Security->CanSearch()) return "";
$sSearchKeyword = $cstArchivedStudents->BasicSearchKeyword;
$sSearchType = $cstArchivedStudents->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 <> "") {
$cstArchivedStudents->setSessionBasicSearchKeyword($sSearchKeyword);
$cstArchivedStudents->setSessionBasicSearchType($sSearchType);
}
return $sSearchStr;
}
// Clear all search parameters
function ResetSearchParms() {
global $cstArchivedStudents;
// Clear search WHERE clause
$this->sSrchWhere = "";
$cstArchivedStudents->setSearchWhere($this->sSrchWhere);
// Clear basic search parameters
$this->ResetBasicSearchParms();
}
// Clear all basic search parameters
function ResetBasicSearchParms() {
global $cstArchivedStudents;
$cstArchivedStudents->setSessionBasicSearchKeyword("");
$cstArchivedStudents->setSessionBasicSearchType("");
}
// Restore all search parameters
function RestoreSearchParms() {
global $cstArchivedStudents;
$bRestore = TRUE;
if (@$_GET[EW_TABLE_BASIC_SEARCH] <> "") $bRestore = FALSE;
$this->RestoreSearch = $bRestore;
if ($bRestore) {
// Restore basic search values
$cstArchivedStudents->BasicSearchKeyword = $cstArchivedStudents->getSessionBasicSearchKeyword();
$cstArchivedStudents->BasicSearchType = $cstArchivedStudents->getSessionBasicSearchType();
}
}
// Set up sort parameters
function SetUpSortOrder() {
global $cstArchivedStudents;
// Check for Ctrl pressed
$bCtrl = (@$_GET["ctrl"] <> "");
// Check for "order" parameter
if (@$_GET["order"] <> "") {
$cstArchivedStudents->CurrentOrder = ew_StripSlashes(@$_GET["order"]);
$cstArchivedStudents->CurrentOrderType = @$_GET["ordertype"];
$cstArchivedStudents->UpdateSort($cstArchivedStudents->FirstName, $bCtrl); // FirstName
$cstArchivedStudents->UpdateSort($cstArchivedStudents->Surname, $bCtrl); // Surname
$cstArchivedStudents->UpdateSort($cstArchivedStudents->KnownAs, $bCtrl); // KnownAs
$cstArchivedStudents->UpdateSort($cstArchivedStudents->Organisation, $bCtrl); // Organisation
$cstArchivedStudents->UpdateSort($cstArchivedStudents->StudentNumber, $bCtrl); // StudentNumber
$cstArchivedStudents->UpdateSort($cstArchivedStudents->Age, $bCtrl); // Age
$cstArchivedStudents->UpdateSort($cstArchivedStudents->Cellphone, $bCtrl); // Cellphone
$cstArchivedStudents->UpdateSort($cstArchivedStudents->EmailAddress, $bCtrl); // EmailAddress
$cstArchivedStudents->UpdateSort($cstArchivedStudents->BlockAccess, $bCtrl); // BlockAccess
$cstArchivedStudents->setStartRecordNumber(1); // Reset start position
}
}
// Load sort order parameters
function LoadSortOrder() {
global $cstArchivedStudents;
$sOrderBy = $cstArchivedStudents->getSessionOrderBy(); // Get ORDER BY from Session
if ($sOrderBy == "") {
if ($cstArchivedStudents->SqlOrderBy() <> "") {
$sOrderBy = $cstArchivedStudents->SqlOrderBy();
$cstArchivedStudents->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 $cstArchivedStudents;
// 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 = "";
$cstArchivedStudents->setSessionOrderBy($sOrderBy);
$cstArchivedStudents->FirstName->setSort("");
$cstArchivedStudents->Surname->setSort("");
$cstArchivedStudents->KnownAs->setSort("");
$cstArchivedStudents->Organisation->setSort("");
$cstArchivedStudents->StudentNumber->setSort("");
$cstArchivedStudents->Age->setSort("");
$cstArchivedStudents->Cellphone->setSort("");
$cstArchivedStudents->EmailAddress->setSort("");
$cstArchivedStudents->BlockAccess->setSort("");
}
// Reset start position
$this->lStartRec = 1;
$cstArchivedStudents->setStartRecordNumber($this->lStartRec);
}
}
// Set up list options
function SetupListOptions() {
global $Security, $cstArchivedStudents;
// "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;
// "detail_CCEStudentAssignments"
$this->ListOptions->Add("detail_CCEStudentAssignments");
$item =& $this->ListOptions->Items["detail_CCEStudentAssignments"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->AllowList('CCEStudentAssignments');
$item->OnLeft = FALSE;
// "detail_CCEStudentActivities"
$this->ListOptions->Add("detail_CCEStudentActivities");
$item =& $this->ListOptions->Items["detail_CCEStudentActivities"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->AllowList('CCEStudentActivities');
$item->OnLeft = FALSE;
// "detail_CCEModuleMarks"
$this->ListOptions->Add("detail_CCEModuleMarks");
$item =& $this->ListOptions->Items["detail_CCEModuleMarks"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->AllowList('CCEModuleMarks');
$item->OnLeft = FALSE;
// "detail_CCEStudentCourses"
$this->ListOptions->Add("detail_CCEStudentCourses");
$item =& $this->ListOptions->Items["detail_CCEStudentCourses"];
$item->CssStyle = "white-space: nowrap;";
$item->Visible = $Security->AllowList('CCEStudentCourses');
$item->OnLeft = FALSE;
// Call ListOptions_Load event
$this->ListOptions_Load();
if ($cstArchivedStudents->Export <> "" ||
$cstArchivedStudents->CurrentAction == "gridadd" ||
$cstArchivedStudents->CurrentAction == "gridedit")
$this->ListOptions->HideAllOptions();
}
// Render list options
function RenderListOptions() {
global $Security, $Language, $cstArchivedStudents;
$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>";
}
// "detail_CCEStudentAssignments"
$oListOpt =& $this->ListOptions->Items["detail_CCEStudentAssignments"];
if ($Security->AllowList('CCEStudentAssignments')) {
$oListOpt->Body = "<img src=\"images/detail.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . $Language->TablePhrase("CCEStudentAssignments", "TblCaption");
$oListOpt->Body = "<a href=\"CCEStudentAssignmentslist.php?" . EW_TABLE_SHOW_MASTER . "=cstArchivedStudents&CCEStudentID=" . urlencode(strval($cstArchivedStudents->CCEStudentID->CurrentValue)) . "\">" . $oListOpt->Body . "</a>";
}
// "detail_CCEStudentActivities"
$oListOpt =& $this->ListOptions->Items["detail_CCEStudentActivities"];
if ($Security->AllowList('CCEStudentActivities')) {
$oListOpt->Body = "<img src=\"images/detail.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . $Language->TablePhrase("CCEStudentActivities", "TblCaption");
$oListOpt->Body = "<a href=\"CCEStudentActivitieslist.php?" . EW_TABLE_SHOW_MASTER . "=cstArchivedStudents&CCEStudentID=" . urlencode(strval($cstArchivedStudents->CCEStudentID->CurrentValue)) . "\">" . $oListOpt->Body . "</a>";
}
// "detail_CCEModuleMarks"
$oListOpt =& $this->ListOptions->Items["detail_CCEModuleMarks"];
if ($Security->AllowList('CCEModuleMarks')) {
$oListOpt->Body = "<img src=\"images/detail.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . $Language->TablePhrase("CCEModuleMarks", "TblCaption");
$oListOpt->Body = "<a href=\"CCEModuleMarkslist.php?" . EW_TABLE_SHOW_MASTER . "=cstArchivedStudents&CCEStudentID=" . urlencode(strval($cstArchivedStudents->CCEStudentID->CurrentValue)) . "\">" . $oListOpt->Body . "</a>";
}
// "detail_CCEStudentCourses"
$oListOpt =& $this->ListOptions->Items["detail_CCEStudentCourses"];
if ($Security->AllowList('CCEStudentCourses')) {
$oListOpt->Body = "<img src=\"images/detail.gif\" alt=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" title=\"" . ew_HtmlEncode($Language->Phrase("DetailLink")) . "\" width=\"16\" height=\"16\" border=\"0\">" . $Language->TablePhrase("CCEStudentCourses", "TblCaption");
$oListOpt->Body = "<a href=\"CCEStudentCourseslist.php?" . EW_TABLE_SHOW_MASTER . "=cstArchivedStudents&CCEStudentID=" . urlencode(strval($cstArchivedStudents->CCEStudentID->CurrentValue)) . "\">" . $oListOpt->Body . "</a>";
}
$this->RenderListOptionsExt();
// Call ListOptions_Rendered event
$this->ListOptions_Rendered();
}
function RenderListOptionsExt() {
global $Security, $Language, $cstArchivedStudents;
}
// Set up starting record parameters
function SetUpStartRec() {
global $cstArchivedStudents;
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];
$cstArchivedStudents->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;
}
$cstArchivedStudents->setStartRecordNumber($this->lStartRec);
}
}
}
$this->lStartRec = $cstArchivedStudents->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
$cstArchivedStudents->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
$cstArchivedStudents->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
$cstArchivedStudents->setStartRecordNumber($this->lStartRec);
}
}
// Load basic search values
function LoadBasicSearchValues() {
global $cstArchivedStudents;
$cstArchivedStudents->BasicSearchKeyword = @$_GET[EW_TABLE_BASIC_SEARCH];
$cstArchivedStudents->BasicSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];
}
// Load recordset
function LoadRecordset($offset = -1, $rowcnt = -1) {
global $conn, $cstArchivedStudents;
// Call Recordset Selecting event
$cstArchivedStudents->Recordset_Selecting($cstArchivedStudents->CurrentFilter);
// Load List page SQL
$sSql = $cstArchivedStudents->SelectSQL();
if ($offset > -1 && $rowcnt > -1)
$sSql .= " LIMIT $offset, $rowcnt";
// Load recordset
$rs = ew_LoadRecordset($sSql);
// Call Recordset Selected event
$cstArchivedStudents->Recordset_Selected($rs);
return $rs;
}
// Load row based on key values
function LoadRow() {
global $conn, $Security, $cstArchivedStudents;
$sFilter = $cstArchivedStudents->KeyFilter();
// Call Row Selecting event
$cstArchivedStudents->Row_Selecting($sFilter);
// Load SQL based on filter
$cstArchivedStudents->CurrentFilter = $sFilter;
$sSql = $cstArchivedStudents->SQL();
$res = FALSE;
$rs = ew_LoadRecordset($sSql);
if ($rs && !$rs->EOF) {
$res = TRUE;
$this->LoadRowValues($rs); // Load row values
// Call Row Selected event
$cstArchivedStudents->Row_Selected($rs);
$rs->Close();
}
return $res;
}
// Load row values from recordset
function LoadRowValues(&$rs) {
global $conn, $cstArchivedStudents;
$cstArchivedStudents->CCEStudentID->setDbValue($rs->fields('CCEStudentID'));
$cstArchivedStudents->Title->setDbValue($rs->fields('Title'));
$cstArchivedStudents->FirstName->setDbValue($rs->fields('FirstName'));
$cstArchivedStudents->Surname->setDbValue($rs->fields('Surname'));
$cstArchivedStudents->KnownAs->setDbValue($rs->fields('KnownAs'));
$cstArchivedStudents->Organisation->setDbValue($rs->fields('Organisation'));
$cstArchivedStudents->OrganisationType->setDbValue($rs->fields('OrganisationType'));
$cstArchivedStudents->StudentNumber->setDbValue($rs->fields('StudentNumber'));
$cstArchivedStudents->CCEFacilitatorID->setDbValue($rs->fields('CCEFacilitatorID'));
$cstArchivedStudents->Project->setDbValue($rs->fields('Project'));
$cstArchivedStudents->ProjectDiscipline->setDbValue($rs->fields('ProjectDiscipline'));
$cstArchivedStudents->IDNumber->setDbValue($rs->fields('IDNumber'));
$cstArchivedStudents->ECSANumber->setDbValue($rs->fields('ECSANumber'));
$cstArchivedStudents->Age->setDbValue($rs->fields('Age'));
$cstArchivedStudents->HighestQual->setDbValue($rs->fields('HighestQual'));
$cstArchivedStudents->AreaDiscipline->setDbValue($rs->fields('AreaDiscipline'));
$cstArchivedStudents->Telephone->setDbValue($rs->fields('Telephone'));
$cstArchivedStudents->Cellphone->setDbValue($rs->fields('Cellphone'));
$cstArchivedStudents->EmailAddress->setDbValue($rs->fields('EmailAddress'));
$cstArchivedStudents->HomeAddress->setDbValue($rs->fields('HomeAddress'));
$cstArchivedStudents->WorkAddress->setDbValue($rs->fields('WorkAddress'));
$cstArchivedStudents->PostalAddress->setDbValue($rs->fields('PostalAddress'));
$cstArchivedStudents->Designation->setDbValue($rs->fields('Designation'));
$cstArchivedStudents->Department->setDbValue($rs->fields('Department'));
$cstArchivedStudents->CESAAccountNo->setDbValue($rs->fields('CESAAccountNo'));
$cstArchivedStudents->VATNo->setDbValue($rs->fields('VATNo'));
$cstArchivedStudents->DietaryRequirements->setDbValue($rs->fields('DietaryRequirements'));
$cstArchivedStudents->CVFile->Upload->DbValue = $rs->fields('CVFile');
$cstArchivedStudents->IDFile->Upload->DbValue = $rs->fields('IDFile');
$cstArchivedStudents->QualCertificate1->Upload->DbValue = $rs->fields('QualCertificate1');
$cstArchivedStudents->QualCertificate2->Upload->DbValue = $rs->fields('QualCertificate2');
$cstArchivedStudents->QualCertificate3->Upload->DbValue = $rs->fields('QualCertificate3');
$cstArchivedStudents->MemorandumFile->Upload->DbValue = $rs->fields('MemorandumFile');
$cstArchivedStudents->AgreementFile->Upload->DbValue = $rs->fields('AgreementFile');
$cstArchivedStudents->OrderNo->setDbValue($rs->fields('OrderNo'));
$cstArchivedStudents->BookedByName->setDbValue($rs->fields('BookedByName'));
$cstArchivedStudents->BookedByDesignation->setDbValue($rs->fields('BookedByDesignation'));
$cstArchivedStudents->BookedByTelNo->setDbValue($rs->fields('BookedByTelNo'));
$cstArchivedStudents->BookedByFaxNo->setDbValue($rs->fields('BookedByFaxNo'));
$cstArchivedStudents->BookedByCellNo->setDbValue($rs->fields('BookedByCellNo'));
$cstArchivedStudents->BookedByEmail->setDbValue($rs->fields('BookedByEmail'));
$cstArchivedStudents->WebUsername->setDbValue($rs->fields('WebUsername'));
$cstArchivedStudents->WebPassword->setDbValue($rs->fields('WebPassword'));
$cstArchivedStudents->MentorName->setDbValue($rs->fields('MentorName'));
$cstArchivedStudents->MentorDesig->setDbValue($rs->fields('MentorDesig'));
$cstArchivedStudents->MentorTel->setDbValue($rs->fields('MentorTel'));
$cstArchivedStudents->MentorCell->setDbValue($rs->fields('MentorCell'));
$cstArchivedStudents->MentorEmail->setDbValue($rs->fields('MentorEmail'));
$cstArchivedStudents->HRManagerName->setDbValue($rs->fields('HRManagerName'));
$cstArchivedStudents->HRManagerDesignation->setDbValue($rs->fields('HRManagerDesignation'));
$cstArchivedStudents->HRManagerTelNo->setDbValue($rs->fields('HRManagerTelNo'));
$cstArchivedStudents->HRManagerCellNo->setDbValue($rs->fields('HRManagerCellNo'));
$cstArchivedStudents->HRManagerEmail->setDbValue($rs->fields('HRManagerEmail'));
$cstArchivedStudents->LengthEmploy->setDbValue($rs->fields('LengthEmploy'));
$cstArchivedStudents->BlockAccess->setDbValue($rs->fields('BlockAccess'));
$cstArchivedStudents->ReasonForLeaving->setDbValue($rs->fields('ReasonForLeaving'));
$cstArchivedStudents->Archived->setDbValue($rs->fields('Archived'));
$cstArchivedStudents->ResultLetter->Upload->DbValue = $rs->fields('ResultLetter');
$cstArchivedStudents->Achieved->setDbValue($rs->fields('Achieved'));
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $cstArchivedStudents;
// Initialize URLs
$this->ViewUrl = $cstArchivedStudents->ViewUrl();
$this->EditUrl = $cstArchivedStudents->EditUrl();
$this->InlineEditUrl = $cstArchivedStudents->InlineEditUrl();
$this->CopyUrl = $cstArchivedStudents->CopyUrl();
$this->InlineCopyUrl = $cstArchivedStudents->InlineCopyUrl();
$this->DeleteUrl = $cstArchivedStudents->DeleteUrl();
// Call Row_Rendering event
$cstArchivedStudents->Row_Rendering();
// Common render codes for all row types
// FirstName
$cstArchivedStudents->FirstName->CellCssStyle = ""; $cstArchivedStudents->FirstName->CellCssClass = "";
$cstArchivedStudents->FirstName->CellAttrs = array(); $cstArchivedStudents->FirstName->ViewAttrs = array(); $cstArchivedStudents->FirstName->EditAttrs = array();
// Surname
$cstArchivedStudents->Surname->CellCssStyle = ""; $cstArchivedStudents->Surname->CellCssClass = "";
$cstArchivedStudents->Surname->CellAttrs = array(); $cstArchivedStudents->Surname->ViewAttrs = array(); $cstArchivedStudents->Surname->EditAttrs = array();
// KnownAs
$cstArchivedStudents->KnownAs->CellCssStyle = ""; $cstArchivedStudents->KnownAs->CellCssClass = "";
$cstArchivedStudents->KnownAs->CellAttrs = array(); $cstArchivedStudents->KnownAs->ViewAttrs = array(); $cstArchivedStudents->KnownAs->EditAttrs = array();
// Organisation
$cstArchivedStudents->Organisation->CellCssStyle = ""; $cstArchivedStudents->Organisation->CellCssClass = "";
$cstArchivedStudents->Organisation->CellAttrs = array(); $cstArchivedStudents->Organisation->ViewAttrs = array(); $cstArchivedStudents->Organisation->EditAttrs = array();
// StudentNumber
$cstArchivedStudents->StudentNumber->CellCssStyle = ""; $cstArchivedStudents->StudentNumber->CellCssClass = "";
$cstArchivedStudents->StudentNumber->CellAttrs = array(); $cstArchivedStudents->StudentNumber->ViewAttrs = array(); $cstArchivedStudents->StudentNumber->EditAttrs = array();
// Age
$cstArchivedStudents->Age->CellCssStyle = ""; $cstArchivedStudents->Age->CellCssClass = "";
$cstArchivedStudents->Age->CellAttrs = array(); $cstArchivedStudents->Age->ViewAttrs = array(); $cstArchivedStudents->Age->EditAttrs = array();
// Cellphone
$cstArchivedStudents->Cellphone->CellCssStyle = ""; $cstArchivedStudents->Cellphone->CellCssClass = "";
$cstArchivedStudents->Cellphone->CellAttrs = array(); $cstArchivedStudents->Cellphone->ViewAttrs = array(); $cstArchivedStudents->Cellphone->EditAttrs = array();
// EmailAddress
$cstArchivedStudents->EmailAddress->CellCssStyle = ""; $cstArchivedStudents->EmailAddress->CellCssClass = "";
$cstArchivedStudents->EmailAddress->CellAttrs = array(); $cstArchivedStudents->EmailAddress->ViewAttrs = array(); $cstArchivedStudents->EmailAddress->EditAttrs = array();
// BlockAccess
$cstArchivedStudents->BlockAccess->CellCssStyle = ""; $cstArchivedStudents->BlockAccess->CellCssClass = "";
$cstArchivedStudents->BlockAccess->CellAttrs = array(); $cstArchivedStudents->BlockAccess->ViewAttrs = array(); $cstArchivedStudents->BlockAccess->EditAttrs = array();
if ($cstArchivedStudents->RowType == EW_ROWTYPE_VIEW) { // View row
// Title
$cstArchivedStudents->Title->ViewValue = $cstArchivedStudents->Title->CurrentValue;
$cstArchivedStudents->Title->CssStyle = "";
$cstArchivedStudents->Title->CssClass = "";
$cstArchivedStudents->Title->ViewCustomAttributes = "";
// FirstName
$cstArchivedStudents->FirstName->ViewValue = $cstArchivedStudents->FirstName->CurrentValue;
$cstArchivedStudents->FirstName->CssStyle = "";
$cstArchivedStudents->FirstName->CssClass = "";
$cstArchivedStudents->FirstName->ViewCustomAttributes = "";
// Surname
$cstArchivedStudents->Surname->ViewValue = $cstArchivedStudents->Surname->CurrentValue;
$cstArchivedStudents->Surname->CssStyle = "";
$cstArchivedStudents->Surname->CssClass = "";
$cstArchivedStudents->Surname->ViewCustomAttributes = "";
// KnownAs
$cstArchivedStudents->KnownAs->ViewValue = $cstArchivedStudents->KnownAs->CurrentValue;
$cstArchivedStudents->KnownAs->CssStyle = "";
$cstArchivedStudents->KnownAs->CssClass = "";
$cstArchivedStudents->KnownAs->ViewCustomAttributes = "";
// Organisation
$cstArchivedStudents->Organisation->ViewValue = $cstArchivedStudents->Organisation->CurrentValue;
$cstArchivedStudents->Organisation->CssStyle = "";
$cstArchivedStudents->Organisation->CssClass = "";
$cstArchivedStudents->Organisation->ViewCustomAttributes = "";
// OrganisationType
$cstArchivedStudents->OrganisationType->ViewValue = $cstArchivedStudents->OrganisationType->CurrentValue;
$cstArchivedStudents->OrganisationType->CssStyle = "";
$cstArchivedStudents->OrganisationType->CssClass = "";
$cstArchivedStudents->OrganisationType->ViewCustomAttributes = "";
// StudentNumber
$cstArchivedStudents->StudentNumber->ViewValue = $cstArchivedStudents->StudentNumber->CurrentValue;
$cstArchivedStudents->StudentNumber->CssStyle = "";
$cstArchivedStudents->StudentNumber->CssClass = "";
$cstArchivedStudents->StudentNumber->ViewCustomAttributes = "";
// CCEFacilitatorID
if (strval($cstArchivedStudents->CCEFacilitatorID->CurrentValue) <> "") {
$sFilterWrk = "`FacilitatorID` = " . ew_AdjustSql($cstArchivedStudents->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`";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$cstArchivedStudents->CCEFacilitatorID->ViewValue = $rswrk->fields('FacilitatorName');
$rswrk->Close();
} else {
$cstArchivedStudents->CCEFacilitatorID->ViewValue = $cstArchivedStudents->CCEFacilitatorID->CurrentValue;
}
} else {
$cstArchivedStudents->CCEFacilitatorID->ViewValue = NULL;
}
$cstArchivedStudents->CCEFacilitatorID->CssStyle = "";
$cstArchivedStudents->CCEFacilitatorID->CssClass = "";
$cstArchivedStudents->CCEFacilitatorID->ViewCustomAttributes = "";
// Project
if (strval($cstArchivedStudents->Project->CurrentValue) <> "") {
$sFilterWrk = "`CCEProjectID` = " . ew_AdjustSql($cstArchivedStudents->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`";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$cstArchivedStudents->Project->ViewValue = $rswrk->fields('Project');
$rswrk->Close();
} else {
$cstArchivedStudents->Project->ViewValue = $cstArchivedStudents->Project->CurrentValue;
}
} else {
$cstArchivedStudents->Project->ViewValue = NULL;
}
$cstArchivedStudents->Project->CssStyle = "";
$cstArchivedStudents->Project->CssClass = "";
$cstArchivedStudents->Project->ViewCustomAttributes = "";
// ProjectDiscipline
$cstArchivedStudents->ProjectDiscipline->ViewValue = $cstArchivedStudents->ProjectDiscipline->CurrentValue;
$cstArchivedStudents->ProjectDiscipline->CssStyle = "";
$cstArchivedStudents->ProjectDiscipline->CssClass = "";
$cstArchivedStudents->ProjectDiscipline->ViewCustomAttributes = "";
// IDNumber
$cstArchivedStudents->IDNumber->ViewValue = $cstArchivedStudents->IDNumber->CurrentValue;
$cstArchivedStudents->IDNumber->CssStyle = "";
$cstArchivedStudents->IDNumber->CssClass = "";
$cstArchivedStudents->IDNumber->ViewCustomAttributes = "mso-number-format:General";
// ECSANumber
$cstArchivedStudents->ECSANumber->ViewValue = $cstArchivedStudents->ECSANumber->CurrentValue;
$cstArchivedStudents->ECSANumber->CssStyle = "";
$cstArchivedStudents->ECSANumber->CssClass = "";
$cstArchivedStudents->ECSANumber->ViewCustomAttributes = "";
// Age
$cstArchivedStudents->Age->ViewValue = $cstArchivedStudents->Age->CurrentValue;
$cstArchivedStudents->Age->CssStyle = "";
$cstArchivedStudents->Age->CssClass = "";
$cstArchivedStudents->Age->ViewCustomAttributes = "";
// HighestQual
$cstArchivedStudents->HighestQual->ViewValue = $cstArchivedStudents->HighestQual->CurrentValue;
$cstArchivedStudents->HighestQual->CssStyle = "";
$cstArchivedStudents->HighestQual->CssClass = "";
$cstArchivedStudents->HighestQual->ViewCustomAttributes = "";
// AreaDiscipline
$cstArchivedStudents->AreaDiscipline->ViewValue = $cstArchivedStudents->AreaDiscipline->CurrentValue;
$cstArchivedStudents->AreaDiscipline->CssStyle = "";
$cstArchivedStudents->AreaDiscipline->CssClass = "";
$cstArchivedStudents->AreaDiscipline->ViewCustomAttributes = "";
// Telephone
$cstArchivedStudents->Telephone->ViewValue = $cstArchivedStudents->Telephone->CurrentValue;
$cstArchivedStudents->Telephone->CssStyle = "";
$cstArchivedStudents->Telephone->CssClass = "";
$cstArchivedStudents->Telephone->ViewCustomAttributes = "mso-number-format:General";
// Cellphone
$cstArchivedStudents->Cellphone->ViewValue = $cstArchivedStudents->Cellphone->CurrentValue;
$cstArchivedStudents->Cellphone->CssStyle = "";
$cstArchivedStudents->Cellphone->CssClass = "";
$cstArchivedStudents->Cellphone->ViewCustomAttributes = "mso-number-format:General";
// EmailAddress
$cstArchivedStudents->EmailAddress->ViewValue = $cstArchivedStudents->EmailAddress->CurrentValue;
$cstArchivedStudents->EmailAddress->CssStyle = "";
$cstArchivedStudents->EmailAddress->CssClass = "";
$cstArchivedStudents->EmailAddress->ViewCustomAttributes = "";
// HomeAddress
$cstArchivedStudents->HomeAddress->ViewValue = $cstArchivedStudents->HomeAddress->CurrentValue;
$cstArchivedStudents->HomeAddress->CssStyle = "";
$cstArchivedStudents->HomeAddress->CssClass = "";
$cstArchivedStudents->HomeAddress->ViewCustomAttributes = "";
// WorkAddress
$cstArchivedStudents->WorkAddress->ViewValue = $cstArchivedStudents->WorkAddress->CurrentValue;
$cstArchivedStudents->WorkAddress->CssStyle = "";
$cstArchivedStudents->WorkAddress->CssClass = "";
$cstArchivedStudents->WorkAddress->ViewCustomAttributes = "";
// PostalAddress
$cstArchivedStudents->PostalAddress->ViewValue = $cstArchivedStudents->PostalAddress->CurrentValue;
$cstArchivedStudents->PostalAddress->CssStyle = "";
$cstArchivedStudents->PostalAddress->CssClass = "";
$cstArchivedStudents->PostalAddress->ViewCustomAttributes = "";
// Designation
$cstArchivedStudents->Designation->ViewValue = $cstArchivedStudents->Designation->CurrentValue;
$cstArchivedStudents->Designation->CssStyle = "";
$cstArchivedStudents->Designation->CssClass = "";
$cstArchivedStudents->Designation->ViewCustomAttributes = "";
// Department
$cstArchivedStudents->Department->ViewValue = $cstArchivedStudents->Department->CurrentValue;
$cstArchivedStudents->Department->CssStyle = "";
$cstArchivedStudents->Department->CssClass = "";
$cstArchivedStudents->Department->ViewCustomAttributes = "";
// CESAAccountNo
$cstArchivedStudents->CESAAccountNo->ViewValue = $cstArchivedStudents->CESAAccountNo->CurrentValue;
$cstArchivedStudents->CESAAccountNo->CssStyle = "";
$cstArchivedStudents->CESAAccountNo->CssClass = "";
$cstArchivedStudents->CESAAccountNo->ViewCustomAttributes = "";
// VATNo
$cstArchivedStudents->VATNo->ViewValue = $cstArchivedStudents->VATNo->CurrentValue;
$cstArchivedStudents->VATNo->CssStyle = "";
$cstArchivedStudents->VATNo->CssClass = "";
$cstArchivedStudents->VATNo->ViewCustomAttributes = "mso-number-format:General";
// DietaryRequirements
$cstArchivedStudents->DietaryRequirements->ViewValue = $cstArchivedStudents->DietaryRequirements->CurrentValue;
$cstArchivedStudents->DietaryRequirements->CssStyle = "";
$cstArchivedStudents->DietaryRequirements->CssClass = "";
$cstArchivedStudents->DietaryRequirements->ViewCustomAttributes = "";
// CVFile
if (!ew_Empty($cstArchivedStudents->CVFile->Upload->DbValue)) {
$cstArchivedStudents->CVFile->ViewValue = $cstArchivedStudents->CVFile->Upload->DbValue;
} else {
$cstArchivedStudents->CVFile->ViewValue = "";
}
$cstArchivedStudents->CVFile->CssStyle = "";
$cstArchivedStudents->CVFile->CssClass = "";
$cstArchivedStudents->CVFile->ViewCustomAttributes = "";
// IDFile
if (!ew_Empty($cstArchivedStudents->IDFile->Upload->DbValue)) {
$cstArchivedStudents->IDFile->ViewValue = $cstArchivedStudents->IDFile->Upload->DbValue;
} else {
$cstArchivedStudents->IDFile->ViewValue = "";
}
$cstArchivedStudents->IDFile->CssStyle = "";
$cstArchivedStudents->IDFile->CssClass = "";
$cstArchivedStudents->IDFile->ViewCustomAttributes = "";
// QualCertificate1
if (!ew_Empty($cstArchivedStudents->QualCertificate1->Upload->DbValue)) {
$cstArchivedStudents->QualCertificate1->ViewValue = $cstArchivedStudents->QualCertificate1->Upload->DbValue;
} else {
$cstArchivedStudents->QualCertificate1->ViewValue = "";
}
$cstArchivedStudents->QualCertificate1->CssStyle = "";
$cstArchivedStudents->QualCertificate1->CssClass = "";
$cstArchivedStudents->QualCertificate1->ViewCustomAttributes = "";
// QualCertificate2
if (!ew_Empty($cstArchivedStudents->QualCertificate2->Upload->DbValue)) {
$cstArchivedStudents->QualCertificate2->ViewValue = $cstArchivedStudents->QualCertificate2->Upload->DbValue;
} else {
$cstArchivedStudents->QualCertificate2->ViewValue = "";
}
$cstArchivedStudents->QualCertificate2->CssStyle = "";
$cstArchivedStudents->QualCertificate2->CssClass = "";
$cstArchivedStudents->QualCertificate2->ViewCustomAttributes = "";
// QualCertificate3
if (!ew_Empty($cstArchivedStudents->QualCertificate3->Upload->DbValue)) {
$cstArchivedStudents->QualCertificate3->ViewValue = $cstArchivedStudents->QualCertificate3->Upload->DbValue;
} else {
$cstArchivedStudents->QualCertificate3->ViewValue = "";
}
$cstArchivedStudents->QualCertificate3->CssStyle = "";
$cstArchivedStudents->QualCertificate3->CssClass = "";
$cstArchivedStudents->QualCertificate3->ViewCustomAttributes = "";
// MemorandumFile
if (!ew_Empty($cstArchivedStudents->MemorandumFile->Upload->DbValue)) {
$cstArchivedStudents->MemorandumFile->ViewValue = $cstArchivedStudents->MemorandumFile->Upload->DbValue;
} else {
$cstArchivedStudents->MemorandumFile->ViewValue = "";
}
$cstArchivedStudents->MemorandumFile->CssStyle = "";
$cstArchivedStudents->MemorandumFile->CssClass = "";
$cstArchivedStudents->MemorandumFile->ViewCustomAttributes = "";
// AgreementFile
if (!ew_Empty($cstArchivedStudents->AgreementFile->Upload->DbValue)) {
$cstArchivedStudents->AgreementFile->ViewValue = $cstArchivedStudents->AgreementFile->Upload->DbValue;
} else {
$cstArchivedStudents->AgreementFile->ViewValue = "";
}
$cstArchivedStudents->AgreementFile->CssStyle = "";
$cstArchivedStudents->AgreementFile->CssClass = "";
$cstArchivedStudents->AgreementFile->ViewCustomAttributes = "";
// OrderNo
$cstArchivedStudents->OrderNo->ViewValue = $cstArchivedStudents->OrderNo->CurrentValue;
$cstArchivedStudents->OrderNo->CssStyle = "";
$cstArchivedStudents->OrderNo->CssClass = "";
$cstArchivedStudents->OrderNo->ViewCustomAttributes = "";
// BookedByName
$cstArchivedStudents->BookedByName->ViewValue = $cstArchivedStudents->BookedByName->CurrentValue;
$cstArchivedStudents->BookedByName->CssStyle = "";
$cstArchivedStudents->BookedByName->CssClass = "";
$cstArchivedStudents->BookedByName->ViewCustomAttributes = "";
// BookedByDesignation
$cstArchivedStudents->BookedByDesignation->ViewValue = $cstArchivedStudents->BookedByDesignation->CurrentValue;
$cstArchivedStudents->BookedByDesignation->CssStyle = "";
$cstArchivedStudents->BookedByDesignation->CssClass = "";
$cstArchivedStudents->BookedByDesignation->ViewCustomAttributes = "";
// BookedByTelNo
$cstArchivedStudents->BookedByTelNo->ViewValue = $cstArchivedStudents->BookedByTelNo->CurrentValue;
$cstArchivedStudents->BookedByTelNo->CssStyle = "";
$cstArchivedStudents->BookedByTelNo->CssClass = "";
$cstArchivedStudents->BookedByTelNo->ViewCustomAttributes = "mso-number-format:General";
// BookedByFaxNo
$cstArchivedStudents->BookedByFaxNo->ViewValue = $cstArchivedStudents->BookedByFaxNo->CurrentValue;
$cstArchivedStudents->BookedByFaxNo->CssStyle = "";
$cstArchivedStudents->BookedByFaxNo->CssClass = "";
$cstArchivedStudents->BookedByFaxNo->ViewCustomAttributes = "mso-number-format:General";
// BookedByCellNo
$cstArchivedStudents->BookedByCellNo->ViewValue = $cstArchivedStudents->BookedByCellNo->CurrentValue;
$cstArchivedStudents->BookedByCellNo->CssStyle = "";
$cstArchivedStudents->BookedByCellNo->CssClass = "";
$cstArchivedStudents->BookedByCellNo->ViewCustomAttributes = "mso-number-format:General";
// BookedByEmail
$cstArchivedStudents->BookedByEmail->ViewValue = $cstArchivedStudents->BookedByEmail->CurrentValue;
$cstArchivedStudents->BookedByEmail->CssStyle = "";
$cstArchivedStudents->BookedByEmail->CssClass = "";
$cstArchivedStudents->BookedByEmail->ViewCustomAttributes = "";
// WebUsername
$cstArchivedStudents->WebUsername->ViewValue = $cstArchivedStudents->WebUsername->CurrentValue;
$cstArchivedStudents->WebUsername->CssStyle = "";
$cstArchivedStudents->WebUsername->CssClass = "";
$cstArchivedStudents->WebUsername->ViewCustomAttributes = "";
// WebPassword
$cstArchivedStudents->WebPassword->ViewValue = $cstArchivedStudents->WebPassword->CurrentValue;
$cstArchivedStudents->WebPassword->CssStyle = "";
$cstArchivedStudents->WebPassword->CssClass = "";
$cstArchivedStudents->WebPassword->ViewCustomAttributes = "";
// MentorName
$cstArchivedStudents->MentorName->ViewValue = $cstArchivedStudents->MentorName->CurrentValue;
$cstArchivedStudents->MentorName->CssStyle = "";
$cstArchivedStudents->MentorName->CssClass = "";
$cstArchivedStudents->MentorName->ViewCustomAttributes = "";
// MentorDesig
$cstArchivedStudents->MentorDesig->ViewValue = $cstArchivedStudents->MentorDesig->CurrentValue;
$cstArchivedStudents->MentorDesig->CssStyle = "";
$cstArchivedStudents->MentorDesig->CssClass = "";
$cstArchivedStudents->MentorDesig->ViewCustomAttributes = "";
// MentorTel
$cstArchivedStudents->MentorTel->ViewValue = $cstArchivedStudents->MentorTel->CurrentValue;
$cstArchivedStudents->MentorTel->CssStyle = "";
$cstArchivedStudents->MentorTel->CssClass = "";
$cstArchivedStudents->MentorTel->ViewCustomAttributes = "";
// MentorCell
$cstArchivedStudents->MentorCell->ViewValue = $cstArchivedStudents->MentorCell->CurrentValue;
$cstArchivedStudents->MentorCell->CssStyle = "";
$cstArchivedStudents->MentorCell->CssClass = "";
$cstArchivedStudents->MentorCell->ViewCustomAttributes = "";
// MentorEmail
$cstArchivedStudents->MentorEmail->ViewValue = $cstArchivedStudents->MentorEmail->CurrentValue;
$cstArchivedStudents->MentorEmail->CssStyle = "";
$cstArchivedStudents->MentorEmail->CssClass = "";
$cstArchivedStudents->MentorEmail->ViewCustomAttributes = "";
// HRManagerName
$cstArchivedStudents->HRManagerName->ViewValue = $cstArchivedStudents->HRManagerName->CurrentValue;
$cstArchivedStudents->HRManagerName->CssStyle = "";
$cstArchivedStudents->HRManagerName->CssClass = "";
$cstArchivedStudents->HRManagerName->ViewCustomAttributes = "";
// HRManagerDesignation
$cstArchivedStudents->HRManagerDesignation->ViewValue = $cstArchivedStudents->HRManagerDesignation->CurrentValue;
$cstArchivedStudents->HRManagerDesignation->CssStyle = "";
$cstArchivedStudents->HRManagerDesignation->CssClass = "";
$cstArchivedStudents->HRManagerDesignation->ViewCustomAttributes = "";
// HRManagerTelNo
$cstArchivedStudents->HRManagerTelNo->ViewValue = $cstArchivedStudents->HRManagerTelNo->CurrentValue;
$cstArchivedStudents->HRManagerTelNo->CssStyle = "";
$cstArchivedStudents->HRManagerTelNo->CssClass = "";
$cstArchivedStudents->HRManagerTelNo->ViewCustomAttributes = "";
// HRManagerCellNo
$cstArchivedStudents->HRManagerCellNo->ViewValue = $cstArchivedStudents->HRManagerCellNo->CurrentValue;
$cstArchivedStudents->HRManagerCellNo->CssStyle = "";
$cstArchivedStudents->HRManagerCellNo->CssClass = "";
$cstArchivedStudents->HRManagerCellNo->ViewCustomAttributes = "";
// HRManagerEmail
$cstArchivedStudents->HRManagerEmail->ViewValue = $cstArchivedStudents->HRManagerEmail->CurrentValue;
$cstArchivedStudents->HRManagerEmail->CssStyle = "";
$cstArchivedStudents->HRManagerEmail->CssClass = "";
$cstArchivedStudents->HRManagerEmail->ViewCustomAttributes = "";
// LengthEmploy
$cstArchivedStudents->LengthEmploy->ViewValue = $cstArchivedStudents->LengthEmploy->CurrentValue;
$cstArchivedStudents->LengthEmploy->CssStyle = "";
$cstArchivedStudents->LengthEmploy->CssClass = "";
$cstArchivedStudents->LengthEmploy->ViewCustomAttributes = "";
// BlockAccess
if (strval($cstArchivedStudents->BlockAccess->CurrentValue) <> "") {
switch ($cstArchivedStudents->BlockAccess->CurrentValue) {
case "y":
$cstArchivedStudents->BlockAccess->ViewValue = "Yes";
break;
case "n":
$cstArchivedStudents->BlockAccess->ViewValue = "No";
break;
default:
$cstArchivedStudents->BlockAccess->ViewValue = $cstArchivedStudents->BlockAccess->CurrentValue;
}
} else {
$cstArchivedStudents->BlockAccess->ViewValue = NULL;
}
$cstArchivedStudents->BlockAccess->CssStyle = "";
$cstArchivedStudents->BlockAccess->CssClass = "";
$cstArchivedStudents->BlockAccess->ViewCustomAttributes = "";
// Archived
if (strval($cstArchivedStudents->Archived->CurrentValue) <> "") {
$cstArchivedStudents->Archived->ViewValue = "";
$arwrk = explode(",", strval($cstArchivedStudents->Archived->CurrentValue));
for ($ari = 0; $ari < count($arwrk); $ari++) {
switch (trim($arwrk[$ari])) {
case "1":
$cstArchivedStudents->Archived->ViewValue .= "Yes";
break;
default:
$cstArchivedStudents->Archived->ViewValue .= trim($arwrk[$ari]);
}
if ($ari < count($arwrk)-1) $cstArchivedStudents->Archived->ViewValue .= ew_ViewOptionSeparator($ari);
}
} else {
$cstArchivedStudents->Archived->ViewValue = NULL;
}
$cstArchivedStudents->Archived->CssStyle = "";
$cstArchivedStudents->Archived->CssClass = "";
$cstArchivedStudents->Archived->ViewCustomAttributes = "";
// ResultLetter
if (!ew_Empty($cstArchivedStudents->ResultLetter->Upload->DbValue)) {
$cstArchivedStudents->ResultLetter->ViewValue = $cstArchivedStudents->ResultLetter->Upload->DbValue;
} else {
$cstArchivedStudents->ResultLetter->ViewValue = "";
}
$cstArchivedStudents->ResultLetter->CssStyle = "";
$cstArchivedStudents->ResultLetter->CssClass = "";
$cstArchivedStudents->ResultLetter->ViewCustomAttributes = "";
// Achieved
if (strval($cstArchivedStudents->Achieved->CurrentValue) <> "") {
$cstArchivedStudents->Achieved->ViewValue = "";
$arwrk = explode(",", strval($cstArchivedStudents->Achieved->CurrentValue));
for ($ari = 0; $ari < count($arwrk); $ari++) {
switch (trim($arwrk[$ari])) {
case "1":
$cstArchivedStudents->Achieved->ViewValue .= "Yes";
break;
default:
$cstArchivedStudents->Achieved->ViewValue .= trim($arwrk[$ari]);
}
if ($ari < count($arwrk)-1) $cstArchivedStudents->Achieved->ViewValue .= ew_ViewOptionSeparator($ari);
}
} else {
$cstArchivedStudents->Achieved->ViewValue = NULL;
}
$cstArchivedStudents->Achieved->CssStyle = "";
$cstArchivedStudents->Achieved->CssClass = "";
$cstArchivedStudents->Achieved->ViewCustomAttributes = "";
// FirstName
$cstArchivedStudents->FirstName->HrefValue = "";
$cstArchivedStudents->FirstName->TooltipValue = "";
// Surname
$cstArchivedStudents->Surname->HrefValue = "";
$cstArchivedStudents->Surname->TooltipValue = "";
// KnownAs
$cstArchivedStudents->KnownAs->HrefValue = "";
$cstArchivedStudents->KnownAs->TooltipValue = "";
// Organisation
$cstArchivedStudents->Organisation->HrefValue = "";
$cstArchivedStudents->Organisation->TooltipValue = "";
// StudentNumber
$cstArchivedStudents->StudentNumber->HrefValue = "";
$cstArchivedStudents->StudentNumber->TooltipValue = "";
// Age
$cstArchivedStudents->Age->HrefValue = "";
$cstArchivedStudents->Age->TooltipValue = "";
// Cellphone
$cstArchivedStudents->Cellphone->HrefValue = "";
$cstArchivedStudents->Cellphone->TooltipValue = "";
// EmailAddress
$cstArchivedStudents->EmailAddress->HrefValue = "";
$cstArchivedStudents->EmailAddress->TooltipValue = "";
// BlockAccess
$cstArchivedStudents->BlockAccess->HrefValue = "";
$cstArchivedStudents->BlockAccess->TooltipValue = "";
}
// Call Row Rendered event
if ($cstArchivedStudents->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$cstArchivedStudents->Row_Rendered();
}
// Export data in HTML/CSV/Word/Excel/XML/Email format
function ExportData() {
global $cstArchivedStudents;
$utf8 = FALSE;
$bSelectLimit = EW_SELECT_LIMIT;
// Load recordset
if ($bSelectLimit) {
$this->lTotalRecs = $cstArchivedStudents->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset())
$this->lTotalRecs = $rs->RecordCount();
}
$this->lStartRec = 1;
// Export all
if ($cstArchivedStudents->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 ($cstArchivedStudents->Export == "xml") {
$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
$XmlDoc->AddRoot();
} else {
$ExportDoc = new cExportDocument($cstArchivedStudents, "h");
$ExportDoc->ExportHeader();
if ($ExportDoc->Horizontal) { // Horizontal format, write header
$ExportDoc->BeginExportRow();
$ExportDoc->ExportCaption($cstArchivedStudents->Title);
$ExportDoc->ExportCaption($cstArchivedStudents->FirstName);
$ExportDoc->ExportCaption($cstArchivedStudents->Surname);
$ExportDoc->ExportCaption($cstArchivedStudents->KnownAs);
$ExportDoc->ExportCaption($cstArchivedStudents->Organisation);
$ExportDoc->ExportCaption($cstArchivedStudents->OrganisationType);
$ExportDoc->ExportCaption($cstArchivedStudents->StudentNumber);
$ExportDoc->ExportCaption($cstArchivedStudents->CCEFacilitatorID);
$ExportDoc->ExportCaption($cstArchivedStudents->Project);
$ExportDoc->ExportCaption($cstArchivedStudents->ProjectDiscipline);
$ExportDoc->ExportCaption($cstArchivedStudents->IDNumber);
$ExportDoc->ExportCaption($cstArchivedStudents->ECSANumber);
$ExportDoc->ExportCaption($cstArchivedStudents->Age);
$ExportDoc->ExportCaption($cstArchivedStudents->HighestQual);
$ExportDoc->ExportCaption($cstArchivedStudents->AreaDiscipline);
$ExportDoc->ExportCaption($cstArchivedStudents->Telephone);
$ExportDoc->ExportCaption($cstArchivedStudents->Cellphone);
$ExportDoc->ExportCaption($cstArchivedStudents->EmailAddress);
$ExportDoc->ExportCaption($cstArchivedStudents->HomeAddress);
$ExportDoc->ExportCaption($cstArchivedStudents->WorkAddress);
$ExportDoc->ExportCaption($cstArchivedStudents->PostalAddress);
$ExportDoc->ExportCaption($cstArchivedStudents->Designation);
$ExportDoc->ExportCaption($cstArchivedStudents->Department);
$ExportDoc->ExportCaption($cstArchivedStudents->CESAAccountNo);
$ExportDoc->ExportCaption($cstArchivedStudents->VATNo);
$ExportDoc->ExportCaption($cstArchivedStudents->DietaryRequirements);
$ExportDoc->ExportCaption($cstArchivedStudents->CVFile);
$ExportDoc->ExportCaption($cstArchivedStudents->IDFile);
$ExportDoc->ExportCaption($cstArchivedStudents->QualCertificate1);
$ExportDoc->ExportCaption($cstArchivedStudents->QualCertificate2);
$ExportDoc->ExportCaption($cstArchivedStudents->QualCertificate3);
$ExportDoc->ExportCaption($cstArchivedStudents->MemorandumFile);
$ExportDoc->ExportCaption($cstArchivedStudents->AgreementFile);
$ExportDoc->ExportCaption($cstArchivedStudents->OrderNo);
$ExportDoc->ExportCaption($cstArchivedStudents->BookedByName);
$ExportDoc->ExportCaption($cstArchivedStudents->BookedByDesignation);
$ExportDoc->ExportCaption($cstArchivedStudents->BookedByTelNo);
$ExportDoc->ExportCaption($cstArchivedStudents->BookedByFaxNo);
$ExportDoc->ExportCaption($cstArchivedStudents->BookedByCellNo);
$ExportDoc->ExportCaption($cstArchivedStudents->BookedByEmail);
$ExportDoc->ExportCaption($cstArchivedStudents->WebUsername);
$ExportDoc->ExportCaption($cstArchivedStudents->WebPassword);
$ExportDoc->ExportCaption($cstArchivedStudents->MentorName);
$ExportDoc->ExportCaption($cstArchivedStudents->MentorDesig);
$ExportDoc->ExportCaption($cstArchivedStudents->MentorTel);
$ExportDoc->ExportCaption($cstArchivedStudents->MentorCell);
$ExportDoc->ExportCaption($cstArchivedStudents->MentorEmail);
$ExportDoc->ExportCaption($cstArchivedStudents->HRManagerName);
$ExportDoc->ExportCaption($cstArchivedStudents->HRManagerDesignation);
$ExportDoc->ExportCaption($cstArchivedStudents->HRManagerTelNo);
$ExportDoc->ExportCaption($cstArchivedStudents->HRManagerCellNo);
$ExportDoc->ExportCaption($cstArchivedStudents->HRManagerEmail);
$ExportDoc->ExportCaption($cstArchivedStudents->LengthEmploy);
$ExportDoc->ExportCaption($cstArchivedStudents->BlockAccess);
$ExportDoc->ExportCaption($cstArchivedStudents->Archived);
$ExportDoc->ExportCaption($cstArchivedStudents->ResultLetter);
$ExportDoc->ExportCaption($cstArchivedStudents->Achieved);
$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
$cstArchivedStudents->CssClass = "";
$cstArchivedStudents->CssStyle = "";
$cstArchivedStudents->RowType = EW_ROWTYPE_VIEW; // Render view
$this->RenderRow();
if ($cstArchivedStudents->Export == "xml") {
$XmlDoc->AddRow();
$XmlDoc->AddField('Title', $cstArchivedStudents->Title->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('FirstName', $cstArchivedStudents->FirstName->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Surname', $cstArchivedStudents->Surname->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('KnownAs', $cstArchivedStudents->KnownAs->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Organisation', $cstArchivedStudents->Organisation->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('OrganisationType', $cstArchivedStudents->OrganisationType->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('StudentNumber', $cstArchivedStudents->StudentNumber->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('CCEFacilitatorID', $cstArchivedStudents->CCEFacilitatorID->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Project', $cstArchivedStudents->Project->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('ProjectDiscipline', $cstArchivedStudents->ProjectDiscipline->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('IDNumber', $cstArchivedStudents->IDNumber->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('ECSANumber', $cstArchivedStudents->ECSANumber->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Age', $cstArchivedStudents->Age->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('HighestQual', $cstArchivedStudents->HighestQual->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('AreaDiscipline', $cstArchivedStudents->AreaDiscipline->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Telephone', $cstArchivedStudents->Telephone->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Cellphone', $cstArchivedStudents->Cellphone->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('EmailAddress', $cstArchivedStudents->EmailAddress->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('HomeAddress', $cstArchivedStudents->HomeAddress->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('WorkAddress', $cstArchivedStudents->WorkAddress->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('PostalAddress', $cstArchivedStudents->PostalAddress->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Designation', $cstArchivedStudents->Designation->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Department', $cstArchivedStudents->Department->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('CESAAccountNo', $cstArchivedStudents->CESAAccountNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('VATNo', $cstArchivedStudents->VATNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('DietaryRequirements', $cstArchivedStudents->DietaryRequirements->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('CVFile', $cstArchivedStudents->CVFile->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('IDFile', $cstArchivedStudents->IDFile->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate1', $cstArchivedStudents->QualCertificate1->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate2', $cstArchivedStudents->QualCertificate2->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('QualCertificate3', $cstArchivedStudents->QualCertificate3->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('MemorandumFile', $cstArchivedStudents->MemorandumFile->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('AgreementFile', $cstArchivedStudents->AgreementFile->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('OrderNo', $cstArchivedStudents->OrderNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByName', $cstArchivedStudents->BookedByName->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByDesignation', $cstArchivedStudents->BookedByDesignation->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByTelNo', $cstArchivedStudents->BookedByTelNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByFaxNo', $cstArchivedStudents->BookedByFaxNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByCellNo', $cstArchivedStudents->BookedByCellNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('BookedByEmail', $cstArchivedStudents->BookedByEmail->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('WebUsername', $cstArchivedStudents->WebUsername->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('WebPassword', $cstArchivedStudents->WebPassword->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorName', $cstArchivedStudents->MentorName->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorDesig', $cstArchivedStudents->MentorDesig->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorTel', $cstArchivedStudents->MentorTel->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorCell', $cstArchivedStudents->MentorCell->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('MentorEmail', $cstArchivedStudents->MentorEmail->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerName', $cstArchivedStudents->HRManagerName->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerDesignation', $cstArchivedStudents->HRManagerDesignation->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerTelNo', $cstArchivedStudents->HRManagerTelNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerCellNo', $cstArchivedStudents->HRManagerCellNo->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('HRManagerEmail', $cstArchivedStudents->HRManagerEmail->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('LengthEmploy', $cstArchivedStudents->LengthEmploy->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('BlockAccess', $cstArchivedStudents->BlockAccess->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Archived', $cstArchivedStudents->Archived->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('ResultLetter', $cstArchivedStudents->ResultLetter->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
$XmlDoc->AddField('Achieved', $cstArchivedStudents->Achieved->ExportValue($cstArchivedStudents->Export, $cstArchivedStudents->ExportOriginalValue));
} else {
$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
$ExportDoc->ExportField($cstArchivedStudents->Title);
$ExportDoc->ExportField($cstArchivedStudents->FirstName);
$ExportDoc->ExportField($cstArchivedStudents->Surname);
$ExportDoc->ExportField($cstArchivedStudents->KnownAs);
$ExportDoc->ExportField($cstArchivedStudents->Organisation);
$ExportDoc->ExportField($cstArchivedStudents->OrganisationType);
$ExportDoc->ExportField($cstArchivedStudents->StudentNumber);
$ExportDoc->ExportField($cstArchivedStudents->CCEFacilitatorID);
$ExportDoc->ExportField($cstArchivedStudents->Project);
$ExportDoc->ExportField($cstArchivedStudents->ProjectDiscipline);
$ExportDoc->ExportField($cstArchivedStudents->IDNumber);
$ExportDoc->ExportField($cstArchivedStudents->ECSANumber);
$ExportDoc->ExportField($cstArchivedStudents->Age);
$ExportDoc->ExportField($cstArchivedStudents->HighestQual);
$ExportDoc->ExportField($cstArchivedStudents->AreaDiscipline);
$ExportDoc->ExportField($cstArchivedStudents->Telephone);
$ExportDoc->ExportField($cstArchivedStudents->Cellphone);
$ExportDoc->ExportField($cstArchivedStudents->EmailAddress);
$ExportDoc->ExportField($cstArchivedStudents->HomeAddress);
$ExportDoc->ExportField($cstArchivedStudents->WorkAddress);
$ExportDoc->ExportField($cstArchivedStudents->PostalAddress);
$ExportDoc->ExportField($cstArchivedStudents->Designation);
$ExportDoc->ExportField($cstArchivedStudents->Department);
$ExportDoc->ExportField($cstArchivedStudents->CESAAccountNo);
$ExportDoc->ExportField($cstArchivedStudents->VATNo);
$ExportDoc->ExportField($cstArchivedStudents->DietaryRequirements);
$ExportDoc->ExportField($cstArchivedStudents->CVFile);
$ExportDoc->ExportField($cstArchivedStudents->IDFile);
$ExportDoc->ExportField($cstArchivedStudents->QualCertificate1);
$ExportDoc->ExportField($cstArchivedStudents->QualCertificate2);
$ExportDoc->ExportField($cstArchivedStudents->QualCertificate3);
$ExportDoc->ExportField($cstArchivedStudents->MemorandumFile);
$ExportDoc->ExportField($cstArchivedStudents->AgreementFile);
$ExportDoc->ExportField($cstArchivedStudents->OrderNo);
$ExportDoc->ExportField($cstArchivedStudents->BookedByName);
$ExportDoc->ExportField($cstArchivedStudents->BookedByDesignation);
$ExportDoc->ExportField($cstArchivedStudents->BookedByTelNo);
$ExportDoc->ExportField($cstArchivedStudents->BookedByFaxNo);
$ExportDoc->ExportField($cstArchivedStudents->BookedByCellNo);
$ExportDoc->ExportField($cstArchivedStudents->BookedByEmail);
$ExportDoc->ExportField($cstArchivedStudents->WebUsername);
$ExportDoc->ExportField($cstArchivedStudents->WebPassword);
$ExportDoc->ExportField($cstArchivedStudents->MentorName);
$ExportDoc->ExportField($cstArchivedStudents->MentorDesig);
$ExportDoc->ExportField($cstArchivedStudents->MentorTel);
$ExportDoc->ExportField($cstArchivedStudents->MentorCell);
$ExportDoc->ExportField($cstArchivedStudents->MentorEmail);
$ExportDoc->ExportField($cstArchivedStudents->HRManagerName);
$ExportDoc->ExportField($cstArchivedStudents->HRManagerDesignation);
$ExportDoc->ExportField($cstArchivedStudents->HRManagerTelNo);
$ExportDoc->ExportField($cstArchivedStudents->HRManagerCellNo);
$ExportDoc->ExportField($cstArchivedStudents->HRManagerEmail);
$ExportDoc->ExportField($cstArchivedStudents->LengthEmploy);
$ExportDoc->ExportField($cstArchivedStudents->BlockAccess);
$ExportDoc->ExportField($cstArchivedStudents->Archived);
$ExportDoc->ExportField($cstArchivedStudents->ResultLetter);
$ExportDoc->ExportField($cstArchivedStudents->Achieved);
$ExportDoc->EndExportRow();
}
}
$rs->MoveNext();
}
if ($cstArchivedStudents->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($cstArchivedStudents->Export, array("email", "xml")))
echo "\xEF\xBB\xBF";
// Write debug message if enabled
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
// Output data
if ($cstArchivedStudents->Export == "xml") {
header("Content-Type: text/xml");
echo $XmlDoc->XML();
} elseif ($cstArchivedStudents->Export == "email") {
$this->ExportEmail($ExportDoc->Text);
$this->Page_Terminate($cstArchivedStudents->ExportReturnUrl());
} else {
echo $ExportDoc->Text;
}
}
// Export email
function ExportEmail($EmailContent) {
global $Language, $cstArchivedStudents;
$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 ($cstArchivedStudents->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 $cstArchivedStudents;
// Initialize
$sQry = "export=html";
// Build QueryString for search
if ($cstArchivedStudents->getSessionBasicSearchKeyword() <> "") {
$sQry .= "&" . EW_TABLE_BASIC_SEARCH . "=" . $cstArchivedStudents->getSessionBasicSearchKeyword() . "&" . EW_TABLE_BASIC_SEARCH_TYPE . "=" . $cstArchivedStudents->getSessionBasicSearchType();
}
// Build QueryString for pager
$sQry .= "&" . EW_TABLE_REC_PER_PAGE . "=" . $cstArchivedStudents->getRecordsPerPage() . "&" . EW_TABLE_START_REC . "=" . $cstArchivedStudents->getStartRecordNumber();
return $sQry;
}
// Add search QueryString
function AddSearchQueryString(&$Qry, &$Fld) {
global $cstArchivedStudents;
$FldParm = substr($Fld->FldVar, 2);
$FldSearchValue = $cstArchivedStudents->GetAdvancedSearch("x_" . $FldParm);
if (strval($FldSearchValue) <> "") {
$Qry .= "&x_" . $FldParm . "=" . FldSearchValue .
"&z_" . $FldParm . "=" . $cstArchivedStudents->GetAdvancedSearch("z_" . $FldParm);
}
$FldSearchValue2 = $cstArchivedStudents->GetAdvancedSearch("y_" . $FldParm);
if (strval($FldSearchValue2) <> "") {
$Qry .= "&v_" . $FldParm . "=" . $cstArchivedStudents->GetAdvancedSearch("v_" . $FldParm) .
"&y_" . $FldParm . "=" . $FldSearchValue2 .
"&w_" . $FldParm . "=" . $cstArchivedStudents->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";
}
}
?>