::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
If trim(strDefTheme) = "" or isNull(strDefTheme) Then
strDefTheme = "Harmonia"
end if
' The default theme to use on the site
strTheme = strDefTheme
stPl = "tal.i" '##### MWPV2.1
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Errors.Clear
my_Conn.Open strConnString
'on error resume next
'see if they are logged in or not
if Request.Cookies(strUniqueID & "User")("Name") <> "" then 'they are logged in
if request("thm") <> "" then 'they just selected a new theme from the themechanger
strTheme = chkString(request("thm"),"sqlstring") '##### MWPV2.1
my_Conn.execute("UPDATE " & strMemberTablePrefix & "MEMBERS set THEME_ID = '" & strTheme & "' where " & strDBNTSQLName & " = '" & Request.Cookies(strUniqueID & "User")("Name") & "'")
else 'member didn't select a new theme. Check for members personal theme
set rs1 = my_Conn.execute("select THEME_ID from " & strMemberTablePrefix & "MEMBERS where " & strDBNTSQLName & " = '" & chkString(Request.Cookies(strUniqueID & "User")("Name"),"sqlstring") & "'")
if not rs1.eof then 'they have selected a theme other than the default theme
strTheme = rs1("THEME_ID")
if strTheme = "0" or trim(strTheme) = "" or isNull(strTheme) then
strTheme = strDefTheme
end if
else
strTheme = strDefTheme
end if
end if
else 'they are a guest or not logged in
if request("thm") <> "" then
strTheme = chkString(request("thm"),"sqlstring") '## MWPV2.1 için düzenlendi
Response.Cookies(strUniqueID & "guest")("Theme") = strTheme
end if
if Request.Cookies(strUniqueID & "guest")("Theme") <> "" then
strTheme = chkString(Request.Cookies(strUniqueID & "guest")("Theme"),"sqlstring") '## MWPV2.1 için düzenlendi
end if
end if
if strTheme <> strDefTheme then
strSQL = "SELECT * FROM " & strTablePrefix & "COLORS WHERE C_STRFOLDER='" & strTheme & "'"
Set objRS2x = my_Conn.Execute(strSQL)
if not objRS2x.EOF then
strPageBGImage = objRS2x("C_STRPAGEBGIMAGE")
strPageBgColor = objRS2x("C_STRPAGEBGCOLOR")
strDefaultFontColor = objRS2x("C_STRDEFAULTFONTCOLOR")
strHeadCellColor = objRS2x("C_STRHEADCELLCOLOR")
strAltHeadCellColor = objRS2x("C_STRALTHEADCELLCOLOR")
strHeadFontColor = objRS2x("C_STRHEADFONTCOLOR")
strCategoryCellColor = objRS2x("C_STRCATEGORYCELLCOLOR")
strCategoryFontColor = objRS2x("C_STRCATEGORYFONTCOLOR")
strForumFirstCellColor = objRS2x("C_STRFORUMFIRSTCELLCOLOR")
strForumCellColor = objRS2x("C_STRFORUMCELLCOLOR")
strAltForumCellColor = objRS2x("C_STRALTFORUMCELLCOLOR")
strForumFontColor = objRS2x("C_STRFORUMFONTCOLOR")
strForumLinkColor = objRS2x("C_STRFORUMLINKCOLOR")
strTableBorderColor = objRS2x("C_STRTABLEBORDERCOLOR")
strPopUpTableColor = objRS2x("C_STRPOPUPTABLECOLOR")
strPopUpBorderColor = objRS2x("C_STRPOPUPBORDERCOLOR")
strNewFontColor = objRS2x("C_STRNEWFONTCOLOR")
strTitleImage = objRS2x("C_STRTITLEIMAGE")
end if
end if