UBG Admin

<% id = Request.QueryString("id") if Request.Form.Count > 0 then dtgstart = "'" & Request.Form("yearstart") & "-" & Request.Form("monthstart") & "-" & Request.Form("daystart") & "'" if Request.Form("yearend") * Request.Form("monthend") * Request.Form("dayend") = 0 then dtgend = "null" else dtgend = "'" & Request.Form("yearend") & "-" & Request.Form("monthend") & "-" & Request.Form("dayend") & "'" end if if id = 0 then sqlStr = "INSERT INTO UBG_QuizTeen (title, dtgstart, dtgend) VALUES ('" & ValidateSQL(Request.Form("title")) & "', " & dtgstart & ", " & dtgend & ")" else sqlStr = "UPDATE UBG_QuizTeen SET title='" & ValidateSQL(Request.Form("title")) & "', dtgstart=" & dtgstart & ", " & "dtgend=" & dtgend & " WHERE id=" & id end if oConn.Execute sqlStr id = "" end if if Request.QueryString("action") = "del" then oConn.Execute "DELETE FROM UBG_QuizQuestionsTeen WHERE quizid=" & id & "; DELETE FROM UBG_Quiz WHERE id=" & id id = "" end if %>
COPY
QUIZ <% if id <> "" then if id <> 0 then oRS.Open "SELECT title, dtgstart, dtgend FROM UBG_QuizTeen WHERE id=" & id, oConn, 0, 1, 1 titleStr = oRS("title") dtgstart = oRS("dtgstart") dtgend = oRS("dtgend") oRS.Close else dtgstart = now() dtgend = null end if %> <%end if%> <% oRS.Open "SELECT * FROM UBG_QuizTeen ORDER BY dtgstart", oConn, 0, 1, 1 do while not oRS.EOF %> <% oRS.MoveNext loop %>
QUIZ ADMIN
Title
From
To
 
TitleStartEnd
<%=oRS("title")%><%=dateformat(oRS("dtgstart"))%> <%if isnull(oRS("dtgend")) then%>---<%else%><%=dateformat(oRS("dtgend"))%><%end if%> Questions Delete
New quiz