$result5 = mysql_query("select email,id from " . $table_prefix . "email_advt where id NOT IN(" . $str . ") {$str1}"); if (mysql_num_rows($result5) > 0) { $aid = 0; if ($log_enabled == 1) { if ($valid == "") { $valid .= "[emails not in any list"; } else { $valid .= ", emails not in any list"; } } mkdir("export/{$day}/", 0777); $handle1 = fopen("export/{$day}/Emails_Not_in_List.ief", "wb"); $resultstring = $resultstring . "<a href=\"export/{$day}/Emails_Not_in_List.ief\">Emails_Not_in_List.ief</a><br><br>"; fwrite($handle1, "EmailsNotInAnyList"); fwrite($handle1, "\r\n"); writeEmailsToFile($result5, $handle1, $table_prefix); fclose($handle1); } else { if ($show == "") { $show .= "[emails not in any list"; } else { $show .= ", emails not in any list"; } } } } if ($resultstring == "" && $show == "" && $invalid == "") { echo "Please go back and select a list. "; echo "<a href=\"javascript:history.back(-1);\">Go Back</a><br><br>"; } if ($resultstring != "") {
$startlimit = ($rems_curr_batch - 1) * $batch_size; //$extension.=" (batch $rems_curr_batch of $rems_batch_count) "; $temp = $startlimit + $batch_size; if ($rems_curr_batch == $rems_batch_count) { $temp = $rems_count; } echo "<br><b>Exporting 'all emails in system' : {$startlimit} to {$temp} of {$rems_count}.<blink> <span class=\"already\">Please wait...</span> </blink></b><br><br>"; } else { $startlimit = 0; echo "<br><b>Exporting 'all emails in system' : 0 to {$rems_count} of {$rems_count}.<blink> <span class=\"already\">Please wait...</span> </blink></b><br><br>"; } $endlimit = $batch_size; $result5 = mysql_query("select email,id from " . $table_prefix . "email_advt {$str1} order by id desc limit {$startlimit},{$endlimit}"); // fwrite($handle1, "EmailsNotInAnyList"); //fwrite($handle1, "\r\n"); writeEmailsToFile($result5, $handle, $table_prefix, $extraparam, $mysql, $rems_curr_batch); if ($rems_curr_batch == $rems_batch_count) { $current_completed_id = "all"; $rems_curr_batch = 0; } fclose($handle); } else { $current_completed_id = "all"; $rems_curr_batch = 0; } } } } } if ($selectedcnt == $completedcnt) { if ($resultstring == "" && $show == "" && $invalid == "") {