  <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="101"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/filesystem.asp"--> 
<!--#include file="../../inc/safe.asp"-->
   <!--#include file="../rolecheck.asp"-->
  
<html>
<head>
<title>系统模版管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/style.css">
</head>
<SCRIPT language=javascript>
function unselectall()
{
    if(document.form.chkAll.checked){
	document.form.chkAll.checked = document.form.chkAll.checked&0;
    } 	
}

function CheckAll(form)
{
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
}
</SCRIPT>
<%
dim action
Action=replace_text(request("Action"))

select case Action
	case "outuser" 
		call outuser()
	case "outuserok"
		call outuserok()
	case "inuser1"
		call inuser1()
	case "inuser2"
		call inuser2()
	case "inuserok"
		call inuserok()
	case "outsys" 
		call outsys()
	case "outsysok"
		call outsysok()
	case "insys1"
		call insys1()
	case "insys2"
		call insys2()
	case "insysok"
		call insysok()
end select

sub outuserok()
	dim mdbname,rs,connskin,fso
	dim skinid,i,rsout
	mdbname=trim(request("mdbname"))	
	set fso=YXFSO
    if fso.FileExists(Server.MapPath(mdbname))=False then
	databasever="2000"
	databasepath=server.mappath(mdbname)
	Createdfile databasepath,databasever '创建数据库 
	
	
	mdbname1=Trim(Request("mdbname"))
	Mbsql="Create table Websen_userskin(id counter primary key,userskinname varchar(50),skinmain text,skinshowlog text,skinauthor varchar(50),skinauthorurl varchar(50),isdefault int,skinpic varchar(50),ispass int,SkinSupply text,SkinPtHall text,SkinPurInfo text,SkinCompanyInfo text,SkinCusApp text,SkinUnInfo text,SkinEmpInfo text,SkinCusMsg text,SkinCantact text)"
	Call Createtable(mdbname1,Mbsql)

    end if
	Set connskin = Server.CreateObject("ADODB.Connection")
	connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)
	set rsout=server.createobject("adodb.recordset")
	rsout.open "select * from Websen_userskin",connskin,1,3
	
	if Trim(request("id"))="" then 
		call HOPE_err("操作错误","ID的值不能为空!","返回","javascript:history.go(-1)")
		Response.end 
	end if
		connskin.execute("Delete From Websen_userskin")
	
	skinid=split(request("id"))
	
	for i=0 to ubound(skinid)
		set rs=conn.execute("select * from Websen_userskin where id="&clng(skinid(i)))
		
		rsout.addnew
		rsout("userskinname")=rs("userskinname")
		rsout("skinmain")=rs("skinmain")
		rsout("skinauthor")=rs("skinauthor")
		rsout("skinauthorurl")=rs("skinauthorurl")
		rsout("isdefault")=rs("isdefault")
		rsout("skinpic")=rs("skinpic")
		rsout("ispass")=rs("ispass")
		rsout("SkinSupply")=rs("SkinSupply")
		rsout("SkinPtHall")=rs("SkinPtHall")
		rsout("SkinPurInfo")=rs("SkinPurInfo")
		rsout("SkinCompanyInfo")=rs("SkinCompanyInfo")
		rsout("SkinCusApp")=rs("SkinCusApp")
		rsout("SkinUnInfo")=rs("SkinUnInfo")
		rsout("SkinEmpInfo")=rs("SkinEmpInfo")
		rsout("SkinCusMsg")=rs("SkinCusMsg")
		rsout("SkinCantact")=rs("SkinCantact")
		rsout.update
	next
	rsout.close
	set rsout=nothing
	set rs=nothing
	response.Write("<script language=javascript>alert('导出成功!');history.back();</script>")
	response.end
end sub

