<%@ codepage ="936" %>
  <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="101"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
  <!--#include file="../rolecheck.asp"-->

<%
  
if replace_text(request("id"))="" then
Response.write("<script >alert('对不起！参数传递错误！');history.back(-1);</script>")
response.End()
end if

 id=replace_text(request("id"))
skinorder=request("skinorder") 
sql="select * from Websen_userskin where id="&id
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if rs.eof or rs.bof then 
response.write("要保存的模板不存在")
else
rs("userskinname")=request("userskinname")
rs("skinpic")=request("skinpic")

     if skinorder=0 or skinorder="" then 
			rs("skinmain")=request("content")
			 elseif skinorder=1 then 
			rs("skinshowlog")=request("content")
			 elseif skinorder=2 then 
			rs("SkinSupply")=request("content")
			 elseif skinorder=3 then 
			rs("SkinPtHall")=request("content")
			 elseif skinorder=4 then 
			rs("SkinPurInfo")=request("content")
			 elseif skinorder=5 then 
			rs("SkinCompanyInfo")=request("content")
			 elseif skinorder=6 then 
			rs("SkinCusApp")=request("content")
			 elseif skinorder=7 then 
			rs("SkinUnInfo")=request("content")
			 elseif skinorder=8 then 
			rs("SkinEmpInfo")=request("content")
			 elseif skinorder=9 then 
			rs("SkinCusMsg")=request("content")
			 elseif skinorder=10 then 
			rs("SkinCantact")=request("content")
			 end if 
			 
			 
rs.update

rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("<script language=javascript>alert('模板保存成功');location='javascript:history.go(-1)'</script>")
end if
%>			 