<% 'PageName = "event_form" DoHeader(PageName) 'Control who can use this update page If LogonID = NTUser Or CheckAdmin("Event") Then FormOption = Request.QueryString("FormOption") ' FormAction = Request.QueryString("FormAction") If FormOption="Search" Then FormAction="/promanweb/event/event_search.asp?iCognateFlag=" & iCognateFlag ElseIf FormOption ="Add" Then ID=Request.Form("ID") ScheduleID="Todo" GroupID="Todo" FormAction="/promanweb/event/event_add.asp?iCognateFlag=" & iCognateFlag & "&FormOption=" & FormOption & "&ID=" & ID & "&ScheduleID=" & ScheduleID & "&GroupID=" & GroupID EventEnteredBy=LogonID EventDateEntered = Now ElseIf FormOption ="Update" Then ID=Request.QueryString("ID") ScheduleID="Todo" GroupID="Todo" FormAction="/promanweb/event/event_update.asp?iCognateFlag=" & iCognateFlag & "&FormOption=" & FormOption & "&ID=" & ID & "&ScheduleID=" & ScheduleID & "&GroupID=" & GroupID 'Validate that there is a key to search on, if so, update, if not, add. If ID <> "" Then strSQL="SELECT * " &_ "FROM Event " &_ "WHERE (([Event].[EventID])= '" & ID & "') " &_ "ORDER BY EventID;" Set objConn = GetConn Set objRStmp = objConn.Execute (strSQL) If NOT objRStmp.eof Then objRStmp.MoveFirst EventID = objRStmp("EventID") EventContactID = objRStmp("EventContactID") EventName = objRStmp("EventName") EventDescription = objRStmp("EventDescription") EventFixedCost = objRStmp("EventFixedCost") EventVariableCost = objRStmp("EventVariableCost") EventEnteredBy = objRStmp("EventEnteredBy") EventDateEntered = objRStmp("EventDateEntered") EventUpdatedBy = objRStmp("EventUpdatedBy") EventExtraInfo = objRStmp("EventExtraInfo") EventHistory = objRStmp("EventHistory") End If EventHistory = EventHistory & vbcrlf &_ EventID & vbcrlf &_ EventContactID & vbcrlf &_ EventName & vbcrlf &_ EventDescription & vbcrlf &_ EventFixedCost & vbcrlf &_ EventEnteredBy & vbcrlf &_ EventDateEntered & vbcrlf &_ EventUpdatedBy & vbcrlf &_ EventExtraInfo If len( EventEnteredBy ) = 0 Then EventEnteredBy=LogonID End If If len( EventDateEntered ) = 0 Then EventDateEntered = Now End If If len( EventUpdatedBy ) = 0 Then EventUpdatedBy=LogonID End If If len( EventDateUpdated ) = 0 Then EventDateUpdated = Now End If EventUpdatedBy=LogonID EventDateUpdated = Now objRStmp.close objConn.close Set objRStmp=nothing Set objConn=nothing End If ElseIf FormOption ="Detail" Then FormAction="/promanweb/event/event_list.asp?iCognateFlag=" & iCognateFlag & "&FormAction=Detail&ID=" & ID & "&ScheduleID=" & ScheduleID & "&GroupID=" & GroupID 'Validate that there is a key to search on, if so, update, if not, add. If ID <> "" Then strSQL="SELECT * " &_ "FROM Event " &_ "WHERE (([Event].[EventID])= '" & ID & "') " &_ "ORDER BY EventID;" Set objConn = GetConn Set objRStmp = objConn.Execute (strSQL) If NOT objRStmp.eof Then objRStmp.MoveFirst EventID = objRStmp("EventID") EventContactID = objRStmp("EventContactID") EventName = objRStmp("EventName") EventDescription = objRStmp("EventDescription") EventFixedCost = objRStmp("EventFixedCost") EventVariableCost = objRStmp("EventVariableCost") EventEnteredBy = objRStmp("EventEnteredBy") EventDateEntered = objRStmp("EventDateEntered") EventUpdatedBy = objRStmp("EventUpdatedBy") EventDateUpdated = objRStmp("EventDateUpdated") EventExtraInfo = objRStmp("EventExtraInfo") EventHistory = objRStmp("EventHistory") End If objRStmp.close objConn.close Set objRStmp=nothing Set objConn=nothing End If Else Response.Write "
" Response.Write "" Response.Write "" & vbcrlf Response.Write "" ' Exit Sub End If %>
Error in FormOption specification of Event Form.
<% If FormOption ="Search" Then %> <% Response.Write "" & vbcrlf Response.Write "" & vbcrlf Response.Write "" & vbcrlf ElseIf FormOption ="Add" OR FormOption ="Update" Then %> <% Response.Write "" & vbcrlf Response.Write "" & vbcrlf Response.Write "" & vbcrlf ElseIf FormOption ="Detail" Then %>
align="center">> Event <%=FormOption%>
" & vbcrlf Response.Write "Search ALL Fields* " & vbcrlf Response.Write "  " & vbcrlf Response.Write "*Recommended, unless you want to be very specific.  " & vbcrlf Response.Write "
align="center">> Event <%=FormOption%>
" & vbcrlf Response.Write "

