<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %> Twitter search newspaper <% request.setCharacterEncoding("UTF-8"); String q = request.getParameter("q"); String lat = request.getParameter("lat"); String lng = request.getParameter("lng"); String mashups="http://mashups.linkstore.ru"; if (lat==null && lng==null) { String geocode = request.getParameter("geocode"); if (geocode!=null) { geocode = geocode.toUpperCase(); geocode=geocode.replaceAll("%252C",","); geocode=geocode.replaceAll("%2C",","); int i = geocode.indexOf(","); if (i>0) { lat = geocode.substring(0,i); geocode = geocode.substring(i+1); i = geocode.indexOf(","); if (i>0) { lng = geocode.substring(0,i); } } } } if (q==null) q=""; else { char aC; String buffer = ""; int bP, sumb = 0; for (int i = 0, more = -1; i < q.length(); i++) { aC = q.charAt(i); switch (aC) { case'%': { aC = q.charAt(++i); int hb = (Character.isDigit(aC) ? aC - '0' : 10 + Character.toLowerCase(aC) - 'a') & 0xF; aC = q.charAt(++i); int lb = (Character.isDigit(aC) ? aC - '0' : 10 + Character.toLowerCase(aC) - 'a') & 0xF; bP = (hb << 4) | lb; break; } case'+': { bP = ' '; break; } default: { bP = aC; } } //* Decode byte bP as UTF-8, sumb collects incomplete chars *//* if ((bP & 0xc0) == 0x80) { // 10xxxxxx sumb = (sumb << 6) | (bP & 0x3f); if (--more == 0) buffer+=(char) sumb; } else if ((bP & 0x80) == 0x00) { // 0xxxxxxx buffer+=(char) bP; } else if ((bP & 0xe0) == 0xc0) { // 110xxxxx sumb = bP & 0x1f; more = 1; } else if ((bP & 0xf0) == 0xe0) { // 1110xxxx sumb = bP & 0x0f; more = 2; } else if ((bP & 0xf8) == 0xf0) { // 11110xxx sumb = bP & 0x07; more = 3; } else if ((bP & 0xfc) == 0xf8) { // 111110xx sumb = bP & 0x03; more = 4; } else { // 1111110x sumb = bP & 0x01; more = 5; } } q = buffer; } if (q.endsWith("/")) { if (q.length()==1) q=""; else q=q.substring(0,q.length()-1); } if (lat!=null) if (lat.endsWith("/")) { if (lat.length()==1) lat=null; else lat=lat.substring(0,lat.length()-1); } if (lng!=null) if (lng.endsWith("/")) { if (lng.length()==1) lat=null; else lng=lng.substring(0,lng.length()-1); } String style="display:block"; if (q.length()>0 || (lat!=null && lng!=null)) style="display:none"; String blog="http://servletsuite.blogspot.com"; String twitter="http://twitter.com/t411"; java.util.Enumeration loc = request.getLocales(); while (loc.hasMoreElements()) { java.util.Locale l = (java.util.Locale)loc.nextElement(); String s = l.toString(); if (s.startsWith("ru")) { blog="http://abava.blogspot.com"; twitter="http://twitter.com/abava"; mashups="http://mashup.linkstore.ru"; break; } } %> Developed by: Coldbeans | Twitter | Blog | Mashups

Twitter <% if (lat!=null && lng!=null) { %> local <% } %> Search <% if (lat!=null && lng!=null) { String sMap="http://bigmap.linkstore.ru?lat="+lat+"&lng="+lng+"&zml=10&mrk=1"; String sPeople="http://lt.linkstore.ru?lat="+lat+"&lng="+lng; %>    Map People <% } %>
<% if (lat!=null && lng!=null) { %> <% } %>
 

<% if (q.length()>0 || (lat!=null && lng!=null)) { %>

<% } %>