if ($dea_status == 'Available') { $status_attributes = array('style' => 'width:300px', 'onChange' => 'controlUnderOffer(this,\'dea_status\',\'' . $dea_status . '\');'); } else { $status_attributes = array('style' => 'width:300px'); } // reset status attributes for LETTINGS if ($_SESSION["auth"]["default_scope"] == 'Lettings') { $status_attributes = array('style' => 'width:300px'); } $formData4 = array('dea_status' => array('type' => 'select', 'label' => 'Status', 'value' => $dea_status, 'options' => $statuses, 'attributes' => $status_attributes), 'dea_notes_sot' => array('type' => 'textarea', 'label' => 'Add Status Note', 'attributes' => array('class' => 'noteInput', 'viewform' => 3))); } // viewing arrangements $formData5 = array('dea_key' => array('type' => 'text', 'label' => 'Key Number', 'value' => $dea_key, 'attributes' => array('class' => 'wide')), 'dea_notes_arr' => array('type' => 'textarea', 'label' => 'Add Viewing Info', 'attributes' => array('class' => 'noteInput'))); if (!$_GET["action"]) { $form = new Form(); $form->addForm("", "GET", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "stage", "", "1"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "pro_id", "", $pro_id); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml('<h1>' . $pro_addr . ' (' . $dea_type . ')</h1>'); $formName = 'form1'; $form->addHtml("<fieldset>\n"); $form->addLegend('Summary', array('style' => 'cursor:pointer', 'onClick' => 'javascript:showHide(\'' . $formName . '\');')); $form->addHtml('<div id="' . $formName . '" style="display:none">'); $form->addHtml($form->addHtml($summary_table)); //$form->addHtml($form->addDiv($form->makeField("textarea",$formName,"General Notes","",array('class'=>'noteInput')))); $form->addHtml($form->addRow('textarea', 'dea_notes', 'Add General Note', '', array('class' => 'noteInput'), '', '')); $form->addHtml(renderNotes('deal_general', $dea_id, array('viewform' => '1', 'label' => 'General Notes')));
$sql = "SELECT * FROM ctype"; $q = $db->query($sql); if (DB::isError($q)) { die("db error: " . $q->getMessage()); } while ($row = $q->fetchRow()) { $ctype[$row["cty_id"]] = $row["cty_title"]; } $form1 = array('com_title' => array('type' => 'text', 'label' => 'Company Name', 'value' => $com_title, 'required' => 2, 'attributes' => array('style' => 'width:320px')), 'com_type' => array('type' => 'select', 'label' => 'Business Type', 'value' => $com_type, 'required' => 2, 'attributes' => array('style' => 'width:320px'), 'options' => $ctype), 'con_tel' => array('type' => 'tel', 'label' => 'Telephone', 'value' => $telephone), 'con_email' => array('type' => 'text', 'label' => 'Email', 'value' => $con_email, 'required' => 3, 'attributes' => array('style' => 'width:320px', 'maxlength' => 255), 'tooltip' => 'Must be a valid email address'), 'con_web' => array('type' => 'text', 'label' => 'Website', 'value' => $con_web, 'init' => 'http://', 'required' => 1, 'attributes' => array('style' => 'width:320px', 'maxlength' => 255))); // address, this is only used for manual input resulting from ajax input (validation only) $form2 = array('pro_addr1' => array('type' => 'text', 'label' => 'House Number', 'value' => $pro_addr1, 'required' => 2, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'pro_addr2' => array('type' => 'text', 'label' => 'Building Name', 'value' => $pro_addr2, 'required' => 1, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'pro_addr3' => array('type' => 'text', 'label' => 'Street', 'value' => $pro_addr3, 'required' => 2, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'pro_addr4' => array('type' => 'text', 'label' => 'Town or Area', 'value' => $pro_addr4, 'required' => 3, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'pro_addr5' => array('type' => 'text', 'label' => 'City or County', 'value' => $pro_addr5, 'required' => 2, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'pro_postcode' => array('type' => 'text', 'label' => 'Postcode', 'value' => $pro_postcode, 'required' => 2, 'attributes' => array('class' => 'pc', 'maxlength' => 9), 'function' => 'format_postcode')); // form is not submitted, show the form if (!$_POST["action"]) { // start new form object $form = new Form(); $form->addForm("testForm", "post", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "con_id", "", $con_id); $form->addField("hidden", "searchLink", "", $searchLink); //$form->addHtml('<input type="hidden" name="action" value="update">'); $form->addHtml('<h1>' . $con_fname . ' ' . $con_sname . '</h1>'); ///////////////////////////////////////////////////////////////////////////////// $formName = 'form1'; $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header"><u>C</u>ontact</div>'); $form->addHtml('<div id="' . $formName . '">'); $form->addData(${$formName}, $_POST); $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')))); $form->addHtml("</div>\n"); $form->addHtml("</fieldset>\n");
$form->addField("hidden", "dea_id", "", $_GET["dea_id"]); // app_id is used when arranging a viewing, adding more clients to the viewing (optional) $form->addField("hidden", "app_id", "", $_GET["app_id"]); $form->addField("hidden", "searchLink", "", $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']); // carry is for carrying return link through (e.g. when adding vendor to deal, we still want to retain the searchLink) $form->addField("hidden", "carry", "", $_GET["carry"]); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Select Client</div>'); $form->addHtml($form->addLabel('cli_id', 'Existing Clients', $form->makeField("select", "cli_id", "", "", array('size' => '6', 'style' => 'width:400px;', 'onDblClick' => 'document.forms[0].submit();'), $options))); $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Use Selected Client", array('class' => 'submit')))); #$form->addHtml($form->addDiv($form->makeField("button","","","Create New Client",array('class'=>'submit','onClick'=>'location.href=\''.$goto_notfound.'?'.http_build_query($terms).'&dest='.$_GET["dest"].'\';')))); $form->addHtml("</fieldset>\n"); $form->addHtml("</div>\n"); } $form2 = new Form(); $form2->addForm("form", "post", $PHP_SELF); $form2->addHtml("<div id=\"standard_form\">\n"); $form2->addField("hidden", "stage", "", "2"); $form2->addField("hidden", "action", "", "new_client"); $form2->addField("hidden", "dest", "", $_GET["dest"]); $form2->addField("hidden", "dea_id", "", $_GET["dea_id"]); $form2->addField("hidden", "app_id", "", $_GET["app_id"]); $form2->addField("hidden", "carry", "", $_GET["carry"]); $form2->addHtml("<fieldset>\n"); $form2->addLegend('New Client'); $form2->addData($formData1, $_GET); $form2->addRow('radio', 'p2c_type', 'Address Type', 'Home', '', db_enum("pro2cli", "p2c_type", "array")); if (!$_GET["pro_pro_id"]) { $form2->ajaxPostcode("by_freetext", "pro"); } else { $form2->addData($formData2, $_GET);
$sql_area = "SELECT * FROM country ORDER BY cou_title"; $q_area = $db->query($sql_area); while ($row_area = $q_area->fetchRow()) { $countries[$row_area["cou_id"]] = $row_area["cou_title"]; } // all are readonly except area for paf addresses if ($pro_pcid == '-1') { $attributes = array('class' => 'wide'); } else { $attributes = array('class' => 'wide', 'readonly' => 'readonly'); $info = '<p class="appInfo">This is a Royal Mail address, all you can edit is the Area</p>'; } $formData1 = array('pro_addr1' => array('type' => 'text', 'label' => 'House/Flat Number', 'value' => $pro_addr1, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_street'), 'pro_addr2' => array('type' => 'text', 'label' => 'Building Name', 'value' => $pro_addr2, 'attributes' => $attributes, 'function' => 'format_street'), 'pro_addr3' => array('type' => 'text', 'label' => 'Street', 'value' => $pro_addr3, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_street'), 'pro_area' => array('type' => 'select', 'label' => 'Area', 'value' => $pro_area, 'attributes' => array('class' => 'wide'), 'options' => $areas), 'pro_addr5' => array('type' => 'text', 'label' => 'City or County', 'value' => $pro_addr5, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_street'), 'pro_country' => array('type' => 'select', 'label' => 'Country', 'value' => $pro_country, 'attributes' => $attributes, 'options' => $countries), 'pro_postcode' => array('type' => 'text', 'label' => 'Postcode', 'value' => $pro_postcode, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_postcode'), 'pro_authority' => array('type' => 'text', 'label' => 'Local Authority', 'value' => $pro_authority, 'attributes' => $attributes), 'pro_east' => array('type' => 'text', 'label' => 'Easting', 'value' => $pro_east, 'attributes' => $attributes), 'pro_north' => array('type' => 'text', 'label' => 'Northing', 'value' => $pro_north, 'attributes' => $attributes), 'pro_latitude' => array('type' => 'text', 'label' => 'Latitude', 'value' => $pro_latitude, 'attributes' => $attributes), 'pro_longitude' => array('type' => 'text', 'label' => 'Longitude', 'value' => $pro_longitude, 'attributes' => $attributes)); if (!$_GET["action"]) { $form = new Form(); $form->addForm("app_form", "GET", $PHP_SELF); $form->addHtml("<div id=\"standard_form\" style=\"width:700px; float:left\">\n"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "pro_id", "", $pro_id); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Edit Address</div>'); $form->addHtml($info); //$form->addHtml($form->addRow("radio","saveas","Action","Save",array(),array('Save'=>'Save','Add as New'=>'Add as New'))); $form->addData($formData1, $_GET); //if ($pro_pcid == '-1') { $form->addHtml($form->addDiv($form->makeField("submit", "submit", "", "Save Changes", array('class' => 'submit')))); // } $form->addHtml("</fieldset>\n"); $form->addHtml("</div>\n"); $form->addHtml('<div style="padding-top: 30px;"><div id="map" style="width:500px; height:435px;"></div></div>
if ($are_title) { $default_area = $are_title; } if ($matched_areas) { $formDataArea = array('pro_area' => array('type' => 'radio', 'label' => 'Area', 'value' => $default_area, 'options' => $matched_areas), 'pro_areanew' => array('type' => 'button', 'label' => 'New Area', 'value' => 'New Area', 'attributes' => array('class' => 'button', 'onClick' => 'javascript:addArea(\'' . $pc1 . '\',\'' . urlencode($_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']) . '\')'))); } else { $formDataArea = array('pro_areanew' => array('type' => 'button', 'label' => 'New Area', 'value' => 'New Area', 'attributes' => array('class' => 'button', 'onClick' => 'javascript:addArea(\'' . $pc1 . '\',\'' . urlencode($_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']) . '\')'))); } # build data arrays for property particulars $formData = array('dea_ptype' => array('type' => 'select_multi', 'label' => 'Property Type', 'required' => 2, 'options' => array('dd1' => $ptype['dd1'], 'dd2' => $ptype['dd2'])), 'dea_bedroom' => array('type' => 'select_number', 'label' => 'Bedrooms', 'value' => $dea_bedroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_reception' => array('type' => 'select_number', 'label' => 'Receptions', 'value' => $dea_reception, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_bathroom' => array('type' => 'select_number', 'label' => 'Bathrooms', 'value' => $dea_bathroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_floor' => array('type' => 'select', 'label' => 'Floor', 'value' => $dea_floor, 'options' => join_arrays(array(array('blank' => ''), db_enum("deal", "dea_floor", "array"))), 'attributes' => array('class' => 'medium')), 'dea_floors' => array('type' => 'select_number', 'label' => 'Floors', 'options' => array('blank' => '', 'min' => '1'), 'value' => $dea_floors, 'attributes' => array('class' => 'narrow'))); // remove area from the equation #$formData = join_arrays(array($formDataArea,$formData)); if (!$_GET["action"]) { // start new form object $form = new Form(); $form->addForm("form", "get", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "stage", "", "particulars"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "cli_id", "", $cli_id); $form->addField("hidden", "pro_id", "", $pro_id); $form->addField("hidden", "dea_id", "", $dea_id); $form->addHtml("<fieldset>\n"); $form->addLegend('Property Particulars'); $form->addData($formDataArea, $_GET); $form->addData($formData, $_GET); $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit')))); $form->addHtml("</fieldset>\n"); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $searchLink), 'search' => array('title' => 'Property Search', 'label' => 'Property Search', 'link' => 'property_search.php')); $navbar = navbar2($navbar_array); $page->setTitle("New Instruction");
} $formData1 = array('dir_category' => array('type' => 'select', 'label' => 'Category', 'value' => $dir_category, 'required' => 2, 'options' => display_tree_select(1, $dir_category, "data"), 'attributes' => array('style' => 'width:320px')), 'dir_title' => array('type' => 'text', 'label' => 'Business Name', 'value' => $dir_title, 'required' => 2, 'attributes' => array('style' => 'width:320px')), 'dir_name' => array('type' => 'text', 'label' => 'Contact Name', 'value' => $dir_name, 'required' => 1, 'attributes' => array('style' => 'width:320px'), 'function' => 'format_name'), 'dir_tel' => array('type' => 'text', 'label' => 'Telephone', 'value' => $dir_tel, 'required' => 1, 'attributes' => array('style' => 'width:164px', 'maxlength' => 30)), 'dir_fax' => array('type' => 'text', 'label' => 'Fax', 'value' => $dir_fax, 'required' => 1, 'attributes' => array('style' => 'width:164px', 'maxlength' => 30)), 'dir_email' => array('type' => 'text', 'label' => 'Email', 'value' => $dir_email, 'required' => 1, 'attributes' => array('style' => 'width:320px', 'maxlength' => 255)), 'dir_web' => array('type' => 'text', 'label' => 'Website', 'value' => $dir_web, 'init' => 'http://', 'required' => 1, 'attributes' => array('style' => 'width:320px', 'maxlength' => 255)), 'dir_blurb' => array('type' => 'textarea', 'label' => 'Description', 'value' => $dir_blurb, 'required' => 1, 'attributes' => array('style' => 'width:320px;height:80px'))); // make fields read only if address comes from paf if ($pro_pcid == '-1') { $attribute_array = array('class' => 'addr'); $attribute_array_pc = array('class' => 'pc', 'maxlength' => 9); } else { $attribute_array = array('class' => 'addr', 'readonly' => 'readonly'); $attribute_array_pc = array('class' => 'pc', 'maxlength' => 9, 'readonly' => 'readonly'); } $formData2 = array('pro_pcid' => array('type' => 'hidden', 'value' => $pro_pcid), 'pro_addr1' => array('type' => 'text', 'label' => 'House Number', 'value' => $pro_addr1, 'required' => 2, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr2' => array('type' => 'text', 'label' => 'Building Name', 'value' => $pro_addr2, 'required' => 1, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr3' => array('type' => 'text', 'label' => 'Street', 'value' => $pro_addr3, 'required' => 2, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr4' => array('type' => 'text', 'label' => 'Town or Area', 'value' => $pro_addr4, 'required' => 3, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr5' => array('type' => 'text', 'label' => 'City or County', 'value' => $pro_addr5, 'required' => 2, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_postcode' => array('type' => 'text', 'label' => 'Postcode', 'value' => $pro_postcode, 'required' => 2, 'attributes' => $attribute_array_pc, 'function' => 'format_postcode', 'group' => 'Postcode'), 'pro_postcode_change' => array('type' => 'button', 'label' => 'Postcode', 'value' => 'Change Address', 'group' => 'Postcode', 'attributes' => array('class' => 'button', 'onClick' => 'javascript:resetDirectoryAddress(' . $dir_id . ');'), 'last_in_group' => 1)); // form is not submitted, show the form if (!$_POST["action"]) { // start new form object $form = new Form(); $form->addForm("form", "post", $PHP_SELF, "multipart/form-data"); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "dir_id", "", $dir_id); $form->addField("hidden", "pro_id", "", $pro_id); ///////////////////////////////////////////////////////////////////////////////// $form->addHtml("<fieldset>\n"); $form->addLegend('Edit Entry'); $form->addData($formData1, $_POST); $form->addHtml("</fieldset>\n"); ///////////////////////////////////////////////////////////////////////////////// $form->addHtml("<fieldset>\n"); $form->addLegend('Address'); if (!$pro_pcid) { $form->ajaxPostcode("by_freetext", "pro"); } else {
} $numRows = $q->numRows(); if ($numRows !== 0) { while ($row = $q->fetchRow()) { foreach ($row as $key => $val) { ${$key} = $val; } } } $formData1 = array('cli_salemin' => array('type' => 'select_price', 'value' => $cli_salemin, 'label' => 'Minimum Price', 'group' => 'Price Range', 'required' => 2, 'options' => array('scope' => 'sales', 'default' => 'Minimum'), 'attributes' => array('style' => 'width:120px')), 'cli_salemax' => array('type' => 'select_price', 'value' => $cli_salemax, 'label' => 'Maximum Price', 'group' => 'Price Range', 'last_in_group' => 1, 'required' => 2, 'options' => array('scope' => 'sales', 'default' => 'Maximum'), 'attributes' => array('style' => 'width:120px')), 'cli_salebed' => array('type' => 'select_number', 'value' => $cli_salebed, 'label' => 'Minimum Beds', 'required' => 2), 'cli_saleemail' => array('type' => 'radio', 'value' => $cli_saleemail, 'label' => 'Email Updates', 'required' => 2, 'options' => db_enum("client", "cli_saleemail", "array"))); $ptype_sale = ptype("sale", explode("|", $cli_saleptype)); $formData2 = array('cli_letmin' => array('type' => 'select_price', 'value' => $cli_letmin, 'label' => 'Minimum Price', 'group' => 'Price Range', 'required' => 2, 'options' => array('scope' => 'lettings', 'default' => 'Minimum'), 'attributes' => array('style' => 'width:120px')), 'cli_letmax' => array('type' => 'select_price', 'value' => $cli_letmax, 'label' => 'Maximum Price', 'group' => 'Price Range', 'last_in_group' => 1, 'required' => 2, 'options' => array('scope' => 'lettings', 'default' => 'Maximum'), 'attributes' => array('style' => 'width:120px')), 'cli_letbed' => array('type' => 'select_number', 'value' => $cli_letbed, 'label' => 'Minimum Beds', 'required' => 2), 'cli_letemail' => array('type' => 'radio', 'value' => $cli_letemail, 'label' => 'Email Updates', 'required' => 2, 'options' => db_enum("client", "cli_letemail", "array"))); $ptype_let = ptype("let", explode("|", $cli_letptype)); $form = new Form(); $form->addHtml("<div id=\"standard_form\">\n"); $form->addForm("", "get"); $form->addField("hidden", "stage", "", "requirements"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "cli_id", "", $cli_id); $form->addField("hidden", "app_id", "", $_GET["app_id"]); $form->addField("hidden", "searchLink", "", $searchLink); $form->addHtml("<fieldset>\n"); $form->addLegend('Sales Requirements'); $form->addHtml($form->addLabel('cli_saleptype', 'Houses', $ptype_sale['house'], 'javascript:checkAll(document.forms[0], \'sale1\');')); $form->addHtml($form->addLabel('cli_saleptype', 'Apartments', $ptype_sale['apartment'], 'javascript:checkAll(document.forms[0], \'sale2\');')); $form->addHtml($form->addLabel('cli_saleptype', 'Others', $ptype_sale['other'], 'javascript:checkAll(document.forms[0], \'sale3\');')); $form->addData($formData1, $_GET); $form->addHtml($form->addDiv($form->makeField("submit", "submit", "", "Save Changes", array('class' => 'submit')))); $form->addHtml("</fieldset>\n"); $form->addHtml("<fieldset>\n"); $form->addLegend('Lettings Requirements');
echo "You cannot cancel appointments that have expired"; exit; } } /* if ($app["type"] == "Lunch" || $app["type"] == "Note" || $app["type"] == "Meeting") { $db_data["app_status"] = 'Cancelled'; db_query($db_data,"UPDATE","appointment","app_id",$app["id"]); header("Location:calendar.php?branch=".$app["branch"]."&y=$y&m=$m&d=$d"); exit; } */ $formData1 = array('notes' => array('type' => 'textarea', 'label' => 'Reason for Cancelling', 'value' => '', 'attributes' => array('class' => 'noteInput'))); $form = new Form(); $form->addForm("app_form", "POST", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "app_id", "", $app_id); $form->addField("hidden", "searchLink", "", urlencode($return)); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Cancel ' . $app["type"] . '</div>'); $form->addHtml('<p class="appInfo">Please remember to inform all vendors/landlords and/or viewers that this appointment has been cancelled</p>'); $form->addData($formData1, $_POST); $form->addHtml(renderNotes('appointment_cancel', $app_id, array('label' => 'Cancellation Notes'))); $buttons = $form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')); $form->addHtml($form->addDiv($buttons)); $form->addHtml("</fieldset>\n"); $form->addHtml('</div>'); if (!$_POST["action"]) { /*
} /* //Results from methods: echo 'getCurrentPageID()...: '; var_dump($pager->getCurrentPageID()); echo 'getNextPageID()......: '; var_dump($pager->getNextPageID()); echo 'getPreviousPageID()..: '; var_dump($pager->getPreviousPageID()); echo 'numItems()...........: '; var_dump($pager->numItems()); echo 'numPages()...........: '; var_dump($pager->numPages()); echo 'isFirstPage()........: '; var_dump($pager->isFirstPage()); echo 'isLastPage().........: '; var_dump($pager->isLastPage()); echo 'isLastPageComplete().: '; var_dump($pager->isLastPageComplete()); echo '$pager->range........: '; var_dump($pager->range); */ $form = new Form(); $form->addHtml("<div id=\"standard_form\">\n"); $form->addForm("", "get", "client_contact.php"); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Search Results</div>'); $form->addHtml('<div id="results_table">'); $form->addHtml($header); $form->addHtml($results); $form->addHtml($header); $form->addHtml('</div>'); $form->addHtml("</fieldset>\n"); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $returnLink), 'search' => array('title' => 'Client Search', 'label' => 'Client Search', 'link' => 'client_search.php')); $navbar = navbar2($navbar_array); $page->setTitle("Client > Search Results"); $page->addStyleSheet(getDefaultCss()); $page->addScript('js/global.js'); $page->addScript('js/jquery.js'); $page->addBodyContent($header_and_menu);
$results .= $output; } $results .= '</table> '; } else { // no results $results = ' <table cellpadding="5"> <tr> <td>Your search returned no matches, please <strong><a href="' . urldecode($returnLink) . '">try again</a></strong></td> </tr> </table>'; } $form = new Form(); $form->addHtml("<div id=\"standard_form\">\n"); $form->addForm("", "get", $_SERVER['PHP_SELF']); $form->addField("hidden", "searchLink", "", $searchLink); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Users</div>'); $form->addHtml('<div id="results_table">'); $form->addHtml($header); $form->addHtml($results); $form->addHtml($footer); $form->addHtml('</div>'); $form->addHtml("</fieldset>\n"); $form->addHtml('</div>'); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $returnLink), 'print' => array('title' => 'Print', 'label' => 'Print', 'link' => 'javascript:windowPrint();')); $navbar = navbar2($navbar_array); $page->setTitle('Users'); $page->addStyleSheet(getDefaultCss()); $page->addScript('js/global.js');
$form = new Form(); $form->addForm("form1", "get", $PHP_SELF); $form->addField("hidden", "pro_id", "", $_GET["pro_id"]); // adding hidden fields for deal, pro2cli, pro2con, pro2com $form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "cli_id", "", $cli_id); $form->addField("hidden", "pro2con", "", $pro2con); $form->addField("hidden", "pro2com", "", $pro2com); $form->addHtml("<div id=\"standard_form\">\n"); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Postcode Lookup</div>'); $form->ajaxPostcode("by_freetext", "pro"); $form->addHtml("</fieldset>\n"); $form->addHtml("</div>\n"); $form2 = new Form(); $form2->addForm("form2", "get", $PHP_SELF); $form2->addField("hidden", "pro_id", "", $_GET["pro_id"]); $form2->addHtml("<div id=\"standard_form\">\n"); $form2->addHtml("<fieldset>\n"); $form2->addLegend('Postcode Lookup'); $form2->ajaxPostcode("by_postcode", "pro"); $form2->addHtml("</fieldset>\n"); $form2->addHtml("</div>\n"); if (!$_GET["stage"]) { /* $render = ' <form method="get"> <select name="lookup_type"> <tr><td><a href="?stage=2&search_string="></a></td></tr> <tr><td><a href="?stage=2&search_string=browse">browse</a></td></tr> <tr><td><a href="?stage=2&search_string=by_freetext">by_freetext</a></td></tr>
} } $image_path_property = IMAGE_PATH_PROPERTY . $dea_id . "/"; $image_url_property = IMAGE_URL_PROPERTY . $dea_id . "/"; if ($med_type == "Photograph") { // which tab to show on return to production page $viewForm = 3; $formData = array('med_title' => array('type' => 'select', 'label' => 'Title', 'value' => $med_title, 'required' => 2, 'attributes' => array('style' => 'width:320px'), 'options' => $photograph_titles), 'med_blurb' => array('type' => 'textarea', 'label' => 'Description', 'value' => $med_blurb, 'attributes' => array('style' => 'width:320px'))); } elseif ($med_type == "Floorplan") { // which tab to show on return to production page $viewForm = 4; $formData = array('med_title' => array('type' => 'select', 'label' => 'Title', 'value' => $med_title, 'required' => 2, 'attributes' => array('style' => 'width:320px'), 'options' => $floorplan_titles), 'med_dims' => array('type' => 'text', 'label' => 'Area', 'value' => $med_dims, 'required' => 1, 'attributes' => array('style' => 'width:120px'), 'group' => 'Area'), 'med_measurement' => array('type' => 'radio', 'label' => 'Area', 'default' => 'mtr²', 'required' => 1, 'options' => array('mtr²' => 'metres', 'ft²' => 'feet'), 'group' => 'Area', 'last_in_group' => 1)); } if (!$_POST["action"]) { $form = new Form(); $form->addForm("", "POST", $PHP_SELF, "multipart/form-data"); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "stage", "", "1"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "med_id", "", $med_id); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml("<fieldset>\n"); //$form->addLegend('Edit '.$med_title); $form->addHtml('<div class="block-header">Edit ' . $med_title . '</div>'); $form->addData($formData, $_POST); $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit')))); if ($med_type == "Photograph") { foreach ($thumbnail_sizes as $dims => $ext) { $dim = explode('x', $dims); $width = $dim[0];
</table> </div> '; } } else { // no results $results = ' <table cellpadding="5"> <tr> <td>Your search returned no matches, please <strong><a href="' . urldecode($returnLink) . '">try again</a></strong></td> </tr> </table>'; } $form = new Form(); $form->addHtml("<div id=\"standard_form\">\n"); $form->addForm("", "get", $formAction); $form->addField("hidden", "stage", "", "appointment"); $form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "dest", "", $_GET["dest"]); $form->addField("hidden", "app_id", "", $_GET["app_id"]); $form->addField("hidden", "app_subtype", "", $_GET["app_subtype"]); $form->addField("hidden", "searchLink", "", $searchLink); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Contacts</div>'); $form->addHtml('<div id="results_table">'); $form->addHtml($header); $form->addHtml($results); $form->addHtml($footer); $form->addHtml('</div>'); $form->addHtml("</fieldset>\n"); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $returnLink), 'search' => array('title' => 'Contact Search', 'label' => 'Contact Search', 'link' => 'contact.php'));
'; /* //Results from methods: echo 'getCurrentPageID()...: '; var_dump($pager->getCurrentPageID()); echo 'getNextPageID()......: '; var_dump($pager->getNextPageID()); echo 'getPreviousPageID()..: '; var_dump($pager->getPreviousPageID()); echo 'numItems()...........: '; var_dump($pager->numItems()); echo 'numPages()...........: '; var_dump($pager->numPages()); echo 'isFirstPage()........: '; var_dump($pager->isFirstPage()); echo 'isLastPage().........: '; var_dump($pager->isLastPage()); echo 'isLastPageComplete().: '; var_dump($pager->isLastPageComplete()); echo '$pager->range........: '; var_dump($pager->range); */ $form = new Form(); $form->addHtml("<div id=\"standard_form\">\n"); $form->addForm("", "get", "property_edit.php"); $form->addHtml("<fieldset>\n"); $form->addLegend('Search Results'); $form->addHtml('<div id="results_table">'); $form->addHtml($header); $form->addHtml($results); #$form->addHtml($footer); $form->addHtml('</div>'); $form->addHtml("</fieldset>\n"); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $returnLink), 'search' => array('title' => 'Property Search', 'label' => 'Property Search', 'link' => 'property_search.php')); $navbar = navbar2($navbar_array); $page = new HTML_Page2($page_defaults); $page->setTitle("Directory List"); $page->addStyleSheet(GLOBAL_URL . 'css/styles.css'); $page->addScript(GLOBAL_URL . 'js/global.js'); $page->addBodyContent('<div id="content_wide">');
$q = $db->query($sql); if (DB::isError($q)) { die("db error: " . $q->getMessage()); } while ($row = $q->fetchRow()) { foreach ($row as $key => $val) { ${$key} = $val; if ($key != 'dea_id') { $db_data[$key] = $val; } } } $formData = array('copy_to' => array('type' => 'radio', 'label' => 'Copy to', 'required' => 2, 'value' => $dea_type, 'options' => array('Sales' => 'Sales', 'Lettings' => 'Lettings')), 'copy_number' => array('type' => 'select', 'label' => 'Number of copies', 'required' => 1, 'options' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10))); if (!$_POST["action"]) { $form = new Form(); $form->addForm("", "POST", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "copy"); $form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Copy</div>'); $form->addHtml('<p class="appInfo">The status of these copies will be set to Production</p>'); $form->addData($formData, $_POST); $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')))); $form->addHtml("</fieldset>\n"); $page = new HTML_Page2($page_defaults); $page->setTitle("Copy"); $page->addStyleSheet(getDefaultCss()); $page->addScript('js/global.js'); $page->addBodyContent($header_and_menu);