ThemeSave + ThemeRead

Saves/Reads selected theme into file.
Used with Bootstrap 3 in most of my websites to allow users to select theme
Attached is some theme CSS's to be used along with ASP code to apply the one that was selected

Function ThemeSave(NewTheme)
 If NewTheme>"" Then
  Set FSO = Server.CreateObject("scripting.FileSystemObject")
  Set myFile = fso.CreateTextFile(Server.MapPath(ThemesSettingFile), true)
 End If
End Function
Function ThemeRead()
 Set FSO = Server.CreateObject("scripting.FileSystemObject")
 If not fso.fileexists(Server.MapPath(ThemesSettingFile)) Then
  Theme_Change Rett
  set f = fso.OpenTextFile(Server.MapPath(ThemesSettingFile),1,true)
  Rett= f.ReadLine
 End If
 If instr(Rett,"%")>0 Then Rett=Left(Rett,instr(Rett,"%")-1)
End Function



Views 107 Downloads 50

Perm link