sub inuserok()
	dim mdbname,rs,connskin
	dim skinid,i,rsin
	mdbname=trim(request("mdbname"))	
	Set connskin = Server.CreateObject("ADODB.Connection")
	connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)
	set rsin=server.createobject("adodb.recordset")
	if not IsObject(conn) then link_database
	rsin.open "select top 1 * from Websen_userskin",conn,2,3
	skinid=split(request("id"))
	for i=0 to ubound(skinid)
		set rs=connskin.execute("select * from Websen_userskin where id="&clng(skinid(i)))
		rsin.addnew
		rsin("userskinname")=rs("userskinname")
		rsin("skinmain")=rs("skinmain")
		rsin("skinauthor")=rs("skinauthor")
		rsin("skinauthorurl")=rs("skinauthorurl")
		rsin("isdefault")=rs("isdefault")
		rsin("skinpic")=rs("skinpic")
		rsin("ispass")=rs("ispass")
		rsin("SkinSupply")=rs("SkinSupply")
		rsin("SkinPtHall")=rs("SkinPtHall")
		rsin("SkinPurInfo")=rs("SkinPurInfo")
		rsin("SkinCompanyInfo")=rs("SkinCompanyInfo")
		rsin("SkinCusApp")=rs("SkinCusApp")
		rsin("SkinUnInfo")=rs("SkinUnInfo")
		rsin("SkinEmpInfo")=rs("SkinEmpInfo")
		rsin("SkinCusMsg")=rs("SkinCusMsg")
		rsin("SkinCantact")=rs("SkinCantact")
		rsin.update
	next
	rsin.close
	set rsin=nothing
	set rs=nothing
	response.Write("<script language=javascript>alert('导入成功!');history.back();</script>")
	response.end
end sub



'=================================创建数据库Begin=====================================================
Function Createdfile(FilePath,Ver) 
Dim Ca,dbver 
select case ver 
case "97" 
dbver = "3.51" 
case "2000" 
dbver = "4.0" 
end select 
if dbver <> "" then 
Set Ca = Server.CreateObject("ADOX.Catalog") 
call Ca.Create("Provider=Microsoft.Jet.OLEDB." & dbver & ";Data Source=" & filepath) 
end if 
End Function 
'=================================创建数据库End=====================================================
'=================================创建表Begin=====================================================
Function Createtable(mdbname,Mbsql)
Set connskin = Server.CreateObject("ADODB.Connection")
			connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)	
	
		connskin.execute(Mbsql)
End Function						
'=================================创建表End=====================================================


sub outsysok()

	skinid=Trim(Request("ID"))
	IDSUm=split(skinid,",")
	
	if skinid="" then 
		call HOPE_err("操作错误","ID的值不能为空!","返回","javascript:history.go(-1)")
		Response.end 
	end if
	
dim mdbname,mdbname1,databasename,databasepath,fso

mdbname1=HOPE_InstallDir&"Databackup/Sys_skin"	

