function displayTransaction($recordsArray, $fieldsArray) { if (count($recordsArray) && count($fieldsArray)) { //Need to include addresses in the fieldArray //list of values that should not be displayed $removalArray = array("id", "modifiedby", "modifieddate", "createdby", "creationdate", "notes", "title", "shiptoname", "uuid"); //gets the address table's columnnames/information (fields) $addressArray = $this->table->address->fields; //gets rid of the values that should not be displayed foreach ($removalArray as $removalField) { if (isset($addressArray[$removalField])) { unset($addressArray[$removalField]); } //end if } //end foreach //get rid of stuff that should only be in addresses but is present in clients foreach ($addressArray as $removalField => $junk) { if (isset($fieldsArray[$removalField])) { unset($fieldsArray[$removalField]); } //end if } //end foreach //need to get two sets of address fields, one named main* and the other ship*. if ($this->importType == "sugarcrm") { foreach ($addressArray as $field => $junk) { $mainAddressArray["main" . $field] = $junk; $shipAddressArray["ship" . $field] = $junk; } //end foreach $addressArray = $mainAddressArray + $shipAddressArray; } //end if $fieldsArray = $fieldsArray + $addressArray; parent::displayTransaction($recordsArray, $fieldsArray); } //end if }
if (file_exists($tableFile)) { include_once $tableFile; } //next, see if the table class exists if (class_exists($thereturn["maintable"])) { $classname = $thereturn["maintable"]; $thetable = new $classname($db, $tabledefid, $backurl); } else { $thetable = new phpbmsTable($db, $tabledefid, $backurl); } //finally, check to see if import class exists if (class_exists($thereturn["maintable"] . "Import")) { $classname = $thereturn["maintable"] . "Import"; $import = new $classname($thetable); } else { $import = new phpbmsImport($thetable); } //Next we process the form (if submitted) and // return the current record as an array ($therecord) // or if this is a new record, it returns the defaults $therecord = $import->processImportPage(); //make sure that we set the status message id the processing returned one // (e.g. "Record Updated") if (isset($therecord["phpbmsStatus"])) { $statusmessage = $therecord["phpbmsStatus"]; } $pageTitle = $therecord["title"] ? $therecord["title"] : "General Table Import"; $phpbms->cssIncludes[] = "pages/imports.css"; //Form Elements //============================================================== // Create the form