<% Function GetRemoteAddress() if request.servervariables("HTTP_X_FORWARDED_FOR") <> "" then ips = split(request.servervariables("HTTP_X_FORWARDED_FOR"), ",") GetRemoteAddress = ips(0) else GetRemoteAddress = request.servervariables("REMOTE_ADDR") end if end function %> <% EventTitle = trim(application("RemoteParticipationEventTitle")) EventID = application("RemoteParticipationEventID") Set conn = Server.CreateObject("ADODB.Connection") conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\\192.168.20.9\inetpub\dbs\ICANN-realtime.mdb","","" select case request.form("stage") case "" body = "Error: Missing stage parameter." case 1 'confirmation page body = "Are you sure that you want to endorse comment #" & request.form("commentid") & " (" & vbcrlf body = body & request.from("commentsubject") & " from " & request.form("commentfirstname") & " " & request.form("commentlastname") & ")?" & vbcrlf body = body & "

Remember, you may endorse only three comments during the entirety of today's meetings." & vbcrlf body = body & "

" for each i in request.form body = body & "" next body = body & " (or Cancel)

" case 2 'making update; confirming that update was successful if request.form("commentsection") <> application("meetingsection") then body = "Error: comment is from a meeting section other than the current meeting section. You can only endorse comments related to the current topic of discussion." else if trim(request.cookies("SignupID")) = "" or not isnumeric(request.cookies("SignupID")) then body = "Error: No SignupID. You must enable cookies to use the remote participation system." else sql = "select * from tsignups where SignupID = " & request.cookies("SignupID") Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, conn, 3, 3 sql2 = "select * from tComments where CommentID=" & request.forM("commentid") & " AND EventID=" & EventID Set rs2 = Server.CreateObject("ADODB.Recordset") rs2.Open sql2, conn, 3, 3 if rs.eof then body = "Error: No such SignupID. Did you log in properly?" else if rs("remainingendorsements")<=0 then body = "Error: No endorsements left. You may only endorse three comments." else if rs2.eof then body = "Error: No such comment, #" & request.form("commentid") & "." else if rs2("boolRead") then body = "Error: Comment has already been read, and so cannot be endorsed." else if rs2("IneligibleBecause")<>"" then body = "Error: Comment is ineligible for endorsement because " & rs("IneligibleBecause") & "." else if rs2("Classification")<> application("meetingsection") then body = "Error: Comment not from current meeting section. You can only endorse comments related to the current topic of discussion." else if rs("ip")<>GetRemoteAddress then body = "Error: Your current IP does not match your signin IP. Possible fraud condition." else rs2("intEndorsements")=rs2("intEndorsements")+1 t = rs2("EndorsedBy") if t<>"" then t = t & ", " t = t & request.cookies("firstname") & " " & request.cookies("lastname") rs2("EndorsedBy") = t rs2("EndorsementLog") = rs2("EndorsementLog") & request.cookies("SignupID") & ", " request.cookies("firstname") & " " & request.cookies("lastname") & ", " & Now & ", " & GetRemoteAddress & "; " rs2.update rs("remainingendorsements") = rs("remainingendorsements)-1 rs("endorsedcomments") = request.form("commentid") & ", " rs.update body = "Endorsement successfully recorded." end if end if end if end if end if end if end if rs2.close set rs2 = nothing rs.close set rs = nothing end select %> Comment Endorsement - <%= EventTitle %>

<% =EventTitle %> Remote Participants

<% = body %>

Return to main Remote Participation page