mdbname=Trim(Request("mdbname"))
databasepath=Server.MapPath(Trim(Request("mdbname")))
databasever="2000"

			set fsoFile=YXFSO
			
 			   if (fsoFile.FileExists(Server.MapPath(Trim(Request("mdbname"))))) Then
			   
					Set connskin = Server.CreateObject("ADODB.Connection")
					connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)			
			   		connskin.execute("Delete From SyS_skins")
			   	Set rsSkin=server.createobject("adodb.Recordset")
						SqlSkin="select * from  Sys_skins"
						rsSkin.open SqlSkin,connskin,1,3
							
												
						if rsSkin.eof then 
						
						
						  for i=0 to ubound(IDSUm)
						  
						  Set rsSkin1=server.createobject("adodb.recordset")
							SqlSkin1="select * from Websen_worldec_Temp Where id="&Cint(IDSUm(i))
						rsSkin1.open SqlSkin1,Conn,1,1
						
							rsSkin.addnew
								rsSkin("home_index")=rsSkin1("home_index")
								rsSkin("tradeinfo_index")=rsSkin1("tradeinfo_index")
								rsSkin("seller_index")=rsSkin1("seller_index")
								rsSkin("brand_index")=rsSkin1("brand_index")
								rsSkin("corporation_index")=rsSkin1("corporation_index")
								rsSkin("productshow_index")=rsSkin1("productshow_index")
								rsSkin("vipinfo_index")=rsSkin1("vipinfo_index")
								rsSkin("expo_index")=rsSkin1("expo_index")
								rsSkin("info_index")=rsSkin1("info_index")
								rsSkin("tradeinfo_sort")=rsSkin1("tradeinfo_sort")
								rsSkin("tradeinfo_type")=rsSkin1("tradeinfo_type")
								rsSkin("tradeinfo_type2")=rsSkin1("tradeinfo_type2")
								rsSkin("tradeinfo_detail")=rsSkin1("tradeinfo_detail")
								rsSkin("seller_sort")=rsSkin1("seller_sort")
								rsSkin("seller_type")=rsSkin1("seller_type")
								rsSkin("seller_type2")=rsSkin1("seller_type2")
								rsSkin("seller_detail")=rsSkin1("seller_detail")
								rsSkin("corporation_sort")=rsSkin1("corporation_sort")
								rsSkin("corporation_type")=rsSkin1("corporation_type")
								rsSkin("corporation_type2")=rsSkin1("corporation_type2")
								rsSkin("corporation_detail")=rsSkin1("corporation_detail")
								rsSkin("productshow_sort")=rsSkin1("productshow_sort")
								rsSkin("productshow_type")=rsSkin1("productshow_type")
								rsSkin("productshow_type2")=rsSkin1("productshow_type2")
								rsSkin("productshow_detail")=rsSkin1("productshow_detail")
								rsSkin("vipinfo_detail")=rsSkin1("vipinfo_detail")
								rsSkin("help_index")=rsSkin1("help_index")
								rsSkin("help_list")=rsSkin1("help_list")
								rsSkin("help_detail")=rsSkin1("help_detail")
								rsSkin("feedback_index")=rsSkin1("feedback_index")
								rsSkin("expo_type")=rsSkin1("expo_type")
								rsSkin("expo_detail")=rsSkin1("expo_detail")
								rsSkin("expoinfo_type")=rsSkin1("expoinfo_type")
								rsSkin("expoinfo_detail")=rsSkin1("expoinfo_detail")
								rsSkin("info_list")=rsSkin1("info_list")
								rsSkin("info_detail")=rsSkin1("info_detail")
								rsSkin("yx_tempname")=rsSkin1("yx_tempname")
								rsSkin("yx_check")=rsSkin1("yx_check")
								rsSkin("yx_selected")=rsSkin1("yx_selected")
								rsSkin("job_index")=rsSkin1("job_index")
								rsSkin("yx_member")=rsSkin1("yx_member")
								rsSkin("brand_sort")=rsSkin1("brand_sort")
								rsSkin("brand_type")=rsSkin1("brand_type")
								rsSkin("brand_type2")=rsSkin1("brand_type2")
								rsSkin("brand_detail")=rsSkin1("brand_detail")

								
							rsSkin.update()
							rsSkin1.close
							set rsSkin1=nothing
							next
						end if
						rsSkin.close
						set rsSkin=nothing
		call HOPE_err("操作成功","导出系统模板成功!<br>位置:网站根目录下<span style='color:red'>"&HOPE_InstallDir&"databackup/SyS_skin.mdb</span>文件","返回","admin_skin.asp?action=outsys")
						Response.end
											
						
						
				else
					databasever="2000"
					Createdfile databasepath,databasever '创建数据库 
					
				Createtable mdbname,"create table Sys_skins(id counter primary key,home_index text,brand_index text,tradeinfo_index text,seller_index text,corporation_index text,productshow_index text,vipinfo_index text,expo_index text,info_index text,tradeinfo_sort text,tradeinfo_type text,tradeinfo_type2 text,tradeinfo_detail text,seller_sort text,seller_type text,seller_type2 text,seller_detail text,corporation_sort text,corporation_type text,corporation_type2 text,corporation_detail text, productshow_sort text,productshow_type text,productshow_type2 text,productshow_detail text,vipinfo_detail text,help_index text,help_list text,help_detail text,feedback_index text,expo_type text,expo_detail text,expoinfo_type text,expoinfo_detail text,info_list text,info_detail text,yx_tempname varchar(50),yx_check varchar(50),yx_selected int,job_index text,yx_member text,brand_sort text,brand_type text,brand_type2 text,brand_detail text)" '创建表
			
			
			
			
					Set connskin = Server.CreateObject("ADODB.Connection")
			connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)						

					Set rsSkin=server.createobject("adodb.Recordset")
						SqlSkin="select * from  Sys_skins"
						rsSkin.open SqlSkin,connskin,1,3
							
												
						if rsSkin.eof then 
						
							
						  for i=0 to ubound(IDSUm)
						  	
						  Set rsSkin1=server.createobject("adodb.recordset")
							SqlSkin1="select * from Websen_worldec_Temp Where id="&Cint(IDSUm(i))
						rsSkin1.open SqlSkin1,Conn,1,1
								
							rsSkin.addnew
								rsSkin("home_index")=rsSkin1("home_index")
								rsSkin("tradeinfo_index")=rsSkin1("tradeinfo_index")
								rsSkin("seller_index")=rsSkin1("seller_index")
								rsSkin("brand_index")=rsSkin1("brand_index")
								rsSkin("corporation_index")=rsSkin1("corporation_index")
								rsSkin("productshow_index")=rsSkin1("productshow_index")
								rsSkin("vipinfo_index")=rsSkin1("vipinfo_index")
								rsSkin("expo_index")=rsSkin1("expo_index")
								rsSkin("info_index")=rsSkin1("info_index")
								rsSkin("tradeinfo_sort")=rsSkin1("tradeinfo_sort")
								rsSkin("tradeinfo_type")=rsSkin1("tradeinfo_type")
								rsSkin("tradeinfo_type2")=rsSkin1("tradeinfo_type2")
								rsSkin("tradeinfo_detail")=rsSkin1("tradeinfo_detail")
								rsSkin("seller_sort")=rsSkin1("seller_sort")
								rsSkin("seller_type")=rsSkin1("seller_type")
								rsSkin("seller_type2")=rsSkin1("seller_type2")
								rsSkin("seller_detail")=rsSkin1("seller_detail")
								rsSkin("corporation_sort")=rsSkin1("corporation_sort")
								rsSkin("corporation_type")=rsSkin1("corporation_type")
								rsSkin("corporation_type2")=rsSkin1("corporation_type2")
								rsSkin("corporation_detail")=rsSkin1("corporation_detail")
								rsSkin("productshow_sort")=rsSkin1("productshow_sort")
								rsSkin("productshow_type")=rsSkin1("productshow_type")
								rsSkin("productshow_type2")=rsSkin1("productshow_type2")
								rsSkin("productshow_detail")=rsSkin1("productshow_detail")
								rsSkin("vipinfo_detail")=rsSkin1("vipinfo_detail")
								rsSkin("help_index")=rsSkin1("help_index")
								rsSkin("help_list")=rsSkin1("help_list")
								rsSkin("help_detail")=rsSkin1("help_detail")
								rsSkin("feedback_index")=rsSkin1("feedback_index")
								rsSkin("expo_type")=rsSkin1("expo_type")
								rsSkin("expo_detail")=rsSkin1("expo_detail")
								rsSkin("expoinfo_type")=rsSkin1("expoinfo_type")
								rsSkin("expoinfo_detail")=rsSkin1("expoinfo_detail")
								rsSkin("info_list")=rsSkin1("info_list")
								rsSkin("info_detail")=rsSkin1("info_detail")
								rsSkin("yx_tempname")=rsSkin1("yx_tempname")
								rsSkin("yx_check")=rsSkin1("yx_check")
								rsSkin("yx_selected")=rsSkin1("yx_selected")
								rsSkin("job_index")=rsSkin1("job_index")
								rsSkin("yx_member")=rsSkin1("yx_member")
								rsSkin("brand_sort")=rsSkin1("brand_sort")
								rsSkin("brand_type")=rsSkin1("brand_type")
								rsSkin("brand_type2")=rsSkin1("brand_type2")
								rsSkin("brand_detail")=rsSkin1("brand_detail")
								
							rsSkin.update()
							rsSkin1.close
							set rsSkin1=nothing
							next
						end if
						rsSkin.close
						set rsSkin=nothing

				end if
		call HOPE_err("操作成功","导出系统模板成功!<br>位置:网站根目录下<span style='color:red'>"&HOPE_InstallDir&"databackup/SyS_skin.mdb</span>","返回","javascript:history.go(-1)")
						Response.end
	
	connskin.close
	set connskin=nothing

