<%
dim rsSkin,sqlSkin,tSkinID,Skin_CSS,Body_Label
If Request.Cookies("MSCom")("Skinid")<>"" And SkinSelect="Yes" then
    sqlSkin="select * from Skin where Skinid="&Request.Cookies("MSCom")("Skinid")&" "
Else
	sqlSkin="select * from Skin where IsDefault=True"
End If
set rsSkin=server.CreateObject("adodb.recordset")
rsSkin.open sqlSkin,conn,1,1
if rsSkin.bof and rsSkin.eof then
	rsSkin.close
	sqlSkin="select top 1 * from Skin where IsDefault=True"
	rsSkin.open sqlSkin,conn,1,1
	If rsskin.bof and rsskin.eof then
		rsskin.close:set rsskin=nothing
		response.write "风格无法加载，后台重新选择默认模板"
		response.End
	end if
	call main()	
else
	call main()
end if
rsSkin.close
set rsSkin=nothing

sub main()
	Skin_CSS=rsSkin("Skin_CSS")
%>
<style type="text/css">
<%=Skin_CSS%>
</style>
<%
end sub
%>