?> </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> <br />
} } } // 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; } if ($subject['delimiter'] !== "") { $subjectArray = array_map('trim', explode($subject['delimiter'], $data[intval($subject['column']) - 1])); } else { $subjectArray = array(trim($data[intval($subject['column']) - 1]));