end sub








sub insysok()
	dim mdbname,rs,connskin
	dim skinid,i,rsin
	mdbname=trim(request("mdbname"))	
	Set connskin = Server.CreateObject("ADODB.Connection")
	connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)
	set rsin=server.createobject("adodb.recordset")
	if not IsObject(conn) then link_database
	rsin.open "select * from Websen_worldec_Temp ",conn,2,3
	skinid=split(request("id"))
	for i=0 to ubound(skinid)
		set rs=connskin.execute("select * from Sys_skins where  id="&clng(skinid(i)))
						rsin.addnew

								rsin("home_index")=rs("home_index")
								rsin("tradeinfo_index")=rs("tradeinfo_index")
								rsin("seller_index")=rs("seller_index")
								rsin("brand_index")=rs("brand_index")
								rsin("corporation_index")=rs("corporation_index")
								rsin("productshow_index")=rs("productshow_index")
								rsin("vipinfo_index")=rs("vipinfo_index")
								rsin("expo_index")=rs("expo_index")
								rsin("info_index")=rs("info_index")
								rsin("tradeinfo_sort")=rs("tradeinfo_sort")
								rsin("tradeinfo_type")=rs("tradeinfo_type")
								rsin("tradeinfo_type2")=rs("tradeinfo_type2")
								rsin("tradeinfo_detail")=rs("tradeinfo_detail")
								rsin("seller_sort")=rs("seller_sort")
								rsin("seller_type")=rs("seller_type")
								rsin("seller_type2")=rs("seller_type2")
								rsin("seller_detail")=rs("seller_detail")
								rsin("corporation_sort")=rs("corporation_sort")
								rsin("corporation_type")=rs("corporation_type")
								rsin("corporation_type2")=rs("corporation_type2")
								rsin("corporation_detail")=rs("corporation_detail")
								rsin("productshow_sort")=rs("productshow_sort")
								rsin("productshow_type")=rs("productshow_type")
								rsin("productshow_type2")=rs("productshow_type2")
								rsin("productshow_detail")=rs("productshow_detail")
								rsin("vipinfo_detail")=rs("vipinfo_detail")
								rsin("help_index")=rs("help_index")
								rsin("help_list")=rs("help_list")
								rsin("help_detail")=rs("help_detail")
								rsin("feedback_index")=rs("feedback_index")
								rsin("expo_type")=rs("expo_type")
								rsin("expo_detail")=rs("expo_detail")
								rsin("expoinfo_type")=rs("expoinfo_type")
								rsin("expoinfo_detail")=rs("expoinfo_detail")
								rsin("info_list")=rs("info_list")
								rsin("info_detail")=rs("info_detail")
								rsin("yx_tempname")=rs("yx_tempname")
								rsin("yx_check")=rs("yx_check")
								rsin("yx_selected")=rs("yx_selected")
								rsin("job_index")=rs("job_index")
								rsin("yx_member")=rs("yx_member")
								rsin("brand_sort")=rs("brand_sort")
								rsin("brand_type")=rs("brand_type")
								rsin("brand_type2")=rs("brand_type2")
								rsin("brand_detail")=rs("brand_detail")
		
		rsin.update
	next
	rsin.close
	set rsin=nothing
	set rs=nothing
	response.Write("导入成功！")
	call HOPE_err("操作成功","导入成功!","返回","admin_skin.asp?action=insys1")
		Response.end 

	
	
