" . T_("Go back") . ""; $import_id = intval($_POST['import_id']); $tmpfname = tempnam(TEMPORARY_DIRECTORY, "FOO"); move_uploaded_file($_FILES['file']['tmp_name'],$tmpfname); $valid = verify_file($tmpfname,$import_id); if ($valid) { //verified so upload if (update_file($tmpfname,$import_id)) { print "

" . T_("Successfully updated sample") . " 

$description

"; } else { print "

" . T_("Error importing file. Please try again") . "

"; } } else print "

" . T_("Error:") . " $error

" . T_("Please check imported file matches column count and names from original sample file, go back in your browser and fix the problem") . "

"; xhtml_foot($js_foot); } else { //need to supply file to upload $subtitle = T_("Select file to upload"); xhtml_head(T_("Add to existing sample") .":",true,$css,$js_head,false,false,false,$subtitle); echo " " . T_("Go back") . ""; $ua = $_SERVER['HTTP_USER_AGENT']; if (preg_match('/Firefox/i', $ua)) $csv= "text/csv"; else $csv= ".csv"; //print "ua=" . $_SERVER['HTTP_USER_AGENT']; ?>
..." type="file" accept="" />