Enter " & vbcrlf Response.Write "details here. Click " & FormOption & " to submit.

" & vbcrlf Response.Write "
> <% If CheckAdmin("Event") Then %>

>Delete <% End If %>

align="middle">>Event Detail > <% If CheckAdmin("Event") Then %>

>Update <% End If %>

<% End If %> " & vbcrlf Else Response.Write "Extra Info   :  " & vbcrlf Response.Write "

  " & vbcrlf End If %>

" & vbcrlf Else Response.Write "History   :  " & vbcrlf Response.Write "

  " & vbcrlf End If %>

<% If FormOption ="Detail" Then %>
> <% If FormOption ="Detail" Then Response.Write "

Event ID   :  " & vbcrlf Response.Write "" & EventID & "  

" & vbcrlf Else Response.Write "

Event ID   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Contact ID   :  " & vbcrlf Response.Write "" & EventContactID & "  

" & vbcrlf Else Response.Write "

Contact ID   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Event Name   :  " & vbcrlf Response.Write "" & EventName & "  

" & vbcrlf Else Response.Write "

Event Name   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Description   :  " & vbcrlf Response.Write "" & EventDescription & "  

" & vbcrlf Else Response.Write "

Description   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Fixed Cost   :  " & vbcrlf Response.Write "" & EventFixedCost & "  

" & vbcrlf Else Response.Write "

Fixed Cost   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Varaiable Cost   :  " & vbcrlf Response.Write "" & EventVariableCost & "  

" & vbcrlf Else Response.Write "

Varaiable Cost   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Entered By   :  " & vbcrlf Response.Write "" & EventEnteredBy & "  

" & vbcrlf Else Response.Write "

Entered By   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Date Entered   :  " & vbcrlf Response.Write "" & EventDateEntered & "  

" & vbcrlf Else Response.Write "

Date Entered   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Updated By   :  " & vbcrlf Response.Write "" & EventUpdatedBy & "  

" & vbcrlf Else Response.Write "

Updated By   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Date Updated   :  " & vbcrlf Response.Write "" & EventDateUpdated & "  

" & vbcrlf Else Response.Write "

Date Updated   :  " & vbcrlf Response.Write "  

" & vbcrlf End If %>
> <% If FormOption ="Detail" Then Response.Write "

Extra Info   :  " & vbcrlf Response.Write "  

> <% If FormOption ="Detail" Then Response.Write "

History   :  " & vbcrlf Response.Write "  

