Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/cceconvenors/
Upload File :
Current File : /var/www/cesa.co.za/cceconvenors/cstStudentAssigArchivedview.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 "cstStudentAssigArchivedinfo.php" ?>
<?php include "CCEFacilitatorUsersinfo.php" ?>
<?php include "cstArchivedStudents2013info.php" ?>
<?php include "cstArchivedStudents2012info.php" ?>
<?php include "cstArchivedStudents2014info.php" ?>
<?php include "cstArchivedStudents2015info.php" ?>
<?php include "cstArchivedStudents2016info.php" ?>
<?php include "cstArchivedStudents2018info.php" ?>
<?php include "cstArchivedStudents2019info.php" ?>
<?php include "cstArchivedStudents2020info.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
$cstStudentAssigArchived_view = new ccstStudentAssigArchived_view();
$Page =& $cstStudentAssigArchived_view;

// Page init
$cstStudentAssigArchived_view->Page_Init();

// Page main
$cstStudentAssigArchived_view->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($cstStudentAssigArchived->Export == "") { ?>
<script type="text/javascript">
<!--

// Create page object
var cstStudentAssigArchived_view = new ew_Page("cstStudentAssigArchived_view");

// page properties
cstStudentAssigArchived_view.PageID = "view"; // page ID
cstStudentAssigArchived_view.FormID = "fcstStudentAssigArchivedview"; // form ID
var EW_PAGE_ID = cstStudentAssigArchived_view.PageID; // for backward compatibility

// extend page with Form_CustomValidate function
cstStudentAssigArchived_view.Form_CustomValidate =  
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }
<?php if (EW_CLIENT_VALIDATE) { ?>
cstStudentAssigArchived_view.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
cstStudentAssigArchived_view.ValidateRequired = false; // no JavaScript validation
<?php } ?>

//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--

// Write your client script here, no need to add script tags.
// To include another .js script, use:
// ew_ClientScriptInclude("my_javascript.js"); 
//-->

