<%
class class_CMS_Skin
  
Private s_name,Value
'----------------------------------------常用成员----------------------------------------
Public skname,skredx,skukong,skgo_back,skcloser,skpost,sknologin,sktitle,skhead,skend,skmod_lefter,sktable_lefter
Public skmod_righter,sktable_righter,sktable_center,skfk_left,skfk_center,sklogin_left1,sklogin_left2

'----------------------------------------SKIN初始化--------------------------------------
Public Sub  class_initialize()
dim hsmod
if format_mid_num(37)=1 then
  hsmod=trim(request.cookies(joekoe_cms.web_cookies)("mod_var"))
  hsmod=joekoe_cms.code_html(hsmod,1,0)
  if var_null(hsmod)="" then hsmod=hs_mod
    sql="select top 1 * from jk_skin where s_id="&hsmod
	  set rs=joekoe_cms.exec(sql,1)
	  Value=rs.GetRows()
	  for i=0 to rs.fields.count-1
      s_name=s_name&rs(i).name&","
	  next
    rs.close
else
  if isarray(application(joekoe_cms.web_cookies&"_CMS_Mod"))=false then
    hsmod=hs_mod
    sql="select top 1 * from jk_skin where s_id="&hsmod
	  set rs=joekoe_cms.exec(sql,1)
	  Value=rs.GetRows()
	  for i=0 to rs.fields.count-1
      s_name=s_name&rs(i).name&","
	  next
    rs.close
    application.lock
    application(joekoe_cms.web_cookies&"_CMS_Mod")=Value
    application(joekoe_cms.web_cookies&"_CMS_Mod_Name")=s_name
    application.unlock
   else
    Value=application(joekoe_cms.web_cookies&"_CMS_Mod")
    s_name=application(joekoe_cms.web_cookies&"_CMS_Mod_Name")
  end if
end if
skname=Value(1,0):skredx=Value(2,0):skukong=Value(3,0):skgo_back=Value(4,0):skcloser=Value(5,0):skpost=Value(6,0)
sknologin=Value(7,0):sktitle=Value(8,0):skhead=Value(9,0):skend=Value(10,0):skmod_lefter=Value(11,0):skmod_righter=Value(12,0)
sktable_lefter=Value(13,0):sktable_center=Value(14,0):sktable_righter=Value(15,0)
end sub

'----------------------------------------获取SKIN数据库---------------------------------------
Public Function GetDB(DB)
  dim sk_name,m
  sk_name=split(s_name,",")
  for m=0 to ubound(sk_name)
    if "s_"&DB=sk_name(m) then
	  skm=m
      GetDB=Value(m,0)
      erase sk_name
      exit Function
    end if
  next
  GetDB="GetDB未知数据!!!"
end Function

'--------------------------------------------获取MOD数据库2-------------------------------------
Public Function MD(DB)

MD=Value(DB,0)

End Function


Public Sub class_terminate()
  erase Value
end Sub

end class

%>
