% state = request("state") %>
|
|
||
|
|
<% OpenDataConn If state="" Then response.write(" ") response.write("Phantom Sound has such a unique and high-quality product that it is in ""demand"" from people ALL over the country! We will install anywhere in the United States and Canada! ") Else sql = "select * from dealers where id=1 or LCase(state)='" & LCase(state) & "' order by id DESC" rs.open sql, DataConn, 3, 3 Do While Not rs.EOF DisplayBoldIfPresent"",rs("name") DisplayIfPresent"",rs("contact_name") DisplayIfPresent"",rs("street_address") DisplayIfPresent"",rs("street_address2") city = rs("city") state_abbr = rs("state_abbr") zipcode = rs("zipcode") 'If (Not IsNull(city)) And (Not IsNull(state_abbr)) And (Not IsNull(zipcode)) Then DisplayIfPresent"",city & ", " & state_abbr & " " & zipcode 'End If DisplayIfPresent"Phone: ",rs("phone") DisplayIfPresent"Fax:",rs("fax") DisplayIfPresent"Mobile: ",rs("mobile") website = rs("website") If Not IsNull(website) Then If website<>"" Then weblink = website If InStr(weblink,"http://")<=0 Then weblink = "http://" & weblink End If response.write("" & website & "" & vbNewLine) End If End If email = rs("email") If Not IsNull(email) Then If email<>"" Then maillink = email If InStr(maillink,"mailto:")<=0 Then maillink = "mailto:" & maillink End If response.write("" & email & " " & vbNewLine) End If End If comments = rs("comments") If Not IsNull(comments) Then If comments<>"" Then response.write(" " & comments & " " & vbNewLine) End If End If response.write(" ") rs.movenext Loop rs.close response.write(" Click here to search for dealers in another state. ") End If CloseDataConn Sub DisplayIfPresent(label,fieldvalue) If IsNull(fieldvalue) Then Exit Sub End If If Trim(fieldvalue)="" Then Exit Sub End If response.write(label & " " & fieldvalue & " " & vbNewLine) End Sub Sub DisplayBoldIfPresent(label,fieldvalue) If IsNull(fieldvalue) Then Exit Sub End If If Trim(fieldvalue)="" Then Exit Sub End If response.write("" & label & " " & fieldvalue & " " & vbNewLine) End Sub %>
|
|