$_userInfo['csvTime'] = time();
                foreach ($_userInfo['csv'] as $row) {
                    if (!isset($row[1])) {
                        $row[1] = '';
                    }
                    if (!empty($row[0]) && is_valid_email($row[0])) {
                        $sql = "INSERT INTO " . DB_PREPEND . "phpwcms_address (";
                        $sql .= "address_email, address_name, address_key, address_subscription, address_verified, address_tstamp) VALUES (";
                        $sql .= "'" . aporeplace($row[0]) . "', ";
                        $sql .= "'" . aporeplace($row[1]) . "', ";
                        $sql .= "'" . aporeplace(shortHash($row[0] . time())) . "', ";
                        $sql .= "'" . ($_userInfo['subscribe_all'] ? '' : aporeplace(serialize($_userInfo['subscribe_select']))) . "', ";
                        $sql .= $_userInfo['subscribe_active'] . ", FROM_UNIXTIME(" . $_userInfo['csvTime'] . ") )";
                        $sql = _dbQuery($sql, 'INSERT');
                        if (empty($sql['INSERT_ID'])) {
                            $_userInfo['nonImported'][$c] = $row[0] . '; ' . $row[1] . ' (' . mysql_error() . ')';
                        }
                    } else {
                        $_userInfo['nonImported'][$c] = $row[0] . '; ' . $row[1];
                    }
                    $c++;
                }
            }
            break;
        default:
            $_userInfo['csvError'] = 'False MIME TYPE. Be sure to upload CSV file only.';
            @unlink($_FILES['cvsfile']['tmp_name']);
    }
} elseif ($_FILES['cvsfile']['error']) {
    $_userInfo['csvError'] = return_upload_errormsg($_FILES['cvsfile']['error']);
}
                         $guestbook['image']['hash'] = '';
                         $guestbook['image']['file'] = '';
                         unlink($_FILES['guestbook_image']['tmp_name']);
                     } else {
                         chmod($guestbook['image_dir'] . '/' . $guestbook['image']['file'], 0666);
                     }
                 } else {
                     $guestbook['error']['image']['writable'] = "Image directory is not writable. Send a notice to the webmaster of this site.";
                 }
             }
         } else {
             $guestbook['error']['image']['format'] = "Proof image format: only JPG, GIF, PNG allowed.";
         }
     } else {
         if ($_FILES['guestbook_image']['error']) {
             $guestbook['error']['image']['system'] = return_upload_errormsg($_FILES['guestbook_image']['error']);
         }
         $guestbook['error']['image']['general'] = "Proof uploaded image file (only JPG, GIF, PNG allowed).";
     }
 } elseif (!empty($_POST['guestbook_hiddenfile'])) {
     //same file was just uploaded
     $guestbook['hidden'] = unserialize(base64_decode($_POST['guestbook_hiddenfile']));
     $guestbook['image']['name'] = $guestbook['hidden']['name'];
     $guestbook['image']['hash'] = $guestbook['hidden']['hash'];
     $guestbook['image']['file'] = $guestbook['hidden']['file'];
     if (!file_exists($guestbook['image_dir'] . '/' . $guestbook['image']['file'])) {
         $guestbook['image']['name'] = '';
         $guestbook['image']['hash'] = '';
         $guestbook['image']['file'] = '';
     }
 }