<%
class class_CMS_Skin
Private Value,s_name

'----------------------------------------常用成员----------------------------------------
Public skname,skcss,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 skin
if format_mid_num(37)=1 then
  skin=trim(request.cookies(joekoe_cms.web_cookies)("skin_var"))
  skin=joekoe_cms.code_html(skin,1,0)
  if var_null(skin)="" then skin=web_dim(7)
    sql="select top 1 * from jk_skin where s_dir='"&skin&"'"
	  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_Skin"))=false then
    skin=web_dim(7)
    sql="select top 1 * from jk_skin where s_dir='"&skin&"'"
	  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_Skin")=Value
    application(joekoe_cms.web_cookies&"_CMS_Skin_Name")=s_name
    application.unlock
  else
    Value=application(joekoe_cms.web_cookies&"_CMS_Skin")
    s_name=application(joekoe_cms.web_cookies&"_CMS_Skin_Name")
  end if
end if
  skname=Value(1,0):skcss=Value(3,0):skredx=Value(4,0):skukong=Value(5,0):skgo_back=Value(6,0):skcloser=Value(7,0):skpost=Value(8,0)
  sknologin=Value(9,0):sktitle=Value(10,0):skhead=Value(11,0):skend=Value(12,0):skmod_lefter=Value(13,0):skmod_righter=Value(14,0)
  sktable_lefter=Value(15,0):sktable_center=Value(16,0):sktable_righter=Value(17,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
      GetDB=Value(m,0)
      erase sk_name
      exit Function
    end if
  next
  GetDB="GetDB未知数据!!!"
end Function

Public Sub class_terminate()
  erase Value
end Sub

end class

Class Class_CMS_Skin_Mod
Private Value,s_name

'----------------------------------------MOD初始化---------------------------------------
Public Sub Class_DB(DB_ID)
  sql="Select * from jk_skin_mod where s_id="&DB_ID
    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
End Sub

'----------------------------------------获取MOD数据库---------------------------------------
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
      GetDB=Value(m,0)
      erase sk_name
      exit Function
    end if
  next
  GetDB="Mod_GetDB未知数据!!!"
End Function

Public Sub sk_end()
  erase Value
End Sub

End Class
%>