end sub
%>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor">
<br>
<%
sub outuser()
dim rs
set rs=conn.execute("select * from Websen_userskin ")
%>
<table cellpadding="2" cellspacing="1" border="0" width="98%" class="tableBorder" align=center>
  <tr align="center">
    <th width="300" height=25 class="topbg"><div align="left"><strong>用户模版导出</strong></div>
  </tr>
</table>
<form name="form" method="post" action="admin_skin.asp?action=outuserok">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="tableBorder">
    <tr>
      <td width="63" height="31" align="center" class="bodytitle">选中</td>
      <td width="120" class="bodytitle"> <div align="center">ID</div></td>
      <td width="288"  class="bodytitle"> <div align="center">名称</div></td>
      <td width="292" class="bodytitle"> <div align="center">作者</div></td>
    </tr>
    <% 
while not rs.eof	  
%>
    <tr class="tdbg" >
      <td width="63" align="center" class=forumRow><input name='ID' type='checkbox' onClick="unselectall()" id="ID" value='<%=cstr(rs("id"))%>'></td>
      <td width="120" class=forumRow> <div align="center"><%= rs("id") %>&nbsp;</div></td>
      <td width="288" class=forumRow> <div align="center"><%= rs("userskinname") %></div></td>
      <td class=forumRow> <div align="center"><%= rs("skinauthor") %></div></td>
    </tr>
    <%
