% case_id = request.QueryString("case_id") updt = request.QueryString("updt") first_name = replace(Request("first_name"),"'","`") last_name = replace(Request("last_name"),"'","`") comp_name = replace(Request("comp_name"),"'","`") phone = Request("phone") email = replace(Request("email"),"'","`") app_ann_rev = Request("app_ann_rev") if request("address") <> "" then strt_addr = replace(request("address"),"'","`") else strt_addr = "" end if if request("city") <> "" then city = replace(request("city"),"'","`") else city = "" end if if request("state") <> "" then province = replace(request("state"),"'","`") else province = "" end if if request("zip") <> "" then zip = request("zip") else zip = "" end if if request("fax") <> "" then fax = request("fax") else fax = "" end if if request("comment") <> "" then comments = replace(request("comment"),"'","`") else comments = "" end if if updt = "yes" then if case_id = "" then case_id = 0 end if set rs = server.CreateObject("adodb.recordset") rs.open "select * from personal_info where case_id=" & case_id,co,1,3 if rs.eof = false then if request("address") <> "" then addr = replace(request("address"),"'","`") end if if request("city") <> "" then city = replace(request("city"),"'","`") end if sql = "update PERSONAL_INFO set " sql = sql & "FIRST_NAME = '" & replace(request("first_name"),"'","`") & "'," sql = sql & "LAST_NAME = '" & replace(request("last_name"),"'","`") & "'," sql = sql & "COMP_NAME = '" & replace(request("comp_name"),"'","`") & "'," sql = sql & "PHONE = '" & request("phone") & "'," sql = sql & "EMAIL ='" & request("email") & "'," sql = sql & "STRT_ADDR = '" & addr & "'," sql = sql & "CITY ='" & city & "'," sql = sql & "PROVINCE = '" & request("state") & "'," sql = sql & "ZIP = '" & request("zip") & "' " sql = sql & "where case_id=" & case_id co.execute sql else case_id = 1 set in_rs = Server.CreateObject("adodb.recordset") in_rs.open "select top 1 case_id from PERSONAL_INFO order by case_id desc",co,1,3 if in_rs.eof = false then case_id = in_rs("case_id") + 1 end if in_rs.close set in_rs = nothing sql = "insert into PERSONAL_INFO(case_id,first_name,last_name,comp_name,phone,email," sql = sql & "STRT_ADDR,CITY,PROVINCE,ZIP,COMMENTS) values(" sql = sql & case_id & "," sql = sql & "'" & first_name & "'," sql = sql & "'" & last_name & "'," sql = sql & "'" & comp_name & "'," sql = sql & "'" & phone & "'," sql = sql & "'" & email & "'," sql = sql & "'" & strt_addr & "'," sql = sql & "'" & city & "'," sql = sql & "'" & province & "'," sql = sql & "'" & zip & "'," sql = sql & "'" & comments & "')" co.execute sql end if rs.close set rs = nothing set rs = server.CreateObject("adodb.recordset") rs.open "select case_id from client_info where case_id=" & case_id,co,1,3 if rs.eof = true then fax = request("fax") website = request("website") entity_type = request("entity") formation_year = request("year_incorp") incorp_state = request("form_state") if request("other_state") <> "" then other_state = replace(request("other_state"),"'","`") else other_state = "" end if sql = "insert into client_info values(" & case_id & "," sql = sql & "'" & fax & "'," sql = sql & "'" & website & "'," sql = sql & "'" & entity_type & "'," sql = sql & "'" & formation_year & "'," sql = sql & "'" & incorp_state & "'," sql = sql & "'" & other_state & "')" co.execute sql end if rs.close set rs = nothing 'end if response.Redirect("CompanyInformation.asp?case_id=" & case_id) end if if case_id <> "" then set rs = server.CreateObject("adodb.recordset") rs.open "select * from personal_info where case_id=" & case_id,co,1,3 first_name = replace(rs("FIRST_NAME"),"`","'") last_name = replace(rs("LAST_NAME"),"`","'") company_name = replace(rs("COMP_NAME"),"`","'") ph = rs("PHONE") email = rs("EMAIL") if rs("STRT_ADDR") <> "" then addr = replace(rs("STRT_ADDR"),"`","'") else addr = "" end if if rs("CITY") <> "" then city = replace(rs("CITY"),"`","'") else city = "" end if province = rs("PROVINCE") zip = rs("ZIP") rs.close set rs = nothing set rs = server.CreateObject("adodb.recordset") rs.open "select * from client_info where case_id=" & case_id,co,1,3 if rs.eof = false then fax = rs("fax") website = rs("website") entity_type = rs("entity_type") formation_year = rs("formation_year") incorp_state = rs("incorp_state") if rs("other_state") <> "" then other_state = replace(rs("other_state"),"'","`") else other_state = "" end if end if rs.close set rs = nothing end if if news = "" and Request.QueryString("mode") = "" then case_id = Request.QueryString("case_id") if case_id="" then case_id=0 end if set rs = Server.CreateObject("Adodb.recordset") rs.open "select * from options where case_id=" & case_id,co,1,3 if rs.eof = false then fr_rprts_val = rs("FREE_REPORT") call_me_val = rs("CALL_ME") if fr_rprts_val = "Y" then msg = "Please Follow the Links to see the Article:" else msg = "We will Contact You Soon" end if end if end if %>