<%Server.ScriptTimeOut=9999

Function NoSqlHack(inputStr)
Dim f_NoSqlHack_AllStr,NoSqlHack_Str,NoSqlHack_i,Str_InputStr
Str_InputStr=inputStr
NoSqlHack_AllStr="*|and |exec |insert |select |delete |update |count |master |truncate |declare |and	|exec	|insert	|select	|delete	|update	|count	|master	|truncate	|declare	|char(|mid(|chr(|and[|exec[|insert[|select[|delete[|update[|count[|master[|truncate[|declare[|set[|set |set	|where[|where |where	"
NoSqlHack_Str = Split(NoSqlHack_AllStr,"|")

For NoSqlHack_i=LBound(NoSqlHack_Str) To Ubound(NoSqlHack_Str)
	If Instr(LCase(Str_InputStr),NoSqlHack_Str(NoSqlHack_i))<>0 Then
		If NoSqlHack_Str(NoSqlHack_i)="'" Then NoSqlHack_Str(NoSqlHack_i)=" \' "
		Response.Write "<html><title>警告</title><body bgcolor=""EEEEEE"" leftmargin=""60"" topmargin=""30""><font style=""font-size:16px;font-weight:bolder;color:blue;""><li>您提交的数据有恶意字符</li></font><font style=""font-size:14px;font-weight:bolder;color:red;""><br><li>您的数据已经被记录!</li><br><li>您的IP："&Request.ServerVariables("Remote_Addr")&"</li><br><li>操作日期："&Now&"</li></font></body></html>"
		Response.End
	End if
