$form->setLogRun(true); $form->setDefault($table); } elseif (!empty($savedquery)) { $form->setSavedQuery($savedquery); $form->setQuery(); $form->setDefault(); } else { $form->setQuery($table, $primary_key_value, $primary_key_var); $form->setDefault($table); } if ($addrecord == "yes") { $form->setAddRecord(); } $form->event->addEvent("mydb.addParamToDisplayNext", 500); $form->event->addParam("errorpage", $_SERVER['PHP_SELF']); $form->setForm(); $form->execute(); } else { ?> <div class="error_message">Missing parameters to display the from</div> <?php } } else { ?> <div class="error_message">Missing parameters to display the from (manageData)</div> <?php } ?> </DIV>
<?php $CompanyEdit = new Company($GLOBALS['conx']); $CompanyEdit->sessionPersistent("CompanyEditSave", "index.php", 300); $company_edit_page = "company_edit.php"; $companyAddForm = new ReportForm($conx, "ofuz_add_company"); $companyAddForm->setFormEvent("CompanyEditSave->eventAdd", 123); $companyAddForm->addEventAction("CompanyEditSave->eventValuesFromForm", 117); $companyAddForm->addEventAction("CompanyEditSave->eventCheckDuplicateCompanyInAdd", 100); $companyAddForm->addEventAction("mydb.gotoPage", 90); $companyAddForm->addParam("goto", $company_edit_page); $companyAddForm->addParam("errPage", $_SERVER['PHP_SELF']); $companyAddForm->setRegistry("ofuz_add_company"); $companyAddForm->setTable("company"); $companyAddForm->setAddRecord(); $companyAddForm->setUrlNext($company_edit_page); $companyAddForm->setForm(); $companyAddForm->execute(); ?> <div class="section20"> <!-- <input type="submit" value="Add this company" />--> </div> <?php //echo $do_contact->getFormFooter(); ?> </div> </td></tr></table> <div class="spacerblock_40"></div> <div class="layout_footer"></div> </div> </td><td class="layout_rmargin"></td></tr></table> <?php