<% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** EzASPSite™ '** '** Copyright 2003-2004 VSBrown All Rights Reserved. '** '** This program is free software; you can modify (at your own risk) any part of it '** and use it both privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may use parts of this program in your own private work, but you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to EzASPSite™ and Powered By EzASPSite™ link must remain unchanged and in place '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** No official support is available for EzASPSite™ but you may post support questions at: '** http://www.ezaspsite.com/forum '** '**************************************************************************************** 'Set the response buffer to true Response.Buffer = True Dim strMode Dim intschemeID strMode = Request.QueryString("mode1") intschemeID = Request.QueryString("scheme_ID") 'If Changing Site Settings Then Update Database If strMode = "change" Then 'Update the recordset strSQL = "SELECT tblscheme.* FROM tblscheme;" With rsCommon .CursorType = 2 .LockType = 3 .Open strSQL, adoCon Do Until rsCommon.EOF .Fields("blnSetDefault") = "False" .Update rsCommon.MoveNext Loop .Requery .Close End With strSQL = "SELECT tblscheme.blnSetDefault FROM tblscheme WHERE tblscheme.scheme_ID = " & intschemeID & ";" With rsCommon .CursorType = 2 .LockType = 3 .Open strSQL, strCon .Fields("blnSetDefault") = "True" 'Re-run the query to read in the updated recordset from the database .Update .Requery .Close End With End If strSQL = "SELECT tblscheme.scheme_ID, tblscheme.Enabled, tblscheme.schemeName, tblscheme.blnSetDefault FROM tblscheme;" rsCommon.Open strSQL, strCon %> Scheme Administration

Scheme Administration
Return to the the Administration Menu

Using this facility you can manage the schemes available to your users.

<% Dim strExportedschemeName Dim strImportedschemeName Dim lngExportedschemeID Dim blnImportError Dim strFunc strFunc = Request.QueryString("func") lngExportedschemeID = CLng(Request.QueryString("id")) strImportedschemeName = Request.QueryString("scheme") blnImportError = False If Request.QueryString("error") <> "" Then blnImportError = True End If Select Case Request.QueryString("mode") Case "management" If Not rsCommon.EOF Then %> <% Do Until rsCommon.EOF If strFunc = "export" Then If lngExportedschemeID = rsCommon.Fields("scheme_ID") Then strExportedschemeName = rsCommon.Fields("schemeName").Value End If End If %> <% rsCommon.MoveNext Loop %>
Scheme Site
Default
Enabled Edit Delete Export
<% = rsCommon.Fields("schemeName").Value %> <% Select Case rsCommon.Fields("blnSetDefault").Value Case 0 %> " style="text-decoration:none;">- <% Case 1 %> + <% Case True %> + <% Case False %> " style="text-decoration:none;">- <% End Select %> <% Select Case rsCommon.Fields("Enabled").Value Case 0 Response.Write("disabled") Case 1 Response.Write("enabled") Case True Response.Write("enabled") Case False Response.Write("disabled") End Select %> ">Edit ">Delete ">Export
<% Select Case strFunc Case "export" Response.Write("

The scheme " & strExportedschemeName & " has been exported successfully!") Response.Write("

It has been saved to root/ezs/" & strExportedschemeName & ".ezs") Case "import" If blnImportError = True Then Response.Write("

The scheme " & strImportedschemeName & " has failed to import, it was not found!") Else Response.Write("

The scheme " & strImportedschemeName & " has been imported successfully!") End If End Select Else Response.Write("no scheme") End If End Select %>
<% 'Reset Server Objects rsCommon.Close Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %>