<% Business business = null; int resultCount = 0; String resultMsg = ""; String code = ""; String name = ""; String matchedTypes = ""; String searchTypes = ""; String searchMode = request.getParameter("mode"); String searchName = request.getParameter("name"); String[] types = ((String[])request.getParameterMap().get("types")); String searchLetter = request.getParameter("letter"); if (searchMode != null && searchMode.equals("select")) searchMode = null; else if (searchName != null) searchMode = "name"; else if (types != null) { searchMode = "type"; if (types != null && types.length > 0) { searchTypes = "|"; for (int i=0;i

Search for Plymouthmi businesses in our business directory.
Search by Business Name, Business Type or list businesses by Letter.

<% } else { %>

Search Again Or

<% } %> <%@ page import="java.util.*" %> <%! TreeMap directory = new TreeMap(); private class Business { String address1 = ""; String address2 = ""; String building_no = ""; String city = ""; String description = ""; String fax = ""; String phone = ""; String state = ""; String type = ""; String website_url = ""; String zip = ""; } %>

To download a complete listing of all business licenses, click here.

<% business = new Business(); name = ""; if (name.length() > 0) { business.address1 = ""; business.address2 = ""; business.building_no = ""; business.city = ""; business.description = ""; business.fax = ""; business.phone = ""; business.state = ""; business.type = ""; business.website_url = ""; business.zip = ""; directory.put(name,business); } %> <% name = ""; code = "0"; if (searchMode != null && searchMode.equals("type") && searchTypes.indexOf("|"+code+"|") != -1) matchedTypes += ", " + name; %> <% if (matchedTypes.length() > 1) matchedTypes = matchedTypes.substring(2); if (searchMode != null) { Iterator iter = directory.keySet().iterator(); while (iter.hasNext()) { String key = (String)iter.next(); if (searchMode.equals("name") && key.toLowerCase().indexOf(searchName) == -1) continue; if (searchMode.equals("letter") && key.indexOf(searchLetter) != 0) continue; if (searchMode.equals("number") && Character.isLetter(key.charAt(0))) continue; business = (Business)directory.get(key); if (searchMode.equals("type")) { boolean isType = false; String[] test = business.type.split("\\|",0); for (int t=0;t

<%=key%>

<%if(!business.building_no.equals("")){%> Building # <%=business.building_no%> <%}%> <% //if (business.description.length() > 0) out.println(business.description+"
"); if (business.address1.length() > 0) out.println(business.address1+"
"); if (business.address2.length() > 0) out.println(business.address2+"
"); if (business.city.length() > 0) out.print(business.city+", "); if (business.state.length() > 0) out.print(business.state+"  "); if (business.zip.length() > 0) out.print(business.zip); if (business.city.length() + business.state.length() + business.zip.length() > 0) out.println("
"); if (business.phone.length() > 0) out.println(business.phone+"
"); if (business.fax.length() > 0) out.println(business.fax+" fax
"); if (business.description.length() > 0) out.println(business.description+"
"); if (business.website_url.length() > 0) { business.website_url = "http://"+business.website_url; %>
  • Click here to visit our website
<% } } // end while selected business display // create results message displayed at top of page if (searchMode.equals("all")) { resultMsg = "There were "+resultCount+" results for All Businesses."; } else if (searchMode.equals("name")) { if (resultCount > 0) resultMsg = "There were "+resultCount+" Plymouthmi business names containing ""+searchName+""."; else resultMsg = "There were no matches for Plymouthmi business names containing ""+searchName+""."; } else if (searchMode.equals("type")) { if (resultCount > 0) resultMsg = "There were "+resultCount+" matches for " + matchedTypes + "."; else resultMsg = "There were no matches for " + matchedTypes + "."; } else if (searchMode.equals("letter")) { if (resultCount > 0) resultMsg = "There were "+resultCount+" Plymouthmi business names beginning with "+searchLetter+"."; else resultMsg = "There were no matches for Plymouthmi business names beginning with "+searchLetter+"."; } else if (searchMode.equals("number")) { if (resultCount > 0) resultMsg = "There were "+resultCount+" matches for Plymouthmi business names beginning with a number or a sign."; else resultMsg = "There were no matches for Plymouthmi business names beginning with a number or a sign."; } if (resultCount==0) resultMsg = "" + resultMsg + "  Please try again."; %>
<% } else { %>
Search by Business Name

 

or Search by Business Type

                                         

Hold Ctrl button and click with the mouse
to select multiple business types

 

or List Businesses by Letter
All - # - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P
Q - R - S - T - U - V - W - X - Y - Z
<% } %>