<% Dim objCon, objRS, enableDBHeader,DBHeader,enableDBFooter,DBFooter if request.form <>"" then enableDBHeader = request.form("enableDBHeader") DBHeader = request.form("DBHeader") enableDBFooter = request.form("enableDBFooter") DBFooter = request.form("DBFooter") if enableDBHeader = "on" then enableDBHeader = 1 else enableDBHeader = 0 if enableDBFooter = "on" then enableDBFooter = 1 else enableDBFooter = 0 Application.Lock Application(dbName&"enableDBHeader") = enableDBHeader Application(dbName&"enableDBFooter") = enableDBFooter if enableDBHeader = 1 then Application(dbName&"DBHeader") = DBHeader if enableDBFooter = 1 then Application(dbName&"DBFooter") = DBFooter Application.unlock SET objCon = server.createObject("ADODB.connection") with objCon .open datastore .execute "update pgd_config set enableDBHeader = "&enableDBHeader&", enableDBFooter = "&enableDBFooter _ , , adExecuteNoRecords + adCmdtext set objRS = server.createobject("adodb.recordset") with objRS .open "SELECT * FROM pgd_DBHeaderFooter", objCon, , adLockoptimistic, adCmdText .fields("DBHeader") = DBHeader .fields("DBFooter") = DBFooter .update .close end with set objRS=nothing .close end with Set objCon = nothing response.clear response.redirect ("admin_header_footer.asp?done=yes") else set objRS = server.createobject("adodb.recordset") with objRS '.CacheSize = 2 .open "SELECT DBHeader, DBFooter FROM pgd_DBHeaderFooter", datastore, , , adCmdText 'If not (.EOF or .BOF) then DBHeader = .fields(0) DBFooter = .fields(1) 'End if .close end with set objRS=nothing enableDBHeader = Application(dbName&"enableDBHeader") enableDBFooter = Application(dbName&"enableDBFooter") end if %> Dynamic Header & Footer <%= OutputCSS() %>
Dynamic Header & Footer :       Help
<% if request("done")<>"" then response.write ("
Dynamic Header and Footer Edited Successfully !") %>
Dynamic Header and Footer Configuration
class="cat" colspan=2> Dynamic Header (HTML Only) class="radiocheck"> Use Dynamic Header?
colspan=2>
class="cat" colspan=2> Dynamic Footer (HTML only) class="radiocheck"> Use Dynamic Footer?
colspan=2>