<?php
namespace PHPMaker2019\project_germanos;

// Session
if (session_status() !== PHP_SESSION_ACTIVE)
	session_start(); // Init session data

// Output buffering
ob_start(); 

// Autoload
include_once "autoload.php";
?>
<?php

// Write header
WriteHeader(FALSE);

// Create page object
$lawfirm_search = new lawfirm_search();

// Run the page
$lawfirm_search->run();

// Setup login status
SetupLoginStatus();
SetClientVar("login", LoginStatus());

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$lawfirm_search->Page_Render();
?>
<?php include_once "header.php" ?>
<script>

// Form object
currentPageID = ew.PAGE_ID = "search";
<?php if ($lawfirm_search->IsModal) { ?>
var flawfirmsearch = currentAdvancedSearchForm = new ew.Form("flawfirmsearch", "search");
<?php } else { ?>
var flawfirmsearch = currentForm = new ew.Form("flawfirmsearch", "search");
<?php } ?>

// Form_CustomValidate event
flawfirmsearch.Form_CustomValidate = function(fobj) { // DO NOT CHANGE THIS LINE!

	// Your custom validation code here, return false if invalid.
	return true;
}

// Use JavaScript validation or not
flawfirmsearch.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
flawfirmsearch.lists["x_Activated[]"] = <?php echo $lawfirm_search->Activated->Lookup->toClientList() ?>;
flawfirmsearch.lists["x_Activated[]"].options = <?php echo JsonEncode($lawfirm_search->Activated->options(FALSE, TRUE)) ?>;

// Form object for search
// Validate function for search

