$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"); ///////////////////////////////////////////////////////////////////////////////// $formName = 'form2'; $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header"><u>A</u>ddress</div>'); $form->addHtml('<div id="' . $formName . '">'); // show old address from import if ($con_oldaddr && !$render_addresses) { $form->addHtml($form->addRow('textarea', 'con_oldaddr', 'Old Address', $con_oldaddr, array('style' => 'width:400px', 'readonly' => 'readonly'), '', 'Please re-enter this address into the form below')); } // add address table $form->addHtml($render_addresses); // add new address $form->addRow('radio', 'p2c_type', 'Type', 'Home', '', db_enum("pro2con", "p2c_type", "array")); $form->ajaxPostcode("by_freetext", "pro"); $form->addHtml("</div>\n"); $form->addHtml("</fieldset>\n"); $onLoad .= 'showForm(' . $viewForm . ');self.focus; '; // start a new page $page = new HTML_Page2($page_defaults); $additional_js = ' if (!previousID) { var previousID = "form' . $viewForm . '"; }
$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); $form2->addHtml($form2->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit')))); } $form2->addHtml("</fieldset>\n"); $form2->addHtml("</div>\n"); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $return), 'search' => array('title' => 'Client Search', 'label' => 'Client Search', 'link' => 'client_search.php')); $navbar = navbar2($navbar_array); $additional_js = ' function validateForm() { if (document.forms.existing_clients_form.cli_id.value == "") { alert(\'You must select a client from the list\'); return false;
$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'))); $buttons = $form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')); if (in_array('Production', $_SESSION["auth"]["roles"]) || in_array('Editor', $_SESSION["auth"]["roles"])) { $buttons .= $form->makeField("button", $formName, "", "Production", array('class' => 'button', 'onClick' => 'javascript:location.href=\'deal_production.php?dea_id=' . $dea_id . '&searchLink=' . $_SERVER['SCRIPT_NAME'] . urlencode('?' . $_SERVER['QUERY_STRING']) . '\'')); $buttons .= $form->makeField("button", $formName, "", "Delete", array('class' => 'button', 'onClick' => 'javascript:location.href=\'?do=archive&dea_id=' . $dea_id . '&return=' . urlencode('?' . $_SERVER['QUERY_STRING']) . '\'')); } $form->addHtml($buttons); $form->addHtml('</div>'); $form->addHtml("</fieldset>\n"); $formName = 'form2'; $form->addHtml("<fieldset>\n"); $form->addLegend($owner . 's & Tenants', array('style' => 'cursor:pointer', 'onClick' => 'javascript:showHide(\'' . $formName . '\');')); $form->addHtml('<div id="' . $formName . '" style="display:none">'); $form->addHtml($form->addHtml($vendor_table)); $form->addHtml($form->addHtml($tenant_table));
'; $formData1 = array('bug_type' => array('type' => 'radio', 'label' => 'Type', 'value' => $bug_type, 'options' => db_enum("bug", "bug_type", "array"), 'default' => 'Bug Report'), 'bug_blurb' => array('type' => 'textarea', 'label' => 'Description', 'value' => $bug_blurb, 'required' => 1, 'attributes' => array('style' => 'width:400px;height:80px')), 'bug_response' => array('type' => 'textarea', 'label' => 'Response', 'value' => $bug_response, 'required' => 1, 'attributes' => array('style' => 'width:400px;height:80px')), 'bug_priority' => array('type' => 'radio', 'label' => 'Priority', 'value' => $bug_priority, 'options' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5)), 'bug_status' => array('type' => 'radio', 'label' => 'Status', 'value' => $bug_status, 'options' => db_enum("bug", "bug_status", "array"))); if (!$_GET["action"]) { $form = new Form(); $form->addForm("", "GET", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "save"); $form->addField("hidden", "bug_id", "", $bug_id); $formName = 'form1'; $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Assistance</div>'); $form->addHtml('<div id="' . $formName . '">'); $form->addHtml($infotable); $form->addData($formData1, $_GET); $form->addRow("radio", "send", "Send", "No", array(), array('Yes' => 'Yes', 'No' => 'No')); $buttons = $form->makeField("submit", "", "", "Submit", array('class' => 'submit')); $buttons .= $form->makeField("button", "", "", "Cancel", array('class' => 'button', 'onClick' => 'javascript:history.back(1);')); $form->addHtml($form->addDiv($buttons)); $form->addHtml("</div>\n"); $form->addHtml("</fieldset>\n"); // start a new page $page = new HTML_Page2($page_defaults); $page->setTitle("Assistance"); $page->addStyleSheet(getDefaultCss()); $page->addScript('js/global.js'); $page->addBodyContent($header_and_menu); $page->addBodyContent('<div id="content">'); $page->addBodyContent($form->renderForm()); $page->addBodyContent('</div>'); $page->display();
} if (!$_GET["action"]) { $form = new Form(); $form->addForm("", "GET", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "stage", "", "client_address"); $form->addField("hidden", "action", "", "advanced_search"); $form->addField("hidden", "cli_id", "", $cli_id); $form->addField("hidden", "app_id", "", $_GET["app_id"]); $form->addField("hidden", "carry", "", $_GET["return"]); $form->addField("hidden", "date", "", $_GET["date"]); $form->addHtml("<fieldset>\n"); $form->addLegend('Client\'s Address'); if ($cli_oldaddr) { $form->addHtml('<p class="appInfo">You have chosen an existing client, but their address needs checking. Please re-enter this address in the form below</p>'); $form->addHtml($form->addRow('textarea', 'cli_oldaddr', 'Old Address', $cli_oldaddr, array('style' => 'width:400px', 'readonly' => 'readonly'), '', '')); } else { $form->addHtml('<p class="appInfo">You have chosen an existing client, but we do not have their address</p>'); } $form->addRow('radio', 'p2c_type', 'Address Type', 'Home', '', db_enum("pro2cli", "p2c_type", "array")); if (!$_GET["pro_pro_id"]) { $form->ajaxPostcode("by_freetext", "pro"); } else { $form->addData($formData, $_GET); $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit')))); } $form->addHtml($form->addDiv($form->makeField("button", "", "", "Skip if Address Unknown", array('onClick' => 'document.location.href = \'?' . $_SERVER['QUERY_STRING'] . '&stage=viewing_address&skip=skip\'', 'class' => 'submit')))); $form->addHtml("</fieldset>\n"); $form->addHtml("</div>\n"); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => urldecode($searchLink)), 'search' => array('title' => 'Property Search', 'label' => 'Property Search', 'link' => 'property_search.php')); $navbar = navbar2($navbar_array);
//$form->addHtml($form->addDiv($form->makeField("submit",$formName,"","Save Changes",array('class'=>'submit')))); $buttons = $form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')); //$buttons .= $form->makeField("button",$formName,"","Contact Log",array('class'=>'button','onClick'=>'javascript:contactLog('.$cli_id.')')); $buttons .= '<a href="clientContactLog.php?modal=false&cli_id=' . $cli_id . '&height=450&width=650" title="Client Contact Log" class="thickbox">Contact Log</a>'; $form->addHtml($form->addDiv($buttons)); $form->addHtml("</div>\n"); $form->addHtml("</fieldset>\n"); ///////////////////////////////////////////////////////////////////////////////// $formName = 'form2'; $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Address</div>'); $form->addHtml('<div id="' . $formName . '" style="">'); // show old address from import if ($cli_oldaddr && !$render_addresses) { $form->addHtml('<p class="appInfo">Please re-enter this address into the form below</p>'); $form->addHtml($form->addRow('textarea', 'cli_oldaddr', 'Old Address', $cli_oldaddr, array('style' => 'width:400px', 'readonly' => 'readonly'), '', '')); } // add address table $form->addHtml($render_addresses); // add new address // $form->addRow('radio', 'p2c_type', 'Type', 'Home', '', db_enum("pro2cli", "p2c_type", "array")); // $form->ajaxPostcode("by_freetext", "pro"); $form->addHtml("</div>\n"); $form->addHtml("</fieldset>\n"); ///////////////////////////////////////////////////////////////////////////////// if ($deal_table) { $formName = 'form3'; $form->addHtml("<fieldset>\n"); // $form->addLegend('Deals (' . $numDeals . ')', array( // 'style' => 'cursor:pointer', // 'onClick' => 'javascript:showHide(\'' . $formName . '\');'
' . $use_name); #echo "<pre>".$offer_text."</pre>"; #exit; if (!$_GET["action"]) { $form = new Form(); $form->addForm("", "GET", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "stage", "", "2"); $form->addField("hidden", "off_id", "", $off_id); $form->addField("hidden", "return", "", $_GET["return"]); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Submit Offer</div>'); #$form->addHtml($form->addHtml($deal_table)); #$form->addData($formData1,$_GET); $form->addRow("textarea", "send", "Letter to Vendor", $offer_text, array('style' => 'width:450px;height:450px')); $form->addRow("checkbox", "send", "Send By", array("Post", "Email"), array(), array('Post' => 'Post', 'Email' => 'Email')); $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Send and Save", array('class' => 'submit')))); $form->addHtml("</fieldset>\n"); $form->addHtml("</div>\n"); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $_GET["return"]), 'search' => array('title' => 'Property Search', 'label' => 'Property Search', 'link' => 'property_search.php')); $navbar = navbar2($navbar_array); $page->setTitle("Submit Offer"); $page->addStyleSheet(getDefaultCss()); $page->addScript('js/global.js'); #$page->addScriptDeclaration($additional_js); #$page->setBodyAttributes(array('onLoad'=>$onLoad)); $page->addBodyContent($header_and_menu); $page->addBodyContent('<div id="content">'); $page->addBodyContent($navbar); $page->addBodyContent($form->renderForm());
$form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">User</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"); ///////////////////////////////////////////////////////////////////////////////// $formName = 'form2'; $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Address</div>'); $form->addHtml('<div id="' . $formName . '">'); // add address table $form->addHtml($render_addresses); // add new address $form->addRow('radio', 'p2u_type', 'Type', 'Home', '', db_enum("pro2use", "p2u_type", "array")); $form->ajaxPostcode("by_freetext", "pro"); $form->addHtml("</div>\n"); $form->addHtml("</fieldset>\n"); ///////////////////////////////////////////////////////////////////////////////// $onLoad .= 'showForm(' . $viewForm . '); '; // start a new page $page = new HTML_Page2($page_defaults); $additional_js = ' if (!previousID) { var previousID = "form' . $viewForm . '"; } '; if ($_GET["msg"]) { $onLoad .= 'javascript:hideMsg();'; $msg = '
$form->run(); } elseif ($mode == 'edit') { $typeid = cleanvar($_REQUEST['typeid']); $sql = "SELECT typename FROM `{$dbSiteTypes}` WHERE typeid = {$typeid}"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_WARNING); } if (mysql_num_rows($result) > 0) { list($typename) = mysql_fetch_array($result); } $form = new Form("sitetypes", $strEdit, $dbSiteTypes, "update", $strEditSiteType); $form->setReturnURLFailure($_SERVER['PHP_SELF']); $form->setReturnURLSuccess($_SERVER['PHP_SELF']); $c1 = new Cell(); $c1->setIsHeader(TRUE); $c1->addComponent(new Label($strSiteType)); $c2 = new Cell(); $c2->addComponent(new SingleLineEntry("typename", 10, "typename", $typename)); $r = new Row(); $r->addComponent($c1); $r->addComponent($c2); $form->addRow($r); $hr = new HiddenRow(); $hr->addComponent(new HiddenEntry("mode", "", "edit")); $hr->addComponent(new HiddenEntry("typeid", "", $typeid)); $form->addRow($hr); $form->setKey("typeid", $typeid); $form->run(); } include APPLICATION_INCPATH . 'htmlfooter.inc.php';
$form = new Form(); $form->addForm("app_form", "GET", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "app_id", "", $app_id); $form->addField("hidden", "d2a_id", "", $d2a_id); $form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "cli_id", "", $cli_id); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Feedback</div>'); $form->addHtml($render); $form->addData($formData1, $_GET); $form->addHtml(renderNotes('feedback', $d2a_id)); if ($app_type == 'Viewing') { $form->addHtml($form->addRow('radio', 'makeoffer', 'Submit Offer?', 'No', '', array('Yes' => 'Yes', 'No' => 'No'))); } $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')))); $form->addHtml("</fieldset>\n"); $form->addHtml('</div>'); $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $_GET["searchLink"]), 'search' => array('title' => 'Appointment Search', 'label' => 'Appointment Search', 'link' => 'appointment_search.php')); $navbar = navbar2($navbar_array); $page = new HTML_Page2($page_defaults); $page->setTitle("Feedback"); $page->addStyleSheet(getDefaultCss()); $page->addScript('js/global.js'); $page->addScript('js/scriptaculous/prototype.js'); $page->addScript('js/scriptaculous/scriptaculous.js'); $page->addBodyContent($header_and_menu); $page->addBodyContent('<div id="content">'); $page->addBodyContent($navbar);
} elseif ($type == 'Lettings') { $sql = "SELECT cli_id, CONCAT(cli_fname,' ',cli_sname) AS cli_name, cli_email FROM client WHERE\n\tcli_status != 'Archived' AND cli_lettings = 'Yes' AND cli_letemail = 'Yes' AND cli_email != '' AND\n\t" . rtrim($sql_inner_lettings, " AND") . "\n\t"; } $count = $db->getOne($sql); if (!$_POST["action"]) { $form = new Form(); $form->addForm("", "POST", $PHP_SELF, "multipart/form-data"); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "send"); $form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Mailshot</div>'); $form->addHtml('<div id="' . $formName . '">'); $form->addHtml('<p class="appInfo">' . $count . ' matching clients found</p>'); $form->addHtml($form->addRow('select', 'mailshot_type', 'Type', '', '', $mailshot_types, '')); $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Send Now!", array('class' => 'submit')))); $form->addHtml('</div>'); $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 = new HTML_Page2($page_defaults); $page->setTitle("Mailshot"); $page->addStyleSheet(getDefaultCss()); $page->addScript('js/global.js'); $page->addBodyContent($header_and_menu); $page->addBodyContent('<div id="content">'); $page->addBodyContent($navbar); $page->addBodyContent($form->renderForm()); $page->addBodyContent('<a href="/admin4/instruction/customMailshot/id/' . $_GET['dea_id'] . '">Custom Mailshot</a>'); $page->addBodyContent('</div>');
$form->addField("hidden", "dea_id", "", $dea_id); $form->addField("hidden", "pro_id", "", $pro_id); $form->addField("hidden", "last_order_photo", "", $photoCount); $form->addField("hidden", "last_order_floorplan", "", $floorplanCount); $form->addField("hidden", "last_order_epc", "", $epcCount); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml('<h1>' . $pro_addr . ' (' . $dea_type . ')</h1>'); $formName = 'form1'; $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Particulars</div>'); $form->addHtml('<div id="' . $formName . '">'); if (!$pro_area) { $form->addData($formDataArea, $_POST); } $form->addData($formData1, $_POST); $form->addHtml($form->addRow('textarea', 'dea_notes_production', 'Add Production Note', '', array('class' => 'noteInput'), '', '')); $form->addHtml(renderNotes('deal_production', $dea_id, array('viewform' => '1', 'label' => 'Production Notes'))); $buttons = $form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')); $buttons .= $form->makeField("button", "", "", "Summary", array('class' => 'button', 'onClick' => 'document.location.href=\'deal_summary.php?dea_id=' . $dea_id . '\'')); $buttons .= $form->makeField("button", "", "", "Copy", array('class' => 'button', 'onClick' => 'document.location.href=\'deal_copy.php?dea_id=' . $dea_id . '\'')); $form->addHtml($form->addDiv($buttons)); $form->addHtml('</div>'); $form->addHtml("</fieldset>\n"); $formName = 'form2'; $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Descriptions</div>'); $form->addHtml('<div id="' . $formName . '" style="">'); $form->addData($formData2, $_POST); $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')))); $form->addHtml('</div>'); $form->addHtml("</fieldset>\n");