Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/cpdadmin/
Upload File :
Current File : /var/www/cesa.co.za/cpdadmin/vwCPD_SPLatestinfo.php

<?php

// Global variable for table object
$vwCPD_SPLatest = NULL;

//
// Table class for vwCPD_SPLatest
//
class cvwCPD_SPLatest {
	var $TableVar = 'vwCPD_SPLatest';
	var $TableName = 'vwCPD_SPLatest';
	var $TableType = 'VIEW';
	var $CPDProviderID;
	var $CompanyName;
	var $TradingAs;
	var $ContactTitle;
	var $ContactInitials;
	var $ContactFirstName;
	var $ContactSurname;
	var $ContactPosition;
	var $ContactIDNum;
	var $PhoneNumber;
	var $ContactEmail;
	var $Password;
	var $PhysicalAddress1;
	var $PhysicalAddress2;
	var $PhysicalCity;
	var $PhysicalCode;
	var $PhysicalProvince;
	var $PhysicalCountry;
	var $PostalAddress1;
	var $PostalAddress2;
	var $PostalCity;
	var $PostalCode;
	var $PostalProvince;
	var $PostalCountry;
	var $Website;
	var $VATNumber;
	var $DateUpdated;
	var $UpdatedBy;
	var $Archived;
	var $ContactPhone;
	var $AdminTitle;
	var $AdminInitials;
	var $AdminFirstName;
	var $AdminSurname;
	var $AdminPosition;
	var $AdminIDNum;
	var $AdminEmail;
	var $AdminPhone;
	var $Approved;
	var $DateAssessed;
	var $EmailAddress;
	var $SPNumber;
	var $DateExpires;
	var $EvaluatorID;
	var $EvaluatorID2;
	var $EvaluatorID3;
	var $InvoiceCode;
	var $InvoiceNumber;
	var $Cost;
	var $EvaluatorFee;
	var $EvaluatorFeeAmount;
	var $EvaluatorFeeDate;
	var $Comments;
	var $CellNumber;
	var $ContactCell;
	var $AdminCell;
	var $DepositAmt;
	var $InvoiceFile;
	var $InvoiceDate;
	var $DatePaid;
	var $ProofOfPayment;
	var $EvaluatorInvoice;
	var $EvaluatorTimesheet;
	var $NumReminders;
	var $LastReminder;
	var $PrevSPNumber;
	var $Renewal;
	var $DateCreated;
	var $fields = array();
	var $UseTokenInUrl = EW_USE_TOKEN_IN_URL;
	var $Export; // Export
	var $ExportOriginalValue = EW_EXPORT_ORIGINAL_VALUE;
	var $ExportAll = TRUE;
	var $SendEmail; // Send email
	var $TableCustomInnerHtml; // Custom inner HTML
	var $BasicSearchKeyword; // Basic search keyword
	var $BasicSearchType; // Basic search type
	var $CurrentFilter; // Current filter
	var $CurrentOrder; // Current order
	var $CurrentOrderType; // Current order type
	var $RowType; // Row type
	var $CssClass; // CSS class
	var $CssStyle; // CSS style
	var $RowAttrs = array(); // Row custom attributes
	var $TableFilter = "";
	var $CurrentAction; // Current action
	var $UpdateConflict; // Update conflict
	var $EventName; // Event name
	var $EventCancelled; // Event cancelled
	var $CancelMessage; // Cancel message

