Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/ccmadmin/
Upload File :
Current File : /var/www/cesa.co.za/ccmadmin/CCMMentorssrch.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 "CCMMentorsinfo.php" ?>
<?php include "CCMUsersinfo.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
$CCMMentors_search = new cCCMMentors_search();
$Page =& $CCMMentors_search;

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

// Page main
$CCMMentors_search->Page_Main();
?>
<?php include "header.php" ?>
<script type="text/javascript">
<!--

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

// page properties
CCMMentors_search.PageID = "search"; // page ID
CCMMentors_search.FormID = "fCCMMentorssearch"; // form ID
var EW_PAGE_ID = CCMMentors_search.PageID; // for backward compatibility

// extend page with validate function for search
CCMMentors_search.ValidateSearch = function(fobj) {
	ew_PostAutoSuggest(fobj);
	if (this.ValidateRequired) {
		var infix = "";

		// Call Form Custom Validate event
		if (!this.Form_CustomValidate(fobj))
			return false;
	}
	for (var i=0; i<fobj.elements.length; i++) {
		var elem = fobj.elements[i];
		if (elem.name.substring(0,2) == "s_" || elem.name.substring(0,3) == "sv_")
			elem.value = "";
	}
	return true;
}

// extend page with Form_CustomValidate function
CCMMentors_search.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) { ?>
CCMMentors_search.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCMMentors_search.ValidateRequired = false; // no JavaScript validation
<?php } ?>

//-->
</script>
<script type="text/javascript">
<!--
var ew_DHTMLEditors = [];

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

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

</script>
<p><span class="phpmaker"><?php echo $Language->Phrase("Search") ?>&nbsp;<?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CCMMentors->TableCaption() ?><br><br>
<a href="<?php echo $CCMMentors->getReturnUrl() ?>"><?php echo $Language->Phrase("BackToList") ?></a></span></p>
<?php
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
$CCMMentors_search->ShowMessage();
?>
<form name="fCCMMentorssearch" id="fCCMMentorssearch" action="<?php echo ew_CurrentPage() ?>" method="post" onsubmit="return CCMMentors_search.ValidateSearch(this);">
<p>
<input type="hidden" name="t" id="t" value="CCMMentors">
<input type="hidden" name="a_search" id="a_search" value="S">
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table cellspacing="0" class="ewTable">
	<tr<?php echo $CCMMentors->CCMMentorID->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->CCMMentorID->FldCaption() ?></td>
		<td<?php echo $CCMMentors->CCMMentorID->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("=") ?><input type="hidden" name="z_CCMMentorID" id="z_CCMMentorID" value="="></span></td>
		<td<?php echo $CCMMentors->CCMMentorID->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_CCMMentorID" id="x_CCMMentorID" title="<?php echo $CCMMentors->CCMMentorID->FldTitle() ?>" value="<?php echo $CCMMentors->CCMMentorID->EditValue ?>"<?php echo $CCMMentors->CCMMentorID->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Organisation->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Organisation->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Organisation->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Organisation" id="z_Organisation" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Organisation->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Organisation" id="x_Organisation" title="<?php echo $CCMMentors->Organisation->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->Organisation->EditValue ?>"<?php echo $CCMMentors->Organisation->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Title->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Title->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Title->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Title" id="z_Title" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Title->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Title" id="x_Title" title="<?php echo $CCMMentors->Title->FldTitle() ?>" size="30" maxlength="20" value="<?php echo $CCMMentors->Title->EditValue ?>"<?php echo $CCMMentors->Title->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->FirstName->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->FirstName->FldCaption() ?></td>
		<td<?php echo $CCMMentors->FirstName->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_FirstName" id="z_FirstName" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->FirstName->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_FirstName" id="x_FirstName" title="<?php echo $CCMMentors->FirstName->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->FirstName->EditValue ?>"<?php echo $CCMMentors->FirstName->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Surname->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Surname->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Surname->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Surname" id="z_Surname" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Surname->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Surname" id="x_Surname" title="<?php echo $CCMMentors->Surname->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->Surname->EditValue ?>"<?php echo $CCMMentors->Surname->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Initials->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Initials->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Initials->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Initials" id="z_Initials" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Initials->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Initials" id="x_Initials" title="<?php echo $CCMMentors->Initials->FldTitle() ?>" size="30" maxlength="50" value="<?php echo $CCMMentors->Initials->EditValue ?>"<?php echo $CCMMentors->Initials->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->KnownAs->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->KnownAs->FldCaption() ?></td>
		<td<?php echo $CCMMentors->KnownAs->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_KnownAs" id="z_KnownAs" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->KnownAs->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_KnownAs" id="x_KnownAs" title="<?php echo $CCMMentors->KnownAs->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->KnownAs->EditValue ?>"<?php echo $CCMMentors->KnownAs->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->IDNumber->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->IDNumber->FldCaption() ?></td>
		<td<?php echo $CCMMentors->IDNumber->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_IDNumber" id="z_IDNumber" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->IDNumber->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_IDNumber" id="x_IDNumber" title="<?php echo $CCMMentors->IDNumber->FldTitle() ?>" size="30" maxlength="50" value="<?php echo $CCMMentors->IDNumber->EditValue ?>"<?php echo $CCMMentors->IDNumber->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->ProfessionalCouncil->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->ProfessionalCouncil->FldCaption() ?></td>
		<td<?php echo $CCMMentors->ProfessionalCouncil->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_ProfessionalCouncil" id="z_ProfessionalCouncil" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->ProfessionalCouncil->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_ProfessionalCouncil" id="x_ProfessionalCouncil" title="<?php echo $CCMMentors->ProfessionalCouncil->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->ProfessionalCouncil->EditValue ?>"<?php echo $CCMMentors->ProfessionalCouncil->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->CategoryReg->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->CategoryReg->FldCaption() ?></td>
		<td<?php echo $CCMMentors->CategoryReg->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_CategoryReg" id="z_CategoryReg" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->CategoryReg->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_CategoryReg" id="x_CategoryReg" title="<?php echo $CCMMentors->CategoryReg->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->CategoryReg->EditValue ?>"<?php echo $CCMMentors->CategoryReg->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->CouncilRegNumber->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->CouncilRegNumber->FldCaption() ?></td>
		<td<?php echo $CCMMentors->CouncilRegNumber->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_CouncilRegNumber" id="z_CouncilRegNumber" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->CouncilRegNumber->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_CouncilRegNumber" id="x_CouncilRegNumber" title="<?php echo $CCMMentors->CouncilRegNumber->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->CouncilRegNumber->EditValue ?>"<?php echo $CCMMentors->CouncilRegNumber->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Telephone->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Telephone->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Telephone->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Telephone" id="z_Telephone" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Telephone->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Telephone" id="x_Telephone" title="<?php echo $CCMMentors->Telephone->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->Telephone->EditValue ?>"<?php echo $CCMMentors->Telephone->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Cellphone->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Cellphone->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Cellphone->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Cellphone" id="z_Cellphone" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Cellphone->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Cellphone" id="x_Cellphone" title="<?php echo $CCMMentors->Cellphone->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->Cellphone->EditValue ?>"<?php echo $CCMMentors->Cellphone->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->EmailAddress->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->EmailAddress->FldCaption() ?></td>
		<td<?php echo $CCMMentors->EmailAddress->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_EmailAddress" id="z_EmailAddress" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->EmailAddress->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_EmailAddress" id="x_EmailAddress" title="<?php echo $CCMMentors->EmailAddress->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->EmailAddress->EditValue ?>"<?php echo $CCMMentors->EmailAddress->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->WorkAddress->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->WorkAddress->FldCaption() ?></td>
		<td<?php echo $CCMMentors->WorkAddress->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_WorkAddress" id="z_WorkAddress" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->WorkAddress->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<textarea name="x_WorkAddress" id="x_WorkAddress" title="<?php echo $CCMMentors->WorkAddress->FldTitle() ?>" cols="35" rows="4"<?php echo $CCMMentors->WorkAddress->EditAttributes() ?>><?php echo $CCMMentors->WorkAddress->EditValue ?></textarea>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->PostalAddress->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->PostalAddress->FldCaption() ?></td>
		<td<?php echo $CCMMentors->PostalAddress->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_PostalAddress" id="z_PostalAddress" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->PostalAddress->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<textarea name="x_PostalAddress" id="x_PostalAddress" title="<?php echo $CCMMentors->PostalAddress->FldTitle() ?>" cols="35" rows="4"<?php echo $CCMMentors->PostalAddress->EditAttributes() ?>><?php echo $CCMMentors->PostalAddress->EditValue ?></textarea>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->EducationalInst->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->EducationalInst->FldCaption() ?></td>
		<td<?php echo $CCMMentors->EducationalInst->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_EducationalInst" id="z_EducationalInst" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->EducationalInst->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_EducationalInst" id="x_EducationalInst" title="<?php echo $CCMMentors->EducationalInst->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->EducationalInst->EditValue ?>"<?php echo $CCMMentors->EducationalInst->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Qualifications->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Qualifications->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Qualifications->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Qualifications" id="z_Qualifications" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Qualifications->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<textarea name="x_Qualifications" id="x_Qualifications" title="<?php echo $CCMMentors->Qualifications->FldTitle() ?>" cols="35" rows="4"<?php echo $CCMMentors->Qualifications->EditAttributes() ?>><?php echo $CCMMentors->Qualifications->EditValue ?></textarea>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->CVFile->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->CVFile->FldCaption() ?></td>
		<td<?php echo $CCMMentors->CVFile->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_CVFile" id="z_CVFile" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->CVFile->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_CVFile" id="x_CVFile" title="<?php echo $CCMMentors->CVFile->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->CVFile->EditValue ?>"<?php echo $CCMMentors->CVFile->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->MentorUndertaking->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->MentorUndertaking->FldCaption() ?></td>
		<td<?php echo $CCMMentors->MentorUndertaking->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_MentorUndertaking" id="z_MentorUndertaking" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->MentorUndertaking->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_MentorUndertaking" id="x_MentorUndertaking" title="<?php echo $CCMMentors->MentorUndertaking->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->MentorUndertaking->EditValue ?>"<?php echo $CCMMentors->MentorUndertaking->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->CandUUndertaking->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->CandUUndertaking->FldCaption() ?></td>
		<td<?php echo $CCMMentors->CandUUndertaking->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_CandUUndertaking" id="z_CandUUndertaking" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->CandUUndertaking->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_CandUUndertaking" id="x_CandUUndertaking" title="<?php echo $CCMMentors->CandUUndertaking->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMMentors->CandUUndertaking->EditValue ?>"<?php echo $CCMMentors->CandUUndertaking->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->WebUsername->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->WebUsername->FldCaption() ?></td>
		<td<?php echo $CCMMentors->WebUsername->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_WebUsername" id="z_WebUsername" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->WebUsername->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_WebUsername" id="x_WebUsername" title="<?php echo $CCMMentors->WebUsername->FldTitle() ?>" size="30" maxlength="20" value="<?php echo $CCMMentors->WebUsername->EditValue ?>"<?php echo $CCMMentors->WebUsername->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->WebPassword->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->WebPassword->FldCaption() ?></td>
		<td<?php echo $CCMMentors->WebPassword->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_WebPassword" id="z_WebPassword" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->WebPassword->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_WebPassword" id="x_WebPassword" title="<?php echo $CCMMentors->WebPassword->FldTitle() ?>" size="30" maxlength="20" value="<?php echo $CCMMentors->WebPassword->EditValue ?>"<?php echo $CCMMentors->WebPassword->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->BlockAccess->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->BlockAccess->FldCaption() ?></td>
		<td<?php echo $CCMMentors->BlockAccess->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_BlockAccess" id="z_BlockAccess" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->BlockAccess->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<div id="tp_x_BlockAccess" class="<?php echo EW_ITEM_TEMPLATE_CLASSNAME ?>"><label><input type="radio" name="x_BlockAccess" id="x_BlockAccess" title="<?php echo $CCMMentors->BlockAccess->FldTitle() ?>" value="{value}"<?php echo $CCMMentors->BlockAccess->EditAttributes() ?>></label></div>
