Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/cceconvenors/
Upload File :
Current File : /var/www/cesa.co.za/cceconvenors/CCEFeedbackview.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 "CCEFeedbackinfo.php" ?>
<?php include "CCEFacilitatorUsersinfo.php" ?>
<?php include "userfn7.php" ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Always modified
header("Cache-Control: private, no-store, no-cache, must-revalidate"); // HTTP/1.1 
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
<?php

// Create page object
$CCEFeedback_view = new cCCEFeedback_view();
$Page =& $CCEFeedback_view;

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

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

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

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

// extend page with Form_CustomValidate function
CCEFeedback_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) { ?>
CCEFeedback_view.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCEFeedback_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("TblTypeTABLE") ?><?php echo $CCEFeedback->TableCaption() ?>
<?php if ($CCEFeedback->Export == "") { ?>
&nbsp;&nbsp;<a href="<?php echo $CCEFeedback_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 $CCEFeedback_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 $CCEFeedback_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_CCEFeedback" id="emf_CCEFeedback" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_CCEFeedback',hdr:ewLanguage.Phrase('ExportToEmail'),key:<?php echo ew_ArrayToJsonAttr($CCEFeedback_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 ($CCEFeedback->Export == "") { ?>
<a href="<?php echo $CCEFeedback_view->ListUrl ?>"><?php echo $Language->Phrase("BackToList") ?></a>&nbsp;
<?php } ?>
</span></p>
<?php
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
$CCEFeedback_view->ShowMessage();
?>
<p>
<?php if ($CCEFeedback->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($CCEFeedback_view->Pager)) $CCEFeedback_view->Pager = new cPrevNextPager($CCEFeedback_view->lStartRec, $CCEFeedback_view->lDisplayRecs, $CCEFeedback_view->lTotalRecs) ?>
<?php if ($CCEFeedback_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 ($CCEFeedback_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 ($CCEFeedback_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 $CCEFeedback_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($CCEFeedback_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 ($CCEFeedback_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 $CCEFeedback_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($CCEFeedback_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 ($CCEFeedback->FeedbackID->Visible) { // FeedbackID ?>
	<tr<?php echo $CCEFeedback->FeedbackID->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->FeedbackID->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->FeedbackID->CellAttributes() ?>>
<div<?php echo $CCEFeedback->FeedbackID->ViewAttributes() ?>><?php echo $CCEFeedback->FeedbackID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Ques1->Visible) { // Ques1 ?>
	<tr<?php echo $CCEFeedback->Ques1->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Ques1->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Ques1->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Ques1->ViewAttributes() ?>><?php echo $CCEFeedback->Ques1->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Comments1->Visible) { // Comments1 ?>
	<tr<?php echo $CCEFeedback->Comments1->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Comments1->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Comments1->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Comments1->ViewAttributes() ?>><?php echo $CCEFeedback->Comments1->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Ques2->Visible) { // Ques2 ?>
	<tr<?php echo $CCEFeedback->Ques2->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Ques2->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Ques2->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Ques2->ViewAttributes() ?>><?php echo $CCEFeedback->Ques2->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Comments2->Visible) { // Comments2 ?>
	<tr<?php echo $CCEFeedback->Comments2->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Comments2->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Comments2->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Comments2->ViewAttributes() ?>><?php echo $CCEFeedback->Comments2->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Ques3->Visible) { // Ques3 ?>
	<tr<?php echo $CCEFeedback->Ques3->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Ques3->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Ques3->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Ques3->ViewAttributes() ?>><?php echo $CCEFeedback->Ques3->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Comments3->Visible) { // Comments3 ?>
	<tr<?php echo $CCEFeedback->Comments3->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Comments3->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Comments3->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Comments3->ViewAttributes() ?>><?php echo $CCEFeedback->Comments3->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Ques4->Visible) { // Ques4 ?>
	<tr<?php echo $CCEFeedback->Ques4->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Ques4->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Ques4->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Ques4->ViewAttributes() ?>><?php echo $CCEFeedback->Ques4->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Comments4->Visible) { // Comments4 ?>
	<tr<?php echo $CCEFeedback->Comments4->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Comments4->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Comments4->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Comments4->ViewAttributes() ?>><?php echo $CCEFeedback->Comments4->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Ques5->Visible) { // Ques5 ?>
	<tr<?php echo $CCEFeedback->Ques5->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Ques5->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Ques5->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Ques5->ViewAttributes() ?>><?php echo $CCEFeedback->Ques5->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Comments5->Visible) { // Comments5 ?>
	<tr<?php echo $CCEFeedback->Comments5->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Comments5->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Comments5->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Comments5->ViewAttributes() ?>><?php echo $CCEFeedback->Comments5->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Ques6->Visible) { // Ques6 ?>
	<tr<?php echo $CCEFeedback->Ques6->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Ques6->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Ques6->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Ques6->ViewAttributes() ?>><?php echo $CCEFeedback->Ques6->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Comments6->Visible) { // Comments6 ?>
	<tr<?php echo $CCEFeedback->Comments6->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Comments6->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Comments6->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Comments6->ViewAttributes() ?>><?php echo $CCEFeedback->Comments6->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->Comments7->Visible) { // Comments7 ?>
	<tr<?php echo $CCEFeedback->Comments7->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->Comments7->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->Comments7->CellAttributes() ?>>
<div<?php echo $CCEFeedback->Comments7->ViewAttributes() ?>><?php echo $CCEFeedback->Comments7->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->CCEStudentID->Visible) { // CCEStudentID ?>
	<tr<?php echo $CCEFeedback->CCEStudentID->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->CCEStudentID->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->CCEStudentID->CellAttributes() ?>>
<div<?php echo $CCEFeedback->CCEStudentID->ViewAttributes() ?>><?php echo $CCEFeedback->CCEStudentID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEFeedback->DateSubmitted->Visible) { // DateSubmitted ?>
	<tr<?php echo $CCEFeedback->DateSubmitted->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCEFeedback->DateSubmitted->FldCaption() ?></td>
		<td<?php echo $CCEFeedback->DateSubmitted->CellAttributes() ?>>
<div<?php echo $CCEFeedback->DateSubmitted->ViewAttributes() ?>><?php echo $CCEFeedback->DateSubmitted->ViewValue ?></div></td>
	</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if ($CCEFeedback->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($CCEFeedback_view->Pager)) $CCEFeedback_view->Pager = new cPrevNextPager($CCEFeedback_view->lStartRec, $CCEFeedback_view->lDisplayRecs, $CCEFeedback_view->lTotalRecs) ?>
<?php if ($CCEFeedback_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 ($CCEFeedback_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 ($CCEFeedback_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 $CCEFeedback_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($CCEFeedback_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 ($CCEFeedback_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $CCEFeedback_view->PageUrl() ?>start=<?php echo $CCEFeedback_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 $CCEFeedback_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($CCEFeedback_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 ($CCEFeedback->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
$CCEFeedback_view->Page_Terminate();
?>
<?php

//
// Page class
//
class cCCEFeedback_view {

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

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

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

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

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

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

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

		// Table object (CCEFeedback)
		$GLOBALS["CCEFeedback"] = new cCCEFeedback();

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

		// 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", 'CCEFeedback', 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 $CCEFeedback;

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

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

			// Get action
			$CCEFeedback->CurrentAction = "I"; // Display form
			switch ($CCEFeedback->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("CCEFeedbacklist.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($CCEFeedback->FeedbackID->CurrentValue) == strval($rs->fields('FeedbackID'))) {
								$CCEFeedback->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 = "CCEFeedbacklist.php"; // No matching record, return to list
					} else {
						$this->LoadRowValues($rs); // Load row values
					}
			}

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

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

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

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

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

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

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

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

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

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

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

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

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn, $CCEFeedback;
		$CCEFeedback->FeedbackID->setDbValue($rs->fields('FeedbackID'));
		$CCEFeedback->Ques1->setDbValue($rs->fields('Ques1'));
		$CCEFeedback->Comments1->setDbValue($rs->fields('Comments1'));
		$CCEFeedback->Ques2->setDbValue($rs->fields('Ques2'));
		$CCEFeedback->Comments2->setDbValue($rs->fields('Comments2'));
		$CCEFeedback->Ques3->setDbValue($rs->fields('Ques3'));
		$CCEFeedback->Comments3->setDbValue($rs->fields('Comments3'));
		$CCEFeedback->Ques4->setDbValue($rs->fields('Ques4'));
		$CCEFeedback->Comments4->setDbValue($rs->fields('Comments4'));
		$CCEFeedback->Ques5->setDbValue($rs->fields('Ques5'));
		$CCEFeedback->Comments5->setDbValue($rs->fields('Comments5'));
		$CCEFeedback->Ques6->setDbValue($rs->fields('Ques6'));
		$CCEFeedback->Comments6->setDbValue($rs->fields('Comments6'));
		$CCEFeedback->Comments7->setDbValue($rs->fields('Comments7'));
		$CCEFeedback->CCEStudentID->setDbValue($rs->fields('CCEStudentID'));
		$CCEFeedback->DateSubmitted->setDbValue($rs->fields('DateSubmitted'));
	}

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

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

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

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

		$CCEFeedback->FeedbackID->CellCssStyle = ""; $CCEFeedback->FeedbackID->CellCssClass = "";
		$CCEFeedback->FeedbackID->CellAttrs = array(); $CCEFeedback->FeedbackID->ViewAttrs = array(); $CCEFeedback->FeedbackID->EditAttrs = array();

		// Ques1
		$CCEFeedback->Ques1->CellCssStyle = ""; $CCEFeedback->Ques1->CellCssClass = "";
		$CCEFeedback->Ques1->CellAttrs = array(); $CCEFeedback->Ques1->ViewAttrs = array(); $CCEFeedback->Ques1->EditAttrs = array();

		// Comments1
		$CCEFeedback->Comments1->CellCssStyle = ""; $CCEFeedback->Comments1->CellCssClass = "";
		$CCEFeedback->Comments1->CellAttrs = array(); $CCEFeedback->Comments1->ViewAttrs = array(); $CCEFeedback->Comments1->EditAttrs = array();

		// Ques2
		$CCEFeedback->Ques2->CellCssStyle = ""; $CCEFeedback->Ques2->CellCssClass = "";
		$CCEFeedback->Ques2->CellAttrs = array(); $CCEFeedback->Ques2->ViewAttrs = array(); $CCEFeedback->Ques2->EditAttrs = array();

		// Comments2
		$CCEFeedback->Comments2->CellCssStyle = ""; $CCEFeedback->Comments2->CellCssClass = "";
		$CCEFeedback->Comments2->CellAttrs = array(); $CCEFeedback->Comments2->ViewAttrs = array(); $CCEFeedback->Comments2->EditAttrs = array();

		// Ques3
		$CCEFeedback->Ques3->CellCssStyle = ""; $CCEFeedback->Ques3->CellCssClass = "";
		$CCEFeedback->Ques3->CellAttrs = array(); $CCEFeedback->Ques3->ViewAttrs = array(); $CCEFeedback->Ques3->EditAttrs = array();

		// Comments3
		$CCEFeedback->Comments3->CellCssStyle = ""; $CCEFeedback->Comments3->CellCssClass = "";
		$CCEFeedback->Comments3->CellAttrs = array(); $CCEFeedback->Comments3->ViewAttrs = array(); $CCEFeedback->Comments3->EditAttrs = array();

		// Ques4
		$CCEFeedback->Ques4->CellCssStyle = ""; $CCEFeedback->Ques4->CellCssClass = "";
		$CCEFeedback->Ques4->CellAttrs = array(); $CCEFeedback->Ques4->ViewAttrs = array(); $CCEFeedback->Ques4->EditAttrs = array();

		// Comments4
		$CCEFeedback->Comments4->CellCssStyle = ""; $CCEFeedback->Comments4->CellCssClass = "";
		$CCEFeedback->Comments4->CellAttrs = array(); $CCEFeedback->Comments4->ViewAttrs = array(); $CCEFeedback->Comments4->EditAttrs = array();

		// Ques5
		$CCEFeedback->Ques5->CellCssStyle = ""; $CCEFeedback->Ques5->CellCssClass = "";
		$CCEFeedback->Ques5->CellAttrs = array(); $CCEFeedback->Ques5->ViewAttrs = array(); $CCEFeedback->Ques5->EditAttrs = array();

		// Comments5
		$CCEFeedback->Comments5->CellCssStyle = ""; $CCEFeedback->Comments5->CellCssClass = "";
		$CCEFeedback->Comments5->CellAttrs = array(); $CCEFeedback->Comments5->ViewAttrs = array(); $CCEFeedback->Comments5->EditAttrs = array();

		// Ques6
		$CCEFeedback->Ques6->CellCssStyle = ""; $CCEFeedback->Ques6->CellCssClass = "";
		$CCEFeedback->Ques6->CellAttrs = array(); $CCEFeedback->Ques6->ViewAttrs = array(); $CCEFeedback->Ques6->EditAttrs = array();

		// Comments6
		$CCEFeedback->Comments6->CellCssStyle = ""; $CCEFeedback->Comments6->CellCssClass = "";
		$CCEFeedback->Comments6->CellAttrs = array(); $CCEFeedback->Comments6->ViewAttrs = array(); $CCEFeedback->Comments6->EditAttrs = array();

		// Comments7
		$CCEFeedback->Comments7->CellCssStyle = ""; $CCEFeedback->Comments7->CellCssClass = "";
		$CCEFeedback->Comments7->CellAttrs = array(); $CCEFeedback->Comments7->ViewAttrs = array(); $CCEFeedback->Comments7->EditAttrs = array();

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

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

			// FeedbackID
			$CCEFeedback->FeedbackID->ViewValue = $CCEFeedback->FeedbackID->CurrentValue;
			$CCEFeedback->FeedbackID->CssStyle = "";
			$CCEFeedback->FeedbackID->CssClass = "";
			$CCEFeedback->FeedbackID->ViewCustomAttributes = "";

			// Ques1
			$CCEFeedback->Ques1->ViewValue = $CCEFeedback->Ques1->CurrentValue;
			$CCEFeedback->Ques1->CssStyle = "";
			$CCEFeedback->Ques1->CssClass = "";
			$CCEFeedback->Ques1->ViewCustomAttributes = "";

			// Comments1
			$CCEFeedback->Comments1->ViewValue = $CCEFeedback->Comments1->CurrentValue;
			$CCEFeedback->Comments1->CssStyle = "";
			$CCEFeedback->Comments1->CssClass = "";
			$CCEFeedback->Comments1->ViewCustomAttributes = "";

			// Ques2
			$CCEFeedback->Ques2->ViewValue = $CCEFeedback->Ques2->CurrentValue;
			$CCEFeedback->Ques2->CssStyle = "";
			$CCEFeedback->Ques2->CssClass = "";
			$CCEFeedback->Ques2->ViewCustomAttributes = "";

			// Comments2
			$CCEFeedback->Comments2->ViewValue = $CCEFeedback->Comments2->CurrentValue;
			$CCEFeedback->Comments2->CssStyle = "";
			$CCEFeedback->Comments2->CssClass = "";
			$CCEFeedback->Comments2->ViewCustomAttributes = "";

			// Ques3
			$CCEFeedback->Ques3->ViewValue = $CCEFeedback->Ques3->CurrentValue;
			$CCEFeedback->Ques3->CssStyle = "";
			$CCEFeedback->Ques3->CssClass = "";
			$CCEFeedback->Ques3->ViewCustomAttributes = "";

			// Comments3
			$CCEFeedback->Comments3->ViewValue = $CCEFeedback->Comments3->CurrentValue;
			$CCEFeedback->Comments3->CssStyle = "";
			$CCEFeedback->Comments3->CssClass = "";
			$CCEFeedback->Comments3->ViewCustomAttributes = "";

			// Ques4
			$CCEFeedback->Ques4->ViewValue = $CCEFeedback->Ques4->CurrentValue;
			$CCEFeedback->Ques4->CssStyle = "";
			$CCEFeedback->Ques4->CssClass = "";
			$CCEFeedback->Ques4->ViewCustomAttributes = "";

			// Comments4
			$CCEFeedback->Comments4->ViewValue = $CCEFeedback->Comments4->CurrentValue;
			$CCEFeedback->Comments4->CssStyle = "";
			$CCEFeedback->Comments4->CssClass = "";
			$CCEFeedback->Comments4->ViewCustomAttributes = "";

			// Ques5
			$CCEFeedback->Ques5->ViewValue = $CCEFeedback->Ques5->CurrentValue;
			$CCEFeedback->Ques5->CssStyle = "";
			$CCEFeedback->Ques5->CssClass = "";
			$CCEFeedback->Ques5->ViewCustomAttributes = "";

			// Comments5
			$CCEFeedback->Comments5->ViewValue = $CCEFeedback->Comments5->CurrentValue;
			$CCEFeedback->Comments5->CssStyle = "";
			$CCEFeedback->Comments5->CssClass = "";
			$CCEFeedback->Comments5->ViewCustomAttributes = "";

			// Ques6
			$CCEFeedback->Ques6->ViewValue = $CCEFeedback->Ques6->CurrentValue;
			$CCEFeedback->Ques6->CssStyle = "";
			$CCEFeedback->Ques6->CssClass = "";
			$CCEFeedback->Ques6->ViewCustomAttributes = "";

			// Comments6
			$CCEFeedback->Comments6->ViewValue = $CCEFeedback->Comments6->CurrentValue;
			$CCEFeedback->Comments6->CssStyle = "";
			$CCEFeedback->Comments6->CssClass = "";
			$CCEFeedback->Comments6->ViewCustomAttributes = "";

			// Comments7
			$CCEFeedback->Comments7->ViewValue = $CCEFeedback->Comments7->CurrentValue;
			$CCEFeedback->Comments7->CssStyle = "";
			$CCEFeedback->Comments7->CssClass = "";
			$CCEFeedback->Comments7->ViewCustomAttributes = "";

			// CCEStudentID
			$CCEFeedback->CCEStudentID->ViewValue = $CCEFeedback->CCEStudentID->CurrentValue;
			$CCEFeedback->CCEStudentID->CssStyle = "";
			$CCEFeedback->CCEStudentID->CssClass = "";
			$CCEFeedback->CCEStudentID->ViewCustomAttributes = "";

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

			// FeedbackID
			$CCEFeedback->FeedbackID->HrefValue = "";
			$CCEFeedback->FeedbackID->TooltipValue = "";

			// Ques1
			$CCEFeedback->Ques1->HrefValue = "";
			$CCEFeedback->Ques1->TooltipValue = "";

			// Comments1
			$CCEFeedback->Comments1->HrefValue = "";
			$CCEFeedback->Comments1->TooltipValue = "";

			// Ques2
			$CCEFeedback->Ques2->HrefValue = "";
			$CCEFeedback->Ques2->TooltipValue = "";

			// Comments2
			$CCEFeedback->Comments2->HrefValue = "";
			$CCEFeedback->Comments2->TooltipValue = "";

			// Ques3
			$CCEFeedback->Ques3->HrefValue = "";
			$CCEFeedback->Ques3->TooltipValue = "";

			// Comments3
			$CCEFeedback->Comments3->HrefValue = "";
			$CCEFeedback->Comments3->TooltipValue = "";

			// Ques4
			$CCEFeedback->Ques4->HrefValue = "";
			$CCEFeedback->Ques4->TooltipValue = "";

			// Comments4
			$CCEFeedback->Comments4->HrefValue = "";
			$CCEFeedback->Comments4->TooltipValue = "";

			// Ques5
			$CCEFeedback->Ques5->HrefValue = "";
			$CCEFeedback->Ques5->TooltipValue = "";

			// Comments5
			$CCEFeedback->Comments5->HrefValue = "";
			$CCEFeedback->Comments5->TooltipValue = "";

			// Ques6
			$CCEFeedback->Ques6->HrefValue = "";
			$CCEFeedback->Ques6->TooltipValue = "";

			// Comments6
			$CCEFeedback->Comments6->HrefValue = "";
			$CCEFeedback->Comments6->TooltipValue = "";

			// Comments7
			$CCEFeedback->Comments7->HrefValue = "";
			$CCEFeedback->Comments7->TooltipValue = "";

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

			// DateSubmitted
			$CCEFeedback->DateSubmitted->HrefValue = "";
			$CCEFeedback->DateSubmitted->TooltipValue = "";
		}

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

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

		// Load recordset
		if ($bSelectLimit) {
			$this->lTotalRecs = $CCEFeedback->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 ($CCEFeedback->Export == "xml") {
			$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
			$XmlDoc->AddRoot();
		} else {
			$ExportDoc = new cExportDocument($CCEFeedback, "v");
			$ExportDoc->ExportHeader();
			if ($ExportDoc->Horizontal) { // Horizontal format, write header
				$ExportDoc->BeginExportRow();
				$ExportDoc->ExportCaption($CCEFeedback->FeedbackID);
				$ExportDoc->ExportCaption($CCEFeedback->Ques1);
				$ExportDoc->ExportCaption($CCEFeedback->Ques2);
				$ExportDoc->ExportCaption($CCEFeedback->Ques3);
				$ExportDoc->ExportCaption($CCEFeedback->Ques4);
				$ExportDoc->ExportCaption($CCEFeedback->Ques5);
				$ExportDoc->ExportCaption($CCEFeedback->Ques6);
				$ExportDoc->ExportCaption($CCEFeedback->CCEStudentID);
				$ExportDoc->ExportCaption($CCEFeedback->DateSubmitted);
				$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
				$CCEFeedback->CssClass = "";
				$CCEFeedback->CssStyle = "";
				$CCEFeedback->RowType = EW_ROWTYPE_VIEW; // Render view
				$this->RenderRow();
				if ($CCEFeedback->Export == "xml") {
					$XmlDoc->AddRow();
					$XmlDoc->AddField('FeedbackID', $CCEFeedback->FeedbackID->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('Ques1', $CCEFeedback->Ques1->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('Ques2', $CCEFeedback->Ques2->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('Ques3', $CCEFeedback->Ques3->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('Ques4', $CCEFeedback->Ques4->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('Ques5', $CCEFeedback->Ques5->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('Ques6', $CCEFeedback->Ques6->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('CCEStudentID', $CCEFeedback->CCEStudentID->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
					$XmlDoc->AddField('DateSubmitted', $CCEFeedback->DateSubmitted->ExportValue($CCEFeedback->Export, $CCEFeedback->ExportOriginalValue));
				} else {
					$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
					$ExportDoc->ExportField($CCEFeedback->FeedbackID);
					$ExportDoc->ExportField($CCEFeedback->Ques1);
					$ExportDoc->ExportField($CCEFeedback->Ques2);
					$ExportDoc->ExportField($CCEFeedback->Ques3);
					$ExportDoc->ExportField($CCEFeedback->Ques4);
					$ExportDoc->ExportField($CCEFeedback->Ques5);
					$ExportDoc->ExportField($CCEFeedback->Ques6);
					$ExportDoc->ExportField($CCEFeedback->CCEStudentID);
					$ExportDoc->ExportField($CCEFeedback->DateSubmitted);
					$ExportDoc->EndExportRow();
				}
			}
			$rs->MoveNext();
		}
		if ($CCEFeedback->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($CCEFeedback->Export, array("email", "xml")))
			echo "\xEF\xBB\xBF";

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

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

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

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

		// Add record key QueryString
		$sQry .= "&" . substr($CCEFeedback->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";

	}
}
?>