<% ' strSQL="SELECT * " &_ strSQL="SELECT " &_ "EventSchedule.EventScheduleID, " &_ "EventSchedule.EventID, " &_ "EventSchedule.EventScheduleStartTime, " &_ "EventSchedule.EventScheduleEndTime, " &_ "EventSchedule.EventScheduleEnteredBy, " &_ "EventSchedule.EventScheduleDateEntered, " &_ "EventSchedule.EventScheduleUpdatedBy, " &_ "EventSchedule.EventScheduleDateUpdated, " &_ "EventSchedule.EventScheduleExtraInfo, " &_ "EventSchedule.EventScheduleHistory " &_ "FROM EventSchedule, EventScheduleJoin " &_ "WHERE ((([EventScheduleJoin].[EventID])= '" & ID & "') AND ( ([EventSchedule].[EventScheduleID])=([EventScheduleJoin].[EventScheduleID]))) " &_ "ORDER BY EventSchedule.EventScheduleID;" 'Set objConn = GetConn 'Response.Write "strSQL = " & strSQL Set objRStmp = objConn.Execute (strSQL) %> <% objRStmp.close Set objRStmp=nothing 'objConn.close 'Set objConn=nothing %>
align=center>>Event Schedule List > <% If CheckAdmin("Event") Then %>

>Update <% End If %>

<% ' strSQL="SELECT * " &_ strSQL="SELECT " &_ "EventGroup.EventGroupID, " &_ "EventGroup.EventGroup, " &_ "EventGroup.EventGroupLeaderID, " &_ "EventGroup.EventGroupDescription " &_ "FROM EventGroup, EventGroupJoin " &_ "WHERE ((([EventGroupJoin].[EventID])= '" & ID & "') AND ( ([EventGroup].[EventGroupID])=([EventGroupJoin].[EventGroupID]))) " &_ "ORDER BY EventGroup.EventGroupID;" 'Set objConn = GetConn 'Response.Write "strSQL = " & strSQL Set objRStmp = objConn.Execute (strSQL) %>
align=center>>Event Group List > <% If CheckAdmin("Event") Then %>

>Update <% End If %>

<% objRStmp.close Set objRStmp=nothing 'objConn.close 'Set objConn=nothing strText = "I have assisted with your query: " & strSQL &_ "Can I assist you any further with the " & PageName & " page?" ElseIf FormOption ="Search" Then Response.Write "" & vbcrlf Response.Write "" & vbcrlf Response.Write "Instructions:" & vbcrlf Response.Write "Enter Criteria to search on.  You MUST have at least one field filled " & vbcrlf Response.Write "before submitting or you will get an error.  You will get more matches if " & vbcrlf Response.Write "you enter less information.  The search works with exactly what you type.  " & vbcrlf Response.Write "For example, if you type "A and B" it will look for that exact phrase in that item " & vbcrlf Response.Write "rather than looking for anything with both "a" and "b" in it. " Response.Write "If you put information in multiple blanks, it will only return people listings " & vbcrlf Response.Write "that meet all the criteria." & vbcrlf Response.Write "" & vbcrlf Response.Write "" & vbcrlf End If If FormOption <>"Detail" Then %> align="center">

align="center">

<% End If %>

<% If FormOption ="Search" Then %> <% ElseIf FormOption ="Add" Or FormOption ="Update" Then %> <% End If %> <% Else DoHeader("Not Authorized") Response.Write "
" & vbcrlf Response.Write "" & vbcrlf Response.Write "" & vbcrlf Response.Write "" End If FormOption = Request.QueryString("FormOption") 'FormAction = Request.QueryString("FormAction") If strText = "" Then strText = LogonID & ", you are now at the " & PageName & " page. " &_ "Your global page options are: " &_ "FormOption = " & FormOption & ". " &_ "FormAction = " & FormAction & ". " &_ "Can I help you with anything on the page?" Else strText = LogonID & ", you are now at the " & PageName & " page. " &_ strText End If If (iCognateFlag = 1) Then %> <% End If %>
You are not authorized to edit the details of this Event