<div id="dsl_x_BlockAccess" repeatcolumn="5">
<?php
$arwrk = $CCMMentors->BlockAccess->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($CCMMentors->BlockAccess->AdvancedSearch->SearchValue) == strval($arwrk[$rowcntwrk][0])) ? " checked=\"checked\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;

		// Note: No spacing within the LABEL tag
?>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 1) ?>
<label><input type="radio" name="x_BlockAccess" id="x_BlockAccess" title="<?php echo $CCMMentors->BlockAccess->FldTitle() ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $CCMMentors->BlockAccess->EditAttributes() ?>><?php echo $arwrk[$rowcntwrk][1] ?></label>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 2) ?>
<?php
	}
}
?>
</div>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Archived->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Archived->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Archived->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("=") ?><input type="hidden" name="z_Archived" id="z_Archived" value="="></span></td>
		<td<?php echo $CCMMentors->Archived->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<div id="tp_x_Archived" class="<?php echo EW_ITEM_TEMPLATE_CLASSNAME ?>"><label><input type="radio" name="x_Archived" id="x_Archived" title="<?php echo $CCMMentors->Archived->FldTitle() ?>" value="{value}"<?php echo $CCMMentors->Archived->EditAttributes() ?>></label></div>
<div id="dsl_x_Archived" repeatcolumn="5">
<?php
$arwrk = $CCMMentors->Archived->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($CCMMentors->Archived->AdvancedSearch->SearchValue) == strval($arwrk[$rowcntwrk][0])) ? " checked=\"checked\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;

		// Note: No spacing within the LABEL tag
?>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 1) ?>
<label><input type="radio" name="x_Archived" id="x_Archived" title="<?php echo $CCMMentors->Archived->FldTitle() ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $CCMMentors->Archived->EditAttributes() ?>><?php echo $arwrk[$rowcntwrk][1] ?></label>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 2) ?>
<?php
	}
}
?>
</div>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Designation->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Designation->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Designation->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Designation" id="z_Designation" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Designation->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Designation" id="x_Designation" title="<?php echo $CCMMentors->Designation->FldTitle() ?>" size="30" maxlength="50" value="<?php echo $CCMMentors->Designation->EditValue ?>"<?php echo $CCMMentors->Designation->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Prof_Reg_No->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Prof_Reg_No->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Prof_Reg_No->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Prof_Reg_No" id="z_Prof_Reg_No" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Prof_Reg_No->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Prof_Reg_No" id="x_Prof_Reg_No" title="<?php echo $CCMMentors->Prof_Reg_No->FldTitle() ?>" size="30" maxlength="50" value="<?php echo $CCMMentors->Prof_Reg_No->EditValue ?>"<?php echo $CCMMentors->Prof_Reg_No->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
	<tr<?php echo $CCMMentors->Reg_No->RowAttributes ?>>
		<td class="ewTableHeader"><?php echo $CCMMentors->Reg_No->FldCaption() ?></td>
		<td<?php echo $CCMMentors->Reg_No->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_Reg_No" id="z_Reg_No" value="LIKE"></span></td>
		<td<?php echo $CCMMentors->Reg_No->CellAttributes() ?>>
			<div style="white-space: nowrap;">
				<span class="phpmaker" style="float: left;">
