<!--#Include File="Include/CmsDj.Label.asp"-->
<!--#Include File="Include/CmsDj.Md5.asp"-->
<!--#include file="Data/Cache/CmsDj.User.asp"-->
<%
'=====================================================
' 描述: 七禧舞曲管理程序数据导入系统
' 作者: 花心萝卜(www.7xiwl.com)
' 日期：2009年10月25日
' 版权: 本作品由七禧网络开发，但是请勿移除版权信息
'=====================================================
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>七禧舞曲管理系统V3.0数据导入系统</title>
<style type="text/css">
* {font-size: 12px;font-family: "宋体";}
body {font-size: 12px;line-height: 1.5;font-family: "宋体";}
form,h1,h2,h3,ul,ol,div {margin: 0; padding:0;}
td,th,div {word-break:break-all;word-wrap:break-word;}
b,strong {color:#666600;}
li,dd {list-style-type:none; margin:0px; padding:0px;}
input[type=button] {background-color: #F1F8B4;}
h1 {color:#171B16; font-size:130%; font-weight:bold;}
h2 {color:#171B16; font-size:115%; font-weight:bold;}
h3 {color:#171B16; font-size:100%; font-weight:bold;}
a:link {font-size: 9pt; color: #000000; text-decoration: none; font-family: ""宋体"";}
a:visited {font-size: 9pt; color: #000000; text-decoration: none; font-family: ""宋体"";}
a:hover {color: red; font-family: ""宋体"";}
a img {border-style:none;}
b a {color:#666600;}
strong a {color:#666600;}
a b {color:#666600;}
a strong {color:#666600;}
input {border: 1px solid #ababab;}
.np {border:none;}
.linerow{border-bottom: 1px solid #ACACAC;}
.coolbg {
  border-right: 1px solid #ACACAC;
  border-bottom: 1px solid #ACACAC;
  background-color: #F1F8B4;
  padding:2px;
  padding-right:5px;
  padding-left:5px;
  cursor:pointer;
}
</style>
</head>
<body leftmargin='8' topmargin='8'>
<%
action=request("do")
If action="importa" Then
    Call Import_A
ElseIf action="addpic" Then

Else
    Call Import_Main
End If

Sub Import_Main
%>
<table width="600" border="0" cellpadding="3" cellspacing="1" bgcolor="#D1DDAA" align="center">
  <form name="form1" action="" method="get" target='stafrm'>
  <input type="hidden" name="do" value="importa" />
    <tr> 
      <td height="28" colspan="2">
      	<table width="98%" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="70%" height="18"><strong>七禧舞曲管理系统V3.0数据导入系统：</strong></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="25%" height="20" align="right">旧版数据库地址：</td>
      <td width="75%" height="20"><input name="MdbA" type="text" id="MdbA" value="Data.mdb" size="30"> 数据库名称不能带符号</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td align="right">3.0 数据库地址：</td>
      <td><input name="MdbB" type="text" id="MdbB" value="<%=CD_DataPath%>" size="30" disabled></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td align="right">选择导入的版本：</td>
      <td>
                <input type="radio" name="MdbC" value="0" disabled>&nbsp;1.2 导入 3.0
                <input type="radio" name="MdbC" value="1" checked>&nbsp;2.0 导入 3.0
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="right">选择要导入内容：</td>
      <td>
                <input type="radio" name="MdbD" value="0" style="margin-bottom:3px;" checked>&nbsp;舞曲
                <input type="radio" name="MdbD" value="1" style="margin-bottom:3px;">&nbsp;会员
                <input type="radio" name="MdbD" value="2" style="margin-bottom:3px;">&nbsp;专辑
                <input type="radio" name="MdbD" value="3" style="margin-bottom:3px;">&nbsp;栏目
                <input type="radio" name="MdbD" value="4" style="margin-bottom:3px;">&nbsp;服务器<br>
                <input type="radio" name="MdbD" value="5" style="margin-bottom:3px;">&nbsp;空间
                <input type="radio" name="MdbD" value="6" style="margin-bottom:3px;">&nbsp;日志
                <input type="radio" name="MdbD" value="7" style="margin-bottom:3px;">&nbsp;相册<br>
                <span style="color:red">图片等文件自己复制过去吧</span>
      </td>
    </tr>
    <tr> 
      <td height="20" colspan="2" bgcolor="#FAFAF1" align="center">
      	<input name="b112" type="button" class="coolbg np" value="开始导入" onClick="document.form1.submit();" style="width:100px"> 
      </td>
    </tr>
  </form>
  <tr bgcolor="#E6F3CD"> 
    <td height="20" colspan="2"> <table width="100%">
        <tr> 
          <td width="74%">进行状态：</td>
          <td width="26%" align="right"></td>
        </tr>
      </table></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" id="mtd">
       <div id='mdv' style='width:100%;height:110px;'> 
        <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="110"></iframe>
       </div>
    </td>
  </tr>
  <tr bgcolor="#EEF4EA"> 
    <td height="36" colspan="2">
      <table width="100%">
        <tr> 
          <td align="center">程序开发：<a href='http://www.7xiwl.com' target='_blank'>七禧网络</a> 作者：花心萝卜</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%End Sub

Sub Import_A
MdbA=request("MdbA")
MdbB=request("MdbB")
MdbC=request("MdbC")
MdbD=request("MdbD")
page=int(request.QueryString ("page"))
pagecout=int(request.QueryString ("pagecout"))
if page<=0 or page="" then page=1'初始化分页参数
%>
<table align="center" width="100%" border="0" cellspacing="4" cellpadding="4">
	<tr>
		<td align="center">数据正在导入中，已完成：<span id="pagenow" style="color:magenta">0</span> / <span id="pagecout" style="color:blue">0</span> / <span id="iii" style="color:darkgreen">0</span> / <span id="mmm" style="color:red">0</span></td>
	</tr>
	<tr>
		<td>
			<table style="border-collapse:collapse;" border="1" bordercolor="#666666" cellpadding="0" cellspacing="0" width="560" align="center" bgcolor="#eeeeee">

				<tr>
					<td><div style="WORD-WRAP: break-word; width:100%;"><div id="percentdone" style="width:0%; background:#EEB525;"></div></div></td>
				</tr>

			</table>

		</td>
	</tr>
	<tr>
		<td align="center"><span id="msg" style="color:red">数据正在导入中，请勿刷新浏览器</span></td>
	</tr>
</table>
<%
    Dim connexport,connstrexport
    on error resume next
    connstrexport="DBQ="+server.mappath(MdbA)+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
    set connexport=server.createobject("ADODB.CONNECTION")
    connexport.open connstrexport
    If Err Then
    Err.Clear
    Response.Write "<script>document.getElementById(""msg"").innerHTML=""旧版数据库地址错误"";</script>"&VbCrLf
    Response.End
    Set connexport = Nothing
    End If
    If MdbD=0 Then
			i=0
			Set RsAspDj = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_Dj"
			RsAspDj.Open sql, connexport, 1, 1
			If Not(RsAspDj.bof And RsAspDj.EOF) Then
				RsAspDj.pagesize=1000        '每页数据
				RsAspDj.AbsolutePage=page
				m=RsAspDj.recordcount     '总记录
				n=RsAspDj.PageCount       '总页数
				z=RsAspDj.pagesize        '每页数量
				do while not RsAspDj.eof  and i<RsAspDj.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_Dj","exe"
					end if
					Call CmsDj_Add_Dj(RsAspDj("Dj_Id"),RsAspDj("Dj_Name"),RsAspDj("DjCat_Id"),RsAspDj("SpecialID"),RsAspDj("Dj_User"),RsAspDj("TjUser"),RsAspDj("Dj_Pic"),RsAspDj("Dj_Url"),RsAspDj("Mp3_Url"),RsAspDj("Dj_Word"),RsAspDj("Dj_Lrc"),RsAspDj("Hits"),RsAspDj("DownHits"),RsAspDj("BoxHits"),RsAspDj("uHits"),RsAspDj("dHits"),RsAspDj("DayHits"),RsAspDj("WeekHits"),RsAspDj("MonthHits"),RsAspDj("LastHitTime"),RsAspDj("Dj_Date"),RsAspDj("Path"),RsAspDj("Deleted"),RsAspDj("IsBest"),RsAspDj("Error"),RsAspDj("Passed"),RsAspDj("Points"),RsAspDj("Grade"),RsAspDj("Font"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspDj.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspDj.Close                               
			Set RsAspDj=nothing
    ElseIf MdbD=1 Then
			i=0
			Set RsAspUser = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_User"
			RsAspUser.Open sql, connexport, 1, 1
			If Not(RsAspUser.bof And RsAspUser.EOF) Then
				RsAspUser.pagesize=1000        '每页数据
				RsAspUser.AbsolutePage=page
				m=RsAspUser.recordcount     '总记录
				n=RsAspUser.PageCount       '总页数
				z=RsAspUser.pagesize        '每页数量
				do while not RsAspUser.eof  and i<RsAspUser.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_User","exe"
					end if
					Call CmsDj_Add_User(RsAspUser("UserID"),RsAspUser("UserName"),RsAspUser("NiCheng"),RsAspUser("Password"),RsAspUser("Question"),RsAspUser("Answer"),RsAspUser("Email"),RsAspUser("Sex"),RsAspUser("RegDate"),RsAspUser("LastLoginIP"),RsAspUser("LoginTimes"),RsAspUser("QQ"),RsAspUser("LastLoginTime"),RsAspUser("UserGrade"),RsAspUser("UserLock"),RsAspUser("Points"),RsAspUser("UserPhoto"),RsAspUser("UserSign"),RsAspUser("hidden"),RsAspUser("whe"),RsAspUser("birthday"),RsAspUser("address"),RsAspUser("vipindate"),RsAspUser("vipenddate"),RsAspUser("Hits"),RsAspUser("isbest"),RsAspUser("Money"),RsAspUser("UserSkin"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspUser.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspUser.Close                               
			Set RsAspUser=nothing
    ElseIf MdbD=2 Then
			i=0
			Set RsAspSpecial = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_DjSpecial"
			RsAspSpecial.Open sql, connexport, 1, 1
			If Not(RsAspSpecial.bof And RsAspSpecial.EOF) Then
				RsAspSpecial.pagesize=1000        '每页数据
				RsAspSpecial.AbsolutePage=page
				m=RsAspSpecial.recordcount     '总记录
				n=RsAspSpecial.PageCount       '总页数
				z=RsAspSpecial.pagesize        '每页数量
					do while not RsAspSpecial.eof  and i<RsAspSpecial.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_Special","exe"
					end if
					Call CmsDj_Add_Special(RsAspSpecial("SpecialID"),RsAspSpecial("ClassID"),RsAspSpecial("Name"),RsAspSpecial("ZjUser"),RsAspSpecial("Pic"),RsAspSpecial("GongSi"),RsAspSpecial("YuYan"),RsAspSpecial("Intro"),RsAspSpecial("Hits"),RsAspSpecial("IsBest"),RsAspSpecial("Passed"),RsAspSpecial("DateAndTime"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspSpecial.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspSpecial.Close                               
			Set RsAspSpecial=nothing
    ElseIf MdbD=3 Then
			i=0
			Set RsAspDjCat = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_DjCat"
			RsAspDjCat.Open sql, connexport, 1, 1
			If Not(RsAspDjCat.bof And RsAspDjCat.EOF) Then
				RsAspDjCat.pagesize=1000        '每页数据
				RsAspDjCat.AbsolutePage=page
				m=RsAspDjCat.recordcount     '总记录
				n=RsAspDjCat.PageCount       '总页数
				z=RsAspDjCat.pagesize        '每页数量
					do while not RsAspDjCat.eof  and i<RsAspDjCat.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_Class","exe"
					end if
					Call CmsDj_Add_Class(RsAspDjCat("DjCat_Id"),RsAspDjCat("DjCat_Name"),RsAspDjCat("ClassAbc"),RsAspDjCat("ClassDir"),RsAspDjCat("ClassOrder"),RsAspDjCat("Idd"),RsAspDjCat("ClassUrl"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspDjCat.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspDjCat.Close                               
			Set RsAspDjCat=nothing
    ElseIf MdbD=4 Then
			i=0
			Set RsAspDjServer = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_DjServer"
			RsAspDjServer.Open sql, connexport, 1, 1
			If Not(RsAspDjServer.bof And RsAspDjServer.EOF) Then
				RsAspDjServer.pagesize=1000        '每页数据
				RsAspDjServer.AbsolutePage=page
				m=RsAspDjServer.recordcount     '总记录
				n=RsAspDjServer.PageCount       '总页数
				z=RsAspDjServer.pagesize        '每页数量
					do while not RsAspDjServer.eof  and i<RsAspDjServer.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_Server","exe"
					end if
					Call CmsDj_Add_Server(RsAspDjServer("DjServerId"),RsAspDjServer("DjServerName"),RsAspDjServer("DjServerUrl"),RsAspDjServer("DjServerDown"),RsAspDjServer("DjServerYes"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspDjServer.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspDjServer.Close                               
			Set RsAspDjServer=nothing
    ElseIf MdbD=5 Then
			i=0
			Set RsAspWeb = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_Web"
			RsAspWeb.Open sql, connexport, 1, 1
			If Not(RsAspWeb.bof And RsAspWeb.EOF) Then
				RsAspWeb.pagesize=1000        '每页数据
				RsAspWeb.AbsolutePage=page
				m=RsAspWeb.recordcount     '总记录
				n=RsAspWeb.PageCount       '总页数
				z=RsAspWeb.pagesize        '每页数量
					do while not RsAspWeb.eof  and i<RsAspWeb.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_Web","exe"
					end if
					Call CmsDj_Add_Web(RsAspWeb("WebID"),RsAspWeb("UserID"),RsAspWeb("UserName"),RsAspWeb("WebName"),RsAspWeb("WebIntro"),RsAspWeb("WebMb"),RsAspWeb("WebHits"),RsAspWeb("WebA"),RsAspWeb("WebAl"),RsAspWeb("WebAt"),RsAspWeb("WebC"),RsAspWeb("WebDate"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspWeb.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspWeb.Close                               
			Set RsAspWeb=nothing
    ElseIf MdbD=6 Then
			i=0
			Set RsAspArt = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_Art"
			RsAspArt.Open sql, connexport, 1, 1
			If Not(RsAspArt.bof And RsAspArt.EOF) Then
				RsAspArt.pagesize=1000        '每页数据
				RsAspArt.AbsolutePage=page
				m=RsAspArt.recordcount     '总记录
				n=RsAspArt.PageCount       '总页数
				z=RsAspArt.pagesize        '每页数量
					do while not RsAspArt.eof  and i<RsAspArt.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_Art","exe"
					end if
					Call CmsDj_Add_Art(RsAspArt("ID"),RsAspArt("UserID"),RsAspArt("UserName"),RsAspArt("Title"),RsAspArt("Content"),RsAspArt("Hidden"),RsAspArt("Hits"),RsAspArt("UpdateTime"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspArt.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspArt.Close                               
			Set RsAspArt=nothing
    ElseIf MdbD=7 Then
			i=0
			Set RsAspPic = Server.CreateObject("adodb.recordset")
			sql = "select * from Ylmv_Pic"
			RsAspPic.Open sql, connexport, 1, 1
			If Not(RsAspPic.bof And RsAspPic.EOF) Then
				RsAspPic.pagesize=1000        '每页数据
				RsAspPic.AbsolutePage=page
				m=RsAspPic.recordcount     '总记录
				n=RsAspPic.PageCount       '总页数
				z=RsAspPic.pagesize        '每页数量
					do while not RsAspPic.eof  and i<RsAspPic.pagesize
					i=i+1
					if i=1 and page=1 then
						Conn.DB "delete from CmsDj_Pic","exe"
					end if
					Call CmsDj_Add_Pic(RsAspPic("ID"),RsAspPic("UserID"),RsAspPic("UserName"),RsAspPic("Title"),RsAspPic("StyleType"),RsAspPic("PicUrl"),RsAspPic("Hidden"),RsAspPic("Hits"),RsAspPic("UpdateTime"))
					percentdone=FormatPercent(i/z)
					if percentdone<"0" then
						percentdone=Replace(percentdone,percentdone,"0"&percentdone)
					else
						percentdone=percentdone
					end if
					Response.Write "<script>document.getElementById(""pagenow"").innerHTML="""&page&""";document.getElementById(""pagecout"").innerHTML="""&n&""";document.getElementById(""iii"").innerHTML="""&i&""";document.getElementById(""mmm"").innerHTML="""&z&""";document.getElementById(""percentdone"").style.width="""&percentdone&""";</script>"&VbCrLf
				Response.Flush()
				RsAspPic.movenext
				loop
			Else
				Response.Write "<script>document.getElementById(""msg"").innerHTML=""没有数据"";</script>"&VbCrLf
			End If
			RsAspPic.Close                               
			Set RsAspPic=nothing
    End If
    If page>n Then
    	Response.Write "<script>document.getElementById(""msg"").innerHTML="""&m&" 条数据已全部导入"";</script>"&VbCrLf
    Else
    	Response.Write "<meta http-equiv=""refresh"" content=""0;url='?do="&request("do")&"&MdbA="&request("MdbA")&"&MdbB="&request("MdbB")&"&MdbC="&request("MdbC")&"&MdbD="&request("MdbD")&"&page="&page+1&"&pagecout="&n&"'"">"
    End If
%>
<%End Sub%>
</body>
</html>

<%
Sub CmsDj_Add_Pic(ID,UserID,UserName,Title,StyleType,PicUrl,Hidden,Hits,UpdateTime)
    dim RsPic
    Set CmsDjPic = New CmsDj_Com_Pic
    Set RsPic=CmsDjPic.GetRs("",0,"ID is null")
    RsPic.addnew
    RsPic("ID")=ID
    RsPic("UserID")=UserID
    RsPic("UserName")=UserName
    RsPic("Title")=Title
    RsPic("StyleType")=StyleType
    RsPic("PicUrl")=PicUrl
    RsPic("Hidden")=Hidden
    RsPic("Hits")=Hits
    RsPic("UpdateTime")=UpdateTime
    RsPic.update
    RsPic.close
    set RsPic=nothing
End Sub

Sub CmsDj_Add_Art(ID,UserID,UserName,Title,Content,Hidden,Hits,UpdateTime)
    dim RsArt
    Set CmsDjArt = New CmsDj_Com_Art
    Set RsArt=CmsDjArt.GetRs("",0,"ID is null")
    RsArt.addnew
    RsArt("ID")=ID
    RsArt("UserID")=UserID
    RsArt("UserName")=UserName
    RsArt("Title")=Title
    RsArt("Content")=Content
    RsArt("Hidden")=Hidden
    RsArt("Hits")=Hits
    RsArt("UpdateTime")=UpdateTime
    RsArt.update
    RsArt.close
    set RsArt=nothing
End Sub

Sub CmsDj_Add_Web(WebID,UserID,UserName,WebName,WebIntro,WebMb,WebHits,WebA,WebAl,WebAt,WebB,WebDate)
    dim RsWeb
    Set CmsDjWeb = New CmsDj_Com_Web
    Set RsWeb=CmsDjWeb.GetRs("",0,"WebID is null")
    RsWeb.addnew
    RsWeb("WebID")=WebID
    RsWeb("UserID")=UserID
    RsWeb("UserName")=UserName
    RsWeb("WebName")=WebName
    RsWeb("WebIntro")=WebIntro
    RsWeb("WebMb")=WebMb
    RsWeb("WebHits")=WebHits
    RsWeb("WebAl")=WebAl
    RsWeb("WebAt")=WebAt
    RsWeb("WebLock")=0
    RsWeb("WebDate")=WebDate
    RsWeb.update
    RsWeb.close
    set RsWeb=nothing
End Sub

Sub CmsDj_Add_Server(CD_ID,CD_Name,CD_Url,CD_DownUrl,CD_Yes)
    dim RsServer
    Set CmsDjServer = New CmsDj_Com_Server
    Set RsServer=CmsDjServer.GetRs("",0,"CD_ID is null")
    RsServer.addnew
    RsServer("CD_ID")=CD_ID
    RsServer("CD_Name")=CD_Name
    RsServer("CD_Url")=CD_Url
    RsServer("CD_DownUrl")=CD_DownUrl
    RsServer("CD_Yes")=CD_Yes
    RsServer.update
    RsServer.close
    set RsServer=nothing
End Sub

Sub CmsDj_Add_Class(CD_ID,CD_Name,CD_AliasName,CD_SystemID,CD_TheOrder,CD_IsHide,CD_ClassUrl)
    dim RsClass
    Set CmsDjClass = New CmsDj_Com_DjClass
    Set RsClass=CmsDjClass.GetRs("",0,"CD_ID is null")
    RsClass.addnew
    RsClass("CD_ID")=CD_ID
    RsClass("CD_Name")=CD_Name
    If CD_SystemID=0 Then
        RsClass("CD_AliasName")=CD_AliasName
    ElseIf CD_SystemID=1 Then
        RsClass("CD_AliasName")=CD_ClassUrl
    End If
    RsClass("CD_Template")="List.Html"
    RsClass("CD_FatherID")=0
    If CD_SystemID=0 Then
        RsClass("CD_SystemID")=1
    ElseIf CD_SystemID=1 Then
        RsClass("CD_SystemID")=2
    End If
    RsClass("CD_TheOrder")=CD_TheOrder
    RsClass("CD_IsHide")=CD_IsHide
    RsClass.update
    RsClass.close
    set RsClass=nothing
End Sub

Sub CmsDj_Add_Special(CD_ID,CD_ClassID,CD_Name,CD_User,CD_Pic,CD_GongSi,CD_YuYan,CD_Intro,CD_Hits,CD_IsBest,CD_Passed,CD_AddTime)
    dim RsSpecial
    Set CmsDjSpecial = New CmsDj_Com_Special
    Set RsSpecial=CmsDjSpecial.GetRs("",0,"CD_ID is null")
    RsSpecial.addnew
    RsSpecial("CD_ID")=CD_ID
    RsSpecial("CD_ClassID")=CD_ClassID
    RsSpecial("CD_Name")=CD_Name
    RsSpecial("CD_User")=CD_User
    RsSpecial("CD_Pic")=CD_Pic
    RsSpecial("CD_GongSi")=CD_GongSi
    RsSpecial("CD_YuYan")=CD_YuYan
    RsSpecial("CD_Intro")=CD_Intro
    RsSpecial("CD_Hits")=CD_Hits
    RsSpecial("CD_IsBest")=CD_IsBest
    RsSpecial("CD_Passed")=CD_Passed
    RsSpecial("CD_AddTime")=CD_AddTime
    RsSpecial.update
    RsSpecial.close
    set RsSpecial=nothing
End Sub

Sub CmsDj_Add_User(UserID,UserName,NiCheng,Password,Question,Answer,Email,Sex,RegDate,LastLoginIP,LoginTimes,QQ,LastLoginTime,UserGrade,UserLock,Points,UserPhoto,UserSign,hidden,whe,birthday,address,vipindate,vipenddate,Hits,isbest,Money,UserSkin)
    dim RsUser
    Set CmsDjUser = New CmsDj_Com_User
    Set RsUser=CmsDjUser.GetRs("",0,"UserID is null")
    RsUser.addnew
    RsUser("UserID")=UserID
    RsUser("UserName")=UserName
    RsUser("NiCheng")=NiCheng
    RsUser("Password")=Password
    RsUser("Question")=Question
    RsUser("Answer")=Answer
    RsUser("Email")=Email
    RsUser("Sex")=Sex
    RsUser("RegDate")=RegDate
    RsUser("LastLoginIP")=LastLoginIP
    RsUser("LoginTimes")=LoginTimes
    RsUser("QQ")=QQ
    RsUser("LastLoginTime")=LastLoginTime
    RsUser("UserGrade")=UserGrade
    RsUser("UserLock")=UserLock
    RsUser("Points")=Points
    RsUser("UserPhoto")=UserPhoto
    RsUser("UserSign")=UserSign
    RsUser("hidden")=hidden
    RsUser("whe")=whe
    RsUser("birthday")=birthday
    RsUser("address")=address
    RsUser("vipindate")=vipindate
    RsUser("vipenddate")=vipenddate
    RsUser("Hits")=Hits
    RsUser("isbest")=isbest
    RsUser("Money")=Money
    RsUser("WebLock")=0
    RsUser("UserSkin")=UserSkin
    RsUser("FriendNum")=CD_FriendNum
    RsUser("MessageNum")=CD_MessageNum
    RsUser("UserRank")=CD_UserRank
    RsUser.update
    RsUser.close
    set RsUser=nothing
End Sub

Sub CmsDj_Add_Dj(CD_ID,CD_Name,CD_ClassID,CD_SpecialID,CD_Singer,CD_User,CD_Pic,CD_Url,CD_DownUrl,CD_Word,CD_Lrc,CD_Hits,CD_DownHits,CD_FavHits,CD_uHits,CD_dHits,CD_DayHits,CD_WeekHits,CD_MonthHits,CD_LastHitTime,CD_AddTime,CD_Server,CD_Deleted,CD_IsBest,CD_Error,CD_Passed,CD_Points,CD_Grade,CD_Color)
    dim RsDj
    Set CmsDjMusic = New CmsDj_Com_Dj
    Set RsDj=CmsDjMusic.GetRs("",0,"CD_ID is null")
    RsDj.addnew
    RsDj("CD_ID")=CD_ID
    RsDj("CD_Name")=CD_Name
    RsDj("CD_ClassID")=CD_ClassID
    RsDj("CD_SpecialID")=CD_SpecialID
    RsDj("CD_Singer")=CD_Singer
    RsDj("CD_User")=CD_User
    RsDj("CD_Pic")=CD_Pic
    RsDj("CD_Url")=CD_Url
    RsDj("CD_DownUrl")=CD_DownUrl
    RsDj("CD_Word")=CD_Word
    RsDj("CD_Lrc")=CD_Lrc
    RsDj("CD_Hits")=CD_Hits
    RsDj("CD_DownHits")=CD_DownHits
    RsDj("CD_FavHits")=CD_FavHits
    RsDj("CD_uHits")=CD_uHits
    RsDj("CD_dHits")=CD_dHits
    RsDj("CD_DayHits")=CD_DayHits
    RsDj("CD_WeekHits")=CD_WeekHits
    RsDj("CD_MonthHits")=CD_MonthHits
    RsDj("CD_LastHitTime")=CD_LastHitTime
    RsDj("CD_AddTime")=CD_AddTime
    RsDj("CD_Server")=CD_Server
    RsDj("CD_Deleted")=CD_Deleted
    RsDj("CD_IsBest")=CD_IsBest
    RsDj("CD_Error")=CD_Error
    RsDj("CD_Passed")=CD_Passed
    RsDj("CD_Points")=CD_Points
    RsDj("CD_Grade")=CD_Grade
    RsDj("CD_Color")=CD_Color
    RsDj("CD_Skin")="Play.Html"
    RsDj.update
    RsDj.close
    set RsDj=nothing
End Sub
%>