rs.movenext
wend
%>
    <tr> 
      <td height="40" colspan="4" align="center" class="tdbg"> <div align="left"> 
          <input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
          选中所有模版　导出数据库名：
          <input name="mdbname" type="text" id="mdbname" value="<%=HOPE_InstallDir%>Databackup/Member_skins.mdb" size="25" maxlength="50" readonly>
          <input type="submit" name="Submit" value=" 导出模版 ">
        </div></td>
    </tr>
  </table>
</form>
<%end sub

sub inuser1()
%>
<table cellpadding="2" cellspacing="1" border="0" width="98%" class="tableBorder" align=center>
  <tr align="center">
    <th width="300" height=25 class="topbg"><div align="left"><strong>用户模版导入</strong></div>
  </tr>
</table>
<form name="form" method="post" action="admin_skin.asp?action=inuser2">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="tableBorder">
     <tr> 
      <td width="763" height="40" align="center" class="tdbg"> <div align="left"> 
          　导入数据库名： 
          <input name="mdbname" type="text" id="mdbname" value="<%=HOPE_InstallDir%>Databackup/Member_skins.mdb" size="45" maxlength="50" readonly>
          <input type="submit" name="Submit" value=" 下一步 ">
        </div></td>
    </tr>
  </table>
</form>
<%end sub

sub inuser2()

dim connskin,rs,mdbname,fso
mdbname=trim(request("mdbname"))


	set fso=YXFSO
    if fso.FileExists(Server.MapPath(mdbname))=False then
    Response.Write("<script language=javascript>alert('“"&mdbname&"”不存在！');history.back();</script>")
    Response.End
    end if
Set connskin = Server.CreateObject("ADODB.Connection")
connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)
set rs=connskin.execute("select * from Websen_userskin")
%>
<table cellpadding="2" cellspacing="1" border="0" width="98%" class="tableBorder" align=center>
  <tr align="center">
    <th width="300" height=25 class="topbg"><div align="left"><strong>用户模版导入</strong></div>
  </tr>
</table>
<form name="form" method="post" action="admin_skin.asp?action=inuserok">
  <table width="98%" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="tableBorder" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
    <tr class="topbg">
      <td width="63" align="center" >选中</td>
      <td width="120"> <div align="center">ID</div></td>
      <td > <div align="center">名称</div></td>
    </tr>
    <% 
while not rs.eof	  
%>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="63" align="center"><input name='ID' type='checkbox' onClick="unselectall()" id="ID" value='<%=cstr(rs("id"))%>'></td>
      <td width="120"> <div align="center"><%= rs("id") %>&nbsp;</div></td>
      <td > <div align="center"><%= rs("userskinname") %></div></td>
    </tr>
    <%
rs.movenext
wend
%>
    <tr> 
      <td height="40" colspan="3" align="center" class="tdbg"> <div align="left"> 
          <input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
          选中所有模版　 
          <input type="submit" name="Submit" value=" 导入模版 ">
          <input type="hidden" name="mdbname" value="<%=mdbname%>">
        </div></td>
    </tr>
  </table>
