<%
Dim Childtype,curl,childname,childurl,localpath
Childtype = Request. QueryString ("Childtype")
Select Case Childtype
Case "0"
Curl= "Http://www.111cn.net/default.asp"
ChildName = "Site Home"
Childurl = "/index.html"
LocalPath = ""
Case "1"
Curl= "Http://www.111cn.ne t/news/index.asp"
ChildName = "News Center Home"
Childurl = "/news/index.html"
LocalPath = "/news"
Case "2"
Curl= "Http://www.111cn.net/newhouse/index.asp"
ChildName = "New House net Home"
Childurl = "/newhouse/index.html"
LocalPath = "/newhouse"
Case "3"
Curl= "Http://www.111cn.net/home/index.asp"
ChildName = "Home Net"
Childurl = "/home/index.html"
LocalPath = "/home"
Case "4"
Curl= "Http://www.111cn.net/hirehouses/index.asp"
ChildName = "Rental Net Home"
Childurl = "/oldhouse/index.html"
LocalPath = "/oldhouse"
Case Else
End Select
Function Fsochange (Filename,target)
Dim Objfso,objcountfile,filetempdata,htmlout
Set objFSO = Server.CreateObject ("Scripting.FileSystemObject")
Set objcountfile = objFSO.OpenTextFile (Server.MapPath (filename), 1,true)
Filetempdata = Objcountfile.readall
Objcountfile.close
Set htmlout = objFSO.CreateTextFile (server. MapPath (Target))
Htmlout.writeline Filetempdata
Htmlout.close
Set objFSO = Nothing
End Function
Dim Fn,dourl,objxmlhttp,binfiledata,objadostream,filepath
filepath = localpath & "/index_.html"
fn = Server. MapPath (filepath)
Dourl = Curl
' Dourl = Request ("Url")
Set objxmlhttp = Server.CreateObject ("Msxml2.serverxmlhttp")
Objxmlhttp.open "Get", Dourl,false
Objxmlhttp.send ()
Binfiledata = Objxmlhttp.responsebody
Set objadostream = Server.CreateObject ("ADODB. Stream ")
Objadostream.type = 1
Objadostream.open ()
Objadostream.write (Binfiledata)
Objadostream.savetofile fn,2
Objadostream.close ()
Set Objadostream = Nothing
Set objxmlhttp = Nothing
Call Fsochange (LocalPath & "/index_.html", LocalPath & "/index.html")
' Functions to read the contents of a file using the FSO
Function fsofileread (filename)
Dim Objfso,objcountfile,filetempdata
Set objFSO = Server.CreateObject ("Scripting.FileSystemObject")
Set objcountfile = objFSO.OpenTextFile (Server.MapPath (filename), 1,true)
Fsofileread = Objcountfile.readall
Objcountfile.close
Set objcountfile=nothing
Set objFSO = Nothing
End Function
Call Lib.tiptext (0, "static page <a href=" "" & Childurl & "" target= "" _blank "" ><b> "& ChildName &" &L T;/b></a> Generation Completed "& Now () &" ")
Response. Redirect (Request. ServerVariables ("Http_referer"))
%>