flawfirmsearch.validate = function(fobj) {
	if (!this.validateRequired)
		return true; // Ignore validation
	fobj = fobj || this._form;
	var infix = "";
	elm = this.getElements("x" + infix + "__UserID");
	if (elm && !ew.checkInteger(elm.value))
		return this.onError(elm, "<?php echo JsEncode($lawfirm->_UserID->errorMessage()) ?>");

	// Fire Form_CustomValidate event
	if (!this.Form_CustomValidate(fobj))
		return false;
	return true;
}
</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php $lawfirm_search->showPageHeader(); ?>
<?php
$lawfirm_search->showMessage();
?>
<form name="flawfirmsearch" id="flawfirmsearch" class="<?php echo $lawfirm_search->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($lawfirm_search->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $lawfirm_search->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="lawfirm">
<input type="hidden" name="action" id="action" value="search">
<input type="hidden" name="modal" value="<?php echo (int)$lawfirm_search->IsModal ?>">
<?php if (!$lawfirm_search->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
<div class="ew-search-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_lawfirmsearch" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($lawfirm->LawFirmID->Visible) { // LawFirmID ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
	<div id="r_LawFirmID" class="form-group row">
		<label class="<?php echo $lawfirm_search->LeftColumnClass ?>"><span id="elh_lawfirm_LawFirmID"><?php echo $lawfirm->LawFirmID->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z_LawFirmID" id="z_LawFirmID" value="="></span>
		</label>
		<div class="<?php echo $lawfirm_search->RightColumnClass ?>"><div<?php echo $lawfirm->LawFirmID->cellAttributes() ?>>
			<span id="el_lawfirm_LawFirmID">
<input type="text" data-table="lawfirm" data-field="x_LawFirmID" name="x_LawFirmID" id="x_LawFirmID" placeholder="<?php echo HtmlEncode($lawfirm->LawFirmID->getPlaceHolder()) ?>" value="<?php echo $lawfirm->LawFirmID->EditValue ?>"<?php echo $lawfirm->LawFirmID->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_LawFirmID">
		<td class="<?php echo $lawfirm_search->TableLeftColumnClass ?>"><span id="elh_lawfirm_LawFirmID"><?php echo $lawfirm->LawFirmID->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z_LawFirmID" id="z_LawFirmID" value="="></span></td>
		<td<?php echo $lawfirm->LawFirmID->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_lawfirm_LawFirmID">
<input type="text" data-table="lawfirm" data-field="x_LawFirmID" name="x_LawFirmID" id="x_LawFirmID" placeholder="<?php echo HtmlEncode($lawfirm->LawFirmID->getPlaceHolder()) ?>" value="<?php echo $lawfirm->LawFirmID->EditValue ?>"<?php echo $lawfirm->LawFirmID->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($lawfirm->LawFirm->Visible) { // LawFirm ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
	<div id="r_LawFirm" class="form-group row">
		<label for="x_LawFirm" class="<?php echo $lawfirm_search->LeftColumnClass ?>"><span id="elh_lawfirm_LawFirm"><?php echo $lawfirm->LawFirm->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_LawFirm" id="z_LawFirm" value="LIKE"></span>
		</label>
		<div class="<?php echo $lawfirm_search->RightColumnClass ?>"><div<?php echo $lawfirm->LawFirm->cellAttributes() ?>>
			<span id="el_lawfirm_LawFirm">
<input type="text" data-table="lawfirm" data-field="x_LawFirm" name="x_LawFirm" id="x_LawFirm" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($lawfirm->LawFirm->getPlaceHolder()) ?>" value="<?php echo $lawfirm->LawFirm->EditValue ?>"<?php echo $lawfirm->LawFirm->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_LawFirm">
		<td class="<?php echo $lawfirm_search->TableLeftColumnClass ?>"><span id="elh_lawfirm_LawFirm"><?php echo $lawfirm->LawFirm->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_LawFirm" id="z_LawFirm" value="LIKE"></span></td>
		<td<?php echo $lawfirm->LawFirm->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_lawfirm_LawFirm">
<input type="text" data-table="lawfirm" data-field="x_LawFirm" name="x_LawFirm" id="x_LawFirm" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($lawfirm->LawFirm->getPlaceHolder()) ?>" value="<?php echo $lawfirm->LawFirm->EditValue ?>"<?php echo $lawfirm->LawFirm->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($lawfirm->LawFirmEn->Visible) { // LawFirmEn ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
	<div id="r_LawFirmEn" class="form-group row">
		<label for="x_LawFirmEn" class="<?php echo $lawfirm_search->LeftColumnClass ?>"><span id="elh_lawfirm_LawFirmEn"><?php echo $lawfirm->LawFirmEn->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_LawFirmEn" id="z_LawFirmEn" value="LIKE"></span>
		</label>
		<div class="<?php echo $lawfirm_search->RightColumnClass ?>"><div<?php echo $lawfirm->LawFirmEn->cellAttributes() ?>>
			<span id="el_lawfirm_LawFirmEn">
<input type="text" data-table="lawfirm" data-field="x_LawFirmEn" name="x_LawFirmEn" id="x_LawFirmEn" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($lawfirm->LawFirmEn->getPlaceHolder()) ?>" value="<?php echo $lawfirm->LawFirmEn->EditValue ?>"<?php echo $lawfirm->LawFirmEn->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_LawFirmEn">
		<td class="<?php echo $lawfirm_search->TableLeftColumnClass ?>"><span id="elh_lawfirm_LawFirmEn"><?php echo $lawfirm->LawFirmEn->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_LawFirmEn" id="z_LawFirmEn" value="LIKE"></span></td>
		<td<?php echo $lawfirm->LawFirmEn->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_lawfirm_LawFirmEn">
<input type="text" data-table="lawfirm" data-field="x_LawFirmEn" name="x_LawFirmEn" id="x_LawFirmEn" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($lawfirm->LawFirmEn->getPlaceHolder()) ?>" value="<?php echo $lawfirm->LawFirmEn->EditValue ?>"<?php echo $lawfirm->LawFirmEn->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($lawfirm->Notes->Visible) { // Notes ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
	<div id="r_Notes" class="form-group row">
		<label for="x_Notes" class="<?php echo $lawfirm_search->LeftColumnClass ?>"><span id="elh_lawfirm_Notes"><?php echo $lawfirm->Notes->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_Notes" id="z_Notes" value="LIKE"></span>
		</label>
		<div class="<?php echo $lawfirm_search->RightColumnClass ?>"><div<?php echo $lawfirm->Notes->cellAttributes() ?>>
			<span id="el_lawfirm_Notes">
<input type="text" data-table="lawfirm" data-field="x_Notes" name="x_Notes" id="x_Notes" size="35" placeholder="<?php echo HtmlEncode($lawfirm->Notes->getPlaceHolder()) ?>" value="<?php echo $lawfirm->Notes->EditValue ?>"<?php echo $lawfirm->Notes->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_Notes">
		<td class="<?php echo $lawfirm_search->TableLeftColumnClass ?>"><span id="elh_lawfirm_Notes"><?php echo $lawfirm->Notes->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_Notes" id="z_Notes" value="LIKE"></span></td>
		<td<?php echo $lawfirm->Notes->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_lawfirm_Notes">
<input type="text" data-table="lawfirm" data-field="x_Notes" name="x_Notes" id="x_Notes" size="35" placeholder="<?php echo HtmlEncode($lawfirm->Notes->getPlaceHolder()) ?>" value="<?php echo $lawfirm->Notes->EditValue ?>"<?php echo $lawfirm->Notes->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($lawfirm->Activated->Visible) { // Activated ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
	<div id="r_Activated" class="form-group row">
		<label class="<?php echo $lawfirm_search->LeftColumnClass ?>"><span id="elh_lawfirm_Activated"><?php echo $lawfirm->Activated->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z_Activated" id="z_Activated" value="="></span>
		</label>
		<div class="<?php echo $lawfirm_search->RightColumnClass ?>"><div<?php echo $lawfirm->Activated->cellAttributes() ?>>
			<span id="el_lawfirm_Activated">
<?php
$selwrk = (ConvertToBool($lawfirm->Activated->AdvancedSearch->SearchValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="lawfirm" data-field="x_Activated" name="x_Activated[]" id="x_Activated[]" value="1"<?php echo $selwrk ?><?php echo $lawfirm->Activated->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_Activated">
		<td class="<?php echo $lawfirm_search->TableLeftColumnClass ?>"><span id="elh_lawfirm_Activated"><?php echo $lawfirm->Activated->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z_Activated" id="z_Activated" value="="></span></td>
		<td<?php echo $lawfirm->Activated->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_lawfirm_Activated">
<?php
$selwrk = (ConvertToBool($lawfirm->Activated->AdvancedSearch->SearchValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="lawfirm" data-field="x_Activated" name="x_Activated[]" id="x_Activated[]" value="1"<?php echo $selwrk ?><?php echo $lawfirm->Activated->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($lawfirm->_UserID->Visible) { // UserID ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
	<div id="r__UserID" class="form-group row">
		<label for="x__UserID" class="<?php echo $lawfirm_search->LeftColumnClass ?>"><span id="elh_lawfirm__UserID"><?php echo $lawfirm->_UserID->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z__UserID" id="z__UserID" value="="></span>
		</label>
		<div class="<?php echo $lawfirm_search->RightColumnClass ?>"><div<?php echo $lawfirm->_UserID->cellAttributes() ?>>
			<span id="el_lawfirm__UserID">
<input type="text" data-table="lawfirm" data-field="x__UserID" name="x__UserID" id="x__UserID" size="30" placeholder="<?php echo HtmlEncode($lawfirm->_UserID->getPlaceHolder()) ?>" value="<?php echo $lawfirm->_UserID->EditValue ?>"<?php echo $lawfirm->_UserID->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r__UserID">
		<td class="<?php echo $lawfirm_search->TableLeftColumnClass ?>"><span id="elh_lawfirm__UserID"><?php echo $lawfirm->_UserID->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z__UserID" id="z__UserID" value="="></span></td>
		<td<?php echo $lawfirm->_UserID->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_lawfirm__UserID">
<input type="text" data-table="lawfirm" data-field="x__UserID" name="x__UserID" id="x__UserID" size="30" placeholder="<?php echo HtmlEncode($lawfirm->_UserID->getPlaceHolder()) ?>" value="<?php echo $lawfirm->_UserID->EditValue ?>"<?php echo $lawfirm->_UserID->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($lawfirm_search->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<?php if (!$lawfirm_search->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $lawfirm_search->OffsetColumnClass ?>"><!-- buttons offset -->
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?php echo $Language->phrase("Search") ?></button>
<button class="btn btn-default ew-btn" name="btn-reset" id="btn-reset" type="button" onclick="ew.clearForm(this.form);"><?php echo $Language->phrase("Reset") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
<?php if (!$lawfirm_search->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
</form>
<?php
$lawfirm_search->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<script>

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

</script>
<?php include_once "footer.php" ?>
<?php
$lawfirm_search->terminate();
?>
