<%@ page language="java" import="com.pri.server.hub.*,com.pri.lib.util.*,com.pri.lib.net.*,java.util.*,java.net.*,java.text.*" %> TrueSystems TrueLookCams <%! public static String replace(String s, String find, String replace) { int i = s.indexOf(find); if (i==-1) return s; return s.substring(0,i) + replace + s.substring(i+ find.length() ); } public static String createTableCell(Camera cam) { StringBuffer b = new StringBuffer(""); b.append(""); b.append("\"Go
"); b.append(cam.getTitle()+"

"+ cam.getCaption()+"
"+ cam.getDescription()+""); return b.toString(); } %> <%= LiveCamHub.getPopupJavascript(800, 530) %> <% LiveCamHub hub = LiveCamHub.getRunningInstance(); //list of live cams set to appear on the homepage Vector homePageCams = Filters.getByVAR("ShowHomePage", "true", hub.getAllDisplayableCams()); if (homePageCams==null) homePageCams = new Vector(); int NUMCAMS = ( homePageCams.size() < 3 ? homePageCams.size() : 3); %>

Images Viewed:
<%= HomePageCounter.formatLong(HomePageCounter.getImageCount()) %>

Unique Visitors:
<%= HomePageCounter.formatLong(HomePageCounter.getUserCount()) %>

Cameras:
400

Featured WebCams
<% int sz = NUMCAMS; int w = 102; int h = 77; for (int i=0; i< sz; i++) { try { Camera cam = (Camera) homePageCams.elementAt(i); String liveURL= replace(cam.getPopupURL(),"perceptualrobotics", "truelook"); String thumbURL = replace(cam.getThumbnailURL(), "perceptualrobotics", "truelook"); %>

<%=cam.getTitle()%>
<%=cam.getTitle()%>

<% } catch (Exception e5) { } } %>

Welcome to TrueLookCams

<% String cat = request.getParameter("cat"); if (cat==null) { %> <% } else { %>

Commerce and Retail

Media and Entertainment

Enterprise and Construction

Look Again

All Cameras

<% Vector liveCams = hub.getAllDisplayableCams(); Vector hubCams = liveCams; if (! cat.equals("all")) hubCams = hub.getByName(cat,liveCams); Camera cam; int i = 0; for(Enumeration camenum = hubCams.elements(); camenum.hasMoreElements(); ) { //get the cameras in that category cam = (Camera)camenum.nextElement(); out.println( createTableCell( cam ) ); i++; if (i%3==0){%> <%} } } %>