<% @LANGUAGE=VBScript %> <% '############################################################################## '# Declare variables '### Declare database field variables Dim longProfessionalId Dim strName Dim strProfession Dim strQualifications Dim longPracticeId Dim strAddress1 Dim strAddress2 Dim strCity Dim strState Dim intPostcode Dim strPhone Dim strFax Dim strEmail Dim strWeb Dim strHours Dim strOwnedBy Dim boolWheelchair Dim strCosts Dim boolService_Men Dim boolService_Women Dim boolService_OrgasmDifficulties Dim strAddress Dim strPhoneAndFax Dim strWebAndEmail Dim strHomeText Dim strYear Dim objConn Dim objRS Dim strQuery Dim boolService_Parking Dim boolService_over90 Dim Public_trans Dim strpay Dim Profid Dim dir Dim myrs Dim strQuery1 Dim hob Dim ex Dim Years Dim strConnect '############################################################################## Dim strDBPath %><% '############################################################################## '# Get argument longPracticeId=Request.QueryString("PracticeId") '############################################################################## '# Make query strQuery="SELECT * FROM ProfPracticeView WHERE Active=true AND PracticeId=" & longPracticeId & ";" '############################################################################## '### Set recordset Set objRS=Server.CreateObject("ADODB.Recordset") Set objRS.ActiveConnection=objConn objRS.Open strQuery '############################################################################## '# Output objRS details strName=objRS("Name") strProfession=objRS("Profession") strQualifications=objRS("Qualifications") strAddress1=objRS("Address1") strAddress2=objRS("Address2") strCity=objRS("City") strState=objRS("State") intPostcode=objRS("Postcode") strPhone=objRS("Phone") strFax=objRS("Fax") strEmail=objRS("Email") strWeb=objRS("Web") strHours=objRS("Hours") strOwnedBy=objRS("OwnedBy") boolWheelchair=objRS("Wheelchair") strCosts=objRS("Costs") boolService_Parking=objRS("Parking") boolService_Men=objRS("Service_Men") boolService_Women=objRS("Service_Women") boolService_OrgasmDifficulties=objRS("Service_OrgasmDifficulties") boolService_over90=objRS("over90") Public_trans=objRS("Public_trans") strpay=objRS("Payment") dir=objRS("Directions") Profid=objRS("ProfessionalId") Rebate=objRS("Rebates") If objRS("Web").ActualSize=0 Then strWeb="" End If If objRS("Email").ActualSize=0 Then strEmail="" End If If objRS("Address2").ActualSize=0 Then strAddress2="" End If '############################################################################## '# Make 2nd query strQuery1="SELECT * FROM Professionals WHERE Active=true AND id=" & Profid & ";" '### Set recordset Set myrs=Server.CreateObject("ADODB.Recordset") Set myrs.ActiveConnection=objConn myrs.Open strQuery1 '############################################################################## '# Output myrs details hob=myrs("Hobbies") ex=myrs("OEx") years=myrs("Years") '############################################################################## '# Close database '### Close recordset & connection objRS.Close myrs.Close objConn.Close Set objRS=Nothing Set myrs=Nothing Set objConn=Nothing '############################################################################## '# Format fields '### Format address If strAddress2="" Then If strAddress1="" Then strAddress="" Else strAddress=strAddress1 End If Else strAddress=strAddress1 & ",
" & strAddress2 End If strAddress="Address:
" & strAddress & ",
" & strCity & ",
" & strState & " " & intPostcode & "." '### Format phone number If strPhone<>"" Then strPhoneAndFax="Phone:
" & strPhone & "

" End If '### Format fax number If strFax<>"" Then strPhoneAndFax=strPhoneAndFax & "Fax:
" & strFax End If '### Format web address If strWeb<>"" Then If Left(strWeb,7)<>"http://" Then strWeb="http://" & strWeb End If strWebAndEmail="Web:
" & strWeb & "

" End If '### Format email address If strEmail<>"" Then strWebAndEmail=strWebAndEmail & "Email:
" & strEmail & "" End If '### Format services strHomeText=strHomeText & "