<% if request.querystring("action") = "add" then if request.querystring("subaction") <> "complete" then 'Empty form... %>

Add A Series

Remember when adding a series, you'll need to prepare a new 64 X 64 pixel gif file to be added to the search page. The naming convention will take the first three letters of the series name + .gif"

 
Series Name
Series Description
<% else 'subaction = complete SQL = "Insert into class_series_tbl (class_series , class_series_description)" SQL = SQL & " Values ('" & cleanstring(request.form("series_name")) &"','" & cleanstring(request.form("series_description")) & "');" SET CONN=server.createobject("ADODB.connection") Conn.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\") & "\data\NothingToIt.mdb;UID=;PWD=;" SET COMM=server.createobject("ADODB.command") comm.activeconnection = CONN comm.commandtext = SQL comm.commandtype = adCmdText comm.execute conn.close set conn = nothing SET comm = nothing response.write "The series has been added" end if else'action = delete if request.querystring("subaction") <> "complete" then 'display list of possible deletion candidates... SET CONN=server.createobject("ADODB.connection") CONN.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\") & "\data\NothingToIt.mdb;UID=;PWD=;" SQL = "SELECT * FROM class_series_tbl" SET RS=server.createobject("ADODB.recordset") RS.open SQL, CONN, 2 response.write "" While not rs.eof response.write "" rs.movenext wend rs.close set rs=nothing conn.close set conn=nothing response.write "
"&rs("class_series")&"Delete
" else'subaction = complete 'DELETE SQL... SQL = "DELETE * FROM class_series_tbl WHERE class_series_id ="&request.querystring("id")&";" SET CONN=server.createobject("ADODB.connection") Conn.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\") & "\data\NothingToIt.mdb;UID=;PWD=;" SET COMM=server.createobject("ADODB.command") comm.activeconnection = CONN comm.commandtext = SQL comm.commandtype = adCmdText comm.execute conn.close set conn = nothing SET comm = nothing response.write "You've successfully deleted this series" end if end if 'end of all cases function CleanString(sqlValue) CleanString = replace(sqlValue, "'", "''") end function function cleanHTMLString(sqlValue) cleanHTMLString = replace(sqlValue, "'", "'") end function %>