Your IP : 216.73.217.117


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

// Create page object
$AwardsEntries_view = new cAwardsEntries_view();
$Page =& $AwardsEntries_view;

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

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

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

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

// extend page with Form_CustomValidate function
AwardsEntries_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) { ?>
AwardsEntries_view.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
AwardsEntries_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 $AwardsEntries->TableCaption() ?>
<?php if ($AwardsEntries->Export == "") { ?>
&nbsp;&nbsp;<a href="<?php echo $AwardsEntries_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 $AwardsEntries_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 $AwardsEntries_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_AwardsEntries" id="emf_AwardsEntries" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_AwardsEntries',hdr:ewLanguage.Phrase('ExportToEmail'),key:<?php echo ew_ArrayToJsonAttr($AwardsEntries_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 ($AwardsEntries->Export == "") { ?>
<a href="<?php echo $AwardsEntries_view->ListUrl ?>"><?php echo $Language->Phrase("BackToList") ?></a>&nbsp;
<?php } ?>
</span></p>
<?php
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
$AwardsEntries_view->ShowMessage();
?>
<p>
<?php if ($AwardsEntries->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($AwardsEntries_view->Pager)) $AwardsEntries_view->Pager = new cPrevNextPager($AwardsEntries_view->lStartRec, $AwardsEntries_view->lDisplayRecs, $AwardsEntries_view->lTotalRecs) ?>
<?php if ($AwardsEntries_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 ($AwardsEntries_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 ($AwardsEntries_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 $AwardsEntries_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($AwardsEntries_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 ($AwardsEntries_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 $AwardsEntries_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($Security->CanList()) { ?>
	<?php if ($AwardsEntries_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 } else { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></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 ($AwardsEntries->AwardsEntryID->Visible) { // AwardsEntryID ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->AwardsEntryID->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->AwardsEntryID->CellAttributes() ?>>
<div<?php echo $AwardsEntries->AwardsEntryID->ViewAttributes() ?>><?php echo $AwardsEntries->AwardsEntryID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->DateCreated->Visible) { // DateCreated ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->DateCreated->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->DateCreated->CellAttributes() ?>>
<div<?php echo $AwardsEntries->DateCreated->ViewAttributes() ?>><?php echo $AwardsEntries->DateCreated->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->AwardYear->Visible) { // AwardYear ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->AwardYear->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->AwardYear->CellAttributes() ?>>
<div<?php echo $AwardsEntries->AwardYear->ViewAttributes() ?>><?php echo $AwardsEntries->AwardYear->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->PreEntry->Visible) { // PreEntry ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->PreEntry->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->PreEntry->CellAttributes() ?>>
<div<?php echo $AwardsEntries->PreEntry->ViewAttributes() ?>><?php echo $AwardsEntries->PreEntry->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Firm_Name->Visible) { // Firm_Name ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Firm_Name->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Firm_Name->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Firm_Name->ViewAttributes() ?>><?php echo $AwardsEntries->Firm_Name->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Award_Category->Visible) { // Award_Category ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Award_Category->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Award_Category->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Award_Category->ViewAttributes() ?>><?php echo $AwardsEntries->Award_Category->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Start_Date->Visible) { // Start_Date ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Start_Date->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Start_Date->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Start_Date->ViewAttributes() ?>><?php echo $AwardsEntries->Start_Date->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Project_Name->Visible) { // Project_Name ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Project_Name->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Project_Name->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Project_Name->ViewAttributes() ?>><?php echo $AwardsEntries->Project_Name->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Completion_Date->Visible) { // Completion_Date ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Completion_Date->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Completion_Date->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Completion_Date->ViewAttributes() ?>><?php echo $AwardsEntries->Completion_Date->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Lead_Consultant_Name->Visible) { // Lead_Consultant_Name ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Lead_Consultant_Name->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Lead_Consultant_Name->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Lead_Consultant_Name->ViewAttributes() ?>><?php echo $AwardsEntries->Lead_Consultant_Name->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Lead_Consultant_Tel->Visible) { // Lead_Consultant_Tel ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Lead_Consultant_Tel->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Lead_Consultant_Tel->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Lead_Consultant_Tel->ViewAttributes() ?>><?php echo $AwardsEntries->Lead_Consultant_Tel->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Lead_Consultant_Mobile->Visible) { // Lead_Consultant_Mobile ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Lead_Consultant_Mobile->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Lead_Consultant_Mobile->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Lead_Consultant_Mobile->ViewAttributes() ?>><?php echo $AwardsEntries->Lead_Consultant_Mobile->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Lead_Consultant_Email->Visible) { // Lead_Consultant_Email ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Lead_Consultant_Email->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Lead_Consultant_Email->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Lead_Consultant_Email->ViewAttributes() ?>><?php echo $AwardsEntries->Lead_Consultant_Email->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Role_In_Project->Visible) { // Role_In_Project ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Role_In_Project->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Role_In_Project->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Role_In_Project->ViewAttributes() ?>><?php echo $AwardsEntries->Role_In_Project->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->JV_Partners->Visible) { // JV_Partners ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->JV_Partners->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->JV_Partners->CellAttributes() ?>>
<div<?php echo $AwardsEntries->JV_Partners->ViewAttributes() ?>><?php echo $AwardsEntries->JV_Partners->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->JV_Consent->Visible) { // JV_Consent ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->JV_Consent->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->JV_Consent->CellAttributes() ?>>
<div<?php echo $AwardsEntries->JV_Consent->ViewAttributes() ?>><?php echo $AwardsEntries->JV_Consent->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Nominee_Name->Visible) { // Nominee_Name ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Nominee_Name->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Nominee_Name->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Nominee_Name->ViewAttributes() ?>><?php echo $AwardsEntries->Nominee_Name->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Nominee_Consent->Visible) { // Nominee_Consent ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Nominee_Consent->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Nominee_Consent->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Nominee_Consent->ViewAttributes() ?>><?php echo $AwardsEntries->Nominee_Consent->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Description_Sent->Visible) { // Description_Sent ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Description_Sent->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Description_Sent->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Description_Sent->ViewAttributes() ?>><?php echo $AwardsEntries->Description_Sent->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Contact_Name->Visible) { // Contact_Name ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Contact_Name->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Contact_Name->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Contact_Name->ViewAttributes() ?>><?php echo $AwardsEntries->Contact_Name->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Contact_Job_Title->Visible) { // Contact_Job_Title ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Contact_Job_Title->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Contact_Job_Title->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Contact_Job_Title->ViewAttributes() ?>><?php echo $AwardsEntries->Contact_Job_Title->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Contact_Tel->Visible) { // Contact_Tel ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Contact_Tel->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Contact_Tel->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Contact_Tel->ViewAttributes() ?>><?php echo $AwardsEntries->Contact_Tel->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Contact_Email->Visible) { // Contact_Email ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Contact_Email->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Contact_Email->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Contact_Email->ViewAttributes() ?>><?php echo $AwardsEntries->Contact_Email->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->A1_Poster_Required->Visible) { // A1_Poster_Required ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->A1_Poster_Required->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->A1_Poster_Required->CellAttributes() ?>>
<div<?php echo $AwardsEntries->A1_Poster_Required->ViewAttributes() ?>><?php echo $AwardsEntries->A1_Poster_Required->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Quantity->Visible) { // Quantity ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Quantity->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Quantity->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Quantity->ViewAttributes() ?>><?php echo $AwardsEntries->Quantity->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->ExternalFormID->Visible) { // ExternalFormID ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->ExternalFormID->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->ExternalFormID->CellAttributes() ?>>
<div<?php echo $AwardsEntries->ExternalFormID->ViewAttributes() ?>><?php echo $AwardsEntries->ExternalFormID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->ExternalEntryID->Visible) { // ExternalEntryID ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->ExternalEntryID->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->ExternalEntryID->CellAttributes() ?>>
<div<?php echo $AwardsEntries->ExternalEntryID->ViewAttributes() ?>><?php echo $AwardsEntries->ExternalEntryID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->PreEntryHTML->Visible) { // PreEntryHTML ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->PreEntryHTML->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->PreEntryHTML->CellAttributes() ?>>
<div<?php echo $AwardsEntries->PreEntryHTML->ViewAttributes() ?>><?php echo $AwardsEntries->PreEntryHTML->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->Contact_Mobile->Visible) { // Contact_Mobile ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->Contact_Mobile->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->Contact_Mobile->CellAttributes() ?>>
<div<?php echo $AwardsEntries->Contact_Mobile->ViewAttributes() ?>><?php echo $AwardsEntries->Contact_Mobile->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($AwardsEntries->FullEntryHTML->Visible) { // FullEntryHTML ?>
	<tr<?php echo $AwardsEntries->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $AwardsEntries->FullEntryHTML->FldCaption() ?></td>
		<td<?php echo $AwardsEntries->FullEntryHTML->CellAttributes() ?>>
<div<?php echo $AwardsEntries->FullEntryHTML->ViewAttributes() ?>><?php echo $AwardsEntries->FullEntryHTML->ViewValue ?></div></td>
	</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if ($AwardsEntries->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($AwardsEntries_view->Pager)) $AwardsEntries_view->Pager = new cPrevNextPager($AwardsEntries_view->lStartRec, $AwardsEntries_view->lDisplayRecs, $AwardsEntries_view->lTotalRecs) ?>
<?php if ($AwardsEntries_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 ($AwardsEntries_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 ($AwardsEntries_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 $AwardsEntries_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($AwardsEntries_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 ($AwardsEntries_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $AwardsEntries_view->PageUrl() ?>start=<?php echo $AwardsEntries_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 $AwardsEntries_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($Security->CanList()) { ?>
	<?php if ($AwardsEntries_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 } else { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></span>
	<?php } ?>
<?php } ?>
		</td>
	</tr>
</table>
</form>
<?php } ?>
<p>
<?php if ($AwardsEntries->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
$AwardsEntries_view->Page_Terminate();
?>
<?php

//
// Page class
//
class cAwardsEntries_view {

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

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

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

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

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

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

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

		// Table object (AwardsEntries)
		$GLOBALS["AwardsEntries"] = new cAwardsEntries();

		// Table object (adminusers)
		$GLOBALS['adminusers'] = new cadminusers();

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

		// User profile
		$UserProfile = new cUserProfile();
		$UserProfile->LoadProfile(@$_SESSION[EW_SESSION_USER_PROFILE]);

		// Security
		$Security = new cAdvancedSecurity();
		if (IsPasswordExpired())
			$this->Page_Terminate("changepwd.php");
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		$Security->TablePermission_Loading();
		$Security->LoadCurrentUserLevel($this->TableName);
		$Security->TablePermission_Loaded();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		if (!$Security->CanView()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("AwardsEntrieslist.php");
		}
		$Security->UserID_Loading();
		if ($Security->IsLoggedIn()) $Security->LoadUserID();
		$Security->UserID_Loaded();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn, $AwardsEntries;
		$AwardsEntries->AwardsEntryID->setDbValue($rs->fields('AwardsEntryID'));
		$AwardsEntries->DateCreated->setDbValue($rs->fields('DateCreated'));
		$AwardsEntries->AwardYear->setDbValue($rs->fields('AwardYear'));
		$AwardsEntries->PreEntry->setDbValue($rs->fields('PreEntry'));
		$AwardsEntries->Firm_Name->setDbValue($rs->fields('Firm_Name'));
		$AwardsEntries->Award_Category->setDbValue($rs->fields('Award_Category'));
		$AwardsEntries->Start_Date->setDbValue($rs->fields('Start_Date'));
		$AwardsEntries->Project_Name->setDbValue($rs->fields('Project_Name'));
		$AwardsEntries->Completion_Date->setDbValue($rs->fields('Completion_Date'));
		$AwardsEntries->Lead_Consultant_Name->setDbValue($rs->fields('Lead_Consultant_Name'));
		$AwardsEntries->Lead_Consultant_Tel->setDbValue($rs->fields('Lead_Consultant_Tel'));
		$AwardsEntries->Lead_Consultant_Mobile->setDbValue($rs->fields('Lead_Consultant_Mobile'));
		$AwardsEntries->Lead_Consultant_Email->setDbValue($rs->fields('Lead_Consultant_Email'));
		$AwardsEntries->Role_In_Project->setDbValue($rs->fields('Role_In_Project'));
		$AwardsEntries->JV_Partners->setDbValue($rs->fields('JV_Partners'));
		$AwardsEntries->JV_Consent->setDbValue($rs->fields('JV_Consent'));
		$AwardsEntries->Nominee_Name->setDbValue($rs->fields('Nominee_Name'));
		$AwardsEntries->Nominee_Consent->setDbValue($rs->fields('Nominee_Consent'));
		$AwardsEntries->Description_Sent->setDbValue($rs->fields('Description_Sent'));
		$AwardsEntries->Contact_Name->setDbValue($rs->fields('Contact_Name'));
		$AwardsEntries->Contact_Job_Title->setDbValue($rs->fields('Contact_Job_Title'));
		$AwardsEntries->Contact_Tel->setDbValue($rs->fields('Contact_Tel'));
		$AwardsEntries->Contact_Email->setDbValue($rs->fields('Contact_Email'));
		$AwardsEntries->A1_Poster_Required->setDbValue($rs->fields('A1_Poster_Required'));
		$AwardsEntries->Quantity->setDbValue($rs->fields('Quantity'));
		$AwardsEntries->ExternalFormID->setDbValue($rs->fields('ExternalFormID'));
		$AwardsEntries->ExternalEntryID->setDbValue($rs->fields('ExternalEntryID'));
		$AwardsEntries->PreEntryHTML->setDbValue($rs->fields('PreEntryHTML'));
		$AwardsEntries->Contact_Mobile->setDbValue($rs->fields('Contact_Mobile'));
		$AwardsEntries->FullEntryHTML->setDbValue($rs->fields('FullEntryHTML'));
	}

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

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

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

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

		$AwardsEntries->AwardsEntryID->CellCssStyle = ""; $AwardsEntries->AwardsEntryID->CellCssClass = "";
		$AwardsEntries->AwardsEntryID->CellAttrs = array(); $AwardsEntries->AwardsEntryID->ViewAttrs = array(); $AwardsEntries->AwardsEntryID->EditAttrs = array();

		// DateCreated
		$AwardsEntries->DateCreated->CellCssStyle = ""; $AwardsEntries->DateCreated->CellCssClass = "";
		$AwardsEntries->DateCreated->CellAttrs = array(); $AwardsEntries->DateCreated->ViewAttrs = array(); $AwardsEntries->DateCreated->EditAttrs = array();

		// AwardYear
		$AwardsEntries->AwardYear->CellCssStyle = ""; $AwardsEntries->AwardYear->CellCssClass = "";
		$AwardsEntries->AwardYear->CellAttrs = array(); $AwardsEntries->AwardYear->ViewAttrs = array(); $AwardsEntries->AwardYear->EditAttrs = array();

		// PreEntry
		$AwardsEntries->PreEntry->CellCssStyle = ""; $AwardsEntries->PreEntry->CellCssClass = "";
		$AwardsEntries->PreEntry->CellAttrs = array(); $AwardsEntries->PreEntry->ViewAttrs = array(); $AwardsEntries->PreEntry->EditAttrs = array();

		// Firm_Name
		$AwardsEntries->Firm_Name->CellCssStyle = ""; $AwardsEntries->Firm_Name->CellCssClass = "";
		$AwardsEntries->Firm_Name->CellAttrs = array(); $AwardsEntries->Firm_Name->ViewAttrs = array(); $AwardsEntries->Firm_Name->EditAttrs = array();

		// Award_Category
		$AwardsEntries->Award_Category->CellCssStyle = ""; $AwardsEntries->Award_Category->CellCssClass = "";
		$AwardsEntries->Award_Category->CellAttrs = array(); $AwardsEntries->Award_Category->ViewAttrs = array(); $AwardsEntries->Award_Category->EditAttrs = array();

		// Start_Date
		$AwardsEntries->Start_Date->CellCssStyle = ""; $AwardsEntries->Start_Date->CellCssClass = "";
		$AwardsEntries->Start_Date->CellAttrs = array(); $AwardsEntries->Start_Date->ViewAttrs = array(); $AwardsEntries->Start_Date->EditAttrs = array();

		// Project_Name
		$AwardsEntries->Project_Name->CellCssStyle = ""; $AwardsEntries->Project_Name->CellCssClass = "";
		$AwardsEntries->Project_Name->CellAttrs = array(); $AwardsEntries->Project_Name->ViewAttrs = array(); $AwardsEntries->Project_Name->EditAttrs = array();

		// Completion_Date
		$AwardsEntries->Completion_Date->CellCssStyle = ""; $AwardsEntries->Completion_Date->CellCssClass = "";
		$AwardsEntries->Completion_Date->CellAttrs = array(); $AwardsEntries->Completion_Date->ViewAttrs = array(); $AwardsEntries->Completion_Date->EditAttrs = array();

		// Lead_Consultant_Name
		$AwardsEntries->Lead_Consultant_Name->CellCssStyle = ""; $AwardsEntries->Lead_Consultant_Name->CellCssClass = "";
		$AwardsEntries->Lead_Consultant_Name->CellAttrs = array(); $AwardsEntries->Lead_Consultant_Name->ViewAttrs = array(); $AwardsEntries->Lead_Consultant_Name->EditAttrs = array();

		// Lead_Consultant_Tel
		$AwardsEntries->Lead_Consultant_Tel->CellCssStyle = ""; $AwardsEntries->Lead_Consultant_Tel->CellCssClass = "";
		$AwardsEntries->Lead_Consultant_Tel->CellAttrs = array(); $AwardsEntries->Lead_Consultant_Tel->ViewAttrs = array(); $AwardsEntries->Lead_Consultant_Tel->EditAttrs = array();

		// Lead_Consultant_Mobile
		$AwardsEntries->Lead_Consultant_Mobile->CellCssStyle = ""; $AwardsEntries->Lead_Consultant_Mobile->CellCssClass = "";
		$AwardsEntries->Lead_Consultant_Mobile->CellAttrs = array(); $AwardsEntries->Lead_Consultant_Mobile->ViewAttrs = array(); $AwardsEntries->Lead_Consultant_Mobile->EditAttrs = array();

		// Lead_Consultant_Email
		$AwardsEntries->Lead_Consultant_Email->CellCssStyle = ""; $AwardsEntries->Lead_Consultant_Email->CellCssClass = "";
		$AwardsEntries->Lead_Consultant_Email->CellAttrs = array(); $AwardsEntries->Lead_Consultant_Email->ViewAttrs = array(); $AwardsEntries->Lead_Consultant_Email->EditAttrs = array();

		// Role_In_Project
		$AwardsEntries->Role_In_Project->CellCssStyle = ""; $AwardsEntries->Role_In_Project->CellCssClass = "";
		$AwardsEntries->Role_In_Project->CellAttrs = array(); $AwardsEntries->Role_In_Project->ViewAttrs = array(); $AwardsEntries->Role_In_Project->EditAttrs = array();

		// JV_Partners
		$AwardsEntries->JV_Partners->CellCssStyle = ""; $AwardsEntries->JV_Partners->CellCssClass = "";
		$AwardsEntries->JV_Partners->CellAttrs = array(); $AwardsEntries->JV_Partners->ViewAttrs = array(); $AwardsEntries->JV_Partners->EditAttrs = array();

		// JV_Consent
		$AwardsEntries->JV_Consent->CellCssStyle = ""; $AwardsEntries->JV_Consent->CellCssClass = "";
		$AwardsEntries->JV_Consent->CellAttrs = array(); $AwardsEntries->JV_Consent->ViewAttrs = array(); $AwardsEntries->JV_Consent->EditAttrs = array();

		// Nominee_Name
		$AwardsEntries->Nominee_Name->CellCssStyle = ""; $AwardsEntries->Nominee_Name->CellCssClass = "";
		$AwardsEntries->Nominee_Name->CellAttrs = array(); $AwardsEntries->Nominee_Name->ViewAttrs = array(); $AwardsEntries->Nominee_Name->EditAttrs = array();

		// Nominee_Consent
		$AwardsEntries->Nominee_Consent->CellCssStyle = ""; $AwardsEntries->Nominee_Consent->CellCssClass = "";
		$AwardsEntries->Nominee_Consent->CellAttrs = array(); $AwardsEntries->Nominee_Consent->ViewAttrs = array(); $AwardsEntries->Nominee_Consent->EditAttrs = array();

		// Description_Sent
		$AwardsEntries->Description_Sent->CellCssStyle = ""; $AwardsEntries->Description_Sent->CellCssClass = "";
		$AwardsEntries->Description_Sent->CellAttrs = array(); $AwardsEntries->Description_Sent->ViewAttrs = array(); $AwardsEntries->Description_Sent->EditAttrs = array();

		// Contact_Name
		$AwardsEntries->Contact_Name->CellCssStyle = ""; $AwardsEntries->Contact_Name->CellCssClass = "";
		$AwardsEntries->Contact_Name->CellAttrs = array(); $AwardsEntries->Contact_Name->ViewAttrs = array(); $AwardsEntries->Contact_Name->EditAttrs = array();

		// Contact_Job_Title
		$AwardsEntries->Contact_Job_Title->CellCssStyle = ""; $AwardsEntries->Contact_Job_Title->CellCssClass = "";
		$AwardsEntries->Contact_Job_Title->CellAttrs = array(); $AwardsEntries->Contact_Job_Title->ViewAttrs = array(); $AwardsEntries->Contact_Job_Title->EditAttrs = array();

		// Contact_Tel
		$AwardsEntries->Contact_Tel->CellCssStyle = ""; $AwardsEntries->Contact_Tel->CellCssClass = "";
		$AwardsEntries->Contact_Tel->CellAttrs = array(); $AwardsEntries->Contact_Tel->ViewAttrs = array(); $AwardsEntries->Contact_Tel->EditAttrs = array();

		// Contact_Email
		$AwardsEntries->Contact_Email->CellCssStyle = ""; $AwardsEntries->Contact_Email->CellCssClass = "";
		$AwardsEntries->Contact_Email->CellAttrs = array(); $AwardsEntries->Contact_Email->ViewAttrs = array(); $AwardsEntries->Contact_Email->EditAttrs = array();

		// A1_Poster_Required
		$AwardsEntries->A1_Poster_Required->CellCssStyle = ""; $AwardsEntries->A1_Poster_Required->CellCssClass = "";
		$AwardsEntries->A1_Poster_Required->CellAttrs = array(); $AwardsEntries->A1_Poster_Required->ViewAttrs = array(); $AwardsEntries->A1_Poster_Required->EditAttrs = array();

		// Quantity
		$AwardsEntries->Quantity->CellCssStyle = ""; $AwardsEntries->Quantity->CellCssClass = "";
		$AwardsEntries->Quantity->CellAttrs = array(); $AwardsEntries->Quantity->ViewAttrs = array(); $AwardsEntries->Quantity->EditAttrs = array();

		// ExternalFormID
		$AwardsEntries->ExternalFormID->CellCssStyle = ""; $AwardsEntries->ExternalFormID->CellCssClass = "";
		$AwardsEntries->ExternalFormID->CellAttrs = array(); $AwardsEntries->ExternalFormID->ViewAttrs = array(); $AwardsEntries->ExternalFormID->EditAttrs = array();

		// ExternalEntryID
		$AwardsEntries->ExternalEntryID->CellCssStyle = ""; $AwardsEntries->ExternalEntryID->CellCssClass = "";
		$AwardsEntries->ExternalEntryID->CellAttrs = array(); $AwardsEntries->ExternalEntryID->ViewAttrs = array(); $AwardsEntries->ExternalEntryID->EditAttrs = array();

		// PreEntryHTML
		$AwardsEntries->PreEntryHTML->CellCssStyle = ""; $AwardsEntries->PreEntryHTML->CellCssClass = "";
		$AwardsEntries->PreEntryHTML->CellAttrs = array(); $AwardsEntries->PreEntryHTML->ViewAttrs = array(); $AwardsEntries->PreEntryHTML->EditAttrs = array();

		// Contact_Mobile
		$AwardsEntries->Contact_Mobile->CellCssStyle = ""; $AwardsEntries->Contact_Mobile->CellCssClass = "";
		$AwardsEntries->Contact_Mobile->CellAttrs = array(); $AwardsEntries->Contact_Mobile->ViewAttrs = array(); $AwardsEntries->Contact_Mobile->EditAttrs = array();

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

			// AwardsEntryID
			$AwardsEntries->AwardsEntryID->ViewValue = $AwardsEntries->AwardsEntryID->CurrentValue;
			$AwardsEntries->AwardsEntryID->CssStyle = "";
			$AwardsEntries->AwardsEntryID->CssClass = "";
			$AwardsEntries->AwardsEntryID->ViewCustomAttributes = "";

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

			// AwardYear
			$AwardsEntries->AwardYear->ViewValue = $AwardsEntries->AwardYear->CurrentValue;
			$AwardsEntries->AwardYear->CssStyle = "";
			$AwardsEntries->AwardYear->CssClass = "";
			$AwardsEntries->AwardYear->ViewCustomAttributes = "";

			// PreEntry
			if (strval($AwardsEntries->PreEntry->CurrentValue) <> "") {
				switch ($AwardsEntries->PreEntry->CurrentValue) {
					case "1":
						$AwardsEntries->PreEntry->ViewValue = "Pre-Entry";
						break;
					case "0":
						$AwardsEntries->PreEntry->ViewValue = "Full Entry";
						break;
					default:
						$AwardsEntries->PreEntry->ViewValue = $AwardsEntries->PreEntry->CurrentValue;
				}
			} else {
				$AwardsEntries->PreEntry->ViewValue = NULL;
			}
			$AwardsEntries->PreEntry->CssStyle = "";
			$AwardsEntries->PreEntry->CssClass = "";
			$AwardsEntries->PreEntry->ViewCustomAttributes = "";

			// Firm_Name
			$AwardsEntries->Firm_Name->ViewValue = $AwardsEntries->Firm_Name->CurrentValue;
			$AwardsEntries->Firm_Name->CssStyle = "";
			$AwardsEntries->Firm_Name->CssClass = "";
			$AwardsEntries->Firm_Name->ViewCustomAttributes = "";

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

			// Start_Date
			$AwardsEntries->Start_Date->ViewValue = $AwardsEntries->Start_Date->CurrentValue;
			$AwardsEntries->Start_Date->CssStyle = "";
			$AwardsEntries->Start_Date->CssClass = "";
			$AwardsEntries->Start_Date->ViewCustomAttributes = "";

			// Project_Name
			$AwardsEntries->Project_Name->ViewValue = $AwardsEntries->Project_Name->CurrentValue;
			$AwardsEntries->Project_Name->CssStyle = "";
			$AwardsEntries->Project_Name->CssClass = "";
			$AwardsEntries->Project_Name->ViewCustomAttributes = "";

			// Completion_Date
			$AwardsEntries->Completion_Date->ViewValue = $AwardsEntries->Completion_Date->CurrentValue;
			$AwardsEntries->Completion_Date->CssStyle = "";
			$AwardsEntries->Completion_Date->CssClass = "";
			$AwardsEntries->Completion_Date->ViewCustomAttributes = "";

			// Lead_Consultant_Name
			$AwardsEntries->Lead_Consultant_Name->ViewValue = $AwardsEntries->Lead_Consultant_Name->CurrentValue;
			$AwardsEntries->Lead_Consultant_Name->CssStyle = "";
			$AwardsEntries->Lead_Consultant_Name->CssClass = "";
			$AwardsEntries->Lead_Consultant_Name->ViewCustomAttributes = "";

			// Lead_Consultant_Tel
			$AwardsEntries->Lead_Consultant_Tel->ViewValue = $AwardsEntries->Lead_Consultant_Tel->CurrentValue;
			$AwardsEntries->Lead_Consultant_Tel->CssStyle = "";
			$AwardsEntries->Lead_Consultant_Tel->CssClass = "";
			$AwardsEntries->Lead_Consultant_Tel->ViewCustomAttributes = "";

			// Lead_Consultant_Mobile
			$AwardsEntries->Lead_Consultant_Mobile->ViewValue = $AwardsEntries->Lead_Consultant_Mobile->CurrentValue;
			$AwardsEntries->Lead_Consultant_Mobile->CssStyle = "";
			$AwardsEntries->Lead_Consultant_Mobile->CssClass = "";
			$AwardsEntries->Lead_Consultant_Mobile->ViewCustomAttributes = "";

			// Lead_Consultant_Email
			$AwardsEntries->Lead_Consultant_Email->ViewValue = $AwardsEntries->Lead_Consultant_Email->CurrentValue;
			$AwardsEntries->Lead_Consultant_Email->CssStyle = "";
			$AwardsEntries->Lead_Consultant_Email->CssClass = "";
			$AwardsEntries->Lead_Consultant_Email->ViewCustomAttributes = "";

			// Role_In_Project
			$AwardsEntries->Role_In_Project->ViewValue = $AwardsEntries->Role_In_Project->CurrentValue;
			$AwardsEntries->Role_In_Project->CssStyle = "";
			$AwardsEntries->Role_In_Project->CssClass = "";
			$AwardsEntries->Role_In_Project->ViewCustomAttributes = "";

			// JV_Partners
			$AwardsEntries->JV_Partners->ViewValue = $AwardsEntries->JV_Partners->CurrentValue;
			$AwardsEntries->JV_Partners->CssStyle = "";
			$AwardsEntries->JV_Partners->CssClass = "";
			$AwardsEntries->JV_Partners->ViewCustomAttributes = "";

			// JV_Consent
			$AwardsEntries->JV_Consent->ViewValue = $AwardsEntries->JV_Consent->CurrentValue;
			$AwardsEntries->JV_Consent->CssStyle = "";
			$AwardsEntries->JV_Consent->CssClass = "";
			$AwardsEntries->JV_Consent->ViewCustomAttributes = "";

			// Nominee_Name
			$AwardsEntries->Nominee_Name->ViewValue = $AwardsEntries->Nominee_Name->CurrentValue;
			$AwardsEntries->Nominee_Name->CssStyle = "";
			$AwardsEntries->Nominee_Name->CssClass = "";
			$AwardsEntries->Nominee_Name->ViewCustomAttributes = "";

			// Nominee_Consent
			$AwardsEntries->Nominee_Consent->ViewValue = $AwardsEntries->Nominee_Consent->CurrentValue;
			$AwardsEntries->Nominee_Consent->CssStyle = "";
			$AwardsEntries->Nominee_Consent->CssClass = "";
			$AwardsEntries->Nominee_Consent->ViewCustomAttributes = "";

			// Description_Sent
			$AwardsEntries->Description_Sent->ViewValue = $AwardsEntries->Description_Sent->CurrentValue;
			$AwardsEntries->Description_Sent->CssStyle = "";
			$AwardsEntries->Description_Sent->CssClass = "";
			$AwardsEntries->Description_Sent->ViewCustomAttributes = "";

			// Contact_Name
			$AwardsEntries->Contact_Name->ViewValue = $AwardsEntries->Contact_Name->CurrentValue;
			$AwardsEntries->Contact_Name->CssStyle = "";
			$AwardsEntries->Contact_Name->CssClass = "";
			$AwardsEntries->Contact_Name->ViewCustomAttributes = "";

			// Contact_Job_Title
			$AwardsEntries->Contact_Job_Title->ViewValue = $AwardsEntries->Contact_Job_Title->CurrentValue;
			$AwardsEntries->Contact_Job_Title->CssStyle = "";
			$AwardsEntries->Contact_Job_Title->CssClass = "";
			$AwardsEntries->Contact_Job_Title->ViewCustomAttributes = "";

			// Contact_Tel
			$AwardsEntries->Contact_Tel->ViewValue = $AwardsEntries->Contact_Tel->CurrentValue;
			$AwardsEntries->Contact_Tel->CssStyle = "";
			$AwardsEntries->Contact_Tel->CssClass = "";
			$AwardsEntries->Contact_Tel->ViewCustomAttributes = "";

			// Contact_Email
			$AwardsEntries->Contact_Email->ViewValue = $AwardsEntries->Contact_Email->CurrentValue;
			$AwardsEntries->Contact_Email->CssStyle = "";
			$AwardsEntries->Contact_Email->CssClass = "";
			$AwardsEntries->Contact_Email->ViewCustomAttributes = "";

			// A1_Poster_Required
			$AwardsEntries->A1_Poster_Required->ViewValue = $AwardsEntries->A1_Poster_Required->CurrentValue;
			$AwardsEntries->A1_Poster_Required->CssStyle = "";
			$AwardsEntries->A1_Poster_Required->CssClass = "";
			$AwardsEntries->A1_Poster_Required->ViewCustomAttributes = "";

			// Quantity
			$AwardsEntries->Quantity->ViewValue = $AwardsEntries->Quantity->CurrentValue;
			$AwardsEntries->Quantity->CssStyle = "";
			$AwardsEntries->Quantity->CssClass = "";
			$AwardsEntries->Quantity->ViewCustomAttributes = "";

			// ExternalFormID
			$AwardsEntries->ExternalFormID->ViewValue = $AwardsEntries->ExternalFormID->CurrentValue;
			$AwardsEntries->ExternalFormID->CssStyle = "";
			$AwardsEntries->ExternalFormID->CssClass = "";
			$AwardsEntries->ExternalFormID->ViewCustomAttributes = "";

			// ExternalEntryID
			$AwardsEntries->ExternalEntryID->ViewValue = $AwardsEntries->ExternalEntryID->CurrentValue;
			$AwardsEntries->ExternalEntryID->CssStyle = "";
			$AwardsEntries->ExternalEntryID->CssClass = "";
			$AwardsEntries->ExternalEntryID->ViewCustomAttributes = "";

			// PreEntryHTML
			$AwardsEntries->PreEntryHTML->ViewValue = $AwardsEntries->PreEntryHTML->CurrentValue;
			$AwardsEntries->PreEntryHTML->CssStyle = "";
			$AwardsEntries->PreEntryHTML->CssClass = "";
			$AwardsEntries->PreEntryHTML->ViewCustomAttributes = "";

			// Contact_Mobile
			$AwardsEntries->Contact_Mobile->ViewValue = $AwardsEntries->Contact_Mobile->CurrentValue;
			$AwardsEntries->Contact_Mobile->CssStyle = "";
			$AwardsEntries->Contact_Mobile->CssClass = "";
			$AwardsEntries->Contact_Mobile->ViewCustomAttributes = "";

			// FullEntryHTML
			$AwardsEntries->FullEntryHTML->ViewValue = $AwardsEntries->FullEntryHTML->CurrentValue;
			$AwardsEntries->FullEntryHTML->CssStyle = "";
			$AwardsEntries->FullEntryHTML->CssClass = "";
			$AwardsEntries->FullEntryHTML->ViewCustomAttributes = "";

			// AwardsEntryID
			$AwardsEntries->AwardsEntryID->HrefValue = "";
			$AwardsEntries->AwardsEntryID->TooltipValue = "";

			// DateCreated
			$AwardsEntries->DateCreated->HrefValue = "";
			$AwardsEntries->DateCreated->TooltipValue = "";

			// AwardYear
			$AwardsEntries->AwardYear->HrefValue = "";
			$AwardsEntries->AwardYear->TooltipValue = "";

			// PreEntry
			$AwardsEntries->PreEntry->HrefValue = "";
			$AwardsEntries->PreEntry->TooltipValue = "";

			// Firm_Name
			$AwardsEntries->Firm_Name->HrefValue = "";
			$AwardsEntries->Firm_Name->TooltipValue = "";

			// Award_Category
			$AwardsEntries->Award_Category->HrefValue = "";
			$AwardsEntries->Award_Category->TooltipValue = "";

			// Start_Date
			$AwardsEntries->Start_Date->HrefValue = "";
			$AwardsEntries->Start_Date->TooltipValue = "";

			// Project_Name
			$AwardsEntries->Project_Name->HrefValue = "";
			$AwardsEntries->Project_Name->TooltipValue = "";

			// Completion_Date
			$AwardsEntries->Completion_Date->HrefValue = "";
			$AwardsEntries->Completion_Date->TooltipValue = "";

			// Lead_Consultant_Name
			$AwardsEntries->Lead_Consultant_Name->HrefValue = "";
			$AwardsEntries->Lead_Consultant_Name->TooltipValue = "";

			// Lead_Consultant_Tel
			$AwardsEntries->Lead_Consultant_Tel->HrefValue = "";
			$AwardsEntries->Lead_Consultant_Tel->TooltipValue = "";

			// Lead_Consultant_Mobile
			$AwardsEntries->Lead_Consultant_Mobile->HrefValue = "";
			$AwardsEntries->Lead_Consultant_Mobile->TooltipValue = "";

			// Lead_Consultant_Email
			$AwardsEntries->Lead_Consultant_Email->HrefValue = "";
			$AwardsEntries->Lead_Consultant_Email->TooltipValue = "";

			// Role_In_Project
			$AwardsEntries->Role_In_Project->HrefValue = "";
			$AwardsEntries->Role_In_Project->TooltipValue = "";

			// JV_Partners
			$AwardsEntries->JV_Partners->HrefValue = "";
			$AwardsEntries->JV_Partners->TooltipValue = "";

			// JV_Consent
			$AwardsEntries->JV_Consent->HrefValue = "";
			$AwardsEntries->JV_Consent->TooltipValue = "";

			// Nominee_Name
			$AwardsEntries->Nominee_Name->HrefValue = "";
			$AwardsEntries->Nominee_Name->TooltipValue = "";

			// Nominee_Consent
			$AwardsEntries->Nominee_Consent->HrefValue = "";
			$AwardsEntries->Nominee_Consent->TooltipValue = "";

			// Description_Sent
			$AwardsEntries->Description_Sent->HrefValue = "";
			$AwardsEntries->Description_Sent->TooltipValue = "";

			// Contact_Name
			$AwardsEntries->Contact_Name->HrefValue = "";
			$AwardsEntries->Contact_Name->TooltipValue = "";

			// Contact_Job_Title
			$AwardsEntries->Contact_Job_Title->HrefValue = "";
			$AwardsEntries->Contact_Job_Title->TooltipValue = "";

			// Contact_Tel
			$AwardsEntries->Contact_Tel->HrefValue = "";
			$AwardsEntries->Contact_Tel->TooltipValue = "";

			// Contact_Email
			$AwardsEntries->Contact_Email->HrefValue = "";
			$AwardsEntries->Contact_Email->TooltipValue = "";

			// A1_Poster_Required
			$AwardsEntries->A1_Poster_Required->HrefValue = "";
			$AwardsEntries->A1_Poster_Required->TooltipValue = "";

			// Quantity
			$AwardsEntries->Quantity->HrefValue = "";
			$AwardsEntries->Quantity->TooltipValue = "";

			// ExternalFormID
			$AwardsEntries->ExternalFormID->HrefValue = "";
			$AwardsEntries->ExternalFormID->TooltipValue = "";

			// ExternalEntryID
			$AwardsEntries->ExternalEntryID->HrefValue = "";
			$AwardsEntries->ExternalEntryID->TooltipValue = "";

			// PreEntryHTML
			$AwardsEntries->PreEntryHTML->HrefValue = "";
			$AwardsEntries->PreEntryHTML->TooltipValue = "";

			// Contact_Mobile
			$AwardsEntries->Contact_Mobile->HrefValue = "";
			$AwardsEntries->Contact_Mobile->TooltipValue = "";

			// FullEntryHTML
			$AwardsEntries->FullEntryHTML->HrefValue = "";
			$AwardsEntries->FullEntryHTML->TooltipValue = "";
		}

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

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

		// Load recordset
		if ($bSelectLimit) {
			$this->lTotalRecs = $AwardsEntries->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 ($AwardsEntries->Export == "xml") {
			$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
			$XmlDoc->AddRoot();
		} else {
			$ExportDoc = new cExportDocument($AwardsEntries, "v");
			$ExportDoc->ExportHeader();
			if ($ExportDoc->Horizontal) { // Horizontal format, write header
				$ExportDoc->BeginExportRow();
				$ExportDoc->ExportCaption($AwardsEntries->AwardsEntryID);
				$ExportDoc->ExportCaption($AwardsEntries->DateCreated);
				$ExportDoc->ExportCaption($AwardsEntries->AwardYear);
				$ExportDoc->ExportCaption($AwardsEntries->PreEntry);
				$ExportDoc->ExportCaption($AwardsEntries->Firm_Name);
				$ExportDoc->ExportCaption($AwardsEntries->Award_Category);
				$ExportDoc->ExportCaption($AwardsEntries->Start_Date);
				$ExportDoc->ExportCaption($AwardsEntries->Project_Name);
				$ExportDoc->ExportCaption($AwardsEntries->Completion_Date);
				$ExportDoc->ExportCaption($AwardsEntries->Lead_Consultant_Name);
				$ExportDoc->ExportCaption($AwardsEntries->Lead_Consultant_Tel);
				$ExportDoc->ExportCaption($AwardsEntries->Lead_Consultant_Mobile);
				$ExportDoc->ExportCaption($AwardsEntries->Lead_Consultant_Email);
				$ExportDoc->ExportCaption($AwardsEntries->Role_In_Project);
				$ExportDoc->ExportCaption($AwardsEntries->JV_Partners);
				$ExportDoc->ExportCaption($AwardsEntries->Nominee_Name);
				$ExportDoc->ExportCaption($AwardsEntries->Nominee_Consent);
				$ExportDoc->ExportCaption($AwardsEntries->Description_Sent);
				$ExportDoc->ExportCaption($AwardsEntries->Contact_Name);
				$ExportDoc->ExportCaption($AwardsEntries->Contact_Job_Title);
				$ExportDoc->ExportCaption($AwardsEntries->Contact_Tel);
				$ExportDoc->ExportCaption($AwardsEntries->Contact_Email);
				$ExportDoc->ExportCaption($AwardsEntries->A1_Poster_Required);
				$ExportDoc->ExportCaption($AwardsEntries->Quantity);
				$ExportDoc->ExportCaption($AwardsEntries->ExternalFormID);
				$ExportDoc->ExportCaption($AwardsEntries->ExternalEntryID);
				$ExportDoc->ExportCaption($AwardsEntries->PreEntryHTML);
				$ExportDoc->ExportCaption($AwardsEntries->Contact_Mobile);
				$ExportDoc->ExportCaption($AwardsEntries->FullEntryHTML);
				$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
				$AwardsEntries->CssClass = "";
				$AwardsEntries->CssStyle = "";
				$AwardsEntries->RowType = EW_ROWTYPE_VIEW; // Render view
				$this->RenderRow();
				if ($AwardsEntries->Export == "xml") {
					$XmlDoc->AddRow();
					$XmlDoc->AddField('AwardsEntryID', $AwardsEntries->AwardsEntryID->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('DateCreated', $AwardsEntries->DateCreated->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('AwardYear', $AwardsEntries->AwardYear->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('PreEntry', $AwardsEntries->PreEntry->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Firm_Name', $AwardsEntries->Firm_Name->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Award_Category', $AwardsEntries->Award_Category->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Start_Date', $AwardsEntries->Start_Date->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Project_Name', $AwardsEntries->Project_Name->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Completion_Date', $AwardsEntries->Completion_Date->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Lead_Consultant_Name', $AwardsEntries->Lead_Consultant_Name->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Lead_Consultant_Tel', $AwardsEntries->Lead_Consultant_Tel->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Lead_Consultant_Mobile', $AwardsEntries->Lead_Consultant_Mobile->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Lead_Consultant_Email', $AwardsEntries->Lead_Consultant_Email->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Role_In_Project', $AwardsEntries->Role_In_Project->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('JV_Partners', $AwardsEntries->JV_Partners->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Nominee_Name', $AwardsEntries->Nominee_Name->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Nominee_Consent', $AwardsEntries->Nominee_Consent->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Description_Sent', $AwardsEntries->Description_Sent->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Contact_Name', $AwardsEntries->Contact_Name->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Contact_Job_Title', $AwardsEntries->Contact_Job_Title->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Contact_Tel', $AwardsEntries->Contact_Tel->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Contact_Email', $AwardsEntries->Contact_Email->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('A1_Poster_Required', $AwardsEntries->A1_Poster_Required->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Quantity', $AwardsEntries->Quantity->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('ExternalFormID', $AwardsEntries->ExternalFormID->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('ExternalEntryID', $AwardsEntries->ExternalEntryID->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('PreEntryHTML', $AwardsEntries->PreEntryHTML->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('Contact_Mobile', $AwardsEntries->Contact_Mobile->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
					$XmlDoc->AddField('FullEntryHTML', $AwardsEntries->FullEntryHTML->ExportValue($AwardsEntries->Export, $AwardsEntries->ExportOriginalValue));
				} else {
					$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
					$ExportDoc->ExportField($AwardsEntries->AwardsEntryID);
					$ExportDoc->ExportField($AwardsEntries->DateCreated);
					$ExportDoc->ExportField($AwardsEntries->AwardYear);
					$ExportDoc->ExportField($AwardsEntries->PreEntry);
					$ExportDoc->ExportField($AwardsEntries->Firm_Name);
					$ExportDoc->ExportField($AwardsEntries->Award_Category);
					$ExportDoc->ExportField($AwardsEntries->Start_Date);
					$ExportDoc->ExportField($AwardsEntries->Project_Name);
					$ExportDoc->ExportField($AwardsEntries->Completion_Date);
					$ExportDoc->ExportField($AwardsEntries->Lead_Consultant_Name);
					$ExportDoc->ExportField($AwardsEntries->Lead_Consultant_Tel);
					$ExportDoc->ExportField($AwardsEntries->Lead_Consultant_Mobile);
					$ExportDoc->ExportField($AwardsEntries->Lead_Consultant_Email);
					$ExportDoc->ExportField($AwardsEntries->Role_In_Project);
					$ExportDoc->ExportField($AwardsEntries->JV_Partners);
					$ExportDoc->ExportField($AwardsEntries->Nominee_Name);
					$ExportDoc->ExportField($AwardsEntries->Nominee_Consent);
					$ExportDoc->ExportField($AwardsEntries->Description_Sent);
					$ExportDoc->ExportField($AwardsEntries->Contact_Name);
					$ExportDoc->ExportField($AwardsEntries->Contact_Job_Title);
					$ExportDoc->ExportField($AwardsEntries->Contact_Tel);
					$ExportDoc->ExportField($AwardsEntries->Contact_Email);
					$ExportDoc->ExportField($AwardsEntries->A1_Poster_Required);
					$ExportDoc->ExportField($AwardsEntries->Quantity);
					$ExportDoc->ExportField($AwardsEntries->ExternalFormID);
					$ExportDoc->ExportField($AwardsEntries->ExternalEntryID);
					$ExportDoc->ExportField($AwardsEntries->PreEntryHTML);
					$ExportDoc->ExportField($AwardsEntries->Contact_Mobile);
					$ExportDoc->ExportField($AwardsEntries->FullEntryHTML);
					$ExportDoc->EndExportRow();
				}
			}
			$rs->MoveNext();
		}
		if ($AwardsEntries->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($AwardsEntries->Export, array("email", "xml")))
			echo "\xEF\xBB\xBF";

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

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

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

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

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

	}
}
?>