%@ LANGUAGE="VBScript" %> <% Dim Lastname(1) Dim Firstname(1) parent_url=Request.Form("parent_url") ' ' Check if operator's name properly defined ' If CStr(Request.Form("fullname1"))="Choose from the list" Then %> <% End If Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLstmt= " select firstname,lastname from secretary.phobos_contacts " SQLstmt= SQLstmt & " where substr(firstname,1,1) || '.' || ' ' || lastname='" & CStr(Request.Form("fullname1")) & "'" SQLstmt= SQLstmt & " or substr(firstname,1,1) || '.' || ' ' || lastname='" & CStr(Request.Form("fullname2")) & "'" SQLstmt= SQLstmt & " order by lastname " Set RS= Connection.Execute(SQLstmt) ' response.write(SQLStmt) nnames=-1 Do While Not RS.EoF nnames=nnames+1 Lastname(nnames)=RS("lastname") Firstname(nnames)=RS("firstname") RS.MoveNext Loop Set RS=nothing ' ' set the cookies and return to the Portal page ' Response.Expires=0 ' Response.Cookies("PHOBOSPORTAL")="" If nnames=1 Then Response.Cookies("PHOBOSPORTAL")("OPERATOR1")=Lastname(0) Response.Cookies("PHOBOSPORTAL")("FIRSTNAME1")=Firstname(0) Response.Cookies("PHOBOSPORTAL")("OPERATOR2")=Lastname(1) Response.Cookies("PHOBOSPORTAL")("FIRSTNAME2")=Firstname(1) Else Response.Cookies("PHOBOSPORTAL")("OPERATOR1")=Lastname(0) Response.Cookies("PHOBOSPORTAL")("FIRSTNAME1")=Firstname(0) Response.Cookies("PHOBOSPORTAL")("OPERATOR2")="" Response.Cookies("PHOBOSPORTAL")("FIRSTNAME2")="" End If Response.Cookies("PHOBOSPORTAL")("CHANGED")="changed" Response.Cookies("PHOBOSPORTAL").Path="/" Response.Cookies("PHOBOSPORTAL").Domain=".bnl.gov" ' ' Send this back to the Portal Page, this time with redefined names ' %>