<% option explicit response.expires = 0 dim Zip, DB, RS, sSQL, name, city, state, desc, phone, address, sDBFile, email, filename, image, FS, FN, InStream Zip = Request("zip") Set DB = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.Recordset") sDBfile = Server.MapPath("database\nw.mdb") 'the following line is for local development DB.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & sDBFile '****************************IMPORTANT!***************************** 'For production distribution, uncomment the following line by removing the leading " ' " character 'DB.ConnectionString="PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & sDBfile & ";UID=;PWD=;" DB.Open sSQL = "SELECT Franchises.Address, Franchises.City, Franchises.State, " sSQL = sSQL & "Franchises.Zip, Franchises.Phone, email, Membership.Name, " sSQL = sSQL & "Membership.Description, Membership.email, specialty, vehicles, " sSQL = sSQL & "ngam, ngaa, carlite, essex, glassweld, agrss, aha " sSQL = sSQL & "FROM Membership, Franchises " sSQL = sSQL & "WHERE Membership.MemberID = Franchises.MemberID " sSQL = sSQL & "AND Franchises.Zip = '" & Zip & "'" 'original sql before 11/03 update -- ncg 'sSQL = "SELECT Franchises.FranchiseID, Franchises.Address AS Franchises_Address, " 'sSQL = sSQL & "Franchises.City AS Franchises_City, Franchises.State AS Franchises_State, " 'sSQL = sSQL & "Franchises.Zip AS Franchises_Zip, Franchises.Phone AS Franchises_Phone, " 'sSQL = sSQL & "Franchises.MemberID AS Franchises_MemberID, Membership.MemberID AS Membership_MemberID, " 'sSQL = sSQL & "Membership.Name, Membership.Address AS Membership_Address, Membership.City AS Membership_City, " 'sSQL = sSQL & "Membership.State AS Membership_State, Membership.Zip AS Membership_Zip, " 'sSQL = sSQL & "Membership.Phone AS Membership_Phone, Membership.Description, Membership.Username, " 'sSQL = sSQL & "Membership.Password, Membership.email, membership.specialty, membership.vehicles, " 'sSQL = sSQL & "Membership.ngam, Membership.ngaa, membership.carlite, membership.essex, " 'sSQL = sSQL & "Membership.glassweld, Membership.agrss, membership.aha " 'sSQL = sSQL & "FROM Membership INNER JOIN Franchises ON Membership.MemberID = Franchises.MemberID " 'sSQL = sSQL & "WHERE Franchises.Zip = '" & Zip & "'" RS.Open sSQL,DB,1,3 If RS.EOF Then Name = "ERROR: no DB entry for " & Zip & "

" Else Name = RS("Name") Address = RS("Address") City = RS("City") State = RS("State") Desc = RS("Description") Phone = RS("Phone") email = RS("email") End If If Zip = "" Then Name = "ERROR: no zipcode was sent" & "

" If Email <> "" Then Email = "" & Email & "" FileName = Zip & ".jpg" If not FileExists("images",FileName) Then filename = "nopicture.jpg" End If %> <%=Name%>
Northwest Windshields - auto glass repair and installation

A properly installed windhield can save your life.

1-800-421-0022

 

<% If rs("ngam") then %>
<% end if If rs("ngaa") then %>
<% end if If rs("carlite") then %>
<% end if If rs("essex") then %>
<% end if If rs("glassweld") then %>
<% end if If rs("agrss") then %>
<% end if If rs("aha") then %>
<% end if %>
 
 


<%=name%>

<%if rs("specialty") & "" <> "" then %> Glass Specialty: <%=rs("specialty")%>

<% end if %> <%if rs("vehicles") & "" <> "" then %>

Vehicles Serviced: <%=rs("vehicles")%>

<% end if %>

<%=desc%>


 

 

 
 


To schedule an appointment for your glass work, contact <%=NAME%> at:
<%=phone%>, toll free at (800) 421-0022 <% if rs("email") & "" <> "" then %> or by email at <%=rs("email")%>.
<% end if %>

 
Northwest Windshields • Toll Free 1-800-421-0022 • 3100 Old Dufur Rd. The Dalles, Oregon 97058 • nwi@gorge.net •
<% RS.Close DB.Close FUNCTION FileExists(ByVal strDir, ByVal strFileName) 'Native VB function "FileExists" overloaded (?!) ' Need this to prevent showing runtime errors ON ERROR RESUME NEXT ' Default to true FileExists = TRUE ' Create the filename to use, this is a web dir, / = root. FN = Server.MapPath(strDir) & "\" & strFileName ' Create FileSystemObject SET FS = Server.CreateObject("Scripting.FileSystemObject") ' Open the file, treat as textfile, doesn't matter SET InStream=FS.OpenTextFile (FN, 1, FALSE, FALSE) ' If anything other than 0 then couldn't open the file IF (Err.Number<>0) THEN ' Clear error Err.Clear ' File doesn't exist FileExists = FALSE END IF ' Close the input stream Instream.Close ' Kill the objects SET InStream = Nothing SET FS = Nothing END FUNCTION %>