Copy codeThe Code is as follows: <! -- # Include file = "../conn. asp" -->
<! -- # Include file = "../cls_main.asp" -->
<Html>
<Head>
<Meta http-equiv = "Content-Language" content = "zh-cn">
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> Generate Baidu XML </title>
</Head>
<Body>
<%
Dim sid, eid
Sid = abs (request ("sid "))
If sid = 0 then
Sid = 0
Else
Sid = cint (request ("sid "))
End if
Eid = cint (request ("eid "))
If eid = 0 then
Eid = 500
Else
Eid = cint (request ("eid "))
End if
Dim tt, ResNum
Set tt = New Cls_Main
ResNum = CLng (tt. Execute ("select max (id) from table") (0 ))
Set Mesky = Nothing
%>
<Table border = "0" width = "100%" id = "table1" cellspacing = "0" cellpadding = "0">
<Form method = "POST" action = "? Action = html ">
<Tr>
<Td width = "9%"> start ID: </td>
<Td width = "35%"> <input type = "text" name = "sid" size = "20" value = "<% = sid %>"> </td>
<Td width = "8%"> end ID: </td>
<Td width = "23%"> <input type = "text" name = "eid" size = "20" value = "<% = eid %>"> (maximum ID: <% = ResNum %>) </td>
<Td width = "23%"> <input type = "submit" value = "submit" name = "B1"> </td>
</Tr>
</Form>
<%
If request ("action") = "html" then
Response. Write "<tr> <td colspan = 5>" & vbNewLine
Response. Write "<br>" & vbNewLine
Response. Write "generating <font color = 'red'> <B>" & eid & ". xml </B> </font> file ...... "& VbNewLine
Response. Write "<br>" & vbNewLine
Response. Write "</td> </tr> <td colspan = 5>" & vbNewLine
Response. Flush
If (eid-500)> ResNum Then
Response. Write "Congratulations! "
Response. Flush
Else
Creat (sid)
Sid = sid more than 500
Eid = eid + 500
Response. Write "<meta http-equiv =" "refresh" "content =" "10; url =? Action = html & sid = "& sid &" & eid = "& eid &" ">"
End If
End if
Function creat (id)
Response. Write "<IFRame name = tt frameborder = 0 width = 100% height = 30 scrolling = no src = http://www.xx.com/cls_create.asp? Startid = "& sid &" & endid = "& eid &"> </IFrame>"
End Function
%>
</Td> </tr>
</Table>
</Body>
</Html>