$tpl->assign('subnet_tmp', $subnet_tmp, NULL, NULL);
             $tpl->assign('pxe_group_tmp', $pxe_group_tmp, NULL, NULL);
             // and the corresponding error
             $tpl->assign('hostname_tmp_err', $hostname_tmp_err, NULL, NULL);
             $tpl->assign('mac_address_tmp_err', $mac_address_tmp_err, NULL, NULL);
             $tpl->assign('ip_address_tmp_err', $ip_address_tmp_err, NULL, NULL);
             $tpl->assign('subnet_tmp_err', $subnet_tmp_err, NULL, NULL);
             $tpl->assign('pxe_group_tmp_err', $pxe_group_tmp_err, NULL, NULL);
             // duplicate entry error data
             $tpl->assign('hostname_dup_err', $hostname_dup_err, NULL, NULL);
             $tpl->assign('mac_address_dup_err', $mac_address_dup_err, NULL, NULL);
             $tpl->assign('ip_address_dup_err', $ip_address_dup_err, NULL, NULL);
             $tpl->assign('subnet_dup_err', $subnet_dup_err, NULL, NULL);
             $tpl->assign('pxe_group_dup_err', $pxe_group_dup_err, NULL, NULL);
             // generate our form data
             $form_data .= $misc->GenImportDuplicateHostForm($num, $val->ValidateXSS($_GET['skin']), $tmp[$x]['hostname'], $found[0]['hostname'], $tmp[$x]['ip_address'], $found[0]['ip-address'], $tmp[$x]['mac_address'], $found[0]['mac-address'], $subnet, $found[0]['subnet-name'], $pxe_group, $found[0]['pxe-group'], $hostname_err[$x], $hostname_dup_err, $ip_address_err[$x], $ip_address_dup_err, $mac_address_err[$x], $mac_address_dup_err, $subnet_err[$x], $subnet_dup_err, $pxe_group_err[$x], $pxe_group_dup_err);
         }
     } else {
         $error = $err->GenerateErrorLink("help/help.html", "#import_host", $defined['good'], $errors['db_insert'], NULL, NULL);
     }
 } else {
     // since we have a duplicate and not an invalid record give them the correct template
     $error_template = "admin.import.hosts.errors.tpl";
     // find validation errors
     $e = $err->GenerateErrorImg($defined['error'], "help/help.html#import_host", '800', '800');
     if ($val->ValidateParagraph($tmp[$x]['hostname']) === -1) {
         $list .= "<li>Hostname field is invalid</li>";
         $hostname_tmp_err = $e;
     }
     if ($val->ValidateMACFormats($tmp[$x]['mac_address']) === -1) {
         $list .= "<li>MAC Address field is invalid</li>";