:: Import Complete! ::
:: Import Information ::
Your user list is currently being imported. Please do not close this window. There are approximately users remaining to import...
I have imported subscribers successfully.
I have skipped banned subscribers.
I have found duplicate subscribers.
I have updated subscribers successfully.
Has taken approximately so far...
Have to wait approximately until it finishes...
$val) {
$d='x';
$b++;
$LF=$FieldLinks[$b];
//is it email?
if($LF=='E')
{
$bad_in_email = array(' ', ',', '"', '\'', ';');
$val = str_replace($bad_in_email, '', $val);
$U['Email']=strtolower($val);
$d=1;
}
if ($LF == 'F') {
$found_format = true;
// if the list let's them decide, use the uploaded value.
// otherwise, the default will be used (list default).
if ($ListFormat == 3) {
if (strtolower($val) == 'text') {
$U['Format'] = 1;
}
if (strtolower($val) == 'html') {
$U['Format'] = 2;
}
} else {
$U['Format'] = $ListFormat;
}
continue;
}
if ($LF == 'S') {
$found_status = true;
$U['Status'] = ((strtolower($val) == 'active') ? 1 : 0);
continue;
}
if ($LF == 'C') {
$found_confirm = true;
$U['Confirmed'] = ((strtolower($val) == 'confirmed') ? 1 : 0);
continue;
}
//is it date?
$U['Date'] = mktime(0,0,0,date('m'),date('d'),date('y'));
//is it an extra?
if($LF!='None' && $d=='x')
{
$extra_fields[$LF]=$val;
}
}
// now we check the format, in case the uploaded file doesn't have the format in it.
if (!$found_format) {
if($AbFormat=='text') {
$U['Format']=1;
} elseif($AbFormat=='html') {
$U['Format']=2;
}
}
if (!$found_status) {
$U['Status'] = $Status;
}
if (!$found_confirm) {
$U['Confirmed'] = $ConfStatus;
}
$user_check_query = "SELECT * FROM " . $TABLEPREFIX . "members WHERE Email = '".addslashes($U['Email'])."' AND ListID='".addslashes($ListID)."'";
$user_check_result = mysql_query($user_check_query);
//now insert this member!
if(!mysql_num_rows($user_check_result))
{
if(Banned($U['Email'], $ListID))
{
ReportBan($BANNED_REPORT, $U['Email']);
$BannedAttempts++;
}
else
{
// Is this a valid email address?
if(is_numeric(strpos($U['Email'], '@')) && is_numeric(strpos($U['Email'], '.')) )
{
// We have a valid email address, let's add this email
mysql_query("INSERT INTO " . $TABLEPREFIX . "members SET ListID='".addslashes($ListID)."', ImportID='".addslashes($ImportID)."', Email='".addslashes($U['Email'])."', Format='".addslashes($U['Format'])."', Status='".addslashes($U['Status'])."', Confirmed='".addslashes($U['Confirmed'])."', ConfirmCode='" . addslashes(md5(microtime())) . "', SubscribeDate='".addslashes($U['Date'])."'");
$SuccessfulImports++;
$UserID=mysql_insert_id();
if(is_array($extra_fields))
{
foreach($extra_fields as $FieldID=>$FV)
{
$insert_value = CheckField($FieldID, $FV);
mysql_query("INSERT INTO " . $TABLEPREFIX . "list_field_values SET FieldID='".addslashes($FieldID)."', ListID='".addslashes($ListID)."', UserID='".addslashes($UserID)."', Value='".addslashes($insert_value)."'");
}
}
}
}
} else {
if ($Overwrite) {
$UserID = mysql_result($user_check_result, 0, 0);
// First, update status, format, confirmation details.
$update_query = "UPDATE " . $TABLEPREFIX . "members SET Format='".addslashes($U['Format'])."', Status='".addslashes($U['Status'])."', Confirmed='".addslashes($U['Confirmed'])."' WHERE MemberID='".addslashes($UserID)."'";
mysql_query($update_query);
if(is_array($extra_fields)) {
// secondly, clear out their old fields.
$delete_query = "DELETE FROM " . $TABLEPREFIX . "list_field_values WHERE UserID='".addslashes($UserID)."' AND ListID='".addslashes($ListID)."'";
mysql_query($delete_query);
// re-add them.
foreach($extra_fields as $FieldID=>$FV) {
$real_value = CheckField($FieldID, $FV);
mysql_query("INSERT INTO " . $TABLEPREFIX . "list_field_values SET FieldID='".addslashes($FieldID)."', ListID='".addslashes($ListID)."', UserID='".addslashes($UserID)."', Value='".addslashes($real_value)."'");
}
}
$OverwrittenRecords++;
} else {
$DuplicateAttempts++;
}
}
}
}
unlink($ROOTDIR.$import_file);
$report_details = '';
foreach($REQUEST_FIELDS as $r) {
$report_details .= "&" . $r . "=" . $$r;
}
foreach($REPORT_LIST as $report) {
$report_details .= "&" . $report . "=" . $$report;
}
$report_details .= "&LinkField=" . urlencode(serialize($LinkField));
$import_link = "import?ImportID=$ImportID&Action=DoImport&PageID=DoImporting";
$import_link .= $report_details;
$import_link .= "&random=".getmicrotime();
$import = MakeAdminLink($import_link);
?>
');
if ($pos !== false) {
list($key,$name)=explode('->',$opt);
if (in_array($name, $splitvals)) $real_value .= $key . ':';
}
}
$real_value = substr($real_value, 0, -1);
break;
case 'dropdown':
$opts=explode(';',$_SESSION['StoredFields'][$id]['AllValues']);
$real_value = $origval;
foreach($opts as $opt) {
$pos = strpos($opt, '->');
if ($pos !== false) {
list($key,$name)=explode('->',$opt);
if (strtolower($name) == strtolower($origval)) {
$real_value = $key;
break;
}
if ($key == $origval) {
$real_value = $key;
break;
}
}
}
break;
default:
$real_value = $origval;
}
return $real_value;
}
exit();
?>