Heray-Was-Here
Server : Apache
System : Linux hybrid3195.ca.ns.planethoster.net 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
User : alliancerealtynb ( 1004)
PHP Version : 7.4.33
Disable Function : noop
Directory :  /home/alliancerealtynb/avantmaj.alliancerealty.nb.ca/adminAR/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/alliancerealtynb/avantmaj.alliancerealty.nb.ca/adminAR/property_notesadd.php
<?php
namespace PHPMaker2020\Alliance;

// Autoload
include_once "autoload.php";

// Session
if (session_status() !== PHP_SESSION_ACTIVE)
	\Delight\Cookie\Session::start(Config("COOKIE_SAMESITE")); // Init session data

// Output buffering
ob_start();
?>
<?php

// Write header
WriteHeader(FALSE);

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

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

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

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

// Page Rendering event
$property_notes_add->Page_Render();
?>
<?php include_once "header.php"; ?>
<script>
var fproperty_notesadd, currentPageID;
loadjs.ready("head", function() {

	// Form object
	currentPageID = ew.PAGE_ID = "add";
	fproperty_notesadd = currentForm = new ew.Form("fproperty_notesadd", "add");

	// Validate form
	fproperty_notesadd.validate = function() {
		if (!this.validateRequired)
			return true; // Ignore validation
		var $ = jQuery, fobj = this.getForm(), $fobj = $(fobj);
		if ($fobj.find("#confirm").val() == "confirm")
			return true;
		var elm, felm, uelm, addcnt = 0;
		var $k = $fobj.find("#" + this.formKeyCountName); // Get key_count
		var rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1;
		var startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
		var gridinsert = ["insert", "gridinsert"].includes($fobj.find("#action").val()) && $k[0];
		for (var i = startcnt; i <= rowcnt; i++) {
			var infix = ($k[0]) ? String(i) : "";
			$fobj.data("rowindex", infix);
			<?php if ($property_notes_add->OwnerID->Required) { ?>
				elm = this.getElements("x" + infix + "_OwnerID");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $property_notes_add->OwnerID->caption(), $property_notes_add->OwnerID->RequiredErrorMessage)) ?>");
			<?php } ?>
				elm = this.getElements("x" + infix + "_OwnerID");
				if (elm && !ew.checkInteger(elm.value))
					return this.onError(elm, "<?php echo JsEncode($property_notes_add->OwnerID->errorMessage()) ?>");
			<?php if ($property_notes_add->Address->Required) { ?>
				elm = this.getElements("x" + infix + "_Address");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $property_notes_add->Address->caption(), $property_notes_add->Address->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($property_notes_add->Town->Required) { ?>
				elm = this.getElements("x" + infix + "_Town");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $property_notes_add->Town->caption(), $property_notes_add->Town->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($property_notes_add->Agent->Required) { ?>
				elm = this.getElements("x" + infix + "_Agent");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $property_notes_add->Agent->caption(), $property_notes_add->Agent->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($property_notes_add->NoteDate->Required) { ?>
				elm = this.getElements("x" + infix + "_NoteDate");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $property_notes_add->NoteDate->caption(), $property_notes_add->NoteDate->RequiredErrorMessage)) ?>");
			<?php } ?>
				elm = this.getElements("x" + infix + "_NoteDate");
				if (elm && !ew.checkDate(elm.value))
					return this.onError(elm, "<?php echo JsEncode($property_notes_add->NoteDate->errorMessage()) ?>");
			<?php if ($property_notes_add->NoteTime->Required) { ?>
				elm = this.getElements("x" + infix + "_NoteTime");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $property_notes_add->NoteTime->caption(), $property_notes_add->NoteTime->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($property_notes_add->Note->Required) { ?>
				elm = this.getElements("x" + infix + "_Note");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $property_notes_add->Note->caption(), $property_notes_add->Note->RequiredErrorMessage)) ?>");
			<?php } ?>

				// Call Form_CustomValidate event
				if (!this.Form_CustomValidate(fobj))
					return false;
		}

		// Process detail forms
		var dfs = $fobj.find("input[name='detailpage']").get();
		for (var i = 0; i < dfs.length; i++) {
			var df = dfs[i], val = df.value;
			if (val && ew.forms[val])
				if (!ew.forms[val].validate())
					return false;
		}
		return true;
	}

	// Form_CustomValidate
	fproperty_notesadd.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
	fproperty_notesadd.validateRequired = <?php echo Config("CLIENT_VALIDATE") ? "true" : "false" ?>;

	// Dynamic selection lists
	fproperty_notesadd.lists["x_OwnerID"] = <?php echo $property_notes_add->OwnerID->Lookup->toClientList($property_notes_add) ?>;
	fproperty_notesadd.lists["x_OwnerID"].options = <?php echo JsonEncode($property_notes_add->OwnerID->lookupOptions()) ?>;
	fproperty_notesadd.autoSuggests["x_OwnerID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
	fproperty_notesadd.lists["x_Address"] = <?php echo $property_notes_add->Address->Lookup->toClientList($property_notes_add) ?>;
	fproperty_notesadd.lists["x_Address"].options = <?php echo JsonEncode($property_notes_add->Address->lookupOptions()) ?>;
	fproperty_notesadd.autoSuggests["x_Address"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
	fproperty_notesadd.lists["x_Town"] = <?php echo $property_notes_add->Town->Lookup->toClientList($property_notes_add) ?>;
	fproperty_notesadd.lists["x_Town"].options = <?php echo JsonEncode($property_notes_add->Town->options(FALSE, TRUE)) ?>;
	fproperty_notesadd.lists["x_Agent"] = <?php echo $property_notes_add->Agent->Lookup->toClientList($property_notes_add) ?>;
	fproperty_notesadd.lists["x_Agent"].options = <?php echo JsonEncode($property_notes_add->Agent->options(FALSE, TRUE)) ?>;
	loadjs.done("fproperty_notesadd");
});
</script>
<script>
loadjs.ready("head", function() {

	// Client script
	// Write your client script here, no need to add script tags.
	//const urlParams = new URLSearchParams(window.location.search);
			//const OwnerID = urlParams.get('OwnerID');
	//window.location.href = "http://www.w3schools.com?OwnerID="+OwnerID;

});
</script>
<?php $property_notes_add->showPageHeader(); ?>
<?php
$property_notes_add->showMessage();
?>
<form name="fproperty_notesadd" id="fproperty_notesadd" class="<?php echo $property_notes_add->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($Page->CheckToken) { ?>
<input type="hidden" name="<?php echo Config("TOKEN_NAME") ?>" value="<?php echo $Page->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="property_notes">
<input type="hidden" name="action" id="action" value="insert">
<input type="hidden" name="modal" value="<?php echo (int)$property_notes_add->IsModal ?>">
<div class="ew-add-div"><!-- page* -->
<?php if ($property_notes_add->OwnerID->Visible) { // OwnerID ?>
	<div id="r_OwnerID" class="form-group row">
		<label id="elh_property_notes_OwnerID" class="<?php echo $property_notes_add->LeftColumnClass ?>"><?php echo $property_notes_add->OwnerID->caption() ?><?php echo $property_notes_add->OwnerID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $property_notes_add->RightColumnClass ?>"><div <?php echo $property_notes_add->OwnerID->cellAttributes() ?>>
<span id="el_property_notes_OwnerID">
<?php
$onchange = $property_notes_add->OwnerID->EditAttrs->prepend("onchange", "");
$onchange = ($onchange) ? ' onchange="' . JsEncode($onchange) . '"' : '';
$property_notes_add->OwnerID->EditAttrs["onchange"] = "";
?>
<span id="as_x_OwnerID">
	<input type="text" class="form-control" name="sv_x_OwnerID" id="sv_x_OwnerID" value="<?php echo RemoveHtml($property_notes_add->OwnerID->EditValue) ?>" size="30" maxlength="11" placeholder="<?php echo HtmlEncode($property_notes_add->OwnerID->getPlaceHolder()) ?>" data-placeholder="<?php echo HtmlEncode($property_notes_add->OwnerID->getPlaceHolder()) ?>"<?php echo $property_notes_add->OwnerID->editAttributes() ?>>
</span>
<input type="hidden" data-table="property_notes" data-field="x_OwnerID" data-value-separator="<?php echo $property_notes_add->OwnerID->displayValueSeparatorAttribute() ?>" name="x_OwnerID" id="x_OwnerID" value="<?php echo HtmlEncode($property_notes_add->OwnerID->CurrentValue) ?>"<?php echo $onchange ?>>
<script>
loadjs.ready(["fproperty_notesadd"], function() {
	fproperty_notesadd.createAutoSuggest({"id":"x_OwnerID","forceSelect":false});
});
</script>
<?php echo $property_notes_add->OwnerID->Lookup->getParamTag($property_notes_add, "p_x_OwnerID") ?>
</span>
<?php echo $property_notes_add->OwnerID->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($property_notes_add->Address->Visible) { // Address ?>
	<div id="r_Address" class="form-group row">
		<label id="elh_property_notes_Address" class="<?php echo $property_notes_add->LeftColumnClass ?>"><?php echo $property_notes_add->Address->caption() ?><?php echo $property_notes_add->Address->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $property_notes_add->RightColumnClass ?>"><div <?php echo $property_notes_add->Address->cellAttributes() ?>>
<span id="el_property_notes_Address">
<?php
$onchange = $property_notes_add->Address->EditAttrs->prepend("onchange", "");
$onchange = ($onchange) ? ' onchange="' . JsEncode($onchange) . '"' : '';
$property_notes_add->Address->EditAttrs["onchange"] = "";
?>
<span id="as_x_Address">
	<input type="text" class="form-control" name="sv_x_Address" id="sv_x_Address" value="<?php echo RemoveHtml($property_notes_add->Address->EditValue) ?>" size="30" maxlength="50" placeholder="<?php echo HtmlEncode($property_notes_add->Address->getPlaceHolder()) ?>" data-placeholder="<?php echo HtmlEncode($property_notes_add->Address->getPlaceHolder()) ?>"<?php echo $property_notes_add->Address->editAttributes() ?>>
</span>
<input type="hidden" data-table="property_notes" data-field="x_Address" data-value-separator="<?php echo $property_notes_add->Address->displayValueSeparatorAttribute() ?>" name="x_Address" id="x_Address" value="<?php echo HtmlEncode($property_notes_add->Address->CurrentValue) ?>"<?php echo $onchange ?>>
<script>
loadjs.ready(["fproperty_notesadd"], function() {
	fproperty_notesadd.createAutoSuggest({"id":"x_Address","forceSelect":false});
});
</script>
<?php echo $property_notes_add->Address->Lookup->getParamTag($property_notes_add, "p_x_Address") ?>
</span>
<?php echo $property_notes_add->Address->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($property_notes_add->Town->Visible) { // Town ?>
	<div id="r_Town" class="form-group row">
		<label id="elh_property_notes_Town" for="x_Town" class="<?php echo $property_notes_add->LeftColumnClass ?>"><?php echo $property_notes_add->Town->caption() ?><?php echo $property_notes_add->Town->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $property_notes_add->RightColumnClass ?>"><div <?php echo $property_notes_add->Town->cellAttributes() ?>>
<span id="el_property_notes_Town">
<div class="btn-group ew-dropdown-list" role="group">
	<div class="btn-group" role="group">
		<button type="button" class="btn form-control dropdown-toggle ew-dropdown-toggle" aria-haspopup="true" aria-expanded="false"<?php if ($property_notes_add->Town->ReadOnly) { ?> readonly<?php } else { ?>data-toggle="dropdown"<?php } ?>><?php echo $property_notes_add->Town->ViewValue ?></button>
		<div id="dsl_x_Town" data-repeatcolumn="1" class="dropdown-menu">
			<div class="ew-items" style="overflow-x: hidden;">
<?php echo $property_notes_add->Town->radioButtonListHtml(TRUE, "x_Town") ?>
			</div><!-- /.ew-items -->
		</div><!-- /.dropdown-menu -->
		<div id="tp_x_Town" class="ew-template"><input type="radio" class="custom-control-input" data-table="property_notes" data-field="x_Town" data-value-separator="<?php echo $property_notes_add->Town->displayValueSeparatorAttribute() ?>" name="x_Town" id="x_Town" value="{value}"<?php echo $property_notes_add->Town->editAttributes() ?>></div>
	</div><!-- /.btn-group -->
	<?php if (!$property_notes_add->Town->ReadOnly) { ?>
	<button type="button" class="btn btn-default ew-dropdown-clear" disabled>
		<i class="fas fa-times ew-icon"></i>
	</button>
	<?php } ?>
</div><!-- /.ew-dropdown-list -->
</span>
<?php echo $property_notes_add->Town->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($property_notes_add->Agent->Visible) { // Agent ?>
	<div id="r_Agent" class="form-group row">
		<label id="elh_property_notes_Agent" for="x_Agent" class="<?php echo $property_notes_add->LeftColumnClass ?>"><?php echo $property_notes_add->Agent->caption() ?><?php echo $property_notes_add->Agent->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $property_notes_add->RightColumnClass ?>"><div <?php echo $property_notes_add->Agent->cellAttributes() ?>>
<span id="el_property_notes_Agent">
<div class="btn-group ew-dropdown-list" role="group">
	<div class="btn-group" role="group">
		<button type="button" class="btn form-control dropdown-toggle ew-dropdown-toggle" aria-haspopup="true" aria-expanded="false"<?php if ($property_notes_add->Agent->ReadOnly) { ?> readonly<?php } else { ?>data-toggle="dropdown"<?php } ?>><?php echo $property_notes_add->Agent->ViewValue ?></button>
		<div id="dsl_x_Agent" data-repeatcolumn="1" class="dropdown-menu">
			<div class="ew-items" style="overflow-x: hidden;">
<?php echo $property_notes_add->Agent->radioButtonListHtml(TRUE, "x_Agent") ?>
			</div><!-- /.ew-items -->
		</div><!-- /.dropdown-menu -->
		<div id="tp_x_Agent" class="ew-template"><input type="radio" class="custom-control-input" data-table="property_notes" data-field="x_Agent" data-value-separator="<?php echo $property_notes_add->Agent->displayValueSeparatorAttribute() ?>" name="x_Agent" id="x_Agent" value="{value}"<?php echo $property_notes_add->Agent->editAttributes() ?>></div>
	</div><!-- /.btn-group -->
	<?php if (!$property_notes_add->Agent->ReadOnly) { ?>
	<button type="button" class="btn btn-default ew-dropdown-clear" disabled>
		<i class="fas fa-times ew-icon"></i>
	</button>
	<?php } ?>
</div><!-- /.ew-dropdown-list -->
</span>
<?php echo $property_notes_add->Agent->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($property_notes_add->NoteDate->Visible) { // NoteDate ?>
	<div id="r_NoteDate" class="form-group row">
		<label id="elh_property_notes_NoteDate" for="x_NoteDate" class="<?php echo $property_notes_add->LeftColumnClass ?>"><?php echo $property_notes_add->NoteDate->caption() ?><?php echo $property_notes_add->NoteDate->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $property_notes_add->RightColumnClass ?>"><div <?php echo $property_notes_add->NoteDate->cellAttributes() ?>>
<span id="el_property_notes_NoteDate">
<input type="text" data-table="property_notes" data-field="x_NoteDate" data-format="5" name="x_NoteDate" id="x_NoteDate" maxlength="19" placeholder="<?php echo HtmlEncode($property_notes_add->NoteDate->getPlaceHolder()) ?>" value="<?php echo $property_notes_add->NoteDate->EditValue ?>"<?php echo $property_notes_add->NoteDate->editAttributes() ?>>
<?php if (!$property_notes_add->NoteDate->ReadOnly && !$property_notes_add->NoteDate->Disabled && !isset($property_notes_add->NoteDate->EditAttrs["readonly"]) && !isset($property_notes_add->NoteDate->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fproperty_notesadd", "datetimepicker"], function() {
	ew.createDateTimePicker("fproperty_notesadd", "x_NoteDate", {"ignoreReadonly":true,"useCurrent":false,"format":5});
});
</script>
<?php } ?>
</span>
<?php echo $property_notes_add->NoteDate->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($property_notes_add->NoteTime->Visible) { // NoteTime ?>
	<div id="r_NoteTime" class="form-group row">
		<label id="elh_property_notes_NoteTime" for="x_NoteTime" class="<?php echo $property_notes_add->LeftColumnClass ?>"><?php echo $property_notes_add->NoteTime->caption() ?><?php echo $property_notes_add->NoteTime->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $property_notes_add->RightColumnClass ?>"><div <?php echo $property_notes_add->NoteTime->cellAttributes() ?>>
<span id="el_property_notes_NoteTime">
<input type="text" data-table="property_notes" data-field="x_NoteTime" name="x_NoteTime" id="x_NoteTime" size="30" maxlength="5" placeholder="<?php echo HtmlEncode($property_notes_add->NoteTime->getPlaceHolder()) ?>" value="<?php echo $property_notes_add->NoteTime->EditValue ?>"<?php echo $property_notes_add->NoteTime->editAttributes() ?>>
</span>
<?php echo $property_notes_add->NoteTime->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($property_notes_add->Note->Visible) { // Note ?>
	<div id="r_Note" class="form-group row">
		<label id="elh_property_notes_Note" class="<?php echo $property_notes_add->LeftColumnClass ?>"><?php echo $property_notes_add->Note->caption() ?><?php echo $property_notes_add->Note->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $property_notes_add->RightColumnClass ?>"><div <?php echo $property_notes_add->Note->cellAttributes() ?>>
<span id="el_property_notes_Note">
<?php $property_notes_add->Note->EditAttrs->appendClass("editor"); ?>
<textarea data-table="property_notes" data-field="x_Note" name="x_Note" id="x_Note" cols="35" rows="4" placeholder="<?php echo HtmlEncode($property_notes_add->Note->getPlaceHolder()) ?>"<?php echo $property_notes_add->Note->editAttributes() ?>><?php echo $property_notes_add->Note->EditValue ?></textarea>
<script>
loadjs.ready(["fproperty_notesadd", "editor"], function() {
	ew.createEditor("fproperty_notesadd", "x_Note", 35, 4, <?php echo $property_notes_add->Note->ReadOnly || FALSE ? "true" : "false" ?>);
});
</script>
</span>
<?php echo $property_notes_add->Note->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div><!-- /page* -->
<?php if (!$property_notes_add->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $property_notes_add->OffsetColumnClass ?>"><!-- buttons offset -->
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?php echo $Language->phrase("AddBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?php echo $property_notes_add->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
</form>
<?php
$property_notes_add->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function() {

	// Startup script
	// Write your table-specific startup script here
	// console.log("page loaded");

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

Hry