<input type="text" name="x_Reg_No" id="x_Reg_No" title="<?php echo $CCMMentors->Reg_No->FldTitle() ?>" size="30" maxlength="50" value="<?php echo $CCMMentors->Reg_No->EditValue ?>"<?php echo $CCMMentors->Reg_No->EditAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
</table>
</div>
</td></tr></table>
<p>
<input type="submit" name="Action" id="Action" value="<?php echo ew_BtnCaption($Language->Phrase("Search")) ?>">
<input type="button" name="Reset" id="Reset" value="<?php echo ew_BtnCaption($Language->Phrase("Reset")) ?>" onclick="ew_ClearForm(this.form);">
</form>
<script language="JavaScript" type="text/javascript">
<!--

// Write your table-specific startup script here
// document.write("page loaded");
//-->

</script>
<?php include "footer.php" ?>
<?php
$CCMMentors_search->Page_Terminate();
?>
<?php

//
// Page class
//
class cCCMMentors_search {

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

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

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

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

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

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

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

		// Table object (CCMMentors)
		$GLOBALS["CCMMentors"] = new cCCMMentors();

		// Table object (CCMUsers)
		$GLOBALS['CCMUsers'] = new cCCMUsers();

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

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'CCMMentors', 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 $CCMMentors;

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

		// Create form object
		$objForm = new cFormObj();

		// 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();
	}

	//
	// Page main
	//
	function Page_Main() {
		global $objForm, $Language, $gsSearchError, $CCMMentors;
		if ($this->IsPageRequest()) { // Validate request

			// Get action
			$CCMMentors->CurrentAction = $objForm->GetValue("a_search");
			switch ($CCMMentors->CurrentAction) {
				case "S": // Get search criteria

					// Build search string for advanced search, remove blank field
					$this->LoadSearchValues(); // Get search values
					if ($this->ValidateSearch()) {
						$sSrchStr = $this->BuildAdvancedSearch();
					} else {
						$sSrchStr = "";
						$this->setMessage($gsSearchError);
					}
					if ($sSrchStr <> "") {
						$sSrchStr = $CCMMentors->UrlParm($sSrchStr);
						$this->Page_Terminate("CCMMentorslist.php" . "?" . $sSrchStr); // Go to list page
					}
			}
		}

		// Restore search settings from Session
		if ($gsSearchError == "")
			$this->LoadAdvancedSearch();

		// Render row for search
		$CCMMentors->RowType = EW_ROWTYPE_SEARCH;
		$this->RenderRow();
	}

// Build advanced search
function BuildAdvancedSearch() {
	global $CCMMentors;
	$sSrchUrl = "";
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->CCMMentorID); // CCMMentorID
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Organisation); // Organisation
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Title); // Title
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->FirstName); // FirstName
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Surname); // Surname
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Initials); // Initials
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->KnownAs); // KnownAs
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->IDNumber); // IDNumber
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->ProfessionalCouncil); // ProfessionalCouncil
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->CategoryReg); // CategoryReg
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->CouncilRegNumber); // CouncilRegNumber
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Telephone); // Telephone
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Cellphone); // Cellphone
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->EmailAddress); // EmailAddress
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->WorkAddress); // WorkAddress
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->PostalAddress); // PostalAddress
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->EducationalInst); // EducationalInst
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Qualifications); // Qualifications
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->CVFile); // CVFile
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->MentorUndertaking); // MentorUndertaking
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->CandUUndertaking); // CandUUndertaking
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->WebUsername); // WebUsername
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->WebPassword); // WebPassword
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->BlockAccess); // BlockAccess
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Archived); // Archived
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Designation); // Designation
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Prof_Reg_No); // Prof Reg No
	$this->BuildSearchUrl($sSrchUrl, $CCMMentors->Reg_No); // Reg No
	return $sSrchUrl;
}

// Build search URL
function BuildSearchUrl(&$Url, &$Fld) {
	global $objForm;
	$sWrk = "";
	$FldParm = substr($Fld->FldVar, 2);
	$FldVal = $objForm->GetValue("x_$FldParm");
	$FldOpr = $objForm->GetValue("z_$FldParm");
	$FldCond = $objForm->GetValue("v_$FldParm");
	$FldVal2 = $objForm->GetValue("y_$FldParm");
	$FldOpr2 = $objForm->GetValue("w_$FldParm");
	$FldVal = ew_StripSlashes($FldVal);
	if (is_array($FldVal)) $FldVal = implode(",", $FldVal);
	$FldVal2 = ew_StripSlashes($FldVal2);
	if (is_array($FldVal2)) $FldVal2 = implode(",", $FldVal2);
	$FldOpr = strtoupper(trim($FldOpr));
	$lFldDataType = ($Fld->FldIsVirtual) ? EW_DATATYPE_STRING : $Fld->FldDataType;
	if ($FldOpr == "BETWEEN") {
		$IsValidValue = ($lFldDataType <> EW_DATATYPE_NUMBER) ||
			($lFldDataType == EW_DATATYPE_NUMBER && is_numeric($FldVal) && is_numeric($FldVal2));
		if ($FldVal <> "" && $FldVal2 <> "" && $IsValidValue) {
			$sWrk = "x_" . $FldParm . "=" . urlencode($FldVal) .
				"&y_" . $FldParm . "=" . urlencode($FldVal2) .
				"&z_" . $FldParm . "=" . urlencode($FldOpr);
		}
	} elseif ($FldOpr == "IS NULL" || $FldOpr == "IS NOT NULL") {
		$sWrk = "x_" . $FldParm . "=" . urlencode($FldVal) .
			"&z_" . $FldParm . "=" . urlencode($FldOpr);
	} else {
		$IsValidValue = ($lFldDataType <> EW_DATATYPE_NUMBER) ||
			($lFldDataType == EW_DATATYPE_NUMBER && is_numeric($FldVal));
		if ($FldVal <> "" && $IsValidValue && ew_IsValidOpr($FldOpr, $lFldDataType)) {

			//$FldVal = $this->ConvertSearchValue($Fld, $FldVal);
			$sWrk = "x_" . $FldParm . "=" . urlencode($FldVal) .
				"&z_" . $FldParm . "=" . urlencode($FldOpr);
		}
		$IsValidValue = ($lFldDataType <> EW_DATATYPE_NUMBER) ||
			($lFldDataType == EW_DATATYPE_NUMBER && is_numeric($FldVal2));
		if ($FldVal2 <> "" && $IsValidValue && ew_IsValidOpr($FldOpr2, $lFldDataType)) {

			//$FldVal2 = $this->ConvertSearchValue($Fld, $FldVal2);
			if ($sWrk <> "") $sWrk .= "&v_" . $FldParm . "=" . urlencode($FldCond) . "&";
			$sWrk .= "&y_" . $FldParm . "=" . urlencode($FldVal2) .
				"&w_" . $FldParm . "=" . urlencode($FldOpr2);
		}
	}
	if ($sWrk <> "") {
		if ($Url <> "") $Url .= "&";
		$Url .= $sWrk;
	}
}