	//
	// Table class constructor
	//
	function __construct() {
		global $Language;

		// CPDProviderID
		$this->CPDProviderID = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_CPDProviderID', 'CPDProviderID', '`CPDProviderID`', 3, -1, FALSE, '`CPDProviderID`', FALSE);
		$this->CPDProviderID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['CPDProviderID'] =& $this->CPDProviderID;

		// CompanyName
		$this->CompanyName = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_CompanyName', 'CompanyName', '`CompanyName`', 200, -1, FALSE, '`CompanyName`', FALSE);
		$this->fields['CompanyName'] =& $this->CompanyName;

		// TradingAs
		$this->TradingAs = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_TradingAs', 'TradingAs', '`TradingAs`', 200, -1, FALSE, '`TradingAs`', FALSE);
		$this->fields['TradingAs'] =& $this->TradingAs;

		// ContactTitle
		$this->ContactTitle = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactTitle', 'ContactTitle', '`ContactTitle`', 200, -1, FALSE, '`ContactTitle`', FALSE);
		$this->fields['ContactTitle'] =& $this->ContactTitle;

		// ContactInitials
		$this->ContactInitials = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactInitials', 'ContactInitials', '`ContactInitials`', 200, -1, FALSE, '`ContactInitials`', FALSE);
		$this->fields['ContactInitials'] =& $this->ContactInitials;

		// ContactFirstName
		$this->ContactFirstName = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactFirstName', 'ContactFirstName', '`ContactFirstName`', 200, -1, FALSE, '`ContactFirstName`', FALSE);
		$this->fields['ContactFirstName'] =& $this->ContactFirstName;

		// ContactSurname
		$this->ContactSurname = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactSurname', 'ContactSurname', '`ContactSurname`', 200, -1, FALSE, '`ContactSurname`', FALSE);
		$this->fields['ContactSurname'] =& $this->ContactSurname;

		// ContactPosition
		$this->ContactPosition = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactPosition', 'ContactPosition', '`ContactPosition`', 200, -1, FALSE, '`ContactPosition`', FALSE);
		$this->fields['ContactPosition'] =& $this->ContactPosition;

		// ContactIDNum
		$this->ContactIDNum = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactIDNum', 'ContactIDNum', '`ContactIDNum`', 200, -1, FALSE, '`ContactIDNum`', FALSE);
		$this->fields['ContactIDNum'] =& $this->ContactIDNum;

		// PhoneNumber
		$this->PhoneNumber = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PhoneNumber', 'PhoneNumber', '`PhoneNumber`', 200, -1, FALSE, '`PhoneNumber`', FALSE);
		$this->fields['PhoneNumber'] =& $this->PhoneNumber;

		// ContactEmail
		$this->ContactEmail = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactEmail', 'ContactEmail', '`ContactEmail`', 200, -1, FALSE, '`ContactEmail`', FALSE);
		$this->fields['ContactEmail'] =& $this->ContactEmail;

		// Password
		$this->Password = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_Password', 'Password', '`Password`', 200, -1, FALSE, '`Password`', FALSE);
		$this->fields['Password'] =& $this->Password;

		// PhysicalAddress1
		$this->PhysicalAddress1 = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PhysicalAddress1', 'PhysicalAddress1', '`PhysicalAddress1`', 200, -1, FALSE, '`PhysicalAddress1`', FALSE);
		$this->fields['PhysicalAddress1'] =& $this->PhysicalAddress1;

		// PhysicalAddress2
		$this->PhysicalAddress2 = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PhysicalAddress2', 'PhysicalAddress2', '`PhysicalAddress2`', 200, -1, FALSE, '`PhysicalAddress2`', FALSE);
		$this->fields['PhysicalAddress2'] =& $this->PhysicalAddress2;

		// PhysicalCity
		$this->PhysicalCity = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PhysicalCity', 'PhysicalCity', '`PhysicalCity`', 200, -1, FALSE, '`PhysicalCity`', FALSE);
		$this->fields['PhysicalCity'] =& $this->PhysicalCity;

		// PhysicalCode
		$this->PhysicalCode = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PhysicalCode', 'PhysicalCode', '`PhysicalCode`', 200, -1, FALSE, '`PhysicalCode`', FALSE);
		$this->fields['PhysicalCode'] =& $this->PhysicalCode;

		// PhysicalProvince
		$this->PhysicalProvince = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PhysicalProvince', 'PhysicalProvince', '`PhysicalProvince`', 200, -1, FALSE, '`PhysicalProvince`', FALSE);
		$this->fields['PhysicalProvince'] =& $this->PhysicalProvince;

		// PhysicalCountry
		$this->PhysicalCountry = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PhysicalCountry', 'PhysicalCountry', '`PhysicalCountry`', 200, -1, FALSE, '`PhysicalCountry`', FALSE);
		$this->fields['PhysicalCountry'] =& $this->PhysicalCountry;

		// PostalAddress1
		$this->PostalAddress1 = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PostalAddress1', 'PostalAddress1', '`PostalAddress1`', 200, -1, FALSE, '`PostalAddress1`', FALSE);
		$this->fields['PostalAddress1'] =& $this->PostalAddress1;

		// PostalAddress2
		$this->PostalAddress2 = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PostalAddress2', 'PostalAddress2', '`PostalAddress2`', 200, -1, FALSE, '`PostalAddress2`', FALSE);
		$this->fields['PostalAddress2'] =& $this->PostalAddress2;

		// PostalCity
		$this->PostalCity = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PostalCity', 'PostalCity', '`PostalCity`', 200, -1, FALSE, '`PostalCity`', FALSE);
		$this->fields['PostalCity'] =& $this->PostalCity;

		// PostalCode
		$this->PostalCode = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PostalCode', 'PostalCode', '`PostalCode`', 200, -1, FALSE, '`PostalCode`', FALSE);
		$this->fields['PostalCode'] =& $this->PostalCode;

		// PostalProvince
		$this->PostalProvince = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PostalProvince', 'PostalProvince', '`PostalProvince`', 200, -1, FALSE, '`PostalProvince`', FALSE);
		$this->fields['PostalProvince'] =& $this->PostalProvince;

		// PostalCountry
		$this->PostalCountry = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PostalCountry', 'PostalCountry', '`PostalCountry`', 200, -1, FALSE, '`PostalCountry`', FALSE);
		$this->fields['PostalCountry'] =& $this->PostalCountry;

		// Website
		$this->Website = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_Website', 'Website', '`Website`', 200, -1, FALSE, '`Website`', FALSE);
		$this->fields['Website'] =& $this->Website;

		// VATNumber
		$this->VATNumber = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_VATNumber', 'VATNumber', '`VATNumber`', 200, -1, FALSE, '`VATNumber`', FALSE);
		$this->fields['VATNumber'] =& $this->VATNumber;

		// DateUpdated
		$this->DateUpdated = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_DateUpdated', 'DateUpdated', '`DateUpdated`', 135, 5, FALSE, '`DateUpdated`', FALSE);
		$this->DateUpdated->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['DateUpdated'] =& $this->DateUpdated;

		// UpdatedBy
		$this->UpdatedBy = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_UpdatedBy', 'UpdatedBy', '`UpdatedBy`', 200, -1, FALSE, '`UpdatedBy`', FALSE);
		$this->fields['UpdatedBy'] =& $this->UpdatedBy;

		// Archived
		$this->Archived = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_Archived', 'Archived', '`Archived`', 16, -1, FALSE, '`Archived`', FALSE);
		$this->Archived->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['Archived'] =& $this->Archived;

		// ContactPhone
		$this->ContactPhone = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactPhone', 'ContactPhone', '`ContactPhone`', 200, -1, FALSE, '`ContactPhone`', FALSE);
		$this->fields['ContactPhone'] =& $this->ContactPhone;

		// AdminTitle
		$this->AdminTitle = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminTitle', 'AdminTitle', '`AdminTitle`', 200, -1, FALSE, '`AdminTitle`', FALSE);
		$this->fields['AdminTitle'] =& $this->AdminTitle;

		// AdminInitials
		$this->AdminInitials = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminInitials', 'AdminInitials', '`AdminInitials`', 200, -1, FALSE, '`AdminInitials`', FALSE);
		$this->fields['AdminInitials'] =& $this->AdminInitials;

		// AdminFirstName
		$this->AdminFirstName = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminFirstName', 'AdminFirstName', '`AdminFirstName`', 200, -1, FALSE, '`AdminFirstName`', FALSE);
		$this->fields['AdminFirstName'] =& $this->AdminFirstName;

		// AdminSurname
		$this->AdminSurname = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminSurname', 'AdminSurname', '`AdminSurname`', 200, -1, FALSE, '`AdminSurname`', FALSE);
		$this->fields['AdminSurname'] =& $this->AdminSurname;

		// AdminPosition
		$this->AdminPosition = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminPosition', 'AdminPosition', '`AdminPosition`', 200, -1, FALSE, '`AdminPosition`', FALSE);
		$this->fields['AdminPosition'] =& $this->AdminPosition;

		// AdminIDNum
		$this->AdminIDNum = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminIDNum', 'AdminIDNum', '`AdminIDNum`', 200, -1, FALSE, '`AdminIDNum`', FALSE);
		$this->fields['AdminIDNum'] =& $this->AdminIDNum;

		// AdminEmail
		$this->AdminEmail = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminEmail', 'AdminEmail', '`AdminEmail`', 200, -1, FALSE, '`AdminEmail`', FALSE);
		$this->fields['AdminEmail'] =& $this->AdminEmail;

		// AdminPhone
		$this->AdminPhone = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminPhone', 'AdminPhone', '`AdminPhone`', 200, -1, FALSE, '`AdminPhone`', FALSE);
		$this->fields['AdminPhone'] =& $this->AdminPhone;

		// Approved
		$this->Approved = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_Approved', 'Approved', '`Approved`', 200, -1, FALSE, '`Approved`', FALSE);
		$this->fields['Approved'] =& $this->Approved;

		// DateAssessed
		$this->DateAssessed = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_DateAssessed', 'DateAssessed', '`DateAssessed`', 133, 5, FALSE, '`DateAssessed`', FALSE);
		$this->DateAssessed->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['DateAssessed'] =& $this->DateAssessed;

		// EmailAddress
		$this->EmailAddress = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EmailAddress', 'EmailAddress', '`EmailAddress`', 200, -1, FALSE, '`EmailAddress`', FALSE);
		$this->fields['EmailAddress'] =& $this->EmailAddress;

		// SPNumber
		$this->SPNumber = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_SPNumber', 'SPNumber', '`SPNumber`', 200, -1, FALSE, '`SPNumber`', FALSE);
		$this->fields['SPNumber'] =& $this->SPNumber;

		// DateExpires
		$this->DateExpires = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_DateExpires', 'DateExpires', '`DateExpires`', 133, 5, FALSE, '`DateExpires`', FALSE);
		$this->DateExpires->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['DateExpires'] =& $this->DateExpires;

		// EvaluatorID
		$this->EvaluatorID = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorID', 'EvaluatorID', '`EvaluatorID`', 3, -1, FALSE, '`EvaluatorID`', FALSE);
		$this->EvaluatorID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['EvaluatorID'] =& $this->EvaluatorID;

		// EvaluatorID2
		$this->EvaluatorID2 = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorID2', 'EvaluatorID2', '`EvaluatorID2`', 3, -1, FALSE, '`EvaluatorID2`', FALSE);
		$this->EvaluatorID2->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['EvaluatorID2'] =& $this->EvaluatorID2;

		// EvaluatorID3
		$this->EvaluatorID3 = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorID3', 'EvaluatorID3', '`EvaluatorID3`', 3, -1, FALSE, '`EvaluatorID3`', FALSE);
		$this->EvaluatorID3->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['EvaluatorID3'] =& $this->EvaluatorID3;

		// InvoiceCode
		$this->InvoiceCode = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_InvoiceCode', 'InvoiceCode', '`InvoiceCode`', 200, -1, FALSE, '`InvoiceCode`', FALSE);
		$this->fields['InvoiceCode'] =& $this->InvoiceCode;

		// InvoiceNumber
		$this->InvoiceNumber = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_InvoiceNumber', 'InvoiceNumber', '`InvoiceNumber`', 200, -1, FALSE, '`InvoiceNumber`', FALSE);
		$this->fields['InvoiceNumber'] =& $this->InvoiceNumber;

		// Cost
		$this->Cost = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_Cost', 'Cost', '`Cost`', 131, -1, FALSE, '`Cost`', FALSE);
		$this->Cost->FldDefaultErrMsg = $Language->Phrase("IncorrectFloat");
		$this->fields['Cost'] =& $this->Cost;

		// EvaluatorFee
		$this->EvaluatorFee = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorFee', 'EvaluatorFee', '`EvaluatorFee`', 16, -1, FALSE, '`EvaluatorFee`', FALSE);
		$this->EvaluatorFee->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['EvaluatorFee'] =& $this->EvaluatorFee;

		// EvaluatorFeeAmount
		$this->EvaluatorFeeAmount = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorFeeAmount', 'EvaluatorFeeAmount', '`EvaluatorFeeAmount`', 131, -1, FALSE, '`EvaluatorFeeAmount`', FALSE);
		$this->EvaluatorFeeAmount->FldDefaultErrMsg = $Language->Phrase("IncorrectFloat");
		$this->fields['EvaluatorFeeAmount'] =& $this->EvaluatorFeeAmount;

		// EvaluatorFeeDate
		$this->EvaluatorFeeDate = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorFeeDate', 'EvaluatorFeeDate', '`EvaluatorFeeDate`', 133, 5, FALSE, '`EvaluatorFeeDate`', FALSE);
		$this->EvaluatorFeeDate->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['EvaluatorFeeDate'] =& $this->EvaluatorFeeDate;

		// Comments
		$this->Comments = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_Comments', 'Comments', '`Comments`', 201, -1, FALSE, '`Comments`', FALSE);
		$this->fields['Comments'] =& $this->Comments;

		// CellNumber
		$this->CellNumber = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_CellNumber', 'CellNumber', '`CellNumber`', 200, -1, FALSE, '`CellNumber`', FALSE);
		$this->fields['CellNumber'] =& $this->CellNumber;

		// ContactCell
		$this->ContactCell = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ContactCell', 'ContactCell', '`ContactCell`', 200, -1, FALSE, '`ContactCell`', FALSE);
		$this->fields['ContactCell'] =& $this->ContactCell;

		// AdminCell
		$this->AdminCell = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_AdminCell', 'AdminCell', '`AdminCell`', 200, -1, FALSE, '`AdminCell`', FALSE);
		$this->fields['AdminCell'] =& $this->AdminCell;

		// DepositAmt
		$this->DepositAmt = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_DepositAmt', 'DepositAmt', '`DepositAmt`', 131, -1, FALSE, '`DepositAmt`', FALSE);
		$this->DepositAmt->FldDefaultErrMsg = $Language->Phrase("IncorrectFloat");
		$this->fields['DepositAmt'] =& $this->DepositAmt;

		// InvoiceFile
		$this->InvoiceFile = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_InvoiceFile', 'InvoiceFile', '`InvoiceFile`', 200, -1, FALSE, '`InvoiceFile`', FALSE);
		$this->fields['InvoiceFile'] =& $this->InvoiceFile;

		// InvoiceDate
		$this->InvoiceDate = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_InvoiceDate', 'InvoiceDate', '`InvoiceDate`', 133, 5, FALSE, '`InvoiceDate`', FALSE);
		$this->InvoiceDate->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['InvoiceDate'] =& $this->InvoiceDate;

		// DatePaid
		$this->DatePaid = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_DatePaid', 'DatePaid', '`DatePaid`', 133, 5, FALSE, '`DatePaid`', FALSE);
		$this->DatePaid->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['DatePaid'] =& $this->DatePaid;

		// ProofOfPayment
		$this->ProofOfPayment = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_ProofOfPayment', 'ProofOfPayment', '`ProofOfPayment`', 200, -1, FALSE, '`ProofOfPayment`', FALSE);
		$this->fields['ProofOfPayment'] =& $this->ProofOfPayment;

		// EvaluatorInvoice
		$this->EvaluatorInvoice = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorInvoice', 'EvaluatorInvoice', '`EvaluatorInvoice`', 200, -1, FALSE, '`EvaluatorInvoice`', FALSE);
		$this->fields['EvaluatorInvoice'] =& $this->EvaluatorInvoice;

		// EvaluatorTimesheet
		$this->EvaluatorTimesheet = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_EvaluatorTimesheet', 'EvaluatorTimesheet', '`EvaluatorTimesheet`', 200, -1, FALSE, '`EvaluatorTimesheet`', FALSE);
		$this->fields['EvaluatorTimesheet'] =& $this->EvaluatorTimesheet;

		// NumReminders
		$this->NumReminders = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_NumReminders', 'NumReminders', '`NumReminders`', 3, -1, FALSE, '`NumReminders`', FALSE);
		$this->NumReminders->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['NumReminders'] =& $this->NumReminders;

		// LastReminder
		$this->LastReminder = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_LastReminder', 'LastReminder', '`LastReminder`', 133, 5, FALSE, '`LastReminder`', FALSE);
		$this->LastReminder->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['LastReminder'] =& $this->LastReminder;

		// PrevSPNumber
		$this->PrevSPNumber = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_PrevSPNumber', 'PrevSPNumber', '`PrevSPNumber`', 200, -1, FALSE, '`PrevSPNumber`', FALSE);
		$this->fields['PrevSPNumber'] =& $this->PrevSPNumber;

		// Renewal
		$this->Renewal = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_Renewal', 'Renewal', '`Renewal`', 16, -1, FALSE, '`Renewal`', FALSE);
		$this->Renewal->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
		$this->fields['Renewal'] =& $this->Renewal;

		// DateCreated
		$this->DateCreated = new cField('vwCPD_SPLatest', 'vwCPD_SPLatest', 'x_DateCreated', 'DateCreated', '`DateCreated`', 135, 5, FALSE, '`DateCreated`', FALSE);
		$this->DateCreated->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
		$this->fields['DateCreated'] =& $this->DateCreated;
	}

