<% if request.form<>"" then Dim objCon set objCon = server.CreateObject("adodb.connection") with objCon if request("Finalize") = "Finalize" then 'edit color scheme .open datastore .execute _ "UPDATE pgd_colorscheme SET schemeName='"&request("schemeName")&_ "', tableTitle='"&SQLStrip(request("tableTitle"))&_ "', tableBorder='"&SQLStrip(request("tableBorder"))&_ "', tableInside='"&SQLStrip(request("tableInside"))&_ "', Titlefontcolor='"&SQLStrip(request("Titlefontcolor"))&_ "', tablealt='"&SQLStrip(request("tablealt"))&_ "', insideBG='"&SQLStrip(request("insideBG"))&_ "', altBG='"&SQLStrip(request("altBG"))&_ "' WHERE schemeName='"&request("colorselect")&"'", , adCmdtext + adExecuteNoRecords .close if request("colorselect") = Application(dbName&"colorScheme") then set objRS=server.createobject("adodb.recordset") with objRS .open _ "SELECT tableTitle, tableBorder, tableInside, Titlefontcolor, tablealt,insideBG,altBG FROM pgd_colorscheme WHERE schemeName='"&_ request("colorselect") &"'", datastore, , , adCmdText colorConfig = .getrows .close end with set objRS = nothing Application.lock Application(dbName&"colorConfig") = colorConfig Application.unlock erase colorConfig end if elseif request("Add") = "Add" then 'Add Color Scheme .open datastore .execute _ "INSERT INTO pgd_colorscheme (schemeName, tableTitle, tableBorder, tableInside, Titlefontcolor, tablealt,insideBG,altBG) "&_ "VALUES ('"&SQLStrip(request("schemeName"))&"','"&SQLStrip(request("tableTitle"))&"','"&SQLStrip(request("tableBorder"))&"','"&SQLStrip(request("tableInside"))&_ "','"&SQLStrip(request("Titlefontcolor"))&"','"&SQLStrip(request("tablealt"))&"','"&SQLStrip(request("insideBG"))&"','"&SQLStrip(request("altBG"))&"')", , adCmdtext + adExecuteNoRecords .close elseif request("Delete") = "Delete" then 'Delete Color Scheme if lcase(request("colorselect"))<> lcase(Application(dbName&"colorScheme")) then 'Don't delete the current scheme .open datastore .execute "DELETE pgd_colorscheme WHERE schemeName='"&request("colorselect")&"'", , adCmdtext + adExecuteNoRecords .close else response.redirect ("admin_color.asp?done=nodelete") end if else 'Set Color Scheme Application.lock Application(dbName&"colorScheme") = request("colorselect") Application.unlock set objRS=server.createobject("adodb.recordset") with objRS .open _ "SELECT tableTitle, tableBorder, tableInside, Titlefontcolor, tablealt, insideBG, altBG FROM pgd_colorscheme WHERE schemeName='"&_ Application(dbName&"colorScheme") &"'", datastore, , , adCmdText Dim colorConfig colorConfig = .getrows .close end with set objRS = nothing Application.lock Application(dbName&"colorConfig") = colorConfig Application.unlock erase colorConfig .open datastore .execute "UPDATE pgd_config SET colorscheme='"&Application(dbName&"colorScheme")&"'", , adCmdtext + adExecuteNoRecords .close end if end with set objCon = nothing response.clear response.redirect ("admin_color.asp?done=yes") end if %> Color Management <%= OutputCSS() %> <% dim color, arrcolor, i, objRS, k, action, disPlayedText action = request.queryString("action") color = Application(dbName&"colorScheme") %>
Color Scheme :       Help
<% if lcase(request("done"))="yes" then response.write ("
Color Scheme Modification Successful.
") elseif lcase(request("done"))="nodelete" then response.write ("
You can't delete the current Scheme.
") end if SELECT CASE action CASE "addnew" disPlayedText = "Add Your New Scheme here" CASE "edit" disPlayedText = "Edit The Scheme here" CASE ELSE disPlayedText = "Which color scheme do you want to display? " END SELECT %>
<%= disPlayedText %>
> <% if action = "" then set objRS = server.CreateObject("adodb.recordset") with objRS .open _ "SELECT schemeName, tableTitle, tableBorder, tableInside, Titlefontcolor, tablealt, insideBG, altBG FROM pgd_colorscheme order by schemename"_ , datastore, , , adCmdText arrcolor= .getrows .close end with set objRS = nothing for i = 0 to ubound(arrcolor,2) Dim altColor if altcolor = tableinside then altcolor = tablealt else altcolor = tableinside response.write "" for k = 0 to 8 if k-1 = -1 then response.write ("") else response.write ("") end if next response.write ("") next %>
SchemeName tableTitle tableBorder tableInside Titlefontcolor tableAlternate insideBG altBG
"&arrcolor(k-1,i)&"

        
<% elseif action = "edit" then set objRS=server.createobject("adodb.recordset") with objRS .open _ "SELECT schemeName, tableTitle, tableBorder, tableInside, Titlefontcolor, tablealt, insideBG, altBG FROM pgd_colorscheme WHERE schemeName='"&_ request("colorselect") &"'", datastore, , , adCmdText colorConfig = .getrows .close end with set objRS = nothing %> >   <%= colorConfig(0,0) %>
">   
<% elseif action = "addnew" then %> >  
  
<%end if%>