// Convert search value for date
function ConvertSearchValue(&$Fld, $FldVal) {
	$Value = $FldVal;
	if ($Fld->FldDataType == EW_DATATYPE_DATE && $FldVal <> "")
		$Value = ew_UnFormatDateTime($FldVal, $Fld->FldDateTimeFormat);
	return $Value;
}

	//  Load search values for validation
	function LoadSearchValues() {
		global $objForm, $CCMMentors;

		// Load search values
		// CCMMentorID

		$CCMMentors->CCMMentorID->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_CCMMentorID"));
		$CCMMentors->CCMMentorID->AdvancedSearch->SearchOperator = $objForm->GetValue("z_CCMMentorID");

		// Organisation
		$CCMMentors->Organisation->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Organisation"));
		$CCMMentors->Organisation->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Organisation");

		// Title
		$CCMMentors->Title->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Title"));
		$CCMMentors->Title->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Title");

		// FirstName
		$CCMMentors->FirstName->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_FirstName"));
		$CCMMentors->FirstName->AdvancedSearch->SearchOperator = $objForm->GetValue("z_FirstName");

		// Surname
		$CCMMentors->Surname->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Surname"));
		$CCMMentors->Surname->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Surname");

		// Initials
		$CCMMentors->Initials->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Initials"));
		$CCMMentors->Initials->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Initials");

		// KnownAs
		$CCMMentors->KnownAs->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_KnownAs"));
		$CCMMentors->KnownAs->AdvancedSearch->SearchOperator = $objForm->GetValue("z_KnownAs");

		// IDNumber
		$CCMMentors->IDNumber->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_IDNumber"));
		$CCMMentors->IDNumber->AdvancedSearch->SearchOperator = $objForm->GetValue("z_IDNumber");

		// ProfessionalCouncil
		$CCMMentors->ProfessionalCouncil->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_ProfessionalCouncil"));
		$CCMMentors->ProfessionalCouncil->AdvancedSearch->SearchOperator = $objForm->GetValue("z_ProfessionalCouncil");

		// CategoryReg
		$CCMMentors->CategoryReg->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_CategoryReg"));
		$CCMMentors->CategoryReg->AdvancedSearch->SearchOperator = $objForm->GetValue("z_CategoryReg");

		// CouncilRegNumber
		$CCMMentors->CouncilRegNumber->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_CouncilRegNumber"));
		$CCMMentors->CouncilRegNumber->AdvancedSearch->SearchOperator = $objForm->GetValue("z_CouncilRegNumber");

		// Telephone
		$CCMMentors->Telephone->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Telephone"));
		$CCMMentors->Telephone->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Telephone");

		// Cellphone
		$CCMMentors->Cellphone->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Cellphone"));
		$CCMMentors->Cellphone->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Cellphone");

		// EmailAddress
		$CCMMentors->EmailAddress->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_EmailAddress"));
		$CCMMentors->EmailAddress->AdvancedSearch->SearchOperator = $objForm->GetValue("z_EmailAddress");

		// WorkAddress
		$CCMMentors->WorkAddress->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_WorkAddress"));
		$CCMMentors->WorkAddress->AdvancedSearch->SearchOperator = $objForm->GetValue("z_WorkAddress");

		// PostalAddress
		$CCMMentors->PostalAddress->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_PostalAddress"));
		$CCMMentors->PostalAddress->AdvancedSearch->SearchOperator = $objForm->GetValue("z_PostalAddress");

		// EducationalInst
		$CCMMentors->EducationalInst->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_EducationalInst"));
		$CCMMentors->EducationalInst->AdvancedSearch->SearchOperator = $objForm->GetValue("z_EducationalInst");

		// Qualifications
		$CCMMentors->Qualifications->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Qualifications"));
		$CCMMentors->Qualifications->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Qualifications");

		// CVFile
		$CCMMentors->CVFile->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_CVFile"));
		$CCMMentors->CVFile->AdvancedSearch->SearchOperator = $objForm->GetValue("z_CVFile");

		// MentorUndertaking
		$CCMMentors->MentorUndertaking->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_MentorUndertaking"));
		$CCMMentors->MentorUndertaking->AdvancedSearch->SearchOperator = $objForm->GetValue("z_MentorUndertaking");

		// CandUUndertaking
		$CCMMentors->CandUUndertaking->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_CandUUndertaking"));
		$CCMMentors->CandUUndertaking->AdvancedSearch->SearchOperator = $objForm->GetValue("z_CandUUndertaking");

		// WebUsername
		$CCMMentors->WebUsername->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_WebUsername"));
		$CCMMentors->WebUsername->AdvancedSearch->SearchOperator = $objForm->GetValue("z_WebUsername");

		// WebPassword
		$CCMMentors->WebPassword->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_WebPassword"));
		$CCMMentors->WebPassword->AdvancedSearch->SearchOperator = $objForm->GetValue("z_WebPassword");

		// BlockAccess
		$CCMMentors->BlockAccess->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_BlockAccess"));
		$CCMMentors->BlockAccess->AdvancedSearch->SearchOperator = $objForm->GetValue("z_BlockAccess");

		// Archived
		$CCMMentors->Archived->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Archived"));
		$CCMMentors->Archived->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Archived");

		// Designation
		$CCMMentors->Designation->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Designation"));
		$CCMMentors->Designation->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Designation");

		// Prof Reg No
		$CCMMentors->Prof_Reg_No->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Prof_Reg_No"));
		$CCMMentors->Prof_Reg_No->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Prof_Reg_No");

		// Reg No
		$CCMMentors->Reg_No->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Reg_No"));
		$CCMMentors->Reg_No->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Reg_No");
	}

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

		// Initialize URLs
		// Call Row_Rendering event

		$CCMMentors->Row_Rendering();

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

		$CCMMentors->CCMMentorID->CellCssStyle = ""; $CCMMentors->CCMMentorID->CellCssClass = "";
		$CCMMentors->CCMMentorID->CellAttrs = array(); $CCMMentors->CCMMentorID->ViewAttrs = array(); $CCMMentors->CCMMentorID->EditAttrs = array();

		// Organisation
		$CCMMentors->Organisation->CellCssStyle = ""; $CCMMentors->Organisation->CellCssClass = "";
		$CCMMentors->Organisation->CellAttrs = array(); $CCMMentors->Organisation->ViewAttrs = array(); $CCMMentors->Organisation->EditAttrs = array();

		// Title
		$CCMMentors->Title->CellCssStyle = ""; $CCMMentors->Title->CellCssClass = "";
		$CCMMentors->Title->CellAttrs = array(); $CCMMentors->Title->ViewAttrs = array(); $CCMMentors->Title->EditAttrs = array();

		// FirstName
		$CCMMentors->FirstName->CellCssStyle = ""; $CCMMentors->FirstName->CellCssClass = "";
		$CCMMentors->FirstName->CellAttrs = array(); $CCMMentors->FirstName->ViewAttrs = array(); $CCMMentors->FirstName->EditAttrs = array();

		// Surname
		$CCMMentors->Surname->CellCssStyle = ""; $CCMMentors->Surname->CellCssClass = "";
		$CCMMentors->Surname->CellAttrs = array(); $CCMMentors->Surname->ViewAttrs = array(); $CCMMentors->Surname->EditAttrs = array();

		// Initials
		$CCMMentors->Initials->CellCssStyle = ""; $CCMMentors->Initials->CellCssClass = "";
		$CCMMentors->Initials->CellAttrs = array(); $CCMMentors->Initials->ViewAttrs = array(); $CCMMentors->Initials->EditAttrs = array();

		// KnownAs
		$CCMMentors->KnownAs->CellCssStyle = ""; $CCMMentors->KnownAs->CellCssClass = "";
		$CCMMentors->KnownAs->CellAttrs = array(); $CCMMentors->KnownAs->ViewAttrs = array(); $CCMMentors->KnownAs->EditAttrs = array();

		// IDNumber
		$CCMMentors->IDNumber->CellCssStyle = ""; $CCMMentors->IDNumber->CellCssClass = "";
		$CCMMentors->IDNumber->CellAttrs = array(); $CCMMentors->IDNumber->ViewAttrs = array(); $CCMMentors->IDNumber->EditAttrs = array();

		// ProfessionalCouncil
		$CCMMentors->ProfessionalCouncil->CellCssStyle = ""; $CCMMentors->ProfessionalCouncil->CellCssClass = "";
		$CCMMentors->ProfessionalCouncil->CellAttrs = array(); $CCMMentors->ProfessionalCouncil->ViewAttrs = array(); $CCMMentors->ProfessionalCouncil->EditAttrs = array();

		// CategoryReg
		$CCMMentors->CategoryReg->CellCssStyle = ""; $CCMMentors->CategoryReg->CellCssClass = "";
		$CCMMentors->CategoryReg->CellAttrs = array(); $CCMMentors->CategoryReg->ViewAttrs = array(); $CCMMentors->CategoryReg->EditAttrs = array();

		// CouncilRegNumber
		$CCMMentors->CouncilRegNumber->CellCssStyle = ""; $CCMMentors->CouncilRegNumber->CellCssClass = "";
		$CCMMentors->CouncilRegNumber->CellAttrs = array(); $CCMMentors->CouncilRegNumber->ViewAttrs = array(); $CCMMentors->CouncilRegNumber->EditAttrs = array();

		// Telephone
		$CCMMentors->Telephone->CellCssStyle = ""; $CCMMentors->Telephone->CellCssClass = "";
		$CCMMentors->Telephone->CellAttrs = array(); $CCMMentors->Telephone->ViewAttrs = array(); $CCMMentors->Telephone->EditAttrs = array();

		// Cellphone
		$CCMMentors->Cellphone->CellCssStyle = ""; $CCMMentors->Cellphone->CellCssClass = "";
		$CCMMentors->Cellphone->CellAttrs = array(); $CCMMentors->Cellphone->ViewAttrs = array(); $CCMMentors->Cellphone->EditAttrs = array();

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

		// WorkAddress
		$CCMMentors->WorkAddress->CellCssStyle = ""; $CCMMentors->WorkAddress->CellCssClass = "";
		$CCMMentors->WorkAddress->CellAttrs = array(); $CCMMentors->WorkAddress->ViewAttrs = array(); $CCMMentors->WorkAddress->EditAttrs = array();

		// PostalAddress
		$CCMMentors->PostalAddress->CellCssStyle = ""; $CCMMentors->PostalAddress->CellCssClass = "";
		$CCMMentors->PostalAddress->CellAttrs = array(); $CCMMentors->PostalAddress->ViewAttrs = array(); $CCMMentors->PostalAddress->EditAttrs = array();

		// EducationalInst
		$CCMMentors->EducationalInst->CellCssStyle = ""; $CCMMentors->EducationalInst->CellCssClass = "";
		$CCMMentors->EducationalInst->CellAttrs = array(); $CCMMentors->EducationalInst->ViewAttrs = array(); $CCMMentors->EducationalInst->EditAttrs = array();

		// Qualifications
		$CCMMentors->Qualifications->CellCssStyle = ""; $CCMMentors->Qualifications->CellCssClass = "";
		$CCMMentors->Qualifications->CellAttrs = array(); $CCMMentors->Qualifications->ViewAttrs = array(); $CCMMentors->Qualifications->EditAttrs = array();

		// CVFile
		$CCMMentors->CVFile->CellCssStyle = ""; $CCMMentors->CVFile->CellCssClass = "";
		$CCMMentors->CVFile->CellAttrs = array(); $CCMMentors->CVFile->ViewAttrs = array(); $CCMMentors->CVFile->EditAttrs = array();

		// MentorUndertaking
		$CCMMentors->MentorUndertaking->CellCssStyle = ""; $CCMMentors->MentorUndertaking->CellCssClass = "";
		$CCMMentors->MentorUndertaking->CellAttrs = array(); $CCMMentors->MentorUndertaking->ViewAttrs = array(); $CCMMentors->MentorUndertaking->EditAttrs = array();

		// CandUUndertaking
		$CCMMentors->CandUUndertaking->CellCssStyle = ""; $CCMMentors->CandUUndertaking->CellCssClass = "";
		$CCMMentors->CandUUndertaking->CellAttrs = array(); $CCMMentors->CandUUndertaking->ViewAttrs = array(); $CCMMentors->CandUUndertaking->EditAttrs = array();

		// WebUsername
		$CCMMentors->WebUsername->CellCssStyle = ""; $CCMMentors->WebUsername->CellCssClass = "";
		$CCMMentors->WebUsername->CellAttrs = array(); $CCMMentors->WebUsername->ViewAttrs = array(); $CCMMentors->WebUsername->EditAttrs = array();

		// WebPassword
		$CCMMentors->WebPassword->CellCssStyle = ""; $CCMMentors->WebPassword->CellCssClass = "";
		$CCMMentors->WebPassword->CellAttrs = array(); $CCMMentors->WebPassword->ViewAttrs = array(); $CCMMentors->WebPassword->EditAttrs = array();

		// BlockAccess
		$CCMMentors->BlockAccess->CellCssStyle = ""; $CCMMentors->BlockAccess->CellCssClass = "";
		$CCMMentors->BlockAccess->CellAttrs = array(); $CCMMentors->BlockAccess->ViewAttrs = array(); $CCMMentors->BlockAccess->EditAttrs = array();

		// Archived
		$CCMMentors->Archived->CellCssStyle = ""; $CCMMentors->Archived->CellCssClass = "";
		$CCMMentors->Archived->CellAttrs = array(); $CCMMentors->Archived->ViewAttrs = array(); $CCMMentors->Archived->EditAttrs = array();

		// Designation
		$CCMMentors->Designation->CellCssStyle = ""; $CCMMentors->Designation->CellCssClass = "";
		$CCMMentors->Designation->CellAttrs = array(); $CCMMentors->Designation->ViewAttrs = array(); $CCMMentors->Designation->EditAttrs = array();

		// Prof Reg No
		$CCMMentors->Prof_Reg_No->CellCssStyle = ""; $CCMMentors->Prof_Reg_No->CellCssClass = "";
		$CCMMentors->Prof_Reg_No->CellAttrs = array(); $CCMMentors->Prof_Reg_No->ViewAttrs = array(); $CCMMentors->Prof_Reg_No->EditAttrs = array();

		// Reg No
		$CCMMentors->Reg_No->CellCssStyle = ""; $CCMMentors->Reg_No->CellCssClass = "";
		$CCMMentors->Reg_No->CellAttrs = array(); $CCMMentors->Reg_No->ViewAttrs = array(); $CCMMentors->Reg_No->EditAttrs = array();
		if ($CCMMentors->RowType == EW_ROWTYPE_VIEW) { // View row

			// CCMMentorID
			$CCMMentors->CCMMentorID->ViewValue = $CCMMentors->CCMMentorID->CurrentValue;
			$CCMMentors->CCMMentorID->CssStyle = "";
			$CCMMentors->CCMMentorID->CssClass = "";
			$CCMMentors->CCMMentorID->ViewCustomAttributes = "";

			// Organisation
			$CCMMentors->Organisation->ViewValue = $CCMMentors->Organisation->CurrentValue;
			$CCMMentors->Organisation->CssStyle = "";
			$CCMMentors->Organisation->CssClass = "";
			$CCMMentors->Organisation->ViewCustomAttributes = "";

			// Title
			$CCMMentors->Title->ViewValue = $CCMMentors->Title->CurrentValue;
			$CCMMentors->Title->CssStyle = "";
			$CCMMentors->Title->CssClass = "";
			$CCMMentors->Title->ViewCustomAttributes = "";

			// FirstName
			$CCMMentors->FirstName->ViewValue = $CCMMentors->FirstName->CurrentValue;
			$CCMMentors->FirstName->CssStyle = "";
			$CCMMentors->FirstName->CssClass = "";
			$CCMMentors->FirstName->ViewCustomAttributes = "";

			// Surname
			$CCMMentors->Surname->ViewValue = $CCMMentors->Surname->CurrentValue;
			$CCMMentors->Surname->CssStyle = "";
			$CCMMentors->Surname->CssClass = "";
			$CCMMentors->Surname->ViewCustomAttributes = "";

			// Initials
			$CCMMentors->Initials->ViewValue = $CCMMentors->Initials->CurrentValue;
			$CCMMentors->Initials->CssStyle = "";
			$CCMMentors->Initials->CssClass = "";
			$CCMMentors->Initials->ViewCustomAttributes = "";

			// KnownAs
			$CCMMentors->KnownAs->ViewValue = $CCMMentors->KnownAs->CurrentValue;
			$CCMMentors->KnownAs->CssStyle = "";
			$CCMMentors->KnownAs->CssClass = "";
			$CCMMentors->KnownAs->ViewCustomAttributes = "";

			// IDNumber
			$CCMMentors->IDNumber->ViewValue = $CCMMentors->IDNumber->CurrentValue;
			$CCMMentors->IDNumber->CssStyle = "";
			$CCMMentors->IDNumber->CssClass = "";
			$CCMMentors->IDNumber->ViewCustomAttributes = "";

			// ProfessionalCouncil
			$CCMMentors->ProfessionalCouncil->ViewValue = $CCMMentors->ProfessionalCouncil->CurrentValue;
			$CCMMentors->ProfessionalCouncil->CssStyle = "";
			$CCMMentors->ProfessionalCouncil->CssClass = "";
			$CCMMentors->ProfessionalCouncil->ViewCustomAttributes = "";

			// CategoryReg
			$CCMMentors->CategoryReg->ViewValue = $CCMMentors->CategoryReg->CurrentValue;
			$CCMMentors->CategoryReg->CssStyle = "";
			$CCMMentors->CategoryReg->CssClass = "";
			$CCMMentors->CategoryReg->ViewCustomAttributes = "";

			// CouncilRegNumber
			$CCMMentors->CouncilRegNumber->ViewValue = $CCMMentors->CouncilRegNumber->CurrentValue;
			$CCMMentors->CouncilRegNumber->CssStyle = "";
			$CCMMentors->CouncilRegNumber->CssClass = "";
			$CCMMentors->CouncilRegNumber->ViewCustomAttributes = "";

			// Telephone
			$CCMMentors->Telephone->ViewValue = $CCMMentors->Telephone->CurrentValue;
			$CCMMentors->Telephone->CssStyle = "";
			$CCMMentors->Telephone->CssClass = "";
			$CCMMentors->Telephone->ViewCustomAttributes = "";

			// Cellphone
			$CCMMentors->Cellphone->ViewValue = $CCMMentors->Cellphone->CurrentValue;
			$CCMMentors->Cellphone->CssStyle = "";
			$CCMMentors->Cellphone->CssClass = "";
			$CCMMentors->Cellphone->ViewCustomAttributes = "";

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

			// WorkAddress
			$CCMMentors->WorkAddress->ViewValue = $CCMMentors->WorkAddress->CurrentValue;
			$CCMMentors->WorkAddress->CssStyle = "";
			$CCMMentors->WorkAddress->CssClass = "";
			$CCMMentors->WorkAddress->ViewCustomAttributes = "";

			// PostalAddress
			$CCMMentors->PostalAddress->ViewValue = $CCMMentors->PostalAddress->CurrentValue;
			$CCMMentors->PostalAddress->CssStyle = "";
			$CCMMentors->PostalAddress->CssClass = "";
			$CCMMentors->PostalAddress->ViewCustomAttributes = "";

			// EducationalInst
			$CCMMentors->EducationalInst->ViewValue = $CCMMentors->EducationalInst->CurrentValue;
			$CCMMentors->EducationalInst->CssStyle = "";
			$CCMMentors->EducationalInst->CssClass = "";
			$CCMMentors->EducationalInst->ViewCustomAttributes = "";

			// Qualifications
			$CCMMentors->Qualifications->ViewValue = $CCMMentors->Qualifications->CurrentValue;
			$CCMMentors->Qualifications->CssStyle = "";
			$CCMMentors->Qualifications->CssClass = "";
			$CCMMentors->Qualifications->ViewCustomAttributes = "";

			// CVFile
			$CCMMentors->CVFile->ViewValue = $CCMMentors->CVFile->CurrentValue;
			$CCMMentors->CVFile->CssStyle = "";
			$CCMMentors->CVFile->CssClass = "";
			$CCMMentors->CVFile->ViewCustomAttributes = "";

			// MentorUndertaking
			$CCMMentors->MentorUndertaking->ViewValue = $CCMMentors->MentorUndertaking->CurrentValue;
			$CCMMentors->MentorUndertaking->CssStyle = "";
			$CCMMentors->MentorUndertaking->CssClass = "";
			$CCMMentors->MentorUndertaking->ViewCustomAttributes = "";

			// CandUUndertaking
			$CCMMentors->CandUUndertaking->ViewValue = $CCMMentors->CandUUndertaking->CurrentValue;
			$CCMMentors->CandUUndertaking->CssStyle = "";
			$CCMMentors->CandUUndertaking->CssClass = "";
			$CCMMentors->CandUUndertaking->ViewCustomAttributes = "";

			// WebUsername
			$CCMMentors->WebUsername->ViewValue = $CCMMentors->WebUsername->CurrentValue;
			$CCMMentors->WebUsername->CssStyle = "";
			$CCMMentors->WebUsername->CssClass = "";
			$CCMMentors->WebUsername->ViewCustomAttributes = "";

			// WebPassword
			$CCMMentors->WebPassword->ViewValue = $CCMMentors->WebPassword->CurrentValue;
			$CCMMentors->WebPassword->CssStyle = "";
			$CCMMentors->WebPassword->CssClass = "";
			$CCMMentors->WebPassword->ViewCustomAttributes = "";

			// BlockAccess
			if (strval($CCMMentors->BlockAccess->CurrentValue) <> "") {
				switch ($CCMMentors->BlockAccess->CurrentValue) {
					case "y":
						$CCMMentors->BlockAccess->ViewValue = "Yes";
						break;
					case "n":
						$CCMMentors->BlockAccess->ViewValue = "No";
						break;
					default:
						$CCMMentors->BlockAccess->ViewValue = $CCMMentors->BlockAccess->CurrentValue;
				}
			} else {
				$CCMMentors->BlockAccess->ViewValue = NULL;
			}
			$CCMMentors->BlockAccess->CssStyle = "";
			$CCMMentors->BlockAccess->CssClass = "";
			$CCMMentors->BlockAccess->ViewCustomAttributes = "";

			// Archived
			if (strval($CCMMentors->Archived->CurrentValue) <> "") {
				switch ($CCMMentors->Archived->CurrentValue) {
					case "1":
						$CCMMentors->Archived->ViewValue = "Yes";
						break;
					case "0":
						$CCMMentors->Archived->ViewValue = "No";
						break;
					default:
						$CCMMentors->Archived->ViewValue = $CCMMentors->Archived->CurrentValue;
				}
			} else {
				$CCMMentors->Archived->ViewValue = NULL;
			}
			$CCMMentors->Archived->CssStyle = "";
			$CCMMentors->Archived->CssClass = "";
			$CCMMentors->Archived->ViewCustomAttributes = "";

			// Designation
			$CCMMentors->Designation->ViewValue = $CCMMentors->Designation->CurrentValue;
			$CCMMentors->Designation->CssStyle = "";
			$CCMMentors->Designation->CssClass = "";
			$CCMMentors->Designation->ViewCustomAttributes = "";

			// Prof Reg No
			$CCMMentors->Prof_Reg_No->ViewValue = $CCMMentors->Prof_Reg_No->CurrentValue;
			$CCMMentors->Prof_Reg_No->CssStyle = "";
			$CCMMentors->Prof_Reg_No->CssClass = "";
			$CCMMentors->Prof_Reg_No->ViewCustomAttributes = "";

			// Reg No
			$CCMMentors->Reg_No->ViewValue = $CCMMentors->Reg_No->CurrentValue;
			$CCMMentors->Reg_No->CssStyle = "";
			$CCMMentors->Reg_No->CssClass = "";
			$CCMMentors->Reg_No->ViewCustomAttributes = "";

			// CCMMentorID
			$CCMMentors->CCMMentorID->HrefValue = "";
			$CCMMentors->CCMMentorID->TooltipValue = "";

			// Organisation
			$CCMMentors->Organisation->HrefValue = "";
			$CCMMentors->Organisation->TooltipValue = "";

			// Title
			$CCMMentors->Title->HrefValue = "";
			$CCMMentors->Title->TooltipValue = "";

			// FirstName
			$CCMMentors->FirstName->HrefValue = "";
			$CCMMentors->FirstName->TooltipValue = "";

			// Surname
			$CCMMentors->Surname->HrefValue = "";
			$CCMMentors->Surname->TooltipValue = "";

			// Initials
			$CCMMentors->Initials->HrefValue = "";
			$CCMMentors->Initials->TooltipValue = "";

			// KnownAs
			$CCMMentors->KnownAs->HrefValue = "";
			$CCMMentors->KnownAs->TooltipValue = "";

			// IDNumber
			$CCMMentors->IDNumber->HrefValue = "";
			$CCMMentors->IDNumber->TooltipValue = "";

			// ProfessionalCouncil
			$CCMMentors->ProfessionalCouncil->HrefValue = "";
			$CCMMentors->ProfessionalCouncil->TooltipValue = "";

			// CategoryReg
			$CCMMentors->CategoryReg->HrefValue = "";
			$CCMMentors->CategoryReg->TooltipValue = "";

			// CouncilRegNumber
			$CCMMentors->CouncilRegNumber->HrefValue = "";
			$CCMMentors->CouncilRegNumber->TooltipValue = "";

			// Telephone
			$CCMMentors->Telephone->HrefValue = "";
			$CCMMentors->Telephone->TooltipValue = "";

			// Cellphone
			$CCMMentors->Cellphone->HrefValue = "";
			$CCMMentors->Cellphone->TooltipValue = "";

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

			// WorkAddress
			$CCMMentors->WorkAddress->HrefValue = "";
			$CCMMentors->WorkAddress->TooltipValue = "";

			// PostalAddress
			$CCMMentors->PostalAddress->HrefValue = "";
			$CCMMentors->PostalAddress->TooltipValue = "";

			// EducationalInst
			$CCMMentors->EducationalInst->HrefValue = "";
			$CCMMentors->EducationalInst->TooltipValue = "";

			// Qualifications
			$CCMMentors->Qualifications->HrefValue = "";
			$CCMMentors->Qualifications->TooltipValue = "";

			// CVFile
			$CCMMentors->CVFile->HrefValue = "";
			$CCMMentors->CVFile->TooltipValue = "";

			// MentorUndertaking
			$CCMMentors->MentorUndertaking->HrefValue = "";
			$CCMMentors->MentorUndertaking->TooltipValue = "";

			// CandUUndertaking
			$CCMMentors->CandUUndertaking->HrefValue = "";
			$CCMMentors->CandUUndertaking->TooltipValue = "";

			// WebUsername
			$CCMMentors->WebUsername->HrefValue = "";
			$CCMMentors->WebUsername->TooltipValue = "";

			// WebPassword
			$CCMMentors->WebPassword->HrefValue = "";
			$CCMMentors->WebPassword->TooltipValue = "";

			// BlockAccess
			$CCMMentors->BlockAccess->HrefValue = "";
			$CCMMentors->BlockAccess->TooltipValue = "";

			// Archived
			$CCMMentors->Archived->HrefValue = "";
			$CCMMentors->Archived->TooltipValue = "";

			// Designation
			$CCMMentors->Designation->HrefValue = "";
			$CCMMentors->Designation->TooltipValue = "";

			// Prof Reg No
			$CCMMentors->Prof_Reg_No->HrefValue = "";
			$CCMMentors->Prof_Reg_No->TooltipValue = "";

			// Reg No
			$CCMMentors->Reg_No->HrefValue = "";
			$CCMMentors->Reg_No->TooltipValue = "";
		} elseif ($CCMMentors->RowType == EW_ROWTYPE_SEARCH) { // Search row

			// CCMMentorID
			$CCMMentors->CCMMentorID->EditCustomAttributes = "";
			$CCMMentors->CCMMentorID->EditValue = ew_HtmlEncode($CCMMentors->CCMMentorID->AdvancedSearch->SearchValue);

			// Organisation
			$CCMMentors->Organisation->EditCustomAttributes = "";
			$CCMMentors->Organisation->EditValue = ew_HtmlEncode($CCMMentors->Organisation->AdvancedSearch->SearchValue);

			// Title
			$CCMMentors->Title->EditCustomAttributes = "";
			$CCMMentors->Title->EditValue = ew_HtmlEncode($CCMMentors->Title->AdvancedSearch->SearchValue);

			// FirstName
			$CCMMentors->FirstName->EditCustomAttributes = "";
			$CCMMentors->FirstName->EditValue = ew_HtmlEncode($CCMMentors->FirstName->AdvancedSearch->SearchValue);

			// Surname
			$CCMMentors->Surname->EditCustomAttributes = "";
			$CCMMentors->Surname->EditValue = ew_HtmlEncode($CCMMentors->Surname->AdvancedSearch->SearchValue);

			// Initials
			$CCMMentors->Initials->EditCustomAttributes = "";
			$CCMMentors->Initials->EditValue = ew_HtmlEncode($CCMMentors->Initials->AdvancedSearch->SearchValue);

			// KnownAs
			$CCMMentors->KnownAs->EditCustomAttributes = "";
			$CCMMentors->KnownAs->EditValue = ew_HtmlEncode($CCMMentors->KnownAs->AdvancedSearch->SearchValue);

			// IDNumber
			$CCMMentors->IDNumber->EditCustomAttributes = "";
			$CCMMentors->IDNumber->EditValue = ew_HtmlEncode($CCMMentors->IDNumber->AdvancedSearch->SearchValue);

			// ProfessionalCouncil
			$CCMMentors->ProfessionalCouncil->EditCustomAttributes = "";
			$CCMMentors->ProfessionalCouncil->EditValue = ew_HtmlEncode($CCMMentors->ProfessionalCouncil->AdvancedSearch->SearchValue);

			// CategoryReg
			$CCMMentors->CategoryReg->EditCustomAttributes = "";
			$CCMMentors->CategoryReg->EditValue = ew_HtmlEncode($CCMMentors->CategoryReg->AdvancedSearch->SearchValue);

			// CouncilRegNumber
			$CCMMentors->CouncilRegNumber->EditCustomAttributes = "";
			$CCMMentors->CouncilRegNumber->EditValue = ew_HtmlEncode($CCMMentors->CouncilRegNumber->AdvancedSearch->SearchValue);

			// Telephone
			$CCMMentors->Telephone->EditCustomAttributes = "";
			$CCMMentors->Telephone->EditValue = ew_HtmlEncode($CCMMentors->Telephone->AdvancedSearch->SearchValue);

			// Cellphone
			$CCMMentors->Cellphone->EditCustomAttributes = "";
			$CCMMentors->Cellphone->EditValue = ew_HtmlEncode($CCMMentors->Cellphone->AdvancedSearch->SearchValue);

			// EmailAddress
			$CCMMentors->EmailAddress->EditCustomAttributes = "";
			$CCMMentors->EmailAddress->EditValue = ew_HtmlEncode($CCMMentors->EmailAddress->AdvancedSearch->SearchValue);

			// WorkAddress
			$CCMMentors->WorkAddress->EditCustomAttributes = "";
			$CCMMentors->WorkAddress->EditValue = ew_HtmlEncode($CCMMentors->WorkAddress->AdvancedSearch->SearchValue);

			// PostalAddress
			$CCMMentors->PostalAddress->EditCustomAttributes = "";
			$CCMMentors->PostalAddress->EditValue = ew_HtmlEncode($CCMMentors->PostalAddress->AdvancedSearch->SearchValue);

			// EducationalInst
			$CCMMentors->EducationalInst->EditCustomAttributes = "";
			$CCMMentors->EducationalInst->EditValue = ew_HtmlEncode($CCMMentors->EducationalInst->AdvancedSearch->SearchValue);

			// Qualifications
			$CCMMentors->Qualifications->EditCustomAttributes = "";
			$CCMMentors->Qualifications->EditValue = ew_HtmlEncode($CCMMentors->Qualifications->AdvancedSearch->SearchValue);

			// CVFile
			$CCMMentors->CVFile->EditCustomAttributes = "";
			$CCMMentors->CVFile->EditValue = ew_HtmlEncode($CCMMentors->CVFile->AdvancedSearch->SearchValue);

			// MentorUndertaking
			$CCMMentors->MentorUndertaking->EditCustomAttributes = "";
			$CCMMentors->MentorUndertaking->EditValue = ew_HtmlEncode($CCMMentors->MentorUndertaking->AdvancedSearch->SearchValue);

			// CandUUndertaking
			$CCMMentors->CandUUndertaking->EditCustomAttributes = "";
			$CCMMentors->CandUUndertaking->EditValue = ew_HtmlEncode($CCMMentors->CandUUndertaking->AdvancedSearch->SearchValue);

			// WebUsername
			$CCMMentors->WebUsername->EditCustomAttributes = "";
			$CCMMentors->WebUsername->EditValue = ew_HtmlEncode($CCMMentors->WebUsername->AdvancedSearch->SearchValue);

			// WebPassword
			$CCMMentors->WebPassword->EditCustomAttributes = "";
			$CCMMentors->WebPassword->EditValue = ew_HtmlEncode($CCMMentors->WebPassword->AdvancedSearch->SearchValue);

			// BlockAccess
			$CCMMentors->BlockAccess->EditCustomAttributes = "";
			$arwrk = array();
			$arwrk[] = array("y", "Yes");
			$arwrk[] = array("n", "No");
			$CCMMentors->BlockAccess->EditValue = $arwrk;

			// Archived
			$CCMMentors->Archived->EditCustomAttributes = "";
			$arwrk = array();
			$arwrk[] = array("1", "Yes");
			$arwrk[] = array("0", "No");
			$CCMMentors->Archived->EditValue = $arwrk;

			// Designation
			$CCMMentors->Designation->EditCustomAttributes = "";
			$CCMMentors->Designation->EditValue = ew_HtmlEncode($CCMMentors->Designation->AdvancedSearch->SearchValue);

			// Prof Reg No
			$CCMMentors->Prof_Reg_No->EditCustomAttributes = "";
			$CCMMentors->Prof_Reg_No->EditValue = ew_HtmlEncode($CCMMentors->Prof_Reg_No->AdvancedSearch->SearchValue);

			// Reg No
			$CCMMentors->Reg_No->EditCustomAttributes = "";
			$CCMMentors->Reg_No->EditValue = ew_HtmlEncode($CCMMentors->Reg_No->AdvancedSearch->SearchValue);
		}

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

	// Validate search
	function ValidateSearch() {
		global $gsSearchError, $CCMMentors;

		// Initialize
		$gsSearchError = "";

		// Check if validation required
		if (!EW_SERVER_VALIDATE)
			return TRUE;

		// Return validate result
		$ValidateSearch = ($gsSearchError == "");

		// Call Form_CustomValidate event
		$sFormCustomError = "";
		$ValidateSearch = $ValidateSearch && $this->Form_CustomValidate($sFormCustomError);
		if ($sFormCustomError <> "") {
			if ($gsSearchError <> "") $gsSearchError .= "<br>";
			$gsSearchError .= $sFormCustomError;
		}
		return $ValidateSearch;
	}

	// Load advanced search
	function LoadAdvancedSearch() {
		global $CCMMentors;
		$CCMMentors->CCMMentorID->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_CCMMentorID");
		$CCMMentors->Organisation->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Organisation");
		$CCMMentors->Title->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Title");
		$CCMMentors->FirstName->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_FirstName");
		$CCMMentors->Surname->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Surname");
		$CCMMentors->Initials->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Initials");
		$CCMMentors->KnownAs->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_KnownAs");
		$CCMMentors->IDNumber->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_IDNumber");
		$CCMMentors->ProfessionalCouncil->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_ProfessionalCouncil");
		$CCMMentors->CategoryReg->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_CategoryReg");
		$CCMMentors->CouncilRegNumber->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_CouncilRegNumber");
		$CCMMentors->Telephone->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Telephone");
		$CCMMentors->Cellphone->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Cellphone");
		$CCMMentors->EmailAddress->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_EmailAddress");
		$CCMMentors->WorkAddress->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_WorkAddress");
		$CCMMentors->PostalAddress->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_PostalAddress");
		$CCMMentors->EducationalInst->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_EducationalInst");
		$CCMMentors->Qualifications->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Qualifications");
		$CCMMentors->CVFile->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_CVFile");
		$CCMMentors->MentorUndertaking->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_MentorUndertaking");
		$CCMMentors->CandUUndertaking->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_CandUUndertaking");
		$CCMMentors->WebUsername->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_WebUsername");
		$CCMMentors->WebPassword->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_WebPassword");
		$CCMMentors->BlockAccess->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_BlockAccess");
		$CCMMentors->Archived->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Archived");
		$CCMMentors->Designation->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Designation");
		$CCMMentors->Prof_Reg_No->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Prof_Reg_No");
		$CCMMentors->Reg_No->AdvancedSearch->SearchValue = $CCMMentors->getAdvancedSearch("x_Reg_No");
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

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

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

	}

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

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

	}

	// Form Custom Validate event
	function Form_CustomValidate(&$CustomError) {

		// Return error message in CustomError
		return TRUE;
	}
}
?>