	// Table caption
	function TableCaption() {
		global $Language;
		return $Language->TablePhrase($this->TableVar, "TblCaption");
	}

	// Page caption
	function PageCaption($Page) {
		global $Language;
		$Caption = $Language->TablePhrase($this->TableVar, "TblPageCaption" . $Page);
		if ($Caption == "") $Caption = "Page " . $Page;
		return $Caption;
	}

	// Export return page
	function ExportReturnUrl() {
		$url = @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL];
		return ($url <> "") ? $url : ew_CurrentPage();
	}

	function setExportReturnUrl($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL] = $v;
	}

	// Records per page
	function getRecordsPerPage() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE];
	}

	function setRecordsPerPage($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE] = $v;
	}

	// Start record number
	function getStartRecordNumber() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC];
	}

	function setStartRecordNumber($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC] = $v;
	}

	// Search highlight name
	function HighlightName() {
		return "vwCPD_SPLatest_Highlight";
	}

	// Advanced search
	function getAdvancedSearch($fld) {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld];
	}

	function setAdvancedSearch($fld, $v) {
		if (@$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] <> $v) {
			$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] = $v;
		}
	}

	// Basic search keyword
	function getSessionBasicSearchKeyword() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH];
	}

	function setSessionBasicSearchKeyword($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH] = $v;
	}

	// Basic search type
	function getSessionBasicSearchType() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE];
	}

	function setSessionBasicSearchType($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE] = $v;
	}

	// Search WHERE clause
	function getSearchWhere() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE];
	}

	function setSearchWhere($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE] = $v;
	}

	// Multiple column sort
	function UpdateSort(&$ofld, $ctrl) {
		if ($this->CurrentOrder == $ofld->FldName) {
			$sSortField = $ofld->FldExpression;
			$sLastSort = $ofld->getSort();
			if ($this->CurrentOrderType == "ASC" || $this->CurrentOrderType == "DESC") {
				$sThisSort = $this->CurrentOrderType;
			} else {
				$sThisSort = ($sLastSort == "ASC") ? "DESC" : "ASC";
			}
			$ofld->setSort($sThisSort);
			if ($ctrl) {
				$sOrderBy = $this->getSessionOrderBy();
				if (strpos($sOrderBy, $sSortField . " " . $sLastSort) !== FALSE) {
					$sOrderBy = str_replace($sSortField . " " . $sLastSort, $sSortField . " " . $sThisSort, $sOrderBy);
				} else {
					if ($sOrderBy <> "") $sOrderBy .= ", ";
					$sOrderBy .= $sSortField . " " . $sThisSort;
				}
				$this->setSessionOrderBy($sOrderBy); // Save to Session
			} else {
				$this->setSessionOrderBy($sSortField . " " . $sThisSort); // Save to Session
			}
		} else {
			if (!$ctrl) $ofld->setSort("");
		}
	}

	// Session WHERE clause
	function getSessionWhere() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE];
	}

	function setSessionWhere($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE] = $v;
	}

	// Session ORDER BY
	function getSessionOrderBy() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY];
	}

	function setSessionOrderBy($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY] = $v;
	}

	// Session key
	function getKey($fld) {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld];
	}

	function setKey($fld, $v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld] = $v;
	}

	// Table level SQL
	function SqlFrom() { // From
		return "`vwCPD_SPLatest`";
	}

	function SqlSelect() { // Select
		return "SELECT * FROM " . $this->SqlFrom();
	}

	function SqlWhere() { // Where
		$sWhere = "";
		$this->TableFilter = "";
		if ($this->TableFilter <> "") {
			if ($sWhere <> "") $sWhere = "(" . $sWhere . ") AND (";
			$sWhere .= "(" . $this->TableFilter . ")";
		}
		return $sWhere;
	}

	function SqlGroupBy() { // Group By
		return "";
	}

	function SqlHaving() { // Having
		return "";
	}

	function SqlOrderBy() { // Order By
		return "";
	}

	// Check if Anonymous User is allowed
	function AllowAnonymousUser() {
		switch (EW_PAGE_ID) {
			case "add":
			case "register":
			case "addopt":
				return FALSE;
			case "edit":
			case "update":
				return FALSE;
			case "delete":
				return FALSE;
			case "view":
				return FALSE;
			case "search":
				return FALSE;
			default:
				return FALSE;
		}
	}

	// Apply User ID filters
	function ApplyUserIDFilters($sFilter) {
		return $sFilter;
	}

	// Get SQL
	function GetSQL($where, $orderby) {
		return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
			$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
			$where, $orderby);
	}

	// Table SQL
	function SQL() {
		$sFilter = $this->CurrentFilter;
		$sFilter = $this->ApplyUserIDFilters($sFilter);
		$sSort = $this->getSessionOrderBy();
		return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
			$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
			$sFilter, $sSort);
	}

	// Table SQL with List page filter
	function SelectSQL() {
		$sFilter = $this->getSessionWhere();
		if ($this->CurrentFilter <> "") {
			if ($sFilter <> "") $sFilter = "(" . $sFilter . ") AND ";
			$sFilter .= "(" . $this->CurrentFilter . ")";
		}
		$sFilter = $this->ApplyUserIDFilters($sFilter);
		$sSort = $this->getSessionOrderBy();
		return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),
			$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);
	}

	// Try to get record count
	function TryGetRecordCount($sSql) {
		global $conn;
		$cnt = -1;
		if ($this->TableType == 'TABLE' || $this->TableType == 'VIEW') {
			$sSql = "SELECT COUNT(*) FROM" . substr($sSql, 13);
		} else {
			$sSql = "SELECT COUNT(*) FROM (" . $sSql . ") EW_COUNT_TABLE";
		}
		if ($rs = $conn->Execute($sSql)) {
			if (!$rs->EOF && $rs->FieldCount() > 0) {
				$cnt = $rs->fields[0];
				$rs->Close();
			}
		}
		return intval($cnt);
	}

	// Get record count based on filter (for detail record count in master table pages)
	function LoadRecordCount($sFilter) {
		$origFilter = $this->CurrentFilter;
		$this->CurrentFilter = $sFilter;
		$this->Recordset_Selecting($this->CurrentFilter);
		$sSql = $this->SQL();
		$cnt = $this->TryGetRecordCount($sSql);
		if ($cnt == -1) {
			if ($rs = $this->LoadRs($this->CurrentFilter)) {
				$cnt = $rs->RecordCount();
				$rs->Close();
			}
		}
		$this->CurrentFilter = $origFilter;
		return intval($cnt);
	}

	// Get record count (for current List page)
	function SelectRecordCount() {
		global $conn;
		$origFilter = $this->CurrentFilter;
		$this->Recordset_Selecting($this->CurrentFilter);
		$sSql = $this->SelectSQL();
		$cnt = $this->TryGetRecordCount($sSql);
		if ($cnt == -1) {
			if ($rs = $conn->Execute($this->SelectSQL())) {
				$cnt = $rs->RecordCount();
				$rs->Close();
			}
		}
		$this->CurrentFilter = $origFilter;
		return intval($cnt);
	}

	// INSERT statement
	function InsertSQL(&$rs) {
		global $conn;
		$names = "";
		$values = "";
		foreach ($rs as $name => $value) {
			$names .= $this->fields[$name]->FldExpression . ",";
			$values .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
		}
		if (substr($names, -1) == ",") $names = substr($names, 0, strlen($names)-1);
		if (substr($values, -1) == ",") $values = substr($values, 0, strlen($values)-1);
		return "INSERT INTO `vwCPD_SPLatest` ($names) VALUES ($values)";
	}

	// UPDATE statement
	function UpdateSQL(&$rs) {
		global $conn;
		$SQL = "UPDATE `vwCPD_SPLatest` SET ";
		foreach ($rs as $name => $value) {
			$SQL .= $this->fields[$name]->FldExpression . "=";
			$SQL .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
		}
		if (substr($SQL, -1) == ",") $SQL = substr($SQL, 0, strlen($SQL)-1);
		if ($this->CurrentFilter <> "")	$SQL .= " WHERE " . $this->CurrentFilter;
		return $SQL;
	}

	// DELETE statement
	function DeleteSQL(&$rs) {
		$SQL = "DELETE FROM `vwCPD_SPLatest` WHERE ";
		$SQL .= ew_QuotedName('CPDProviderID') . '=' . ew_QuotedValue($rs['CPDProviderID'], $this->CPDProviderID->FldDataType) . ' AND ';
		if (substr($SQL, -5) == " AND ") $SQL = substr($SQL, 0, strlen($SQL)-5);
		if ($this->CurrentFilter <> "")	$SQL .= " AND " . $this->CurrentFilter;
		return $SQL;
	}

	// Key filter WHERE clause
	function SqlKeyFilter() {
		return "`CPDProviderID` = @CPDProviderID@";
	}

	// Key filter
	function KeyFilter() {
		$sKeyFilter = $this->SqlKeyFilter();
		if (!is_numeric($this->CPDProviderID->CurrentValue))
			$sKeyFilter = "0=1"; // Invalid key
		$sKeyFilter = str_replace("@CPDProviderID@", ew_AdjustSql($this->CPDProviderID->CurrentValue), $sKeyFilter); // Replace key value
		return $sKeyFilter;
	}

	// Return page URL
	function getReturnUrl() {
		$name = EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL;

		// Get referer URL automatically
		if (ew_ServerVar("HTTP_REFERER") <> "" && ew_ReferPage() <> ew_CurrentPage() && ew_ReferPage() <> "login.php") // Referer not same page or login page
			$_SESSION[$name] = ew_ServerVar("HTTP_REFERER"); // Save to Session
		if (@$_SESSION[$name] <> "") {
			return $_SESSION[$name];
		} else {
			return "vwCPD_SPLatestlist.php";
		}
	}

	function setReturnUrl($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = $v;
	}

	// List URL
	function ListUrl() {
		return "vwCPD_SPLatestlist.php";
	}

	// View URL
	function ViewUrl() {
		return $this->KeyUrl("vwCPD_SPLatestview.php", $this->UrlParm());
	}

	// Add URL
	function AddUrl() {
		$AddUrl = "vwCPD_SPLatestadd.php";
		$sUrlParm = $this->UrlParm();
		if ($sUrlParm <> "")
			$AddUrl .= "?" . $sUrlParm;
		return $AddUrl;
	}

	// Edit URL
	function EditUrl() {
		return $this->KeyUrl("vwCPD_SPLatestedit.php", $this->UrlParm());
	}

	// Inline edit URL
	function InlineEditUrl() {
		return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=edit"));
	}

	// Copy URL
	function CopyUrl() {
		return $this->KeyUrl("vwCPD_SPLatestadd.php", $this->UrlParm());
	}

	// Inline copy URL
	function InlineCopyUrl() {
		return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=copy"));
	}

	// Delete URL
	function DeleteUrl() {
		return $this->KeyUrl("vwCPD_SPLatestdelete.php", $this->UrlParm());
	}

	// Add key value to URL
	function KeyUrl($url, $parm = "") {
		$sUrl = $url . "?";
		if ($parm <> "") $sUrl .= $parm . "&";
		if (!is_null($this->CPDProviderID->CurrentValue)) {
			$sUrl .= "CPDProviderID=" . urlencode($this->CPDProviderID->CurrentValue);
		} else {
			return "javascript:alert(ewLanguage.Phrase(\"InvalidRecord\"));";
		}
		return $sUrl;
	}

	// Sort URL
	function SortUrl(&$fld) {
		if ($this->CurrentAction <> "" || $this->Export <> "" ||
			in_array($fld->FldType, array(128, 204, 205))) { // Unsortable data type
				return "";
		} elseif ($fld->Sortable) {
			$sUrlParm = $this->UrlParm("order=" . urlencode($fld->FldName) . "&ordertype=" . $fld->ReverseSort());
			return ew_CurrentPage() . "?" . $sUrlParm;
		} else {
			return "";
		}
	}

	// Add URL parameter
	function UrlParm($parm = "") {
		$UrlParm = ($this->UseTokenInUrl) ? "t=vwCPD_SPLatest" : "";
		if ($parm <> "") {
			if ($UrlParm <> "")
				$UrlParm .= "&";
			$UrlParm .= $parm;
		}
		return $UrlParm;
	}

	// Load rows based on filter
	function &LoadRs($sFilter) {
		global $conn;

		// Set up filter (SQL WHERE clause) and get return SQL
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		return $conn->Execute($sSql);
	}

	// Load row values from recordset
	function LoadListRowValues(&$rs) {
		$this->CPDProviderID->setDbValue($rs->fields('CPDProviderID'));
		$this->CompanyName->setDbValue($rs->fields('CompanyName'));
		$this->TradingAs->setDbValue($rs->fields('TradingAs'));
		$this->ContactTitle->setDbValue($rs->fields('ContactTitle'));
		$this->ContactInitials->setDbValue($rs->fields('ContactInitials'));
		$this->ContactFirstName->setDbValue($rs->fields('ContactFirstName'));
		$this->ContactSurname->setDbValue($rs->fields('ContactSurname'));
		$this->ContactPosition->setDbValue($rs->fields('ContactPosition'));
		$this->ContactIDNum->setDbValue($rs->fields('ContactIDNum'));
		$this->PhoneNumber->setDbValue($rs->fields('PhoneNumber'));
		$this->ContactEmail->setDbValue($rs->fields('ContactEmail'));
		$this->Password->setDbValue($rs->fields('Password'));
		$this->PhysicalAddress1->setDbValue($rs->fields('PhysicalAddress1'));
		$this->PhysicalAddress2->setDbValue($rs->fields('PhysicalAddress2'));
		$this->PhysicalCity->setDbValue($rs->fields('PhysicalCity'));
		$this->PhysicalCode->setDbValue($rs->fields('PhysicalCode'));
		$this->PhysicalProvince->setDbValue($rs->fields('PhysicalProvince'));
		$this->PhysicalCountry->setDbValue($rs->fields('PhysicalCountry'));
		$this->PostalAddress1->setDbValue($rs->fields('PostalAddress1'));
		$this->PostalAddress2->setDbValue($rs->fields('PostalAddress2'));
		$this->PostalCity->setDbValue($rs->fields('PostalCity'));
		$this->PostalCode->setDbValue($rs->fields('PostalCode'));
		$this->PostalProvince->setDbValue($rs->fields('PostalProvince'));
		$this->PostalCountry->setDbValue($rs->fields('PostalCountry'));
		$this->Website->setDbValue($rs->fields('Website'));
		$this->VATNumber->setDbValue($rs->fields('VATNumber'));
		$this->DateUpdated->setDbValue($rs->fields('DateUpdated'));
		$this->UpdatedBy->setDbValue($rs->fields('UpdatedBy'));
		$this->Archived->setDbValue($rs->fields('Archived'));
		$this->ContactPhone->setDbValue($rs->fields('ContactPhone'));
		$this->AdminTitle->setDbValue($rs->fields('AdminTitle'));
		$this->AdminInitials->setDbValue($rs->fields('AdminInitials'));
		$this->AdminFirstName->setDbValue($rs->fields('AdminFirstName'));
		$this->AdminSurname->setDbValue($rs->fields('AdminSurname'));
		$this->AdminPosition->setDbValue($rs->fields('AdminPosition'));
		$this->AdminIDNum->setDbValue($rs->fields('AdminIDNum'));
		$this->AdminEmail->setDbValue($rs->fields('AdminEmail'));
		$this->AdminPhone->setDbValue($rs->fields('AdminPhone'));
		$this->Approved->setDbValue($rs->fields('Approved'));
		$this->DateAssessed->setDbValue($rs->fields('DateAssessed'));
		$this->EmailAddress->setDbValue($rs->fields('EmailAddress'));
		$this->SPNumber->setDbValue($rs->fields('SPNumber'));
		$this->DateExpires->setDbValue($rs->fields('DateExpires'));
		$this->EvaluatorID->setDbValue($rs->fields('EvaluatorID'));
		$this->EvaluatorID2->setDbValue($rs->fields('EvaluatorID2'));
		$this->EvaluatorID3->setDbValue($rs->fields('EvaluatorID3'));
		$this->InvoiceCode->setDbValue($rs->fields('InvoiceCode'));
		$this->InvoiceNumber->setDbValue($rs->fields('InvoiceNumber'));
		$this->Cost->setDbValue($rs->fields('Cost'));
		$this->EvaluatorFee->setDbValue($rs->fields('EvaluatorFee'));
		$this->EvaluatorFeeAmount->setDbValue($rs->fields('EvaluatorFeeAmount'));
		$this->EvaluatorFeeDate->setDbValue($rs->fields('EvaluatorFeeDate'));
		$this->Comments->setDbValue($rs->fields('Comments'));
		$this->CellNumber->setDbValue($rs->fields('CellNumber'));
		$this->ContactCell->setDbValue($rs->fields('ContactCell'));
		$this->AdminCell->setDbValue($rs->fields('AdminCell'));
		$this->DepositAmt->setDbValue($rs->fields('DepositAmt'));
		$this->InvoiceFile->setDbValue($rs->fields('InvoiceFile'));
		$this->InvoiceDate->setDbValue($rs->fields('InvoiceDate'));
		$this->DatePaid->setDbValue($rs->fields('DatePaid'));
		$this->ProofOfPayment->setDbValue($rs->fields('ProofOfPayment'));
		$this->EvaluatorInvoice->setDbValue($rs->fields('EvaluatorInvoice'));
		$this->EvaluatorTimesheet->setDbValue($rs->fields('EvaluatorTimesheet'));
		$this->NumReminders->setDbValue($rs->fields('NumReminders'));
		$this->LastReminder->setDbValue($rs->fields('LastReminder'));
		$this->PrevSPNumber->setDbValue($rs->fields('PrevSPNumber'));
		$this->Renewal->setDbValue($rs->fields('Renewal'));
		$this->DateCreated->setDbValue($rs->fields('DateCreated'));
	}

	// Render list row values
	function RenderListRow() {
		global $conn, $Security;

		// Call Row Rendering event
		$this->Row_Rendering();

   // Common render codes
		// CPDProviderID

		$this->CPDProviderID->CellCssStyle = ""; $this->CPDProviderID->CellCssClass = "";
		$this->CPDProviderID->CellAttrs = array(); $this->CPDProviderID->ViewAttrs = array(); $this->CPDProviderID->EditAttrs = array();

		// CompanyName
		$this->CompanyName->CellCssStyle = ""; $this->CompanyName->CellCssClass = "";
		$this->CompanyName->CellAttrs = array(); $this->CompanyName->ViewAttrs = array(); $this->CompanyName->EditAttrs = array();

		// TradingAs
		$this->TradingAs->CellCssStyle = ""; $this->TradingAs->CellCssClass = "";
		$this->TradingAs->CellAttrs = array(); $this->TradingAs->ViewAttrs = array(); $this->TradingAs->EditAttrs = array();

		// ContactTitle
		$this->ContactTitle->CellCssStyle = ""; $this->ContactTitle->CellCssClass = "";
		$this->ContactTitle->CellAttrs = array(); $this->ContactTitle->ViewAttrs = array(); $this->ContactTitle->EditAttrs = array();

		// ContactInitials
		$this->ContactInitials->CellCssStyle = ""; $this->ContactInitials->CellCssClass = "";
		$this->ContactInitials->CellAttrs = array(); $this->ContactInitials->ViewAttrs = array(); $this->ContactInitials->EditAttrs = array();

		// ContactFirstName
		$this->ContactFirstName->CellCssStyle = ""; $this->ContactFirstName->CellCssClass = "";
		$this->ContactFirstName->CellAttrs = array(); $this->ContactFirstName->ViewAttrs = array(); $this->ContactFirstName->EditAttrs = array();

		// ContactSurname
		$this->ContactSurname->CellCssStyle = ""; $this->ContactSurname->CellCssClass = "";
		$this->ContactSurname->CellAttrs = array(); $this->ContactSurname->ViewAttrs = array(); $this->ContactSurname->EditAttrs = array();

		// ContactPosition
		$this->ContactPosition->CellCssStyle = ""; $this->ContactPosition->CellCssClass = "";
		$this->ContactPosition->CellAttrs = array(); $this->ContactPosition->ViewAttrs = array(); $this->ContactPosition->EditAttrs = array();

		// ContactIDNum
		$this->ContactIDNum->CellCssStyle = ""; $this->ContactIDNum->CellCssClass = "";
		$this->ContactIDNum->CellAttrs = array(); $this->ContactIDNum->ViewAttrs = array(); $this->ContactIDNum->EditAttrs = array();

		// PhoneNumber
		$this->PhoneNumber->CellCssStyle = ""; $this->PhoneNumber->CellCssClass = "";
		$this->PhoneNumber->CellAttrs = array(); $this->PhoneNumber->ViewAttrs = array(); $this->PhoneNumber->EditAttrs = array();

		// ContactEmail
		$this->ContactEmail->CellCssStyle = ""; $this->ContactEmail->CellCssClass = "";
		$this->ContactEmail->CellAttrs = array(); $this->ContactEmail->ViewAttrs = array(); $this->ContactEmail->EditAttrs = array();

		// DateUpdated
		$this->DateUpdated->CellCssStyle = ""; $this->DateUpdated->CellCssClass = "";
		$this->DateUpdated->CellAttrs = array(); $this->DateUpdated->ViewAttrs = array(); $this->DateUpdated->EditAttrs = array();

		// ContactPhone
		$this->ContactPhone->CellCssStyle = ""; $this->ContactPhone->CellCssClass = "";
		$this->ContactPhone->CellAttrs = array(); $this->ContactPhone->ViewAttrs = array(); $this->ContactPhone->EditAttrs = array();

		// Approved
		$this->Approved->CellCssStyle = ""; $this->Approved->CellCssClass = "";
		$this->Approved->CellAttrs = array(); $this->Approved->ViewAttrs = array(); $this->Approved->EditAttrs = array();

		// DateAssessed
		$this->DateAssessed->CellCssStyle = ""; $this->DateAssessed->CellCssClass = "";
		$this->DateAssessed->CellAttrs = array(); $this->DateAssessed->ViewAttrs = array(); $this->DateAssessed->EditAttrs = array();

		// EmailAddress
		$this->EmailAddress->CellCssStyle = ""; $this->EmailAddress->CellCssClass = "";
		$this->EmailAddress->CellAttrs = array(); $this->EmailAddress->ViewAttrs = array(); $this->EmailAddress->EditAttrs = array();

		// SPNumber
		$this->SPNumber->CellCssStyle = ""; $this->SPNumber->CellCssClass = "";
		$this->SPNumber->CellAttrs = array(); $this->SPNumber->ViewAttrs = array(); $this->SPNumber->EditAttrs = array();

		// DateExpires
		$this->DateExpires->CellCssStyle = ""; $this->DateExpires->CellCssClass = "";
		$this->DateExpires->CellAttrs = array(); $this->DateExpires->ViewAttrs = array(); $this->DateExpires->EditAttrs = array();

		// CellNumber
		$this->CellNumber->CellCssStyle = ""; $this->CellNumber->CellCssClass = "";
		$this->CellNumber->CellAttrs = array(); $this->CellNumber->ViewAttrs = array(); $this->CellNumber->EditAttrs = array();

		// ContactCell
		$this->ContactCell->CellCssStyle = ""; $this->ContactCell->CellCssClass = "";
		$this->ContactCell->CellAttrs = array(); $this->ContactCell->ViewAttrs = array(); $this->ContactCell->EditAttrs = array();

		// DatePaid
		$this->DatePaid->CellCssStyle = ""; $this->DatePaid->CellCssClass = "";
		$this->DatePaid->CellAttrs = array(); $this->DatePaid->ViewAttrs = array(); $this->DatePaid->EditAttrs = array();

		// NumReminders
		$this->NumReminders->CellCssStyle = ""; $this->NumReminders->CellCssClass = "";
		$this->NumReminders->CellAttrs = array(); $this->NumReminders->ViewAttrs = array(); $this->NumReminders->EditAttrs = array();

		// LastReminder
		$this->LastReminder->CellCssStyle = ""; $this->LastReminder->CellCssClass = "";
		$this->LastReminder->CellAttrs = array(); $this->LastReminder->ViewAttrs = array(); $this->LastReminder->EditAttrs = array();

		// PrevSPNumber
		$this->PrevSPNumber->CellCssStyle = ""; $this->PrevSPNumber->CellCssClass = "";
		$this->PrevSPNumber->CellAttrs = array(); $this->PrevSPNumber->ViewAttrs = array(); $this->PrevSPNumber->EditAttrs = array();

		// Renewal
		$this->Renewal->CellCssStyle = ""; $this->Renewal->CellCssClass = "";
		$this->Renewal->CellAttrs = array(); $this->Renewal->ViewAttrs = array(); $this->Renewal->EditAttrs = array();

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

		// CPDProviderID
		$this->CPDProviderID->ViewValue = $this->CPDProviderID->CurrentValue;
		$this->CPDProviderID->CssStyle = "";
		$this->CPDProviderID->CssClass = "";
		$this->CPDProviderID->ViewCustomAttributes = "";

		// CompanyName
		$this->CompanyName->ViewValue = $this->CompanyName->CurrentValue;
		$this->CompanyName->CssStyle = "";
		$this->CompanyName->CssClass = "";
		$this->CompanyName->ViewCustomAttributes = "";

		// TradingAs
		$this->TradingAs->ViewValue = $this->TradingAs->CurrentValue;
		$this->TradingAs->CssStyle = "";
		$this->TradingAs->CssClass = "";
		$this->TradingAs->ViewCustomAttributes = "";

		// ContactTitle
		$this->ContactTitle->ViewValue = $this->ContactTitle->CurrentValue;
		$this->ContactTitle->CssStyle = "";
		$this->ContactTitle->CssClass = "";
		$this->ContactTitle->ViewCustomAttributes = "";

		// ContactInitials
		$this->ContactInitials->ViewValue = $this->ContactInitials->CurrentValue;
		$this->ContactInitials->CssStyle = "";
		$this->ContactInitials->CssClass = "";
		$this->ContactInitials->ViewCustomAttributes = "";

		// ContactFirstName
		$this->ContactFirstName->ViewValue = $this->ContactFirstName->CurrentValue;
		$this->ContactFirstName->CssStyle = "";
		$this->ContactFirstName->CssClass = "";
		$this->ContactFirstName->ViewCustomAttributes = "";

		// ContactSurname
		$this->ContactSurname->ViewValue = $this->ContactSurname->CurrentValue;
		$this->ContactSurname->CssStyle = "";
		$this->ContactSurname->CssClass = "";
		$this->ContactSurname->ViewCustomAttributes = "";

		// ContactPosition
		$this->ContactPosition->ViewValue = $this->ContactPosition->CurrentValue;
		$this->ContactPosition->CssStyle = "";
		$this->ContactPosition->CssClass = "";
		$this->ContactPosition->ViewCustomAttributes = "";

		// ContactIDNum
		$this->ContactIDNum->ViewValue = $this->ContactIDNum->CurrentValue;
		$this->ContactIDNum->CssStyle = "";
		$this->ContactIDNum->CssClass = "";
		$this->ContactIDNum->ViewCustomAttributes = "";

		// PhoneNumber
		$this->PhoneNumber->ViewValue = $this->PhoneNumber->CurrentValue;
		$this->PhoneNumber->CssStyle = "";
		$this->PhoneNumber->CssClass = "";
		$this->PhoneNumber->ViewCustomAttributes = "";

		// ContactEmail
		$this->ContactEmail->ViewValue = $this->ContactEmail->CurrentValue;
		$this->ContactEmail->CssStyle = "";
		$this->ContactEmail->CssClass = "";
		$this->ContactEmail->ViewCustomAttributes = "";

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

		// ContactPhone
		$this->ContactPhone->ViewValue = $this->ContactPhone->CurrentValue;
		$this->ContactPhone->CssStyle = "";
		$this->ContactPhone->CssClass = "";
		$this->ContactPhone->ViewCustomAttributes = "";

		// Approved
		$this->Approved->ViewValue = $this->Approved->CurrentValue;
		$this->Approved->CssStyle = "";
		$this->Approved->CssClass = "";
		$this->Approved->ViewCustomAttributes = "";

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

		// EmailAddress
		$this->EmailAddress->ViewValue = $this->EmailAddress->CurrentValue;
		$this->EmailAddress->CssStyle = "";
		$this->EmailAddress->CssClass = "";
		$this->EmailAddress->ViewCustomAttributes = "";

		// SPNumber
		$this->SPNumber->ViewValue = $this->SPNumber->CurrentValue;
		$this->SPNumber->CssStyle = "";
		$this->SPNumber->CssClass = "";
		$this->SPNumber->ViewCustomAttributes = "";

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

		// CellNumber
		$this->CellNumber->ViewValue = $this->CellNumber->CurrentValue;
		$this->CellNumber->CssStyle = "";
		$this->CellNumber->CssClass = "";
		$this->CellNumber->ViewCustomAttributes = "";

		// ContactCell
		$this->ContactCell->ViewValue = $this->ContactCell->CurrentValue;
		$this->ContactCell->CssStyle = "";
		$this->ContactCell->CssClass = "";
		$this->ContactCell->ViewCustomAttributes = "";

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

		// NumReminders
		$this->NumReminders->ViewValue = $this->NumReminders->CurrentValue;
		$this->NumReminders->CssStyle = "";
		$this->NumReminders->CssClass = "";
		$this->NumReminders->ViewCustomAttributes = "";

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

		// PrevSPNumber
		$this->PrevSPNumber->ViewValue = $this->PrevSPNumber->CurrentValue;
		$this->PrevSPNumber->CssStyle = "";
		$this->PrevSPNumber->CssClass = "";
		$this->PrevSPNumber->ViewCustomAttributes = "";

		// Renewal
		$this->Renewal->ViewValue = $this->Renewal->CurrentValue;
		$this->Renewal->CssStyle = "";
		$this->Renewal->CssClass = "";
		$this->Renewal->ViewCustomAttributes = "";

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

		// CPDProviderID
		$this->CPDProviderID->HrefValue = "";
		$this->CPDProviderID->TooltipValue = "";

		// CompanyName
		$this->CompanyName->HrefValue = "";
		$this->CompanyName->TooltipValue = "";

		// TradingAs
		$this->TradingAs->HrefValue = "";
		$this->TradingAs->TooltipValue = "";

		// ContactTitle
		$this->ContactTitle->HrefValue = "";
		$this->ContactTitle->TooltipValue = "";

		// ContactInitials
		$this->ContactInitials->HrefValue = "";
		$this->ContactInitials->TooltipValue = "";

		// ContactFirstName
		$this->ContactFirstName->HrefValue = "";
		$this->ContactFirstName->TooltipValue = "";

		// ContactSurname
		$this->ContactSurname->HrefValue = "";
		$this->ContactSurname->TooltipValue = "";

		// ContactPosition
		$this->ContactPosition->HrefValue = "";
		$this->ContactPosition->TooltipValue = "";

		// ContactIDNum
		$this->ContactIDNum->HrefValue = "";
		$this->ContactIDNum->TooltipValue = "";

		// PhoneNumber
		$this->PhoneNumber->HrefValue = "";
		$this->PhoneNumber->TooltipValue = "";

		// ContactEmail
		$this->ContactEmail->HrefValue = "";
		$this->ContactEmail->TooltipValue = "";

		// DateUpdated
		$this->DateUpdated->HrefValue = "";
		$this->DateUpdated->TooltipValue = "";

		// ContactPhone
		$this->ContactPhone->HrefValue = "";
		$this->ContactPhone->TooltipValue = "";

		// Approved
		$this->Approved->HrefValue = "";
		$this->Approved->TooltipValue = "";

		// DateAssessed
		$this->DateAssessed->HrefValue = "";
		$this->DateAssessed->TooltipValue = "";

		// EmailAddress
		$this->EmailAddress->HrefValue = "";
		$this->EmailAddress->TooltipValue = "";

		// SPNumber
		$this->SPNumber->HrefValue = "";
		$this->SPNumber->TooltipValue = "";

		// DateExpires
		$this->DateExpires->HrefValue = "";
		$this->DateExpires->TooltipValue = "";

		// CellNumber
		$this->CellNumber->HrefValue = "";
		$this->CellNumber->TooltipValue = "";

		// ContactCell
		$this->ContactCell->HrefValue = "";
		$this->ContactCell->TooltipValue = "";

		// DatePaid
		$this->DatePaid->HrefValue = "";
		$this->DatePaid->TooltipValue = "";

		// NumReminders
		$this->NumReminders->HrefValue = "";
		$this->NumReminders->TooltipValue = "";

		// LastReminder
		$this->LastReminder->HrefValue = "";
		$this->LastReminder->TooltipValue = "";

		// PrevSPNumber
		$this->PrevSPNumber->HrefValue = "";
		$this->PrevSPNumber->TooltipValue = "";

		// Renewal
		$this->Renewal->HrefValue = "";
		$this->Renewal->TooltipValue = "";

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

		// Call Row Rendered event
		$this->Row_Rendered();
	}

	// Aggregate list row values
	function AggregateListRowValues() {
	}

	// Aggregate list row (for rendering)
	function AggregateListRow() {
	}

	// Row styles
	function RowStyles() {
		$sAtt = "";
		$sStyle = trim($this->CssStyle);
		if (@$this->RowAttrs["style"] <> "")
			$sStyle .= " " . $this->RowAttrs["style"];
		$sClass = trim($this->CssClass);
		if (@$this->RowAttrs["class"] <> "")
			$sClass .= " " . $this->RowAttrs["class"];
		if (trim($sStyle) <> "")
			$sAtt .= " style=\"" . trim($sStyle) . "\"";
		if (trim($sClass) <> "")
			$sAtt .= " class=\"" . trim($sClass) . "\"";
		return $sAtt;
	}

	// Row attributes
	function RowAttributes() {
		$sAtt = $this->RowStyles();
		if ($this->Export == "") {
			foreach ($this->RowAttrs as $k => $v) {
				if ($k <> "class" && $k <> "style" && trim($v) <> "")
					$sAtt .= " " . $k . "=\"" . trim($v) . "\"";
			}
		}
		return $sAtt;
	}

	// Field object by name
	function fields($fldname) {
		return $this->fields[$fldname];
	}

	// Table level events
	// Recordset Selecting event
	function Recordset_Selecting(&$filter) {

		// Enter your code here	
	}

	// Recordset Selected event
	function Recordset_Selected(&$rs) {

		//echo "Recordset Selected";
	}

	// Recordset Search Validated event
	function Recordset_SearchValidated() {

		// Example:
		//$this->MyField1->AdvancedSearch->SearchValue = "your search criteria"; // Search value

	}

	// Recordset Searching event
	function Recordset_Searching(&$filter) {

		// Enter your code here	
	}

	// Row_Selecting event
	function Row_Selecting(&$filter) {

		// Enter your code here	
	}

	// Row Selected event
	function Row_Selected(&$rs) {

		//echo "Row Selected";
	}

	// Row Rendering event
	function Row_Rendering() {

		// Enter your code here	
	}

	// Row Rendered event
	function Row_Rendered() {

		// To view properties of field class, use:
		//var_dump($this-><FieldName>); 

	}

	// Row Inserting event
	function Row_Inserting(&$rs) {

		// Enter your code here
		// To cancel, set return value to FALSE

		return TRUE;
	}

	// Row Inserted event
	function Row_Inserted(&$rs) {

		//echo "Row Inserted"
	}

	// Row Updating event
	function Row_Updating(&$rsold, &$rsnew) {

		// Enter your code here
		// To cancel, set return value to FALSE

		return TRUE;
	}

	// Row Updated event
	function Row_Updated(&$rsold, &$rsnew) {

		//echo "Row Updated";
	}

	// Row Update Conflict event
	function Row_UpdateConflict(&$rsold, &$rsnew) {

		// Enter your code here
		// To ignore conflict, set return value to FALSE

		return TRUE;
	}

	// Row Deleting event
	function Row_Deleting(&$rs) {

		// Enter your code here
		// To cancel, set return value to False

		return TRUE;
	}

	// Row Deleted event
	function Row_Deleted(&$rs) {

		//echo "Row Deleted";
	}

	// Email Sending event
	function Email_Sending(&$Email, &$Args) {

		//var_dump($Email); var_dump($Args); exit();
		return TRUE;
	}
}
?>