</script>
<?php } ?>
<p><span class="phpmaker"><?php echo $Language->Phrase("View") ?>&nbsp;<?php echo $Language->Phrase("TblTypeCUSTOMVIEW") ?><?php echo $cstStudentAssigArchived->TableCaption() ?>
<?php if ($cstStudentAssigArchived->Export == "") { ?>
&nbsp;&nbsp;<a href="<?php echo $cstStudentAssigArchived_view->ExportPrintUrl ?>"><img src="images/print.gif" alt="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" title="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" width="16" height="16" border="0"></a>
&nbsp;&nbsp;<a href="<?php echo $cstStudentAssigArchived_view->ExportExcelUrl ?>"><img src='images/exportxls.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' width='16' height='16' border='0'></a>
&nbsp;&nbsp;<a href="<?php echo $cstStudentAssigArchived_view->ExportWordUrl ?>"><img src='images/exportdoc.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' width='16' height='16' border='0'></a>
&nbsp;&nbsp;<a name="emf_cstStudentAssigArchived" id="emf_cstStudentAssigArchived" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_cstStudentAssigArchived',hdr:ewLanguage.Phrase('ExportToEmail'),key:<?php echo ew_ArrayToJsonAttr($cstStudentAssigArchived_view->arRecKey) ?>,sel:false});"><img src='images/exportemail.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' width='16' height='16' border='0'></a>
<?php } ?>
<br><br>
<?php if ($cstStudentAssigArchived->Export == "") { ?>
<a href="<?php echo $cstStudentAssigArchived_view->ListUrl ?>"><?php echo $Language->Phrase("BackToList") ?></a>&nbsp;
<?php } ?>
</span></p>
<?php
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
$cstStudentAssigArchived_view->ShowMessage();
?>
<p>
<?php if ($cstStudentAssigArchived->Export == "") { ?>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
	<tr>
		<td nowrap>
<?php if (!isset($cstStudentAssigArchived_view->Pager)) $cstStudentAssigArchived_view->Pager = new cPrevNextPager($cstStudentAssigArchived_view->lStartRec, $cstStudentAssigArchived_view->lDisplayRecs, $cstStudentAssigArchived_view->lTotalRecs) ?>
<?php if ($cstStudentAssigArchived_view->Pager->RecordCount > 0) { ?>
	<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?>&nbsp;</span></td>
<!--first page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--previous page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--current page number-->
	<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $cstStudentAssigArchived_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--last page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
	<td><span class="phpmaker">&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $cstStudentAssigArchived_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($cstStudentAssigArchived_view->sSrchWhere == "0=101") { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
	<?php } else { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
	<?php } ?>
<?php } ?>
		</td>
	</tr>
</table>
</form>
<br>
<?php } ?>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table cellspacing="0" class="ewTable">
<?php if ($cstStudentAssigArchived->CCEStudentID->Visible) { // CCEStudentID ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->CCEStudentID->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->CCEStudentID->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->CCEStudentID->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->CCEStudentID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->RefNum->Visible) { // RefNum ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->RefNum->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->RefNum->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->RefNum->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->RefNum->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->AssignmentName->Visible) { // AssignmentName ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->AssignmentName->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->AssignmentName->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->AssignmentName->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->AssignmentName->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->DueDate->Visible) { // DueDate ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->DueDate->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->DueDate->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->DueDate->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->DueDate->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->DateSubmitted->Visible) { // DateSubmitted ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->DateSubmitted->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->DateSubmitted->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->DateSubmitted->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->DateSubmitted->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->AssignmentFile1->Visible) { // AssignmentFile1 ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->AssignmentFile1->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->AssignmentFile1->CellAttributes() ?>>
<?php if ($cstStudentAssigArchived->AssignmentFile1->HrefValue <> "" || $cstStudentAssigArchived->AssignmentFile1->TooltipValue <> "") { ?>
<?php if (!empty($cstStudentAssigArchived->AssignmentFile1->Upload->DbValue)) { ?>
<a href="<?php echo $cstStudentAssigArchived->AssignmentFile1->HrefValue ?>" target="_blank"><?php echo $cstStudentAssigArchived->AssignmentFile1->ViewValue ?></a>
<?php } elseif (!in_array($cstStudentAssigArchived->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($cstStudentAssigArchived->AssignmentFile1->Upload->DbValue)) { ?>
<?php echo $cstStudentAssigArchived->AssignmentFile1->ViewValue ?>
<?php } elseif (!in_array($cstStudentAssigArchived->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->AssignmentFile2->Visible) { // AssignmentFile2 ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->AssignmentFile2->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->AssignmentFile2->CellAttributes() ?>>
<?php if ($cstStudentAssigArchived->AssignmentFile2->HrefValue <> "" || $cstStudentAssigArchived->AssignmentFile2->TooltipValue <> "") { ?>
<?php if (!empty($cstStudentAssigArchived->AssignmentFile2->Upload->DbValue)) { ?>
<a href="<?php echo $cstStudentAssigArchived->AssignmentFile2->HrefValue ?>" target="_blank"><?php echo $cstStudentAssigArchived->AssignmentFile2->ViewValue ?></a>
<?php } elseif (!in_array($cstStudentAssigArchived->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($cstStudentAssigArchived->AssignmentFile2->Upload->DbValue)) { ?>
<?php echo $cstStudentAssigArchived->AssignmentFile2->ViewValue ?>
<?php } elseif (!in_array($cstStudentAssigArchived->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->AssignmentFile3->Visible) { // AssignmentFile3 ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->AssignmentFile3->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->AssignmentFile3->CellAttributes() ?>>
<?php if ($cstStudentAssigArchived->AssignmentFile3->HrefValue <> "" || $cstStudentAssigArchived->AssignmentFile3->TooltipValue <> "") { ?>
<?php if (!empty($cstStudentAssigArchived->AssignmentFile3->Upload->DbValue)) { ?>
<a href="<?php echo $cstStudentAssigArchived->AssignmentFile3->HrefValue ?>" target="_blank"><?php echo $cstStudentAssigArchived->AssignmentFile3->ViewValue ?></a>
<?php } elseif (!in_array($cstStudentAssigArchived->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($cstStudentAssigArchived->AssignmentFile3->Upload->DbValue)) { ?>
<?php echo $cstStudentAssigArchived->AssignmentFile3->ViewValue ?>
<?php } elseif (!in_array($cstStudentAssigArchived->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->Passed->Visible) { // Passed ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->Passed->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->Passed->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->Passed->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->Passed->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->RulingCode->Visible) { // RulingCode ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->RulingCode->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->RulingCode->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->RulingCode->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->RulingCode->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($cstStudentAssigArchived->AssignmentScore->Visible) { // AssignmentScore ?>
	<tr<?php echo $cstStudentAssigArchived->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $cstStudentAssigArchived->AssignmentScore->FldCaption() ?></td>
		<td<?php echo $cstStudentAssigArchived->AssignmentScore->CellAttributes() ?>>
<div<?php echo $cstStudentAssigArchived->AssignmentScore->ViewAttributes() ?>><?php echo $cstStudentAssigArchived->AssignmentScore->ViewValue ?></div></td>
	</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if ($cstStudentAssigArchived->Export == "") { ?>
<br>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
	<tr>
		<td nowrap>
<?php if (!isset($cstStudentAssigArchived_view->Pager)) $cstStudentAssigArchived_view->Pager = new cPrevNextPager($cstStudentAssigArchived_view->lStartRec, $cstStudentAssigArchived_view->lDisplayRecs, $cstStudentAssigArchived_view->lTotalRecs) ?>
<?php if ($cstStudentAssigArchived_view->Pager->RecordCount > 0) { ?>
	<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?>&nbsp;</span></td>
<!--first page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--previous page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--current page number-->
	<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $cstStudentAssigArchived_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--last page button-->
	<?php if ($cstStudentAssigArchived_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $cstStudentAssigArchived_view->PageUrl() ?>start=<?php echo $cstStudentAssigArchived_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
	<td><span class="phpmaker">&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $cstStudentAssigArchived_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($cstStudentAssigArchived_view->sSrchWhere == "0=101") { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
	<?php } else { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
	<?php } ?>
<?php } ?>
		</td>
	</tr>
</table>
</form>
<?php } ?>
<p>
<?php if ($cstStudentAssigArchived->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
$cstStudentAssigArchived_view->Page_Terminate();
?>
<?php

//
// Page class
//
class ccstStudentAssigArchived_view {

	// Page ID
	var $PageID = 'view';

	// Table name
	var $TableName = 'cstStudentAssigArchived';

	// Page object name
	var $PageObjName = 'cstStudentAssigArchived_view';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		global $cstStudentAssigArchived;
		if ($cstStudentAssigArchived->UseTokenInUrl) $PageUrl .= "t=" . $cstStudentAssigArchived->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, $cstStudentAssigArchived;
		if ($cstStudentAssigArchived->UseTokenInUrl) {
			if ($objForm)
				return ($cstStudentAssigArchived->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($cstStudentAssigArchived->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;

		// Language object
		$Language = new cLanguage();

		// Table object (cstStudentAssigArchived)
		$GLOBALS["cstStudentAssigArchived"] = new ccstStudentAssigArchived();

		// Table object (CCEFacilitatorUsers)
		$GLOBALS['CCEFacilitatorUsers'] = new cCCEFacilitatorUsers();

		// Table object (cstArchivedStudents2013)
		$GLOBALS['cstArchivedStudents2013'] = new ccstArchivedStudents2013();

		// Table object (cstArchivedStudents2012)
		$GLOBALS['cstArchivedStudents2012'] = new ccstArchivedStudents2012();

		// Table object (cstArchivedStudents2014)
		$GLOBALS['cstArchivedStudents2014'] = new ccstArchivedStudents2014();

		// Table object (cstArchivedStudents2015)
		$GLOBALS['cstArchivedStudents2015'] = new ccstArchivedStudents2015();

		// Table object (cstArchivedStudents2016)
		$GLOBALS['cstArchivedStudents2016'] = new ccstArchivedStudents2016();

		// Table object (cstArchivedStudents2018)
		$GLOBALS['cstArchivedStudents2018'] = new ccstArchivedStudents2018();

		// Table object (cstArchivedStudents2019)
		$GLOBALS['cstArchivedStudents2019'] = new ccstArchivedStudents2019();

		// Table object (cstArchivedStudents2020)
		$GLOBALS['cstArchivedStudents2020'] = new ccstArchivedStudents2020();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'view', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'cstStudentAssigArchived', TRUE);

		// Start timer
		$GLOBALS["gsTimer"] = new cTimer();

		// Open connection
		$conn = ew_Connect();
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
		global $cstStudentAssigArchived;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}

		// Get export parameters
		if (@$_GET["export"] <> "") {
			$cstStudentAssigArchived->Export = $_GET["export"];
		} elseif (ew_IsHttpPost()) {
			if (@$_POST["exporttype"] <> "")
				$cstStudentAssigArchived->Export = $_POST["exporttype"];
		} else {
			$cstStudentAssigArchived->setExportReturnUrl(ew_CurrentUrl());
		}
		$gsExport = $cstStudentAssigArchived->Export; // Get export parameter, used in header
		$gsExportFile = $cstStudentAssigArchived->TableVar; // Get export file, used in header
		if (@$_GET["CCEStudentAssigID"] <> "") {
			if ($gsExportFile <> "") $gsExportFile .= "_";
			$gsExportFile .= ew_StripSlashes($_GET["CCEStudentAssigID"]);
		}
		if ($cstStudentAssigArchived->Export == "excel") {
			header('Content-Type: application/vnd.ms-excel');
			header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
		}
		if ($cstStudentAssigArchived->Export == "word") {
			header('Content-Type: application/vnd.ms-word');
			header('Content-Disposition: attachment; filename=' . $gsExportFile .'.doc');
		}

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		$this->Page_Redirecting($url);
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $lDisplayRecs = 1;
	var $lStartRec;
	var $lStopRec;
	var $lTotalRecs = 0;
	var $lRecRange = 10;
	var $lRecCnt;
	var $arRecKey = array();

	//
	// Page main
	//
	function Page_Main() {
		global $Language, $cstStudentAssigArchived;

		// Load current record
		$bLoadCurrentRecord = FALSE;
		$sReturnUrl = "";
		$bMatchRecord = FALSE;
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET["CCEStudentAssigID"] <> "") {
				$cstStudentAssigArchived->CCEStudentAssigID->setQueryStringValue($_GET["CCEStudentAssigID"]);
				$this->arRecKey["CCEStudentAssigID"] = $cstStudentAssigArchived->CCEStudentAssigID->QueryStringValue;
			} else {
				$bLoadCurrentRecord = TRUE;
			}

			// Get action
			$cstStudentAssigArchived->CurrentAction = "I"; // Display form
			switch ($cstStudentAssigArchived->CurrentAction) {
				case "I": // Get a record to display
					$this->lStartRec = 1; // Initialize start position
					if ($rs = $this->LoadRecordset()) // Load records
						$this->lTotalRecs = $rs->RecordCount(); // Get record count
					if ($this->lTotalRecs <= 0) { // No record found
						$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
						$this->Page_Terminate("cstStudentAssigArchivedlist.php"); // Return to list page
					} elseif ($bLoadCurrentRecord) { // Load current record position
						$this->SetUpStartRec(); // Set up start record position

						// Point to current record
						if (intval($this->lStartRec) <= intval($this->lTotalRecs)) {
							$bMatchRecord = TRUE;
							$rs->Move($this->lStartRec-1);
						}
					} else { // Match key values
						while (!$rs->EOF) {
							if (strval($cstStudentAssigArchived->CCEStudentAssigID->CurrentValue) == strval($rs->fields('CCEStudentAssigID'))) {
								$cstStudentAssigArchived->setStartRecordNumber($this->lStartRec); // Save record position
								$bMatchRecord = TRUE;
								break;
							} else {
								$this->lStartRec++;
								$rs->MoveNext();
							}
						}
					}
					if (!$bMatchRecord) {
						$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
						$sReturnUrl = "cstStudentAssigArchivedlist.php"; // No matching record, return to list
					} else {
						$this->LoadRowValues($rs); // Load row values
					}
			}

			// Export data only
			if (in_array($cstStudentAssigArchived->Export, array("html","word","excel","xml","csv","email"))) {
				$this->ExportData();
				if ($cstStudentAssigArchived->Export <> "email")
					$this->Page_Terminate(); // Terminate response
				exit();
			}
		} else {
			$sReturnUrl = "cstStudentAssigArchivedlist.php"; // Not page request, return to list
		}
		if ($sReturnUrl <> "")
			$this->Page_Terminate($sReturnUrl);

		// Render row
		$cstStudentAssigArchived->RowType = EW_ROWTYPE_VIEW;
		$this->RenderRow();
	}

	// Set up starting record parameters
	function SetUpStartRec() {
		global $cstStudentAssigArchived;
		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];
				$cstStudentAssigArchived->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;
					}
					$cstStudentAssigArchived->setStartRecordNumber($this->lStartRec);
				}
			}
		}
		$this->lStartRec = $cstStudentAssigArchived->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
			$cstStudentAssigArchived->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
			$cstStudentAssigArchived->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
			$cstStudentAssigArchived->setStartRecordNumber($this->lStartRec);
		}
	}

	// Load recordset
	function LoadRecordset($offset = -1, $rowcnt = -1) {
		global $conn, $cstStudentAssigArchived;

		// Call Recordset Selecting event
		$cstStudentAssigArchived->Recordset_Selecting($cstStudentAssigArchived->CurrentFilter);

		// Load List page SQL
		$sSql = $cstStudentAssigArchived->SelectSQL();
		if ($offset > -1 && $rowcnt > -1)
			$sSql .= " LIMIT $offset, $rowcnt";

		// Load recordset
		$rs = ew_LoadRecordset($sSql);

		// Call Recordset Selected event
		$cstStudentAssigArchived->Recordset_Selected($rs);
		return $rs;
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $cstStudentAssigArchived;
		$sFilter = $cstStudentAssigArchived->KeyFilter();

		// Call Row Selecting event
		$cstStudentAssigArchived->Row_Selecting($sFilter);

		// Load SQL based on filter
		$cstStudentAssigArchived->CurrentFilter = $sFilter;
		$sSql = $cstStudentAssigArchived->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values

			// Call Row Selected event
			$cstStudentAssigArchived->Row_Selected($rs);
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn, $cstStudentAssigArchived;
		$cstStudentAssigArchived->CCEStudentAssigID->setDbValue($rs->fields('CCEStudentAssigID'));
		$cstStudentAssigArchived->CCEStudentID->setDbValue($rs->fields('CCEStudentID'));
		$cstStudentAssigArchived->RefNum->setDbValue($rs->fields('RefNum'));
		$cstStudentAssigArchived->AssignmentName->setDbValue($rs->fields('AssignmentName'));
		$cstStudentAssigArchived->DueDate->setDbValue($rs->fields('DueDate'));
		$cstStudentAssigArchived->DateSubmitted->setDbValue($rs->fields('DateSubmitted'));
		$cstStudentAssigArchived->AssignmentFile1->Upload->DbValue = $rs->fields('AssignmentFile1');
		$cstStudentAssigArchived->AssignmentFile2->Upload->DbValue = $rs->fields('AssignmentFile2');
		$cstStudentAssigArchived->AssignmentFile3->Upload->DbValue = $rs->fields('AssignmentFile3');
		$cstStudentAssigArchived->Passed->setDbValue($rs->fields('Passed'));
		$cstStudentAssigArchived->RulingCode->setDbValue($rs->fields('RulingCode'));
		$cstStudentAssigArchived->AssignmentScore->setDbValue($rs->fields('AssignmentScore'));
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language, $cstStudentAssigArchived;

		// Initialize URLs
		$this->ExportPrintUrl = $this->PageUrl() . "export=print&" . "CCEStudentAssigID=" . urlencode($cstStudentAssigArchived->CCEStudentAssigID->CurrentValue);
		$this->ExportHtmlUrl = $this->PageUrl() . "export=html&" . "CCEStudentAssigID=" . urlencode($cstStudentAssigArchived->CCEStudentAssigID->CurrentValue);
		$this->ExportExcelUrl = $this->PageUrl() . "export=excel&" . "CCEStudentAssigID=" . urlencode($cstStudentAssigArchived->CCEStudentAssigID->CurrentValue);
		$this->ExportWordUrl = $this->PageUrl() . "export=word&" . "CCEStudentAssigID=" . urlencode($cstStudentAssigArchived->CCEStudentAssigID->CurrentValue);
		$this->ExportXmlUrl = $this->PageUrl() . "export=xml&" . "CCEStudentAssigID=" . urlencode($cstStudentAssigArchived->CCEStudentAssigID->CurrentValue);
		$this->ExportCsvUrl = $this->PageUrl() . "export=csv&" . "CCEStudentAssigID=" . urlencode($cstStudentAssigArchived->CCEStudentAssigID->CurrentValue);
		$this->AddUrl = $cstStudentAssigArchived->AddUrl();
		$this->EditUrl = $cstStudentAssigArchived->EditUrl();
		$this->CopyUrl = $cstStudentAssigArchived->CopyUrl();
		$this->DeleteUrl = $cstStudentAssigArchived->DeleteUrl();
		$this->ListUrl = $cstStudentAssigArchived->ListUrl();

		// Call Row_Rendering event
		$cstStudentAssigArchived->Row_Rendering();

		// Common render codes for all row types
		// CCEStudentID

		$cstStudentAssigArchived->CCEStudentID->CellCssStyle = ""; $cstStudentAssigArchived->CCEStudentID->CellCssClass = "";
		$cstStudentAssigArchived->CCEStudentID->CellAttrs = array(); $cstStudentAssigArchived->CCEStudentID->ViewAttrs = array(); $cstStudentAssigArchived->CCEStudentID->EditAttrs = array();

		// RefNum
		$cstStudentAssigArchived->RefNum->CellCssStyle = ""; $cstStudentAssigArchived->RefNum->CellCssClass = "";
		$cstStudentAssigArchived->RefNum->CellAttrs = array(); $cstStudentAssigArchived->RefNum->ViewAttrs = array(); $cstStudentAssigArchived->RefNum->EditAttrs = array();

		// AssignmentName
		$cstStudentAssigArchived->AssignmentName->CellCssStyle = ""; $cstStudentAssigArchived->AssignmentName->CellCssClass = "";
		$cstStudentAssigArchived->AssignmentName->CellAttrs = array(); $cstStudentAssigArchived->AssignmentName->ViewAttrs = array(); $cstStudentAssigArchived->AssignmentName->EditAttrs = array();

		// DueDate
		$cstStudentAssigArchived->DueDate->CellCssStyle = ""; $cstStudentAssigArchived->DueDate->CellCssClass = "";
		$cstStudentAssigArchived->DueDate->CellAttrs = array(); $cstStudentAssigArchived->DueDate->ViewAttrs = array(); $cstStudentAssigArchived->DueDate->EditAttrs = array();

		// DateSubmitted
		$cstStudentAssigArchived->DateSubmitted->CellCssStyle = ""; $cstStudentAssigArchived->DateSubmitted->CellCssClass = "";
		$cstStudentAssigArchived->DateSubmitted->CellAttrs = array(); $cstStudentAssigArchived->DateSubmitted->ViewAttrs = array(); $cstStudentAssigArchived->DateSubmitted->EditAttrs = array();

		// AssignmentFile1
		$cstStudentAssigArchived->AssignmentFile1->CellCssStyle = ""; $cstStudentAssigArchived->AssignmentFile1->CellCssClass = "";
		$cstStudentAssigArchived->AssignmentFile1->CellAttrs = array(); $cstStudentAssigArchived->AssignmentFile1->ViewAttrs = array(); $cstStudentAssigArchived->AssignmentFile1->EditAttrs = array();

		// AssignmentFile2
		$cstStudentAssigArchived->AssignmentFile2->CellCssStyle = ""; $cstStudentAssigArchived->AssignmentFile2->CellCssClass = "";
		$cstStudentAssigArchived->AssignmentFile2->CellAttrs = array(); $cstStudentAssigArchived->AssignmentFile2->ViewAttrs = array(); $cstStudentAssigArchived->AssignmentFile2->EditAttrs = array();

		// AssignmentFile3
		$cstStudentAssigArchived->AssignmentFile3->CellCssStyle = ""; $cstStudentAssigArchived->AssignmentFile3->CellCssClass = "";
		$cstStudentAssigArchived->AssignmentFile3->CellAttrs = array(); $cstStudentAssigArchived->AssignmentFile3->ViewAttrs = array(); $cstStudentAssigArchived->AssignmentFile3->EditAttrs = array();

		// Passed
		$cstStudentAssigArchived->Passed->CellCssStyle = ""; $cstStudentAssigArchived->Passed->CellCssClass = "";
		$cstStudentAssigArchived->Passed->CellAttrs = array(); $cstStudentAssigArchived->Passed->ViewAttrs = array(); $cstStudentAssigArchived->Passed->EditAttrs = array();

		// RulingCode
		$cstStudentAssigArchived->RulingCode->CellCssStyle = ""; $cstStudentAssigArchived->RulingCode->CellCssClass = "";
		$cstStudentAssigArchived->RulingCode->CellAttrs = array(); $cstStudentAssigArchived->RulingCode->ViewAttrs = array(); $cstStudentAssigArchived->RulingCode->EditAttrs = array();

		// AssignmentScore
		$cstStudentAssigArchived->AssignmentScore->CellCssStyle = ""; $cstStudentAssigArchived->AssignmentScore->CellCssClass = "";
		$cstStudentAssigArchived->AssignmentScore->CellAttrs = array(); $cstStudentAssigArchived->AssignmentScore->ViewAttrs = array(); $cstStudentAssigArchived->AssignmentScore->EditAttrs = array();
		if ($cstStudentAssigArchived->RowType == EW_ROWTYPE_VIEW) { // View row

			// CCEStudentAssigID
			$cstStudentAssigArchived->CCEStudentAssigID->ViewValue = $cstStudentAssigArchived->CCEStudentAssigID->CurrentValue;
			$cstStudentAssigArchived->CCEStudentAssigID->CssStyle = "";
			$cstStudentAssigArchived->CCEStudentAssigID->CssClass = "";
			$cstStudentAssigArchived->CCEStudentAssigID->ViewCustomAttributes = "";

			// CCEStudentID
			if (strval($cstStudentAssigArchived->CCEStudentID->CurrentValue) <> "") {
				$sFilterWrk = "`CCEStudentID` = " . ew_AdjustSql($cstStudentAssigArchived->CCEStudentID->CurrentValue) . "";
			$sSqlWrk = "SELECT `FirstName`, `Surname` FROM `CCEStudents`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
				$sWhereWrk .= "(" . $sFilterWrk . ")";
			}
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$sSqlWrk .= " ORDER BY `Surname`";
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$cstStudentAssigArchived->CCEStudentID->ViewValue = $rswrk->fields('FirstName');
					$cstStudentAssigArchived->CCEStudentID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('Surname');
					$rswrk->Close();
				} else {
					$cstStudentAssigArchived->CCEStudentID->ViewValue = $cstStudentAssigArchived->CCEStudentID->CurrentValue;
				}
			} else {
				$cstStudentAssigArchived->CCEStudentID->ViewValue = NULL;
			}
			$cstStudentAssigArchived->CCEStudentID->CssStyle = "";
			$cstStudentAssigArchived->CCEStudentID->CssClass = "";
			$cstStudentAssigArchived->CCEStudentID->ViewCustomAttributes = "";

			// RefNum
			$cstStudentAssigArchived->RefNum->ViewValue = $cstStudentAssigArchived->RefNum->CurrentValue;
			$cstStudentAssigArchived->RefNum->CssStyle = "";
			$cstStudentAssigArchived->RefNum->CssClass = "";
			$cstStudentAssigArchived->RefNum->ViewCustomAttributes = "";

			// AssignmentName
			$cstStudentAssigArchived->AssignmentName->ViewValue = $cstStudentAssigArchived->AssignmentName->CurrentValue;
			$cstStudentAssigArchived->AssignmentName->CssStyle = "";
			$cstStudentAssigArchived->AssignmentName->CssClass = "";
			$cstStudentAssigArchived->AssignmentName->ViewCustomAttributes = "";

			// DueDate
			$cstStudentAssigArchived->DueDate->ViewValue = $cstStudentAssigArchived->DueDate->CurrentValue;
			$cstStudentAssigArchived->DueDate->ViewValue = ew_FormatDateTime($cstStudentAssigArchived->DueDate->ViewValue, 5);
			$cstStudentAssigArchived->DueDate->CssStyle = "";
			$cstStudentAssigArchived->DueDate->CssClass = "";
			$cstStudentAssigArchived->DueDate->ViewCustomAttributes = "";

			// DateSubmitted
			$cstStudentAssigArchived->DateSubmitted->ViewValue = $cstStudentAssigArchived->DateSubmitted->CurrentValue;
			$cstStudentAssigArchived->DateSubmitted->ViewValue = ew_FormatDateTime($cstStudentAssigArchived->DateSubmitted->ViewValue, 5);
			$cstStudentAssigArchived->DateSubmitted->CssStyle = "";
			$cstStudentAssigArchived->DateSubmitted->CssClass = "";
			$cstStudentAssigArchived->DateSubmitted->ViewCustomAttributes = "";

			// AssignmentFile1
			if (!ew_Empty($cstStudentAssigArchived->AssignmentFile1->Upload->DbValue)) {
				$cstStudentAssigArchived->AssignmentFile1->ViewValue = $cstStudentAssigArchived->AssignmentFile1->Upload->DbValue;
			} else {
				$cstStudentAssigArchived->AssignmentFile1->ViewValue = "";
			}
			$cstStudentAssigArchived->AssignmentFile1->CssStyle = "";
			$cstStudentAssigArchived->AssignmentFile1->CssClass = "";
			$cstStudentAssigArchived->AssignmentFile1->ViewCustomAttributes = "";

			// AssignmentFile2
			if (!ew_Empty($cstStudentAssigArchived->AssignmentFile2->Upload->DbValue)) {
				$cstStudentAssigArchived->AssignmentFile2->ViewValue = $cstStudentAssigArchived->AssignmentFile2->Upload->DbValue;
			} else {
				$cstStudentAssigArchived->AssignmentFile2->ViewValue = "";
			}
			$cstStudentAssigArchived->AssignmentFile2->CssStyle = "";
			$cstStudentAssigArchived->AssignmentFile2->CssClass = "";
			$cstStudentAssigArchived->AssignmentFile2->ViewCustomAttributes = "";

			// AssignmentFile3
			if (!ew_Empty($cstStudentAssigArchived->AssignmentFile3->Upload->DbValue)) {
				$cstStudentAssigArchived->AssignmentFile3->ViewValue = $cstStudentAssigArchived->AssignmentFile3->Upload->DbValue;
			} else {
				$cstStudentAssigArchived->AssignmentFile3->ViewValue = "";
			}
			$cstStudentAssigArchived->AssignmentFile3->CssStyle = "";
			$cstStudentAssigArchived->AssignmentFile3->CssClass = "";
			$cstStudentAssigArchived->AssignmentFile3->ViewCustomAttributes = "";

			// Passed
			if (strval($cstStudentAssigArchived->Passed->CurrentValue) <> "") {
				switch ($cstStudentAssigArchived->Passed->CurrentValue) {
					case "1":
						$cstStudentAssigArchived->Passed->ViewValue = "Achieved";
						break;
					case "2":
						$cstStudentAssigArchived->Passed->ViewValue = "Not Yet Achieved";
						break;
					case "0":
						$cstStudentAssigArchived->Passed->ViewValue = "Not Yet Evaluated";
						break;
					case "3":
						$cstStudentAssigArchived->Passed->ViewValue = "Added to PoE";
						break;
					default:
						$cstStudentAssigArchived->Passed->ViewValue = $cstStudentAssigArchived->Passed->CurrentValue;
				}
			} else {
				$cstStudentAssigArchived->Passed->ViewValue = NULL;
			}
			$cstStudentAssigArchived->Passed->CssStyle = "";
			$cstStudentAssigArchived->Passed->CssClass = "";
			$cstStudentAssigArchived->Passed->ViewCustomAttributes = "";

			// RulingCode
			if (strval($cstStudentAssigArchived->RulingCode->CurrentValue) <> "") {
				$sFilterWrk = "`RulingCode` = '" . ew_AdjustSql($cstStudentAssigArchived->RulingCode->CurrentValue) . "'";
			$sSqlWrk = "SELECT `Ruling` FROM `CCERulingCodes`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
				$sWhereWrk .= "(" . $sFilterWrk . ")";
			}
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$cstStudentAssigArchived->RulingCode->ViewValue = $rswrk->fields('Ruling');
					$rswrk->Close();
				} else {
					$cstStudentAssigArchived->RulingCode->ViewValue = $cstStudentAssigArchived->RulingCode->CurrentValue;
				}
			} else {
				$cstStudentAssigArchived->RulingCode->ViewValue = NULL;
			}
			$cstStudentAssigArchived->RulingCode->CssStyle = "";
			$cstStudentAssigArchived->RulingCode->CssClass = "";
			$cstStudentAssigArchived->RulingCode->ViewCustomAttributes = "";

			// AssignmentScore
			$cstStudentAssigArchived->AssignmentScore->ViewValue = $cstStudentAssigArchived->AssignmentScore->CurrentValue;
			$cstStudentAssigArchived->AssignmentScore->CssStyle = "";
			$cstStudentAssigArchived->AssignmentScore->CssClass = "";
			$cstStudentAssigArchived->AssignmentScore->ViewCustomAttributes = "";

			// CCEStudentID
			$cstStudentAssigArchived->CCEStudentID->HrefValue = "";
			$cstStudentAssigArchived->CCEStudentID->TooltipValue = "";

			// RefNum
			$cstStudentAssigArchived->RefNum->HrefValue = "";
			$cstStudentAssigArchived->RefNum->TooltipValue = "";

			// AssignmentName
			$cstStudentAssigArchived->AssignmentName->HrefValue = "";
			$cstStudentAssigArchived->AssignmentName->TooltipValue = "";

			// DueDate
			$cstStudentAssigArchived->DueDate->HrefValue = "";
			$cstStudentAssigArchived->DueDate->TooltipValue = "";

			// DateSubmitted
			$cstStudentAssigArchived->DateSubmitted->HrefValue = "";
			$cstStudentAssigArchived->DateSubmitted->TooltipValue = "";

			// AssignmentFile1
			if (!ew_Empty($cstStudentAssigArchived->AssignmentFile1->Upload->DbValue)) {
				$cstStudentAssigArchived->AssignmentFile1->HrefValue = ew_UploadPathEx(FALSE, $cstStudentAssigArchived->AssignmentFile1->UploadPath) . ((!empty($cstStudentAssigArchived->AssignmentFile1->ViewValue)) ? $cstStudentAssigArchived->AssignmentFile1->ViewValue : $cstStudentAssigArchived->AssignmentFile1->CurrentValue);
				if ($cstStudentAssigArchived->Export <> "") $cstStudentAssigArchived->AssignmentFile1->HrefValue = ew_ConvertFullUrl($cstStudentAssigArchived->AssignmentFile1->HrefValue);
			} else {
				$cstStudentAssigArchived->AssignmentFile1->HrefValue = "";
			}
			$cstStudentAssigArchived->AssignmentFile1->TooltipValue = "";

			// AssignmentFile2
			if (!ew_Empty($cstStudentAssigArchived->AssignmentFile2->Upload->DbValue)) {
				$cstStudentAssigArchived->AssignmentFile2->HrefValue = ew_UploadPathEx(FALSE, $cstStudentAssigArchived->AssignmentFile2->UploadPath) . ((!empty($cstStudentAssigArchived->AssignmentFile2->ViewValue)) ? $cstStudentAssigArchived->AssignmentFile2->ViewValue : $cstStudentAssigArchived->AssignmentFile2->CurrentValue);
				if ($cstStudentAssigArchived->Export <> "") $cstStudentAssigArchived->AssignmentFile2->HrefValue = ew_ConvertFullUrl($cstStudentAssigArchived->AssignmentFile2->HrefValue);
			} else {
				$cstStudentAssigArchived->AssignmentFile2->HrefValue = "";
			}
			$cstStudentAssigArchived->AssignmentFile2->TooltipValue = "";

			// AssignmentFile3
			if (!ew_Empty($cstStudentAssigArchived->AssignmentFile3->Upload->DbValue)) {
				$cstStudentAssigArchived->AssignmentFile3->HrefValue = ew_UploadPathEx(FALSE, $cstStudentAssigArchived->AssignmentFile3->UploadPath) . ((!empty($cstStudentAssigArchived->AssignmentFile3->ViewValue)) ? $cstStudentAssigArchived->AssignmentFile3->ViewValue : $cstStudentAssigArchived->AssignmentFile3->CurrentValue);
				if ($cstStudentAssigArchived->Export <> "") $cstStudentAssigArchived->AssignmentFile3->HrefValue = ew_ConvertFullUrl($cstStudentAssigArchived->AssignmentFile3->HrefValue);
			} else {
				$cstStudentAssigArchived->AssignmentFile3->HrefValue = "";
			}
			$cstStudentAssigArchived->AssignmentFile3->TooltipValue = "";

			// Passed
			$cstStudentAssigArchived->Passed->HrefValue = "";
			$cstStudentAssigArchived->Passed->TooltipValue = "";

			// RulingCode
			$cstStudentAssigArchived->RulingCode->HrefValue = "";
			$cstStudentAssigArchived->RulingCode->TooltipValue = "";

			// AssignmentScore
			$cstStudentAssigArchived->AssignmentScore->HrefValue = "";
			$cstStudentAssigArchived->AssignmentScore->TooltipValue = "";
		}

		// Call Row Rendered event
		if ($cstStudentAssigArchived->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$cstStudentAssigArchived->Row_Rendered();
	}

	// Export data in HTML/CSV/Word/Excel/XML/Email format
	function ExportData() {
		global $cstStudentAssigArchived;
		$utf8 = FALSE;
		$bSelectLimit = FALSE;

		// Load recordset
		if ($bSelectLimit) {
			$this->lTotalRecs = $cstStudentAssigArchived->SelectRecordCount();
		} else {
			if ($rs = $this->LoadRecordset())
				$this->lTotalRecs = $rs->RecordCount();
		}
		$this->lStartRec = 1;
		$this->SetUpStartRec(); // Set up start record position

		// Set the last record to display
		if ($this->lDisplayRecs < 0) {
			$this->lStopRec = $this->lTotalRecs;
		} else {
			$this->lStopRec = $this->lStartRec + $this->lDisplayRecs - 1;
		}
		if (!$rs) {
			header("Content-Type:"); // Remove header
			header("Content-Disposition:");
			$this->ShowMessage();
			return;
		}
		if ($cstStudentAssigArchived->Export == "xml") {
			$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
			$XmlDoc->AddRoot();
		} else {
			$ExportDoc = new cExportDocument($cstStudentAssigArchived, "v");
			$ExportDoc->ExportHeader();
			if ($ExportDoc->Horizontal) { // Horizontal format, write header
				$ExportDoc->BeginExportRow();
				$ExportDoc->ExportCaption($cstStudentAssigArchived->CCEStudentAssigID);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->CCEStudentID);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->RefNum);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->AssignmentName);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->DueDate);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->DateSubmitted);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->AssignmentFile1);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->AssignmentFile2);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->AssignmentFile3);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->Passed);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->RulingCode);
				$ExportDoc->ExportCaption($cstStudentAssigArchived->AssignmentScore);
				$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
				$cstStudentAssigArchived->CssClass = "";
				$cstStudentAssigArchived->CssStyle = "";
				$cstStudentAssigArchived->RowType = EW_ROWTYPE_VIEW; // Render view
				$this->RenderRow();
				if ($cstStudentAssigArchived->Export == "xml") {
					$XmlDoc->AddRow();
					$XmlDoc->AddField('CCEStudentAssigID', $cstStudentAssigArchived->CCEStudentAssigID->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('CCEStudentID', $cstStudentAssigArchived->CCEStudentID->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('RefNum', $cstStudentAssigArchived->RefNum->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentName', $cstStudentAssigArchived->AssignmentName->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('DueDate', $cstStudentAssigArchived->DueDate->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('DateSubmitted', $cstStudentAssigArchived->DateSubmitted->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile1', $cstStudentAssigArchived->AssignmentFile1->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile2', $cstStudentAssigArchived->AssignmentFile2->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile3', $cstStudentAssigArchived->AssignmentFile3->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('Passed', $cstStudentAssigArchived->Passed->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('RulingCode', $cstStudentAssigArchived->RulingCode->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentScore', $cstStudentAssigArchived->AssignmentScore->ExportValue($cstStudentAssigArchived->Export, $cstStudentAssigArchived->ExportOriginalValue));
				} else {
					$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
					$ExportDoc->ExportField($cstStudentAssigArchived->CCEStudentAssigID);
					$ExportDoc->ExportField($cstStudentAssigArchived->CCEStudentID);
					$ExportDoc->ExportField($cstStudentAssigArchived->RefNum);
					$ExportDoc->ExportField($cstStudentAssigArchived->AssignmentName);
					$ExportDoc->ExportField($cstStudentAssigArchived->DueDate);
					$ExportDoc->ExportField($cstStudentAssigArchived->DateSubmitted);
					$ExportDoc->ExportField($cstStudentAssigArchived->AssignmentFile1);
					$ExportDoc->ExportField($cstStudentAssigArchived->AssignmentFile2);
					$ExportDoc->ExportField($cstStudentAssigArchived->AssignmentFile3);
					$ExportDoc->ExportField($cstStudentAssigArchived->Passed);
					$ExportDoc->ExportField($cstStudentAssigArchived->RulingCode);
					$ExportDoc->ExportField($cstStudentAssigArchived->AssignmentScore);
					$ExportDoc->EndExportRow();
				}
			}
			$rs->MoveNext();
		}
		if ($cstStudentAssigArchived->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($cstStudentAssigArchived->Export, array("email", "xml")))
			echo "\xEF\xBB\xBF";

		// Write debug message if enabled
		if (EW_DEBUG_ENABLED)
			echo ew_DebugMsg();

		// Output data
		if ($cstStudentAssigArchived->Export == "xml") {
			header("Content-Type: text/xml");
			echo $XmlDoc->XML();
		} elseif ($cstStudentAssigArchived->Export == "email") {
			$this->ExportEmail($ExportDoc->Text);
			$this->Page_Terminate($cstStudentAssigArchived->ExportReturnUrl());
		} else {
			echo $ExportDoc->Text;
		}
	}

	// Export email
	function ExportEmail($EmailContent) {
		global $Language, $cstStudentAssigArchived;
		$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 ($cstStudentAssigArchived->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 $cstStudentAssigArchived;

		// Initialize
		$sQry = "export=html";

		// Add record key QueryString
		$sQry .= "&" . substr($cstStudentAssigArchived->KeyUrl("", ""), 1);
		return $sQry;
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	function Message_Showing(&$msg) {

		// Example:
		//$msg = "your new message";

	}
}
?>