speakdataupto200.asp

来自「聊天室源码呵呵你好用~~~~~~2.0版本」· ASP 代码 · 共 49 行

ASP
49
字号
<%@ LANGUAGE=VBScript%>
<%Server.ScriptTimeout=600
Response.Expires=0
Set fs = CreateObject ("Scripting.FileSystemObject")
udfile200=server.mappath("speakdata_v200.asp")
if fs.FileExists(udfile200)=True then
 Response.Write "<title>出错提示 - " & Application("a_c_chatroom_name") & "</title>"
 Response.write "<body bgcolor=FFCC99><p>&nbsp;</p><p align='center'>出错提示:留言数据已经升级过了,不能重复操作。</p>"
 Response.write "<p align='center'><a href='javascript:window.close();'>关闭窗口</a></p></body>"
 Response.end
end if
udfile=server.mappath("speakdata.asp")
if fs.FileExists(udfile)=False then
 Response.Write "<title>出错提示 - " & Application("a_c_chatroom_name") & "</title>"
 Response.write "<body bgcolor=FFCC99><p>&nbsp;</p><p align='center'>出错提示:找不到旧版本的数据。</p>"
 Response.write "<p align='center'><a href='javascript:window.close();'>关闭窗口</a></p></body>"
 Response.end
end if
Set thisfile = fs.OpenTextFile(udfile,1,False)
dim ud()
countud=0
do while not thisfile.AtEndOfStream
 thisline=thisfile.readline
 if thisline="0" then thisline=""
 Redim preserve ud(countud)
 ud(countud) = thisline
 countud = countud + 1
loop
thisfile.Close
Set outfile = fs.CreateTextFile(udfile200)
outfile.WriteLine ud(0)
for i=1 to countud-1 step 7
 outfile.WriteLine "0"
 outfile.WriteLine "大家"
 outfile.WriteLine ud(i)
 outfile.WriteLine ud(i+1)
 outfile.WriteLine ud(i+2)
 outfile.WriteLine ud(i+3)
 outfile.WriteLine "1"
 outfile.WriteLine ""
 outfile.WriteLine ud(i+4)
 outfile.WriteLine ud(i+5)
 outfile.WriteLine ud(i+6)
next
outfile.Close
Response.Write "<title>已将留言数据升级至2.00版 - " & Application("a_c_chatroom_name") & "</title>"
Response.write "<body bgcolor=FFCC99><p>&nbsp;</p><p align='center'>恭喜,留言数据已经顺利升级为2.00版。</p>"
Response.write "<p align='center'><a href='javascript:window.close();'>关闭窗口</a></p></body>"
Response.end%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?