Next
NoSqlHack = Replace(Str_InputStr,"'","''")
End Function%>
<html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--数据迁升</title>
<LINK href="css.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.RefreshLen {
	BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; MARGIN-top: 10px;MARGIN-BOTTOM: 5px; BORDER-LEFT: #000000 1px solid; WIDTH: 400px; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 20px; TEXT-ALIGN: left
}
-->
</style>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<div align="center"><img src="top.gif" width="983" height="108" border="0"></div>
  <!--#include file="../Conn.asp" -->
  <%Function EditClassID(TypeID,CompatStr)  
		Dim RSclass,TempStr
		Set RSclass = Conn.Execute("Select ID,ClassName,ClassID from YWNT_TMS_MovieClass where ClassID="&TypeID&" order by ClassWith asc,id asc" )
		TempStr =CompatStr & "┄"
		do while Not RSclass.Eof
				EditClassID = EditClassID & "<option value="""& RSclass("ID") &""">"
				EditClassID = EditClassID & "├" & TempStr &  RSclass("ClassName")
				EditClassID = EditClassID & "</option>" & Chr(13) & Chr(10)
				EditClassID = EditClassID &EditClassID(RSclass("ID"),TempStr)
		RSclass.MoveNext
		loop
		RSclass.Close
		Set RSclass = Nothing
End Function 

Function UsersGroupselect(UsersGroupName)
Set Rs = server.CreateObject(YWNT_TMS_RS)
sql="Select ID,GroupName from YWNT_TMS_UsersGroup where GroupType=1 Order by ID asc"
Rs.open sql,Conn,1,1 
if RS.eof then
Response.Write"暂时还没有该类的会员组请先添加会员组"
else
Response.Write"<select name='"&UsersGroupName&"' id='"&UsersGroupName&"'>"
do while not RS.eof
Response.Write"<option value='"&RS("ID")&"'>"&RS("GroupName")&"</option>" &vbcrlf
RS.movenext     
loop
Response.Write"</select>"
end if
RS.close     
set RS=nothing
End Function

Function Region(Rname)
Response.Write "<TR>" & Chr(13) & Chr(10)
Response.Write "<TD height=32 align=""right"" class=""hback"">源地区：</TD>" & Chr(13) & Chr(10)
Response.Write "<TD height=32 class=""hback"">"&Rname&"</TD>" & Chr(13) & Chr(10)
Response.Write "<TD height=32 align=""right"" class=""hback"">对应目的地区：</TD>" & Chr(13) & Chr(10)
Response.Write "<TD class=""hback""><select name=""Region"&Rname&""" id=""Region"&Rname&""">" & Chr(13) & Chr(10)
Set RRegion = Conn.Execute("Select ID,RegionName from YWNT_TMS_MovieRegion order by RegionWith asc,id asc" )
do while Not RRegion.Eof
Response.Write "<option value="""& RRegion("ID") &""">"
Response.Write  RRegion("RegionName")
Response.Write "</option>" & Chr(13) & Chr(10)
RRegion.MoveNext
loop
RRegion.Close
Set RRegion = Nothing
Response.Write "</select></TD>" & Chr(13) & Chr(10)
Response.Write "</TR>"
end function

sub WRegion()
Select Case Request.Form("MovieClass")
Case 1
call Region("大陆")
call Region("台湾")
call Region("香港")
call Region("日韩")
call Region("韩国")
call Region("欧美")
call Region("其他")
Case 2
call Region("华语电影")
call Region("日韩电影")
call Region("欧美电影")
call Region("其他电影")
Case 3
call Region("香港")
call Region("台湾")
call Region("大陆")
call Region("日本")
call Region("韩国")
call Region("欧美")
call Region("其它")
Case 4
call Region("大陆")
call Region("港湾")
call Region("韩国")
call Region("日本")
call Region("欧美")
call Region("其他")
end select
end sub

Action=Trim(request("Action"))
Select Case Action
Case "Data"
call Data()
Case "DataSave"
call DataSave()
Case else
call DataDB()
End Select
sub DataDB()%>
<TABLE class=table height=197 cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
  <TR>
    <TD class=xingmu colSpan=4>系统迁升</TD>
  </TR>
 <form action="UPData.asp?Action=Data" method="post" name="form">
  <TR>
    <TD width="30%" height=32 align="right" class="hback">系统类型：</TD>
    <TD height=32 class="hback">
      <select name="MovieClass" id="MovieClass">
        <option value="1">云网影视系统4.X系列</option>
        <option value="2">云网影视系统5.X系列</option>
        <option value="3">亚阳影视系统1.4</option>
        <option value="4">天天秀影视PHP系统</option>
      </select></TD>
  </TR>
   <TR>
    <TD height=32 align="right" class="hback">数据库类型：</TD>
    <TD height=32 class="hback"><select name="DataType" id="DataType" onChange="UPDATA_Type(this.value)">
      <option value="1">ACCESS</option>
      <option value="2">MSSQL</option>
      <option value="3">MYSQL</option>
        </select></TD>
   </TR>
   <TR id="showAcc">
    <TD height=32 align="right" class="hback">ACCESS数据库：</TD>
    <TD height=32 class="hback"><input name="Access" type="file" id="Access" size="40"></TD>
  </TR>
 <TR id="showSqlSever">
    <TD height=32 align="right" class="hback">数据库地址：</TD>
    <TD height=32 class="hback"><input name="SqlSever" type="text" id="SqlSever" size="40"></TD>
  </TR>
  <TR id="showSqlSa">
    <TD width="21%" height=32 align="right" class="hback">连接用户名：</TD>
    <TD width="79%" height=32 class="hback"><input name="SqlSa" type="text" id="SqlSa" size="40"></TD>
  </TR>
  <TR id="showSqlpassword">
    <TD width="21%" height=32 align="right" class="hback">连接密码：</TD>
    <TD width="79%" height=37 class="hback"><input name="Sqlpassword" type="text" id="Sqlpassword" size="40"></TD>
  </TR>
  <TR id="showSqlName">
    <TD height=32 align="right" class="hback">数据库名称：</TD>
    <TD class="hback"><input name="SqlName" type="text" id="SqlName" size="40"></TD>
  </TR>
  <TR>
    <TD height=32 align="right" class="hback">导入数据：</TD>
    <TD class="hback">
      <input type="checkbox" name="UPMovie" id="UPMovie" checked>
      影片数据      
      <input type="checkbox" name="UPUsers" id="UPUsers">
	  会员数据</TD>
  </TR>
    <TR align="center">
    <TD height=32 colspan="2" class="hback">
      <input type="submit" name="Submit" value="下一步"></TD>
    </TR>
	</form>
</TABLE>
<script>
UPDATA_Type(1)
function UPDATA_Type(param)
{
	if (param==1)
	{
		document.getElementById("showAcc").style.display="block";
		document.getElementById("showSqlSever").style.display="none";
		document.getElementById("showSqlSa").style.display="none";
		document.getElementById("showSqlpassword").style.display="none";
		document.getElementById("showSqlName").style.display="none";
	}
	else if (param==2,3)
	{
		document.getElementById("showAcc").style.display="none";
		document.getElementById("showSqlSever").style.display="block";
		document.getElementById("showSqlSa").style.display="block";
		document.getElementById("showSqlpassword").style.display="block";
		document.getElementById("showSqlName").style.display="block";
	}
}
</script>
<%end sub
sub Data()
On Error Resume Next
Select Case Request.Form("DataType")
Case 1
connstrUPDate = "provider=microsoft.jet.oledb.4.0;data source="&NoSqlHack(Request.Form("Access"))
Case 2
connstrUPDate = "Provider = Sqloledb; User ID = "&NoSqlHack(Request.Form("SqlSa"))&"; Password = "&NoSqlHack(Request.Form("Sqlpassword"))&"; Initial Catalog = "&NoSqlHack(Request.Form("SqlName"))&"; Data Source = "&NoSqlHack(Request.Form("SqlSever"))&";"
Case 3
connstrUPDate = "DefaultDir=;Driver={mysql odbc 3.51 driver};server="&NoSqlHack(Request.Form("SqlSever"))&";uid="&NoSqlHack(Request.Form("SqlSa"))&";pwd="&NoSqlHack(Request.Form("Sqlpassword"))&";database="&NoSqlHack(Request.Form("SqlName"))&";Stmt=Set Names 'GBK'"
End Select
Set connUPDate = server.CreateObject("ADODB.Connection")
connUPDate.open connstrUPDate
If Err Then Err.Clear:Set connUPDate = Nothing:Response.write "<script>alert('数据库连接出错!');location.href = 'javascript:history.go(-1)';</Script>":Response.End 
Select Case Request.Form("MovieClass")
Case 1,2
TypeDb="type"
Typeid="typeid"
TypeNameW="type"
SeverDb="movie"
Severid="id"
ClassID=TypeNameW
Case 3
TypeDb="影片分类"
Typeid="id"
TypeNameW="分类名"
SeverDb="服务器"
Severid="id"
ClassID=Typeid
Case 4
TypeDb="jdzcnnet_class"
Typeid="id"
TypeNameW="class"
SeverDb="jdzcnnet_server"
Severid="id"
ClassID=TypeNameW
End Select
%>
<TABLE class=table cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
    <TR>
      <TD class=xingmu colSpan=4>系统迁升第二步</TD>
    </TR>
  <form action="UPData.asp?Action=DataSave" method="post" name="form">
  <%if Request.Form("UPMovie")<>"" then %>
      <TR>
      <TD colSpan=4 align="center" class=hback><strong>设置对应栏目</strong></TD>
    </TR>
  <%sql="Select "&Typeid&","&TypeNameW&" from "&TypeDb&" Order by "&Typeid&" asc"
		Set rs = connUPDate.Execute(sql)
        do while not RS.eof%>
    <TR>
      <TD width="25%" height=32 align="right" class="hback">源栏目：</TD>
      <TD width="25%" height=32 class="hback"><%=RS(TypeNamew)%></TD>
      <TD width="25%" align="right" class="hback">对应目的栏目：</TD>
      <TD width="25%" class="hback"><select name="Class<%=RS(ClassID)%>" id="Class<%=RS(ClassID)%>">
	 <%=EditClassID(0,"")%>
      </select></TD>
    </TR>
    	<%RS.Movenext
		loop
		Rs.close
		Set Rs=nothing%>
    <TR>
      <TD colSpan=4 align="center" class=hback><strong>设置对应服务器</strong></TD>
    </TR>
		<%dim i
		sql="Select "&Severid&" from "&SeverDb&" Order by "&Severid&" asc"
		Set rs = connUPDate.Execute(sql)
        do while not RS.eof
		i=i+1%>
    <TR>
      <TD height=32 align="right" class="hback">源服务器：</TD>
      <TD height=32 class="hback">第<%=i%>服务器</TD>
      <TD height=32 align="right" class="hback">对应目的服务器：</TD>
      <TD class="hback"><select name="Sever<%=RS(Severid)%>" id="Sever<%=RS(Severid)%>">
		<%Set RSsever = Conn.Execute("Select ID,SeverName from YWNT_TMS_Sever  order by id asc" )
		do while Not RSsever.Eof
		Response.Write "<option value="""& RSsever("ID") &""">"
		Response.Write  RSsever("SeverName")
		Response.Write "</option>" & Chr(13) & Chr(10)
		RSsever.MoveNext
		loop
		RSsever.Close
		Set RSsever = Nothing%>
      </select></TD>
    </TR>
    <%RS.Movenext
		loop
		Rs.close
		Set Rs=nothing%>
	<TR>
      <TD colSpan=4 align="center" class=hback><strong>设置对应地区</strong></TD>
    </TR>
	<% Call WRegion()
	end if 
	IF Request.Form("UPUsers")<>"" then%>
     <TR>
      <TD colSpan=4 align="center" class=hback><strong>设置会员转换到的会员组</strong></TD>
    </TR>
    <TR>
      <TD colSpan=4 align="center" class=hback><%UsersGroupselect("UsersRegGroup")%></TD>
    </TR>
    <%end if%>
    <TR align="center">
      <TD height=32 colspan="4" class="hback">
      <input name="MovieClass" type="hidden" value="<%=Request.Form("MovieClass")%>">
      <input name="DataType" type="hidden" value="<%=Request.Form("DataType")%>">
      <input name="Access" type="hidden" value="<%=Request.Form("Access")%>">
      <input name="SqlSever" type="hidden" value="<%=Request.Form("SqlSever")%>">
      <input name="SqlSa" type="hidden" value="<%=Request.Form("SqlSa")%>">
      <input name="Sqlpassword" type="hidden" value="<%=Request.Form("Sqlpassword")%>">
      <input name="SqlName" type="hidden" value="<%=Request.Form("SqlName")%>">
      <input name="UPMovie" type="hidden" value="<%=Request.Form("UPMovie")%>">
      <input name="UPUsers" type="hidden" value="<%=Request.Form("UPUsers")%>">
      <input type="submit" name="Submit" value="下一步"></TD>
    </TR>
  </form>
  </TABLE>
<%end sub
sub DataSave()%>
<TABLE class=table cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
    <TR>
      <TD class=xingmu>迁升进度</TD>
    </TR>
    <TR align="center">
      <TD height=32 class="hback"><div class="RefreshLen"><span class="xingmu" id="RefreshLenx"></span></div></TD>
    </TR>
      <TR>
      <TD height=32 align="center" class="hback"><span id="UPname"></span></TD>
    </TR>
    <TR>
      <TD height=32 align="center" class="hback">总共要升迁<span id="ClassNum"></span>条数据,已经迁升<span id="ClassHtmlNum">0</span>条数据</TD>
    </TR>
</TABLE>
<%On Error Resume Next
Select Case Request.Form("DataType")
Case 1
connstrUPDate = "provider=microsoft.jet.oledb.4.0;data source="&NoSqlHack(Request.Form("Access"))
Case 2
connstrUPDate = "Provider = Sqloledb; User ID = "&NoSqlHack(Request.Form("SqlSa"))&"; Password = "&NoSqlHack(Request.Form("Sqlpassword"))&"; Initial Catalog = "&NoSqlHack(Request.Form("SqlName"))&"; Data Source = "&NoSqlHack(Request.Form("SqlSever"))&";"
Case 3
connstrUPDate="DefaultDir=;Driver={mysql odbc 3.51 driver};server="&NoSqlHack(Request.Form("SqlSever"))&";uid="&NoSqlHack(Request.Form("SqlSa"))&";pwd="&NoSqlHack(Request.Form("Sqlpassword"))&";database="&NoSqlHack(Request.Form("SqlName"))&";Stmt=Set Names 'GBK'"
End Select
Set connUPDate = server.CreateObject("ADODB.Connection")
connUPDate.open connstrUPDate
If Err Then Err.Clear:Set connUPDate = Nothing:Response.write "<script>alert('数据库连接出错!');location.href = 'javascript:history.go(-1)';</Script>":Response.End 

IF Request.form("UPMovie")<>"" Then
Select Case Request.Form("MovieClass")
Case 1,2
set rs=server.createobject("adodb.recordset")
sql="select articleid,title,[name],domurl,serverip,typeid,[where],content,hits,firstbest,count,dateandtime from learning order by articleid asc"
rs.open sql,connUPDate,1,1
If Not rs.Eof Then
UpMovie=rs.GetRows()
End If
rs.Close
Set rs=Nothing
Case 3
set rs=server.createobject("adodb.recordset")
sql="select id,影片名,主演,大图,服务器号,分类,出产地,详细介绍,观看次数,推荐,观看需点,加入时间 from 影片 order by id asc"
rs.open sql,connUPDate,1,1
If Not rs.Eof Then
UpMovie=rs.GetRows()
End If
rs.Close
Set rs=Nothing
Case 4
sql="select id,title,name,pic,serverip,class,area,content,hits,firstbest,money,addtime,playid from jdzcnnet_movie order by id asc"
Set rs = connUPDate.Execute(sql)
If Not rs.Eof Then
UpMovie=rs.GetRows()
End If
rs.Close
Set rs=Nothing
End Select

for i=0 to Ubound(UpMovie,2)
set rs=server.createobject("adodb.recordset")
sql="select * from YWNT_TMS_Movie" 
rs.open sql,conn,1,3
rs.addnew
rs("MovieName")=UpMovie(1,i)
rs("MovieActor")=UpMovie(2,i)
Select Case Request.Form("MovieClass")
Case 1,2
rs("MoviePic")=Replace(UpMovie(3,i),"tupian/","/UpFiles/")
Case 3
rs("MoviePic")=Replace(UpMovie(3,i),"UploadFile/","/UpFiles/")
case 4
rs("MoviePic")=Replace(UpMovie(3,i),"../upload/","/UpFiles/")
End Select
rs("SeverID")=NoSqlHack(Request.Form("Sever"&UpMovie(4,i)))
rs("TypeID")=NoSqlHack(Request.Form("Class"&UpMovie(5,i)))
rs("MovieRegion")=NoSqlHack(Request.Form("Region"&UpMovie(6,i)))
rs("MovieContent")=UpMovie(7,i)
rs("MovieClick")=UpMovie(8,i)
rs("MovieSuggest")=UpMovie(9,i)
rs("MovieCoin")=UpMovie(10,i)
rs("MovieCompetence")=0
rs("MovieLook")=1
Select Case Request.Form("MovieClass")
Case 1,2,3
rs("MovieDate")=UpMovie(11,i)
Case 4
rs("MovieDate")=date()
End Select
rs("MovieAudit")=1
rs.update
rs.close
set rs=nothing
set RS = Conn.execute("select top 1 ID from YWNT_TMS_Movie Order by ID desc")
articleid=RS("ID")
Rs.Close
Set Rs = Nothing

Select Case Request.Form("MovieClass")
Case 1
set rs2=server.createobject("adodb.recordset")
sql2="select * from movieurl where nameid='"&UpMovie(0,i)&"' order by id asc"
rs2.open sql2,connUPDate,1,1
do while not rs2.eof
Conn.Execute("insert into YWNT_TMS_MovieUrl(MovieID,MovieUrl) values("&articleid&",'"&rs2("url")&"')")
rs2.movenext
loop
rs2.close
set rs2=nothing
Case 2
set rs2=server.createobject("adodb.recordset")
sql2="select * from movieurl where nameid='"&UpMovie(0,i)&"' order by id asc"
rs2.open sql2,connUPDate,1,1
do while not rs2.eof
Conn.Execute("insert into YWNT_TMS_MovieUrl(MovieID,MovieUrl) values("&articleid&",'"&rs2("url")&"')")
rs2.movenext
loop
rs2.close
set rs2=nothing
set rs2=server.createobject("adodb.recordset")
sql2="select * from moviep2p where nameid='"&UpMovie(0,i)&"' order by id asc"
rs2.open sql2,connUPDate,1,1
do while not rs2.eof
Conn.Execute("insert into YWNT_TMS_P2PUrl(MovieID,P2PUrl) values("&articleid&",'"&rs2("urlp2p")&"')")
rs2.movenext
loop
rs2.close
set rs2=nothing
Case 3
set rs2=server.createobject("adodb.recordset")
sql2="select * from 影片地址 where 所属影片="&UpMovie(0,i)&" order by id asc"
rs2.open sql2,connUPDate,1,1
do while not rs2.eof
Conn.Execute("insert into YWNT_TMS_MovieUrl(MovieID,MovieUrl) values("&articleid&",'"&rs2("地址")&"')")
rs2.movenext
loop
rs2.close
set rs2=nothing
Case 4
set rs2=server.createobject("adodb.recordset")
sql2="select * from jdzcnnet_url where movid="&UpMovie(0,i)&" order by id asc"
rs2.open sql2,connUPDate,1,1
do while not rs2.eof
IF UpMovie(12,i)=1 or UpMovie(12,i)=2 or UpMovie(12,i)=3 or UpMovie(12,i)=5 or UpMovie(12,i)=9 then
Conn.Execute("insert into YWNT_TMS_MovieUrl(MovieID,MovieUrl) values("&articleid&",'"&rs2("url")&"')")
ElseIF UpMovie(12,i)=7 then
Conn.Execute("insert into YWNT_TMS_P2PUrl(MovieID,P2PUrl) values("&articleid&",'"&rs2("url")&"')")
end if
rs2.movenext
loop
rs2.close
set rs2=nothing
End Select

Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbNewLine
Response.Write vbTab & "document.getElementById(""UPname"").innerHTML = ""正在迁升影片数据"";" & vbNewLine
Response.Write vbTab & "document.getElementById(""RefreshLenx"").style.width = """&(i/Ubound(UpMovie,2))*100&"%"&""";" & vbNewLine
Response.Write vbTab & "document.getElementById(""RefreshLenx"").innerHTML = """&Round((i/Ubound(UpMovie,2))*100)&"%"&""";" & vbNewLine
Response.Write vbTab & "document.getElementById(""ClassHtmlNum"").innerHTML = """ & i & """;" & vbNewLine
Response.Write vbTab & "document.getElementById(""ClassNum"").innerHTML = """ & Ubound(UpMovie,2) & """;" & vbNewLine
Response.Write "</script>" & vbNewLine
Response.Flush
next
End if

IF Request.form("UPUsers")<>"" Then		'会员
Select Case Request.Form("MovieClass")
Case 1,2
set rs=server.createobject("adodb.recordset")
sql="select id,userid,password,baoyue,usercount,money,city,adress,email,date from users order by id asc"
rs.open sql,connUPDate,1,1
If Not rs.Eof Then
UpUsers=rs.GetRows()
End If
rs.Close
Set rs=Nothing
Case 3
set rs=server.createobject("adodb.recordset")
sql="select id,用户名,密码,级别,点数,到期时间,问题,答案,邮箱,注册时间 from 会员 order by id asc"
rs.open sql,connUPDate,1,1
If Not rs.Eof Then
UpUsers=rs.GetRows()
End If
rs.Close
Set rs=Nothing
Case 4
set rs=server.createobject("adodb.recordset")
sql="select uid,username,password,usertype,money,endtime,question,answer,regdate from jdzcnnet_members order by id asc"
rs.open sql,connUPDate,1,1
If Not rs.Eof Then
UpUsers=rs.GetRows()
End If
rs.Close
Set rs=Nothing
End Select

dim i
for i=0 to Ubound(UpUsers,2)
Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select * from YWNT_TMS_Users"
Rs.open sql,Conn,1,3
Rs.addnew
RS("UsersName")=UpUsers(1,i)
Select Case Request.Form("MovieClass")
Case 1,2
RS("UsersPassword")=UpUsers(2,i)
RS("UsersType")=UpUsers(3,i)
Case 3
RS("UsersPassword")=mid(UpUsers(2,i),9,16)
if UpUsers(3,i)>1 then
RS("UsersType")=1
else
RS("UsersType")=0
end if
Case 4
RS("UsersPassword")=mid(UpUsers(2,i),9,16)
RS("UsersType")=UpUsers(3,i)
End Select
RS("UsersProblems")=UpUsers(6,i)
RS("UsersAnswer")=UpUsers(7,i)
RS("UsersGroup")=GetUsersSystem("UsersRegGroup")
RS("UsersCoin")=UpUsers(4,i)
RS("UsersCoinDate")=UpUsers(5,i)
RS("UsersTrueName")=UpUsers(1,i)
RS("UsersEmail")=UpUsers(8,i)
RS("UsersQQ")=""
RS("UsersRegDate")=UpUsers(9,i)
Rs.Update
Rs.Close
Set Rs = Nothing

Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbNewLine
Response.Write vbTab & "document.getElementById(""UPname"").innerHTML = ""正在迁升会员数据"";" & vbNewLine
Response.Write vbTab & "document.getElementById(""RefreshLenx"").style.width = """&(i/Ubound(UpUsers,2))*100&"%"&""";" & vbNewLine
Response.Write vbTab & "document.getElementById(""RefreshLenx"").innerHTML = """&Round((i/Ubound(UpUsers,2))*100)&"%"&""";" & vbNewLine
Response.Write vbTab & "document.getElementById(""ClassHtmlNum"").innerHTML = """ & i & """;" & vbNewLine
Response.Write vbTab & "document.getElementById(""ClassNum"").innerHTML = """ & Ubound(UpUsers,2) & """;" & vbNewLine
Response.Write "</script>" & vbNewLine
Response.Flush
next
End IF
end sub%>
</BODY></HTML>
