Exemplo n.º 1
0
     $primarykey = $manageData->getParam("primarykey");
 }
 $registryname = $manageData->getParam("registryname");
 $savedquery = $manageData->getParam("savedquery");
 if (strlen($manageData->getParam("table")) > 0) {
     $table = $manageData->getParam("table");
 }
 $primary_key_var = $manageData->getParam("primarykeyvar");
 if (!empty($primarykeyvar)) {
     $primary_key_value = $manageData->getParam("primary_key_var");
 } else {
     $primary_key_value = $manageData->getParam("id" . $table);
 }
 if (!empty($table) || !empty($savedquery)) {
     $form = new ReportForm($conx);
     $form->setUrlNext(urldecode($goto));
     $form->setEventControl($cfg_eventcontroler);
     if (!empty($registryname)) {
         $form->setRegistry($registryname);
     }
     if ($primarykey != "") {
         $form->squery = new sqlQuery($conx);
         $primarykey = stripslashes($primarykey);
         $form->squery->query("select * from " . $table . " where " . $primarykey);
         $form->setLogRun(true);
         $form->setDefault($table);
     } elseif (!empty($savedquery)) {
         $form->setSavedQuery($savedquery);
         $form->setQuery();
         $form->setDefault();
     } else {
Exemplo n.º 2
0
        <div class="contentfull">
            <?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>