| Current Path : /var/www/cesa.co.za/ccmadmin/ |
| Current File : /var/www/cesa.co.za/ccmadmin/CCMEmployerssrch.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 "CCMEmployersinfo.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
$CCMEmployers_search = new cCCMEmployers_search();
$Page =& $CCMEmployers_search;
// Page init
$CCMEmployers_search->Page_Init();
// Page main
$CCMEmployers_search->Page_Main();
?>
<?php include "header.php" ?>
<script type="text/javascript">
<!--
// Create page object
var CCMEmployers_search = new ew_Page("CCMEmployers_search");
// page properties
CCMEmployers_search.PageID = "search"; // page ID
CCMEmployers_search.FormID = "fCCMEmployerssearch"; // form ID
var EW_PAGE_ID = CCMEmployers_search.PageID; // for backward compatibility
// extend page with validate function for search
CCMEmployers_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
CCMEmployers_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) { ?>
CCMEmployers_search.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCMEmployers_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") ?> <?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CCMEmployers->TableCaption() ?><br><br>
<a href="<?php echo $CCMEmployers->getReturnUrl() ?>"><?php echo $Language->Phrase("BackToList") ?></a></span></p>
<?php
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
$CCMEmployers_search->ShowMessage();
?>
<form name="fCCMEmployerssearch" id="fCCMEmployerssearch" action="<?php echo ew_CurrentPage() ?>" method="post" onsubmit="return CCMEmployers_search.ValidateSearch(this);">
<p>
<input type="hidden" name="t" id="t" value="CCMEmployers">
<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 $CCMEmployers->CCMEmployerID->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->CCMEmployerID->FldCaption() ?></td>
<td<?php echo $CCMEmployers->CCMEmployerID->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("=") ?><input type="hidden" name="z_CCMEmployerID" id="z_CCMEmployerID" value="="></span></td>
<td<?php echo $CCMEmployers->CCMEmployerID->CellAttributes() ?>>
<div style="white-space: nowrap;">
<span class="phpmaker" style="float: left;">
<input type="text" name="x_CCMEmployerID" id="x_CCMEmployerID" title="<?php echo $CCMEmployers->CCMEmployerID->FldTitle() ?>" value="<?php echo $CCMEmployers->CCMEmployerID->EditValue ?>"<?php echo $CCMEmployers->CCMEmployerID->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->Organisation->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->Organisation->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->Organisation->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->Organisation->EditValue ?>"<?php echo $CCMEmployers->Organisation->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->Title->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->Title->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->Title->FldTitle() ?>" size="30" maxlength="20" value="<?php echo $CCMEmployers->Title->EditValue ?>"<?php echo $CCMEmployers->Title->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->FirstName->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->FirstName->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->FirstName->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->FirstName->EditValue ?>"<?php echo $CCMEmployers->FirstName->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->Surname->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->Surname->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->Surname->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->Surname->EditValue ?>"<?php echo $CCMEmployers->Surname->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->Initials->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->Initials->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->Initials->FldTitle() ?>" size="30" maxlength="50" value="<?php echo $CCMEmployers->Initials->EditValue ?>"<?php echo $CCMEmployers->Initials->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->KnownAs->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->KnownAs->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->KnownAs->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->KnownAs->EditValue ?>"<?php echo $CCMEmployers->KnownAs->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->IDNumber->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->IDNumber->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->IDNumber->FldTitle() ?>" size="30" maxlength="50" value="<?php echo $CCMEmployers->IDNumber->EditValue ?>"<?php echo $CCMEmployers->IDNumber->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->Telephone->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->Telephone->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->Telephone->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->Telephone->EditValue ?>"<?php echo $CCMEmployers->Telephone->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->Cellphone->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->Cellphone->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->Cellphone->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->Cellphone->EditValue ?>"<?php echo $CCMEmployers->Cellphone->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->EmailAddress->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->EmailAddress->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->EmailAddress->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->EmailAddress->EditValue ?>"<?php echo $CCMEmployers->EmailAddress->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->WorkAddress->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->WorkAddress->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->WorkAddress->CellAttributes() ?>>
<div style="white-space: nowrap;">
<span class="phpmaker" style="float: left;">
<textarea name="x_WorkAddress" id="x_WorkAddress" title="<?php echo $CCMEmployers->WorkAddress->FldTitle() ?>" cols="35" rows="4"<?php echo $CCMEmployers->WorkAddress->EditAttributes() ?>><?php echo $CCMEmployers->WorkAddress->EditValue ?></textarea>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->PostalAddress->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->PostalAddress->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->PostalAddress->CellAttributes() ?>>
<div style="white-space: nowrap;">
<span class="phpmaker" style="float: left;">
<textarea name="x_PostalAddress" id="x_PostalAddress" title="<?php echo $CCMEmployers->PostalAddress->FldTitle() ?>" cols="35" rows="4"<?php echo $CCMEmployers->PostalAddress->EditAttributes() ?>><?php echo $CCMEmployers->PostalAddress->EditValue ?></textarea>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->CandUUndertaking->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->CandUUndertaking->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->CandUUndertaking->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->CandUUndertaking->EditValue ?>"<?php echo $CCMEmployers->CandUUndertaking->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->WebUsername->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->WebUsername->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->WebUsername->FldTitle() ?>" size="30" maxlength="20" value="<?php echo $CCMEmployers->WebUsername->EditValue ?>"<?php echo $CCMEmployers->WebUsername->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->WebPassword->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->WebPassword->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->WebPassword->FldTitle() ?>" size="30" maxlength="20" value="<?php echo $CCMEmployers->WebPassword->EditValue ?>"<?php echo $CCMEmployers->WebPassword->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->BlockAccess->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->BlockAccess->FldCaption() ?></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->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 $CCMEmployers->BlockAccess->FldTitle() ?>" value="{value}"<?php echo $CCMEmployers->BlockAccess->EditAttributes() ?>></label></div>
<div id="dsl_x_BlockAccess" repeatcolumn="5">
<?php
$arwrk = $CCMEmployers->BlockAccess->EditValue;
if (is_array($arwrk)) {
$rowswrk = count($arwrk);
$emptywrk = TRUE;
for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
$selwrk = (strval($CCMEmployers->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 $CCMEmployers->BlockAccess->FldTitle() ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $CCMEmployers->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 $CCMEmployers->Archived->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->Archived->FldCaption() ?></td>
<td<?php echo $CCMEmployers->Archived->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("=") ?><input type="hidden" name="z_Archived" id="z_Archived" value="="></span></td>
<td<?php echo $CCMEmployers->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 $CCMEmployers->Archived->FldTitle() ?>" value="{value}"<?php echo $CCMEmployers->Archived->EditAttributes() ?>></label></div>
<div id="dsl_x_Archived" repeatcolumn="5">
<?php
$arwrk = $CCMEmployers->Archived->EditValue;
if (is_array($arwrk)) {
$rowswrk = count($arwrk);
$emptywrk = TRUE;
for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
$selwrk = (strval($CCMEmployers->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 $CCMEmployers->Archived->FldTitle() ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $CCMEmployers->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 $CCMEmployers->AccountName->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->AccountName->FldCaption() ?></td>
<td<?php echo $CCMEmployers->AccountName->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_AccountName" id="z_AccountName" value="LIKE"></span></td>
<td<?php echo $CCMEmployers->AccountName->CellAttributes() ?>>
<div style="white-space: nowrap;">
<span class="phpmaker" style="float: left;">
<input type="text" name="x_AccountName" id="x_AccountName" title="<?php echo $CCMEmployers->AccountName->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->AccountName->EditValue ?>"<?php echo $CCMEmployers->AccountName->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->BankName->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->BankName->FldCaption() ?></td>
<td<?php echo $CCMEmployers->BankName->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_BankName" id="z_BankName" value="LIKE"></span></td>
<td<?php echo $CCMEmployers->BankName->CellAttributes() ?>>
<div style="white-space: nowrap;">
<span class="phpmaker" style="float: left;">
<input type="text" name="x_BankName" id="x_BankName" title="<?php echo $CCMEmployers->BankName->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->BankName->EditValue ?>"<?php echo $CCMEmployers->BankName->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->BranchName->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->BranchName->FldCaption() ?></td>
<td<?php echo $CCMEmployers->BranchName->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_BranchName" id="z_BranchName" value="LIKE"></span></td>
<td<?php echo $CCMEmployers->BranchName->CellAttributes() ?>>
<div style="white-space: nowrap;">
<span class="phpmaker" style="float: left;">
<input type="text" name="x_BranchName" id="x_BranchName" title="<?php echo $CCMEmployers->BranchName->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->BranchName->EditValue ?>"<?php echo $CCMEmployers->BranchName->EditAttributes() ?>>
</span>
</div>
</td>
</tr>
<tr<?php echo $CCMEmployers->AccountNum->RowAttributes ?>>
<td class="ewTableHeader"><?php echo $CCMEmployers->AccountNum->FldCaption() ?></td>
<td<?php echo $CCMEmployers->AccountNum->CellAttributes() ?>><span class="ewSearchOpr"><?php echo $Language->Phrase("LIKE") ?><input type="hidden" name="z_AccountNum" id="z_AccountNum" value="LIKE"></span></td>
<td<?php echo $CCMEmployers->AccountNum->CellAttributes() ?>>
<div style="white-space: nowrap;">
<span class="phpmaker" style="float: left;">
<input type="text" name="x_AccountNum" id="x_AccountNum" title="<?php echo $CCMEmployers->AccountNum->FldTitle() ?>" size="30" maxlength="255" value="<?php echo $CCMEmployers->AccountNum->EditValue ?>"<?php echo $CCMEmployers->AccountNum->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
$CCMEmployers_search->Page_Terminate();
?>
<?php
//
// Page class
//
class cCCMEmployers_search {
// Page ID
var $PageID = 'search';
// Table name
var $TableName = 'CCMEmployers';
// Page object name
var $PageObjName = 'CCMEmployers_search';
// Page name
function PageName() {
return ew_CurrentPage();
}
// Page URL
function PageUrl() {
$PageUrl = ew_CurrentPage() . "?";
global $CCMEmployers;
if ($CCMEmployers->UseTokenInUrl) $PageUrl .= "t=" . $CCMEmployers->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, $CCMEmployers;
if ($CCMEmployers->UseTokenInUrl) {
if ($objForm)
return ($CCMEmployers->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($CCMEmployers->TableVar == $_GET["t"]);
} else {
return TRUE;
}
}
//
// Page class constructor
//
function cCCMEmployers_search() {
global $conn, $Language;
// Language object
$Language = new cLanguage();
// Table object (CCMEmployers)
$GLOBALS["CCMEmployers"] = new cCCMEmployers();
// 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", 'CCMEmployers', 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 $CCMEmployers;
// 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("CCMEmployerslist.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, $CCMEmployers;
if ($this->IsPageRequest()) { // Validate request
// Get action
$CCMEmployers->CurrentAction = $objForm->GetValue("a_search");
switch ($CCMEmployers->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 = $CCMEmployers->UrlParm($sSrchStr);
$this->Page_Terminate("CCMEmployerslist.php" . "?" . $sSrchStr); // Go to list page
}
}
}
// Restore search settings from Session
if ($gsSearchError == "")
$this->LoadAdvancedSearch();
// Render row for search
$CCMEmployers->RowType = EW_ROWTYPE_SEARCH;
$this->RenderRow();
}
// Build advanced search
function BuildAdvancedSearch() {
global $CCMEmployers;
$sSrchUrl = "";
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->CCMEmployerID); // CCMEmployerID
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->Organisation); // Organisation
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->Title); // Title
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->FirstName); // FirstName
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->Surname); // Surname
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->Initials); // Initials
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->KnownAs); // KnownAs
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->IDNumber); // IDNumber
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->Telephone); // Telephone
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->Cellphone); // Cellphone
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->EmailAddress); // EmailAddress
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->WorkAddress); // WorkAddress
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->PostalAddress); // PostalAddress
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->CandUUndertaking); // CandUUndertaking
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->WebUsername); // WebUsername
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->WebPassword); // WebPassword
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->BlockAccess); // BlockAccess
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->Archived); // Archived
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->AccountName); // AccountName
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->BankName); // BankName
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->BranchName); // BranchName
$this->BuildSearchUrl($sSrchUrl, $CCMEmployers->AccountNum); // AccountNum
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, $CCMEmployers;
// Load search values
// CCMEmployerID
$CCMEmployers->CCMEmployerID->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_CCMEmployerID"));
$CCMEmployers->CCMEmployerID->AdvancedSearch->SearchOperator = $objForm->GetValue("z_CCMEmployerID");
// Organisation
$CCMEmployers->Organisation->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Organisation"));
$CCMEmployers->Organisation->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Organisation");
// Title
$CCMEmployers->Title->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Title"));
$CCMEmployers->Title->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Title");
// FirstName
$CCMEmployers->FirstName->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_FirstName"));
$CCMEmployers->FirstName->AdvancedSearch->SearchOperator = $objForm->GetValue("z_FirstName");
// Surname
$CCMEmployers->Surname->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Surname"));
$CCMEmployers->Surname->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Surname");
// Initials
$CCMEmployers->Initials->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Initials"));
$CCMEmployers->Initials->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Initials");
// KnownAs
$CCMEmployers->KnownAs->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_KnownAs"));
$CCMEmployers->KnownAs->AdvancedSearch->SearchOperator = $objForm->GetValue("z_KnownAs");
// IDNumber
$CCMEmployers->IDNumber->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_IDNumber"));
$CCMEmployers->IDNumber->AdvancedSearch->SearchOperator = $objForm->GetValue("z_IDNumber");
// Telephone
$CCMEmployers->Telephone->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Telephone"));
$CCMEmployers->Telephone->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Telephone");
// Cellphone
$CCMEmployers->Cellphone->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Cellphone"));
$CCMEmployers->Cellphone->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Cellphone");
// EmailAddress
$CCMEmployers->EmailAddress->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_EmailAddress"));
$CCMEmployers->EmailAddress->AdvancedSearch->SearchOperator = $objForm->GetValue("z_EmailAddress");
// WorkAddress
$CCMEmployers->WorkAddress->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_WorkAddress"));
$CCMEmployers->WorkAddress->AdvancedSearch->SearchOperator = $objForm->GetValue("z_WorkAddress");
// PostalAddress
$CCMEmployers->PostalAddress->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_PostalAddress"));
$CCMEmployers->PostalAddress->AdvancedSearch->SearchOperator = $objForm->GetValue("z_PostalAddress");
// CandUUndertaking
$CCMEmployers->CandUUndertaking->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_CandUUndertaking"));
$CCMEmployers->CandUUndertaking->AdvancedSearch->SearchOperator = $objForm->GetValue("z_CandUUndertaking");
// WebUsername
$CCMEmployers->WebUsername->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_WebUsername"));
$CCMEmployers->WebUsername->AdvancedSearch->SearchOperator = $objForm->GetValue("z_WebUsername");
// WebPassword
$CCMEmployers->WebPassword->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_WebPassword"));
$CCMEmployers->WebPassword->AdvancedSearch->SearchOperator = $objForm->GetValue("z_WebPassword");
// BlockAccess
$CCMEmployers->BlockAccess->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_BlockAccess"));
$CCMEmployers->BlockAccess->AdvancedSearch->SearchOperator = $objForm->GetValue("z_BlockAccess");
// Archived
$CCMEmployers->Archived->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_Archived"));
$CCMEmployers->Archived->AdvancedSearch->SearchOperator = $objForm->GetValue("z_Archived");
// AccountName
$CCMEmployers->AccountName->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_AccountName"));
$CCMEmployers->AccountName->AdvancedSearch->SearchOperator = $objForm->GetValue("z_AccountName");
// BankName
$CCMEmployers->BankName->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_BankName"));
$CCMEmployers->BankName->AdvancedSearch->SearchOperator = $objForm->GetValue("z_BankName");
// BranchName
$CCMEmployers->BranchName->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_BranchName"));
$CCMEmployers->BranchName->AdvancedSearch->SearchOperator = $objForm->GetValue("z_BranchName");
// AccountNum
$CCMEmployers->AccountNum->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue("x_AccountNum"));
$CCMEmployers->AccountNum->AdvancedSearch->SearchOperator = $objForm->GetValue("z_AccountNum");
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $CCMEmployers;
// Initialize URLs
// Call Row_Rendering event
$CCMEmployers->Row_Rendering();
// Common render codes for all row types
// CCMEmployerID
$CCMEmployers->CCMEmployerID->CellCssStyle = ""; $CCMEmployers->CCMEmployerID->CellCssClass = "";
$CCMEmployers->CCMEmployerID->CellAttrs = array(); $CCMEmployers->CCMEmployerID->ViewAttrs = array(); $CCMEmployers->CCMEmployerID->EditAttrs = array();
// Organisation
$CCMEmployers->Organisation->CellCssStyle = ""; $CCMEmployers->Organisation->CellCssClass = "";
$CCMEmployers->Organisation->CellAttrs = array(); $CCMEmployers->Organisation->ViewAttrs = array(); $CCMEmployers->Organisation->EditAttrs = array();
// Title
$CCMEmployers->Title->CellCssStyle = ""; $CCMEmployers->Title->CellCssClass = "";
$CCMEmployers->Title->CellAttrs = array(); $CCMEmployers->Title->ViewAttrs = array(); $CCMEmployers->Title->EditAttrs = array();
// FirstName
$CCMEmployers->FirstName->CellCssStyle = ""; $CCMEmployers->FirstName->CellCssClass = "";
$CCMEmployers->FirstName->CellAttrs = array(); $CCMEmployers->FirstName->ViewAttrs = array(); $CCMEmployers->FirstName->EditAttrs = array();
// Surname
$CCMEmployers->Surname->CellCssStyle = ""; $CCMEmployers->Surname->CellCssClass = "";
$CCMEmployers->Surname->CellAttrs = array(); $CCMEmployers->Surname->ViewAttrs = array(); $CCMEmployers->Surname->EditAttrs = array();
// Initials
$CCMEmployers->Initials->CellCssStyle = ""; $CCMEmployers->Initials->CellCssClass = "";
$CCMEmployers->Initials->CellAttrs = array(); $CCMEmployers->Initials->ViewAttrs = array(); $CCMEmployers->Initials->EditAttrs = array();
// KnownAs
$CCMEmployers->KnownAs->CellCssStyle = ""; $CCMEmployers->KnownAs->CellCssClass = "";
$CCMEmployers->KnownAs->CellAttrs = array(); $CCMEmployers->KnownAs->ViewAttrs = array(); $CCMEmployers->KnownAs->EditAttrs = array();
// IDNumber
$CCMEmployers->IDNumber->CellCssStyle = ""; $CCMEmployers->IDNumber->CellCssClass = "";
$CCMEmployers->IDNumber->CellAttrs = array(); $CCMEmployers->IDNumber->ViewAttrs = array(); $CCMEmployers->IDNumber->EditAttrs = array();
// Telephone
$CCMEmployers->Telephone->CellCssStyle = ""; $CCMEmployers->Telephone->CellCssClass = "";
$CCMEmployers->Telephone->CellAttrs = array(); $CCMEmployers->Telephone->ViewAttrs = array(); $CCMEmployers->Telephone->EditAttrs = array();
// Cellphone
$CCMEmployers->Cellphone->CellCssStyle = ""; $CCMEmployers->Cellphone->CellCssClass = "";
$CCMEmployers->Cellphone->CellAttrs = array(); $CCMEmployers->Cellphone->ViewAttrs = array(); $CCMEmployers->Cellphone->EditAttrs = array();
// EmailAddress
$CCMEmployers->EmailAddress->CellCssStyle = ""; $CCMEmployers->EmailAddress->CellCssClass = "";
$CCMEmployers->EmailAddress->CellAttrs = array(); $CCMEmployers->EmailAddress->ViewAttrs = array(); $CCMEmployers->EmailAddress->EditAttrs = array();
// WorkAddress
$CCMEmployers->WorkAddress->CellCssStyle = ""; $CCMEmployers->WorkAddress->CellCssClass = "";
$CCMEmployers->WorkAddress->CellAttrs = array(); $CCMEmployers->WorkAddress->ViewAttrs = array(); $CCMEmployers->WorkAddress->EditAttrs = array();
// PostalAddress
$CCMEmployers->PostalAddress->CellCssStyle = ""; $CCMEmployers->PostalAddress->CellCssClass = "";
$CCMEmployers->PostalAddress->CellAttrs = array(); $CCMEmployers->PostalAddress->ViewAttrs = array(); $CCMEmployers->PostalAddress->EditAttrs = array();
// CandUUndertaking
$CCMEmployers->CandUUndertaking->CellCssStyle = ""; $CCMEmployers->CandUUndertaking->CellCssClass = "";
$CCMEmployers->CandUUndertaking->CellAttrs = array(); $CCMEmployers->CandUUndertaking->ViewAttrs = array(); $CCMEmployers->CandUUndertaking->EditAttrs = array();
// WebUsername
$CCMEmployers->WebUsername->CellCssStyle = ""; $CCMEmployers->WebUsername->CellCssClass = "";
$CCMEmployers->WebUsername->CellAttrs = array(); $CCMEmployers->WebUsername->ViewAttrs = array(); $CCMEmployers->WebUsername->EditAttrs = array();
// WebPassword
$CCMEmployers->WebPassword->CellCssStyle = ""; $CCMEmployers->WebPassword->CellCssClass = "";
$CCMEmployers->WebPassword->CellAttrs = array(); $CCMEmployers->WebPassword->ViewAttrs = array(); $CCMEmployers->WebPassword->EditAttrs = array();
// BlockAccess
$CCMEmployers->BlockAccess->CellCssStyle = ""; $CCMEmployers->BlockAccess->CellCssClass = "";
$CCMEmployers->BlockAccess->CellAttrs = array(); $CCMEmployers->BlockAccess->ViewAttrs = array(); $CCMEmployers->BlockAccess->EditAttrs = array();
// Archived
$CCMEmployers->Archived->CellCssStyle = ""; $CCMEmployers->Archived->CellCssClass = "";
$CCMEmployers->Archived->CellAttrs = array(); $CCMEmployers->Archived->ViewAttrs = array(); $CCMEmployers->Archived->EditAttrs = array();
// AccountName
$CCMEmployers->AccountName->CellCssStyle = ""; $CCMEmployers->AccountName->CellCssClass = "";
$CCMEmployers->AccountName->CellAttrs = array(); $CCMEmployers->AccountName->ViewAttrs = array(); $CCMEmployers->AccountName->EditAttrs = array();
// BankName
$CCMEmployers->BankName->CellCssStyle = ""; $CCMEmployers->BankName->CellCssClass = "";
$CCMEmployers->BankName->CellAttrs = array(); $CCMEmployers->BankName->ViewAttrs = array(); $CCMEmployers->BankName->EditAttrs = array();
// BranchName
$CCMEmployers->BranchName->CellCssStyle = ""; $CCMEmployers->BranchName->CellCssClass = "";
$CCMEmployers->BranchName->CellAttrs = array(); $CCMEmployers->BranchName->ViewAttrs = array(); $CCMEmployers->BranchName->EditAttrs = array();
// AccountNum
$CCMEmployers->AccountNum->CellCssStyle = ""; $CCMEmployers->AccountNum->CellCssClass = "";
$CCMEmployers->AccountNum->CellAttrs = array(); $CCMEmployers->AccountNum->ViewAttrs = array(); $CCMEmployers->AccountNum->EditAttrs = array();
if ($CCMEmployers->RowType == EW_ROWTYPE_VIEW) { // View row
// CCMEmployerID
$CCMEmployers->CCMEmployerID->ViewValue = $CCMEmployers->CCMEmployerID->CurrentValue;
$CCMEmployers->CCMEmployerID->CssStyle = "";
$CCMEmployers->CCMEmployerID->CssClass = "";
$CCMEmployers->CCMEmployerID->ViewCustomAttributes = "";
// Organisation
$CCMEmployers->Organisation->ViewValue = $CCMEmployers->Organisation->CurrentValue;
$CCMEmployers->Organisation->CssStyle = "";
$CCMEmployers->Organisation->CssClass = "";
$CCMEmployers->Organisation->ViewCustomAttributes = "";
// Title
$CCMEmployers->Title->ViewValue = $CCMEmployers->Title->CurrentValue;
$CCMEmployers->Title->CssStyle = "";
$CCMEmployers->Title->CssClass = "";
$CCMEmployers->Title->ViewCustomAttributes = "";
// FirstName
$CCMEmployers->FirstName->ViewValue = $CCMEmployers->FirstName->CurrentValue;
$CCMEmployers->FirstName->CssStyle = "";
$CCMEmployers->FirstName->CssClass = "";
$CCMEmployers->FirstName->ViewCustomAttributes = "";
// Surname
$CCMEmployers->Surname->ViewValue = $CCMEmployers->Surname->CurrentValue;
$CCMEmployers->Surname->CssStyle = "";
$CCMEmployers->Surname->CssClass = "";
$CCMEmployers->Surname->ViewCustomAttributes = "";
// Initials
$CCMEmployers->Initials->ViewValue = $CCMEmployers->Initials->CurrentValue;
$CCMEmployers->Initials->CssStyle = "";
$CCMEmployers->Initials->CssClass = "";
$CCMEmployers->Initials->ViewCustomAttributes = "";
// KnownAs
$CCMEmployers->KnownAs->ViewValue = $CCMEmployers->KnownAs->CurrentValue;
$CCMEmployers->KnownAs->CssStyle = "";
$CCMEmployers->KnownAs->CssClass = "";
$CCMEmployers->KnownAs->ViewCustomAttributes = "";
// IDNumber
$CCMEmployers->IDNumber->ViewValue = $CCMEmployers->IDNumber->CurrentValue;
$CCMEmployers->IDNumber->CssStyle = "";
$CCMEmployers->IDNumber->CssClass = "";
$CCMEmployers->IDNumber->ViewCustomAttributes = "";
// Telephone
$CCMEmployers->Telephone->ViewValue = $CCMEmployers->Telephone->CurrentValue;
$CCMEmployers->Telephone->CssStyle = "";
$CCMEmployers->Telephone->CssClass = "";
$CCMEmployers->Telephone->ViewCustomAttributes = "";
// Cellphone
$CCMEmployers->Cellphone->ViewValue = $CCMEmployers->Cellphone->CurrentValue;
$CCMEmployers->Cellphone->CssStyle = "";
$CCMEmployers->Cellphone->CssClass = "";
$CCMEmployers->Cellphone->ViewCustomAttributes = "";
// EmailAddress
$CCMEmployers->EmailAddress->ViewValue = $CCMEmployers->EmailAddress->CurrentValue;
$CCMEmployers->EmailAddress->CssStyle = "";
$CCMEmployers->EmailAddress->CssClass = "";
$CCMEmployers->EmailAddress->ViewCustomAttributes = "";
// WorkAddress
$CCMEmployers->WorkAddress->ViewValue = $CCMEmployers->WorkAddress->CurrentValue;
$CCMEmployers->WorkAddress->CssStyle = "";
$CCMEmployers->WorkAddress->CssClass = "";
$CCMEmployers->WorkAddress->ViewCustomAttributes = "";
// PostalAddress
$CCMEmployers->PostalAddress->ViewValue = $CCMEmployers->PostalAddress->CurrentValue;
$CCMEmployers->PostalAddress->CssStyle = "";
$CCMEmployers->PostalAddress->CssClass = "";
$CCMEmployers->PostalAddress->ViewCustomAttributes = "";
// CandUUndertaking
$CCMEmployers->CandUUndertaking->ViewValue = $CCMEmployers->CandUUndertaking->CurrentValue;
$CCMEmployers->CandUUndertaking->CssStyle = "";
$CCMEmployers->CandUUndertaking->CssClass = "";
$CCMEmployers->CandUUndertaking->ViewCustomAttributes = "";
// WebUsername
$CCMEmployers->WebUsername->ViewValue = $CCMEmployers->WebUsername->CurrentValue;
$CCMEmployers->WebUsername->CssStyle = "";
$CCMEmployers->WebUsername->CssClass = "";
$CCMEmployers->WebUsername->ViewCustomAttributes = "";
// WebPassword
$CCMEmployers->WebPassword->ViewValue = $CCMEmployers->WebPassword->CurrentValue;
$CCMEmployers->WebPassword->CssStyle = "";
$CCMEmployers->WebPassword->CssClass = "";
$CCMEmployers->WebPassword->ViewCustomAttributes = "";
// BlockAccess
if (strval($CCMEmployers->BlockAccess->CurrentValue) <> "") {
switch ($CCMEmployers->BlockAccess->CurrentValue) {
case "y":
$CCMEmployers->BlockAccess->ViewValue = "Yes";
break;
case "n":
$CCMEmployers->BlockAccess->ViewValue = "No";
break;
default:
$CCMEmployers->BlockAccess->ViewValue = $CCMEmployers->BlockAccess->CurrentValue;
}
} else {
$CCMEmployers->BlockAccess->ViewValue = NULL;
}
$CCMEmployers->BlockAccess->CssStyle = "";
$CCMEmployers->BlockAccess->CssClass = "";
$CCMEmployers->BlockAccess->ViewCustomAttributes = "";
// Archived
if (strval($CCMEmployers->Archived->CurrentValue) <> "") {
switch ($CCMEmployers->Archived->CurrentValue) {
case "1":
$CCMEmployers->Archived->ViewValue = "Yes";
break;
case "0":
$CCMEmployers->Archived->ViewValue = "No";
break;
default:
$CCMEmployers->Archived->ViewValue = $CCMEmployers->Archived->CurrentValue;
}
} else {
$CCMEmployers->Archived->ViewValue = NULL;
}
$CCMEmployers->Archived->CssStyle = "";
$CCMEmployers->Archived->CssClass = "";
$CCMEmployers->Archived->ViewCustomAttributes = "";
// AccountName
$CCMEmployers->AccountName->ViewValue = $CCMEmployers->AccountName->CurrentValue;
$CCMEmployers->AccountName->CssStyle = "";
$CCMEmployers->AccountName->CssClass = "";
$CCMEmployers->AccountName->ViewCustomAttributes = "";
// BankName
$CCMEmployers->BankName->ViewValue = $CCMEmployers->BankName->CurrentValue;
$CCMEmployers->BankName->CssStyle = "";
$CCMEmployers->BankName->CssClass = "";
$CCMEmployers->BankName->ViewCustomAttributes = "";
// BranchName
$CCMEmployers->BranchName->ViewValue = $CCMEmployers->BranchName->CurrentValue;
$CCMEmployers->BranchName->CssStyle = "";
$CCMEmployers->BranchName->CssClass = "";
$CCMEmployers->BranchName->ViewCustomAttributes = "";
// AccountNum
$CCMEmployers->AccountNum->ViewValue = $CCMEmployers->AccountNum->CurrentValue;
$CCMEmployers->AccountNum->CssStyle = "";
$CCMEmployers->AccountNum->CssClass = "";
$CCMEmployers->AccountNum->ViewCustomAttributes = "";
// CCMEmployerID
$CCMEmployers->CCMEmployerID->HrefValue = "";
$CCMEmployers->CCMEmployerID->TooltipValue = "";
// Organisation
$CCMEmployers->Organisation->HrefValue = "";
$CCMEmployers->Organisation->TooltipValue = "";
// Title
$CCMEmployers->Title->HrefValue = "";
$CCMEmployers->Title->TooltipValue = "";
// FirstName
$CCMEmployers->FirstName->HrefValue = "";
$CCMEmployers->FirstName->TooltipValue = "";
// Surname
$CCMEmployers->Surname->HrefValue = "";
$CCMEmployers->Surname->TooltipValue = "";
// Initials
$CCMEmployers->Initials->HrefValue = "";
$CCMEmployers->Initials->TooltipValue = "";
// KnownAs
$CCMEmployers->KnownAs->HrefValue = "";
$CCMEmployers->KnownAs->TooltipValue = "";
// IDNumber
$CCMEmployers->IDNumber->HrefValue = "";
$CCMEmployers->IDNumber->TooltipValue = "";
// Telephone
$CCMEmployers->Telephone->HrefValue = "";
$CCMEmployers->Telephone->TooltipValue = "";
// Cellphone
$CCMEmployers->Cellphone->HrefValue = "";
$CCMEmployers->Cellphone->TooltipValue = "";
// EmailAddress
$CCMEmployers->EmailAddress->HrefValue = "";
$CCMEmployers->EmailAddress->TooltipValue = "";
// WorkAddress
$CCMEmployers->WorkAddress->HrefValue = "";
$CCMEmployers->WorkAddress->TooltipValue = "";
// PostalAddress
$CCMEmployers->PostalAddress->HrefValue = "";
$CCMEmployers->PostalAddress->TooltipValue = "";
// CandUUndertaking
$CCMEmployers->CandUUndertaking->HrefValue = "";
$CCMEmployers->CandUUndertaking->TooltipValue = "";
// WebUsername
$CCMEmployers->WebUsername->HrefValue = "";
$CCMEmployers->WebUsername->TooltipValue = "";
// WebPassword
$CCMEmployers->WebPassword->HrefValue = "";
$CCMEmployers->WebPassword->TooltipValue = "";
// BlockAccess
$CCMEmployers->BlockAccess->HrefValue = "";
$CCMEmployers->BlockAccess->TooltipValue = "";
// Archived
$CCMEmployers->Archived->HrefValue = "";
$CCMEmployers->Archived->TooltipValue = "";
// AccountName
$CCMEmployers->AccountName->HrefValue = "";
$CCMEmployers->AccountName->TooltipValue = "";
// BankName
$CCMEmployers->BankName->HrefValue = "";
$CCMEmployers->BankName->TooltipValue = "";
// BranchName
$CCMEmployers->BranchName->HrefValue = "";
$CCMEmployers->BranchName->TooltipValue = "";
// AccountNum
$CCMEmployers->AccountNum->HrefValue = "";
$CCMEmployers->AccountNum->TooltipValue = "";
} elseif ($CCMEmployers->RowType == EW_ROWTYPE_SEARCH) { // Search row
// CCMEmployerID
$CCMEmployers->CCMEmployerID->EditCustomAttributes = "";
$CCMEmployers->CCMEmployerID->EditValue = ew_HtmlEncode($CCMEmployers->CCMEmployerID->AdvancedSearch->SearchValue);
// Organisation
$CCMEmployers->Organisation->EditCustomAttributes = "";
$CCMEmployers->Organisation->EditValue = ew_HtmlEncode($CCMEmployers->Organisation->AdvancedSearch->SearchValue);
// Title
$CCMEmployers->Title->EditCustomAttributes = "";
$CCMEmployers->Title->EditValue = ew_HtmlEncode($CCMEmployers->Title->AdvancedSearch->SearchValue);
// FirstName
$CCMEmployers->FirstName->EditCustomAttributes = "";
$CCMEmployers->FirstName->EditValue = ew_HtmlEncode($CCMEmployers->FirstName->AdvancedSearch->SearchValue);
// Surname
$CCMEmployers->Surname->EditCustomAttributes = "";
$CCMEmployers->Surname->EditValue = ew_HtmlEncode($CCMEmployers->Surname->AdvancedSearch->SearchValue);
// Initials
$CCMEmployers->Initials->EditCustomAttributes = "";
$CCMEmployers->Initials->EditValue = ew_HtmlEncode($CCMEmployers->Initials->AdvancedSearch->SearchValue);
// KnownAs
$CCMEmployers->KnownAs->EditCustomAttributes = "";
$CCMEmployers->KnownAs->EditValue = ew_HtmlEncode($CCMEmployers->KnownAs->AdvancedSearch->SearchValue);
// IDNumber
$CCMEmployers->IDNumber->EditCustomAttributes = "";
$CCMEmployers->IDNumber->EditValue = ew_HtmlEncode($CCMEmployers->IDNumber->AdvancedSearch->SearchValue);
// Telephone
$CCMEmployers->Telephone->EditCustomAttributes = "";
$CCMEmployers->Telephone->EditValue = ew_HtmlEncode($CCMEmployers->Telephone->AdvancedSearch->SearchValue);
// Cellphone
$CCMEmployers->Cellphone->EditCustomAttributes = "";
$CCMEmployers->Cellphone->EditValue = ew_HtmlEncode($CCMEmployers->Cellphone->AdvancedSearch->SearchValue);
// EmailAddress
$CCMEmployers->EmailAddress->EditCustomAttributes = "";
$CCMEmployers->EmailAddress->EditValue = ew_HtmlEncode($CCMEmployers->EmailAddress->AdvancedSearch->SearchValue);
// WorkAddress
$CCMEmployers->WorkAddress->EditCustomAttributes = "";
$CCMEmployers->WorkAddress->EditValue = ew_HtmlEncode($CCMEmployers->WorkAddress->AdvancedSearch->SearchValue);
// PostalAddress
$CCMEmployers->PostalAddress->EditCustomAttributes = "";
$CCMEmployers->PostalAddress->EditValue = ew_HtmlEncode($CCMEmployers->PostalAddress->AdvancedSearch->SearchValue);
// CandUUndertaking
$CCMEmployers->CandUUndertaking->EditCustomAttributes = "";
$CCMEmployers->CandUUndertaking->EditValue = ew_HtmlEncode($CCMEmployers->CandUUndertaking->AdvancedSearch->SearchValue);
// WebUsername
$CCMEmployers->WebUsername->EditCustomAttributes = "";
$CCMEmployers->WebUsername->EditValue = ew_HtmlEncode($CCMEmployers->WebUsername->AdvancedSearch->SearchValue);
// WebPassword
$CCMEmployers->WebPassword->EditCustomAttributes = "";
$CCMEmployers->WebPassword->EditValue = ew_HtmlEncode($CCMEmployers->WebPassword->AdvancedSearch->SearchValue);
// BlockAccess
$CCMEmployers->BlockAccess->EditCustomAttributes = "";
$arwrk = array();
$arwrk[] = array("y", "Yes");
$arwrk[] = array("n", "No");
$CCMEmployers->BlockAccess->EditValue = $arwrk;
// Archived
$CCMEmployers->Archived->EditCustomAttributes = "";
$arwrk = array();
$arwrk[] = array("1", "Yes");
$arwrk[] = array("0", "No");
$CCMEmployers->Archived->EditValue = $arwrk;
// AccountName
$CCMEmployers->AccountName->EditCustomAttributes = "";
$CCMEmployers->AccountName->EditValue = ew_HtmlEncode($CCMEmployers->AccountName->AdvancedSearch->SearchValue);
// BankName
$CCMEmployers->BankName->EditCustomAttributes = "";
$CCMEmployers->BankName->EditValue = ew_HtmlEncode($CCMEmployers->BankName->AdvancedSearch->SearchValue);
// BranchName
$CCMEmployers->BranchName->EditCustomAttributes = "";
$CCMEmployers->BranchName->EditValue = ew_HtmlEncode($CCMEmployers->BranchName->AdvancedSearch->SearchValue);
// AccountNum
$CCMEmployers->AccountNum->EditCustomAttributes = "";
$CCMEmployers->AccountNum->EditValue = ew_HtmlEncode($CCMEmployers->AccountNum->AdvancedSearch->SearchValue);
}
// Call Row Rendered event
if ($CCMEmployers->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$CCMEmployers->Row_Rendered();
}
// Validate search
function ValidateSearch() {
global $gsSearchError, $CCMEmployers;
// 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 $CCMEmployers;
$CCMEmployers->CCMEmployerID->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_CCMEmployerID");
$CCMEmployers->Organisation->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_Organisation");
$CCMEmployers->Title->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_Title");
$CCMEmployers->FirstName->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_FirstName");
$CCMEmployers->Surname->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_Surname");
$CCMEmployers->Initials->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_Initials");
$CCMEmployers->KnownAs->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_KnownAs");
$CCMEmployers->IDNumber->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_IDNumber");
$CCMEmployers->Telephone->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_Telephone");
$CCMEmployers->Cellphone->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_Cellphone");
$CCMEmployers->EmailAddress->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_EmailAddress");
$CCMEmployers->WorkAddress->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_WorkAddress");
$CCMEmployers->PostalAddress->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_PostalAddress");
$CCMEmployers->CandUUndertaking->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_CandUUndertaking");
$CCMEmployers->WebUsername->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_WebUsername");
$CCMEmployers->WebPassword->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_WebPassword");
$CCMEmployers->BlockAccess->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_BlockAccess");
$CCMEmployers->Archived->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_Archived");
$CCMEmployers->AccountName->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_AccountName");
$CCMEmployers->BankName->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_BankName");
$CCMEmployers->BranchName->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_BranchName");
$CCMEmployers->AccountNum->AdvancedSearch->SearchValue = $CCMEmployers->getAdvancedSearch("x_AccountNum");
}
// 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;
}
}
?>