<!--#include file="conn.asp"-->
<!--#include file="chkadmin.asp"-->
<!--#include file="inc/char.asp"-->
<%dim SkinName,BodyBgColor,BackGround,TableBorderColor,TdBgColor1,TdBgColor2
dim TdBgColor3,TitleColor,TitleBgColor,LinkBgColor,LinkBorderColor
dim S_FaceColor,S_ShadowColor,S_HighlightColor,S_3dlightColor
dim S_DarkshadowColor,S_TrackColor,S_ArrowColor,SiteLogo,LogoBgImage,id
id=Cint(Trim(Request.Form("id")))
SkinName=Trim(Request.Form("SkinName"))
BodyBgColor=Trim(Request.Form("BodyBgColor"))
BackGround=Trim(Request.Form("BackGround"))
TableBorderColor=Trim(Request.Form("TableBorderColor"))
TdBgColor1=Trim(Request.Form("TdBgColor1"))
TdBgColor2=Trim(Request.Form("TdBgColor2"))
TdBgColor3=Trim(Request.Form("TdBgColor3"))
TitleColor=Trim(Request.Form("TitleColor"))
TitleBgColor=Trim(Request.Form("TitleBgColor"))
LinkBgColor=Trim(Request.Form("LinkBgColor"))
LinkBorderColor=Trim(Request.Form("LinkBorderColor"))
S_FaceColor=Trim(Request.Form("S_FaceColor"))
S_ShadowColor=Trim(Request.Form("S_ShadowColor"))
S_HighlightColor=Trim(Request.Form("S_HighlightColor"))
S_3dlightColor=Trim(Request.Form("S_3dlightColor"))
S_DarkshadowColor=Trim(Request.Form("S_DarkshadowColor"))
S_TrackColor=Trim(Request.Form("S_TrackColor"))
S_ArrowColor=Trim(Request.Form("S_ArrowColor"))
SiteLogo=Trim(Request.Form("SiteLogo"))
LogoBgImage=Trim(Request.Form("LogoBgImage"))

dim SkinSetting
SkinSetting=BodyBgColor+","+BackGround+","+TableBorderColor+","+TdBgColor1+","+TdBgColor2+","+TdBgColor3+","+TitleColor
SkinSetting=SkinSetting+","+TitleBgColor+","+LinkBgColor+","+LinkBorderColor+","+S_FaceColor+","+S_ShadowColor
SkinSetting=SkinSetting+","+S_HighlightColor+","+S_3dlightColor+","+S_DarkshadowColor+","+S_TrackColor
SkinSetting=SkinSetting+","+S_ArrowColor+","+SiteLogo+","+LogoBgImage

dim errmsg,founderr
founderr=false

if chkadmin=false or power(5)="0" then
	founderr=true
	errmsg=errmsg+"<li>您没有修改配色方案的权限</li>"
end if

if SkinName="" then
	founderr=true
	errmsg=errmsg+"<li>方案名称不能为空</li>"
end if

if strlen(SkinName)<2 or strlen(SkinName)>10 then
	founderr=true
	errmsg=errmsg+"<li>方案名称应为2～10个字符</li>"
end if

if founderr=false then
	conn.execute("update Skin set SkinName='"&SkinName&"',SkinSetting='"&SkinSetting&"' where ID="&id)
	dim gourl,msg
	gourl=request.ServerVariables("HTTP_REFERER")
	msg="配色方案修改成功！"
	call ok()
else
	call error()
end if

conn.close
set conn=nothing
%>