} ?> </select> </td> </tr> <tr> <td class='searchRow'><label for='searchResourceFormatID'><b>Resource Format</b></label> <br /> <select name='search[resourceFormatID]' id='searchResourceFormatID' style='width:150px'> <option value=''>All</option> <?php $display = array(); $resourceFormat = new ResourceFormat(); foreach ($resourceFormat->allAsArray() as $display) { if ($search['resourceFormatID'] == $display['resourceFormatID']) { echo "<option value='" . $display['resourceFormatID'] . "' selected>" . $display['shortName'] . "</option>"; } else { echo "<option value='" . $display['resourceFormatID'] . "'>" . $display['shortName'] . "</option>"; } } ?> </select> </td> </tr> <tr> <td class='searchRow'><label for='searchResourceTypeID'><b>Resource Type</b></label>
<?php $resourceID = $_GET['resourceID']; $resource = new Resource(new NamedArguments(array('primaryKey' => $resourceID))); if (!is_null_date($resource->archiveDate)) { $archiveChecked = 'checked'; } else { $archiveChecked = ''; } //get all resource formats for output in drop down $resourceFormatArray = array(); $resourceFormatObj = new ResourceFormat(); $resourceFormatArray = $resourceFormatObj->sortedArray(); //get all resource types for output in drop down $resourceTypeArray = array(); $resourceTypeObj = new ResourceType(); $resourceTypeArray = $resourceTypeObj->allAsArray(); //get parents resources $sanitizedInstance = array(); $instance = new Resource(); $parentResourceArray = array(); foreach ($resource->getParentResources() as $instance) { foreach (array_keys($instance->attributeNames) as $attributeName) { $sanitizedInstance[$attributeName] = $instance->{$attributeName}; } $sanitizedInstance[$instance->primaryKeyName] = $instance->primaryKey; array_push($parentResourceArray, $sanitizedInstance); } //get all alias types for output in drop down $aliasTypeArray = array(); $aliasTypeObj = new AliasType();
$resourceTypeObj->save(); $resourceTypeID = $resourceTypeObj->primaryKey; $resourceTypeArray = $resourceTypeObj->allAsArray(); $resourceTypeInserted++; } } } // If Resource Format is mapped, check to see if it exists $resourceFormatID = null; if ($jsonData['resourceFormat'] != '') { $index = searchForShortName($data[$resourceFormatColumn], $resourceFormatArray); if ($index !== null) { $resourceFormatID = $resourceFormatArray[$index]['resourceFormatID']; } else { if ($index === null && $data[$resourceFormatColumn] != '') { $resourceFormatObj = new ResourceFormat(); $resourceFormatObj->shortName = $data[$resourceFormatColumn]; $resourceFormatObj->save(); $resourceFormatID = $resourceFormatObj->primaryKey; $resourceFormatArray = $resourceFormatObj->allAsArray(); $resourceFormatInserted++; } } } // If Subject is mapped, check to see if it exists $generalDetailSubjectLinkIDArray = array(); foreach ($jsonData['subject'] as $subject) { $generalSubjectID = null; if ($subject['column'] === "") { continue; }