</form>
<%end sub%>
<%
sub outsys()
dim rs
set rs=conn.execute("select * from Websen_worldec_Temp ")
%>
<table cellpadding="2" cellspacing="1" border="0" width="98%" class="tableBorder" align=center>
  <tr align="center">
    <th width="300" height=25 class="topbg"><div align="left"><strong>系统模版导出</strong></div>
  </tr>
</table>
<form name="form" method="post" action="admin_skin.asp?action=outsysok">
  <table width="98%" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="tableBorder" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
    <tr class="topbg">
      <td width="63" align="center" >选中</td>
      <td width="120"> <div align="center">ID</div></td>
      <td > <div align="center">名称</div> </td>
    </tr>
    <% 
while not rs.eof	  
%>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="63" align="center"><input name='ID' type='checkbox' onClick="unselectall()" id="ID" value='<%=cstr(rs("id"))%>'></td>
      <td width="120"> <div align="center"><%= rs("id") %>&nbsp;</div></td>
      <td > <div align="center"><%= rs("yx_tempname") %></div> <div align="center"></div></td>
    </tr>
    <%
rs.movenext
wend
%>
    <tr> 
      <td height="40" colspan="3" align="center" class="tdbg"> <div align="left"> 
          <input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
          选中所有模版
          <input name="mdbname" type="hidden" id="mdbname" value="<%=HOPE_InstallDir%>Databackup/SyS_skin.mdb">
          <input type="submit" name="Submit" value=" 导出模版 ">
        </div></td>
    </tr>
  </table>
</form>
<%end sub

sub insys1()
%>
<table cellpadding="2" cellspacing="1" border="0" width="98%" class="tableBorder" align=center>
  <tr align="center">
    <th width="300" height=25 class="topbg"><div align="left"><strong>系统模版导入</strong></div>
  </tr>
</table>
<form name="form" method="post" action="admin_skin.asp?action=insys2">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="tableBorder">
     <tr> 
      <td width="763" height="40" align="center" class="tdbg"> <div align="left"> 
          　导入数据库名： 
          <input name="mdbname" type="text" id="mdbname" value="<%=HOPE_InstallDir%>Databackup/SyS_skin.mdb" size="45" maxlength="50" readonly style="border:1px solid #cccccc; ">
          <input type="submit" name="Submit" value=" 下一步 ">
        </div></td>
    </tr>
  </table>
</form>
<%end sub

sub insys2()
dim connskin,rs,mdbname,fso
mdbname=trim(request("mdbname"))
set fso=YXFSO
    if fso.FileExists(Server.MapPath(mdbname))=False then
    Response.Write("<script language=javascript>alert('“"&mdbname&"”不存在！');history.back();</script>")
    Response.End
    end if
Set connskin = Server.CreateObject("ADODB.Connection")
connskin.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(mdbname)
set rs=connskin.execute("select * from Sys_skins")
%>
<table cellpadding="2" cellspacing="1" border="0" width="98%" class="tableBorder" align=center>
  <tr align="center">
    <th width="300" height=25 class="topbg"><div align="left"><strong>系统模版导入</strong></div>
  </tr>
</table>
<form name="form" method="post" action="admin_skin.asp?action=insysok">
  <table width="98%" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="tableBorder" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
    <tr class="topbg">
      <td width="63" align="center" >选中</td>
      <td width="120"> <div align="center">ID</div></td>
      <td width="288" > <div align="center">名称</div></td>
    
    </tr>
    <% 
while not rs.eof	  
%>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="63" align="center"><input name='ID' type='checkbox' onClick="unselectall()" id="ID" value='<%=cstr(rs("id"))%>'></td>
      <td width="120"> <div align="center"><%= rs("id") %>&nbsp;</div></td>
      <td width="288" > <div align="center"><%= rs("yx_tempname") %></div></td>    </tr>
    <%
rs.movenext
wend
%>
    <tr> 
      <td height="40" colspan="4" align="center" class="tdbg"> <div align="left"> 
          <input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
          选中所有模版　 
          <input type="submit" name="Submit" value=" 导入模版 ">
          <input type="hidden" name="mdbname" value="<%=mdbname%>">
        </div></td>
    </tr>
  </table>
</form>
<%end sub%>

</body>
</html>
