Gotta love www.php.net! I'll get an update together within the next couple of days. In the interim, you'll need to edit /YOUR_ADMIN/add_customers_backend.php, adding one line and changing another around line 40:
Code:
...
function check_file_upload() {
global $db, $row_positions, $post, $acfa_lines;
$files = $_FILES['bulk_upload'];
$errors = array();
$to_insert = array();
if (!zen_not_null($files['name'])) {
$errors[] = ERROR_NO_UPLOAD_FILE;
} else {
if ($files['error'] != 0) {
$errors[] = sprintf (ERROR_FILE_UPLOAD, $files['error']);
} else {
$pos = strrpos($files['name'],'.')+1;
$allowed_extensions = array ( 'TXT', 'CSV' );
$extension = substr ($files['name'], $pos);
if ( (strlen ($extension) < 1 ) || !in_array(strtoupper($extension), $allowed_extensions) ) {
$errors[] = sprintf (ERROR_BAD_FILE_EXTENSION, $extension) . implode(', ', $allowed_extensions);
} else {
$path = DIR_FS_UPLOADS . $files['name'];
if (!move_uploaded_file($files['tmp_name'], $path)) {
$errors[] = ERROR_CANT_MOVE_FILE;
} else {
chmod($path, 0775);
ini_set("auto_detect_line_endings", true); /*v2.0.3a*/
$lines = file($path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); /*v2.0.3c*/
...
I'll also beef up some of the error-detection that's present in the files ...
Bookmarks