Refresh the page multiple times to query large data volumes.

Source: Internet
Author: User

<%
Data_path = "http://www.cnblogs.com/" 'ACC Connection database path, invalid for SQL
Numid = "19"
Dir = "../err. asp"
%>
<! -- # Include file = "http://www.cnblogs.com/conn/conn.asp" -->
<! -- # Include file = "../rolecheck. asp" -->
<Link href = "../CSS/style.css" rel = stylesheet type = text/CSS>
<Br/>
<%
Mailusername = "noreply@vipmail.yzw.cc"
Mailuserpass = "noreply123"
Mailaddress = "SMTP. vipmail. yzw. cc"
Fromname = "China Die Casting network" %>
<Table cellpadding = "2" cellspacing = "1" border = "0" width = "560" align = "center" class = "A2">
<Tr>
<TD Height = "35" align = "center" bgcolor = "# ced8ec"> <strong> mail <% = mailusername %> </strong> </TD>
</Tr>
<Tr class = "A4">
<TD align = "center" bgcolor = "# dde4f2">
<Br>
<Br>
<Br>
<%

Email_id = request ("email_id ")
If email_id = "" then
Email_id = 0
End if
Set rs_1 = server. Createobject ("ADODB. recordset ")
SQL _1 = "select * From log_email_title where id =" & email_id &""
Rs_1.open SQL _1, Conn, 1, 1
If not rs_1.eof then
'Set the Email Subject
Strtitle = rs_1 ("email_title ")
'Set mail content
Strcontent = rs_1 ("email_content ")
'Mailbox verification Regular Expression
Dim regex' creates a variable.
Set RegEx = new Regexp 'to create a regular expression.
RegEx. pattern = "^ \ W + ([\.-]? \ W +) * @ \ W + ([\.-]? \ W +) * (\. \ W +) + $"
RegEx. ignorecase = true' specifies whether the characters are case sensitive.
RegEx. Global = true' to set global availability.
If request ("page") <> "then
If int (Request ("page") <1 then
Currentpage = 1
Else
Currentpage = int (Request ("page "))
End if
Else
Currentpage = 1
End if
Maxperpage = 1
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select ID, iuser, truename, email from individual_user where email <>'' and ID in (select user_id from individual_user_expertlist) order by ID ASC"
Rs. Open SQL, Conn, 1, 1

If not Rs. EOF then
Rs. pagesize = maxperpage
Mpage = Rs. pagecount
If currentpage> mpage then
'Mail Record Database
Email_content = ""
Email_content1 = ""
Email_ I = 1
Do while not Rs. EOF
If RegEx. Test (TRIM (RS ("email") then' is true
Email_content = email_content & email_ I & "," & RS ("email") & "--" & RS ("iuser") & "--" & RS ("truename ") & "<br/>"
Else
Email_content1 = email_content1 & email_ I & ", Incorrect email format:" & RS ("email") & "--" & RS ("iuser ") & "--" & RS ("truename") & "<br/>"
End if
Rs. movenext
Email_ I = email_ I + 1
Loop
Rs. Close
Set rs = nothing
Email_content = email_content & email_content1
'Record Operator
If issession = 0 then
User_name = request. Cookies ("username ")
Else
User_name = SESSION ("globalecmaster ")
End if
Call log_email (11, email_content, mpage, email_id, user_name)

Response. Write "sending completed & nbsp; completion time:" & now ()
Response. End
End if
Rs. Move (currentPage-1) * maxperpage
If mpage> = currentpage then
Sendmail1 = trim (RS ("email") 'receive mail
End if
Else
Response. Write "no data"
Response. End
End if
'Mail sending Process
Dim I
I = request ("I") 'determines the number of failed emails
If I = "" Or I <0 then
I = 0
End if

If RegEx. test (sendmail1) then' is true
call Sendmail (sendmail1, strtitle, strcontent, mailusername, mailuserpass, mailaddress, fromname)
else
I = I + 1
end if

response. write "
sent/sent in total: "& currentPage-1 &" / "& mpage &" mails, "& I &" emails with Incorrect email format are not sent. "
If mpage response. write ", completion time" & now () & "
"
elseif currentpage mod 490 = 0 then
response. write " "
response. write "
Note: up to 500 emails can be sent within one hour. Current Time: "& now ()
else
response. write " "
end if
Rs. close
set rs = nothing
Conn. close
set conn = nothing

Else
Response. Write ("the email content does not exist! & Nbsp; [<a href = bs_mail_send.asp> return </a>] ")
End if
%>
<Br>
</TD>
</Tr>
</Table>

Note:

Meta http-equiv = "refresh" content = "1000" timed refresh in seconds

<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Meta http-equiv = "refresh" content = "1000">
<Title>Refresh the current page every 1000 seconds</Title>
</Head>
<Body>
</Body>
</Html>

<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Meta http-equiv = "refresh" content = "3; url =Http://www.yongfa365.com/blog">
<Title>RefreshHttp://www.yongfa365.com/blog</Title>
</Head>
<Body>
</Body>
</Html>

The time unit in refresh isSeconds,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.