<!--#include file="conn.asp"-->
<!--#include file="chkadmin.asp"-->
<!--#include file="inc/char.asp"-->
<%dim SkinName,errmsg,founderr
SkinName=Trim(Request.Form("SkinName"))
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("insert into Skin (SkinName,SkinSetting) values ('"&SkinName&"',',,,,,,,,,,,,,,,,,,')")
	dim sql,rs
	sql="select top 1 ID from Skin order by ID desc"
	set rs=conn.execute(sql)
	dim gourl,msg
	gourl="skin_list.asp?id="&rs(0)
	msg="配色方案添加成功！"
	set rs=nothing
	call ok()
else
	call error()
end if

conn.close
set conn=nothing%>