<?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
$casesort_search = new casesort_search();

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

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

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

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

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

// Form_CustomValidate event
fcasesortsearch.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
fcasesortsearch.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
// Form object for search
// Validate function for search

fcasesortsearch.validate = function(fobj) {
	if (!this.validateRequired)
		return true; // Ignore validation
	fobj = fobj || this._form;
	var infix = "";
	elm = this.getElements("x" + infix + "_CaseSortID");
	if (elm && !ew.checkInteger(elm.value))
		return this.onError(elm, "<?php echo JsEncode($casesort->CaseSortID->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 $casesort_search->showPageHeader(); ?>
<?php
$casesort_search->showMessage();
?>
<form name="fcasesortsearch" id="fcasesortsearch" class="<?php echo $casesort_search->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($casesort_search->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $casesort_search->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="casesort">
<input type="hidden" name="action" id="action" value="search">
<input type="hidden" name="modal" value="<?php echo (int)$casesort_search->IsModal ?>">
<?php if (!$casesort_search->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($casesort_search->IsMobileOrModal) { ?>
<div class="ew-search-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_casesortsearch" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($casesort->CaseSortID->Visible) { // CaseSortID ?>
<?php if ($casesort_search->IsMobileOrModal) { ?>
	<div id="r_CaseSortID" class="form-group row">
		<label for="x_CaseSortID" class="<?php echo $casesort_search->LeftColumnClass ?>"><span id="elh_casesort_CaseSortID"><?php echo $casesort->CaseSortID->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z_CaseSortID" id="z_CaseSortID" value="="></span>
		</label>
		<div class="<?php echo $casesort_search->RightColumnClass ?>"><div<?php echo $casesort->CaseSortID->cellAttributes() ?>>
			<span id="el_casesort_CaseSortID">
<input type="text" data-table="casesort" data-field="x_CaseSortID" name="x_CaseSortID" id="x_CaseSortID" placeholder="<?php echo HtmlEncode($casesort->CaseSortID->getPlaceHolder()) ?>" value="<?php echo $casesort->CaseSortID->EditValue ?>"<?php echo $casesort->CaseSortID->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_CaseSortID">
		<td class="<?php echo $casesort_search->TableLeftColumnClass ?>"><span id="elh_casesort_CaseSortID"><?php echo $casesort->CaseSortID->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z_CaseSortID" id="z_CaseSortID" value="="></span></td>
		<td<?php echo $casesort->CaseSortID->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_casesort_CaseSortID">
<input type="text" data-table="casesort" data-field="x_CaseSortID" name="x_CaseSortID" id="x_CaseSortID" placeholder="<?php echo HtmlEncode($casesort->CaseSortID->getPlaceHolder()) ?>" value="<?php echo $casesort->CaseSortID->EditValue ?>"<?php echo $casesort->CaseSortID->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($casesort->CaseSort->Visible) { // CaseSort ?>
<?php if ($casesort_search->IsMobileOrModal) { ?>
	<div id="r_CaseSort" class="form-group row">
		<label for="x_CaseSort" class="<?php echo $casesort_search->LeftColumnClass ?>"><span id="elh_casesort_CaseSort"><?php echo $casesort->CaseSort->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_CaseSort" id="z_CaseSort" value="LIKE"></span>
		</label>
		<div class="<?php echo $casesort_search->RightColumnClass ?>"><div<?php echo $casesort->CaseSort->cellAttributes() ?>>
			<span id="el_casesort_CaseSort">
<input type="text" data-table="casesort" data-field="x_CaseSort" name="x_CaseSort" id="x_CaseSort" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($casesort->CaseSort->getPlaceHolder()) ?>" value="<?php echo $casesort->CaseSort->EditValue ?>"<?php echo $casesort->CaseSort->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_CaseSort">
		<td class="<?php echo $casesort_search->TableLeftColumnClass ?>"><span id="elh_casesort_CaseSort"><?php echo $casesort->CaseSort->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_CaseSort" id="z_CaseSort" value="LIKE"></span></td>
		<td<?php echo $casesort->CaseSort->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_casesort_CaseSort">
<input type="text" data-table="casesort" data-field="x_CaseSort" name="x_CaseSort" id="x_CaseSort" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($casesort->CaseSort->getPlaceHolder()) ?>" value="<?php echo $casesort->CaseSort->EditValue ?>"<?php echo $casesort->CaseSort->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($casesort->CaseSortEn->Visible) { // CaseSortEn ?>
<?php if ($casesort_search->IsMobileOrModal) { ?>
	<div id="r_CaseSortEn" class="form-group row">
		<label for="x_CaseSortEn" class="<?php echo $casesort_search->LeftColumnClass ?>"><span id="elh_casesort_CaseSortEn"><?php echo $casesort->CaseSortEn->caption() ?></span>
		<span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_CaseSortEn" id="z_CaseSortEn" value="LIKE"></span>
		</label>
		<div class="<?php echo $casesort_search->RightColumnClass ?>"><div<?php echo $casesort->CaseSortEn->cellAttributes() ?>>
			<span id="el_casesort_CaseSortEn">
<input type="text" data-table="casesort" data-field="x_CaseSortEn" name="x_CaseSortEn" id="x_CaseSortEn" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($casesort->CaseSortEn->getPlaceHolder()) ?>" value="<?php echo $casesort->CaseSortEn->EditValue ?>"<?php echo $casesort->CaseSortEn->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_CaseSortEn">
		<td class="<?php echo $casesort_search->TableLeftColumnClass ?>"><span id="elh_casesort_CaseSortEn"><?php echo $casesort->CaseSortEn->caption() ?></span></td>
		<td class="w-col-1"><span class="ew-search-operator"><?php echo $Language->phrase("LIKE") ?><input type="hidden" name="z_CaseSortEn" id="z_CaseSortEn" value="LIKE"></span></td>
		<td<?php echo $casesort->CaseSortEn->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_casesort_CaseSortEn">
<input type="text" data-table="casesort" data-field="x_CaseSortEn" name="x_CaseSortEn" id="x_CaseSortEn" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($casesort->CaseSortEn->getPlaceHolder()) ?>" value="<?php echo $casesort->CaseSortEn->EditValue ?>"<?php echo $casesort->CaseSortEn->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($casesort->Notes->Visible) { // Notes ?>
<?php if ($casesort_search->IsMobileOrModal) { ?>
	<div id="r_Notes" class="form-group row">
		<label for="x_Notes" class="<?php echo $casesort_search->LeftColumnClass ?>"><span id="elh_casesort_Notes"><?php echo $casesort->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 $casesort_search->RightColumnClass ?>"><div<?php echo $casesort->Notes->cellAttributes() ?>>
			<span id="el_casesort_Notes">
<input type="text" data-table="casesort" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($casesort->Notes->getPlaceHolder()) ?>" value="<?php echo $casesort->Notes->EditValue ?>"<?php echo $casesort->Notes->editAttributes() ?>>
</span>
		</div></div>
	</div>
<?php } else { ?>
	<tr id="r_Notes">
		<td class="<?php echo $casesort_search->TableLeftColumnClass ?>"><span id="elh_casesort_Notes"><?php echo $casesort->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 $casesort->Notes->cellAttributes() ?>>
			<div class="text-nowrap">
				<span id="el_casesort_Notes">
<input type="text" data-table="casesort" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($casesort->Notes->getPlaceHolder()) ?>" value="<?php echo $casesort->Notes->EditValue ?>"<?php echo $casesort->Notes->editAttributes() ?>>
</span>
			</div>
		</td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($casesort_search->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<?php if (!$casesort_search->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $casesort_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 (!$casesort_search->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
</form>
<?php
$casesort_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
$casesort_search->terminate();
?>
