Esempio n. 1
0
 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
 }
Esempio n. 2
0
		<?php 
}
//end if
if ($import->error && $import->pageType != "main") {
    ?>
			<h2>Import Errors</h2>
			<div id="importError">
				<ul>
				<?php 
    echo $import->error;
    ?>
				</ul>
			</div>
			<?php 
}
//end if
$import->displayTransaction($import->transactionRecords, $import->table->fields);
?>
	</div>
	<div id="createmodifiedby" >
	<?php 
//Last, we show the create/modifiy with the bottom save and cancel buttons
// and then close the form.
$theform->showButtons(2, $import->pageType, count($import->transactionRecords));
?>
</div><?php 
$theform->endForm();
?>
</div>
<?php 
include "footer.php";