$pxeg = $db->dbArrayResultsAssoc($return); } if (count($pxeg) === 0) { $pxe_group_tmp = "No PXE Groups defined"; } else { $pxe_group_tmp = $misc->GenDropMenuWSelectedPXE($pxeg, $tmp[$x]['pxe_group'], 'pxe_group_tmp'); // quick check to ensure pxe group form import matches existin pxe group if (!in_array($tmp[$x]['pxe_group'], $pxeg) && !empty($tmp[$x]['pxe_group'])) { $pxe_group_tmp_err = $err->GenerateErrorImg($defined['error'], "help/help.html#import_host", '800', '800'); $list .= "<li>PXE Group field from import does match current list of existing PXE groups</li>"; } } // close our error list $list .= "</ol>"; // create the form with our current record data $form_data .= $misc->GenImportValidateHostForm($x, $val->ValidateXSS($_GET['skin']), $tmp[$x]['hostname'], $tmp[$x]['ip_address'], $tmp[$x]['mac_address'], $subnet_tmp, $pxe_group_tmp, $hostname_tmp_err, $ip_address_tmp_err, $mac_address_tmp_err, $subnet_tmp_err, $pxe_group_tmp_err); } // perform a little cleanup on file fclose($handle); unlink($upload_path); } else { // give user error pertaining to upload progblems $error = $err->GenerateErrorLink("help/help.html", "#import_hosts", $defined['error'], "The file '" . $file_name . "' was not copied to specified directory due to security restrictions on upload folder", NULL, NULL); } } else { // find validation errors $e = $err->GenerateErrorImg($defined['error'], "help/help.html#import_hosts", '800', '800'); $list .= "<ol>"; if ($val->ValidateUploadedFile($file_name, $uploaded, $type, $size, "xml|csv", "application/octet-stream", "1024") === -1) { $list .= "<li>File Name field is empty</li>"; $file_name_err = $e;