<%
'# Quick Admin - Version 1.07 ##########################################

'###############################################################################
'# Settings                                                                    #
'###############################################################################
'path to Microsoft Access data file
strDatabasePath = Server.MapPath("dbs/pinwarehouse.mdb")

'the table in the database we are getting data from
strTable = "Pinball"
keyField = "id"
'orderField = "RecordOrder" 'if you comment this out, the option to sort ^ v the records will not be given

PageTitle = "Pinball Machines"

'font
Font = "Arial, Helvetica, sans-serif"
FontSize = "10pt"
PageTitleFontSize = "12pt"

'color scheme
BackgroundColor = "#FFFFFF"
RowColor1 = "#F0F0F0"
RowColor2 = "#FFFFFF" 
TitleBarColor = "#000080"
TitleBarFontColor = "#FFFFFF"

'###############################################################################
'# The Fields                                                                  #
'###############################################################################
'These are for quick generation of all the fields we will need
'AVAILABLE TYPES: Text, TextArea, Radio, CheckBox, Select, MultSelect, File, Static
'Fields.add "TheDate", "Text[" & now() & "],AdminDisplay[false]"
Fields.add "Game", "Text,AdminDisplay[true]"
Fields.add "Manufacturer", "Text,AdminDisplay[true]"
Fields.add "Vintage", "Text,AdminDisplay[true]"
Fields.add "Condition", "Text,AdminDisplay[true]"
Fields.add "Photo", "File[d:\images]"

'###############################################################################
'# Advanced Options                                                            #
'###############################################################################
SelectedRecord = request(keyField) 'don't change this line

strConnection = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & strDatabasePath
'for DSN connection:
'strConnection = "DSN=DatabaseName"

'select statements:
'this is for the main admin page
strSQL = "SELECT * FROM " & strTABLE & " ORDER BY Game"
if not isEmpty(orderField) then strSQL = strSQL & " ORDER BY " & orderField
'this is used to select a specific record
strSelectedSQL = "SELECT * FROM " & strTABLE & " WHERE " & keyField & " = " & SelectedRecord
strOrderSQL = "SELECT " & keyField & ", " & orderField & " FROM " & strTable & " ORDER BY " & orderField & ""

'# END #########################################################################
%>