<%@ page import="java.util.Random"%> <%@ page import="java.util.Vector"%> <%@ page import="com.ibm.azportal.util.JspHelper"%> <%@ page import="com.ibm.azportal.admin.AdminLinkServlet"%> <%@ page import="com.ibm.azportal.image.*" %> <%@ page import="com.ibm.azportal.document.tree.*"%> <%@ page import="org.apache.log4j.*"%> <%! Category log = Category.getInstance( "JSP:CONTENT" ); %> <% String staticPath = JspHelper.getStaticPath( "Portal" ); // determine if we are in the admin EDIT mode so that "[EDIT]" can be put on the screen Boolean flag = (Boolean)request.getAttribute( "isAdmin" ); if ( flag == null ) { Cookie[] cookies = request.getCookies(); if ( cookies != null ) { for ( int i = 0; i < cookies.length; i++ ) { if( AdminLinkServlet.COOKIE_NAME.equals( cookies[i].getName() ) ) { if ( AdminLinkServlet.TRUE.equals( cookies[i].getValue() ) ) { request.setAttribute( "isAdmin", new Boolean( true ) ); break; } } // if this is the cookie } //for all cookies } } // if the flag is not yet set // get list of image to be displayed Random rand = new Random(); String imageName = "mainphoto"; String imageSummary = ""; try { Object id = TreeLookup.lookupRootID( "PortalContent", "rotatingimage" ); Vector listOfImage = Image.retrieveImagesInFolder(id); int randomNumber = rand.nextInt(listOfImage.size()); ImageInterface image = (ImageInterface)listOfImage.get(randomNumber); imageName = image.getTitle(); imageSummary = image.getSummary(); } catch (Exception e) { log.error( "Error retrieving document ID : " + e.getMessage() ); } %> Arizona @ Your Service <% // ********************************************************* // Header // ********************************************************* %> <% // ********************************************************* // Center table setup // ********************************************************* %> <% // ********************************************************* // Quick Links section // ********************************************************* %> <% // ********************************************************* // "News & Events" data section // ********************************************************* %>
<% // ********************************************************* // Find by category section // ********************************************************* %> <% // ********************************************************* // Center image (also known as the "focus image") // ********************************************************* %>
<%= imageSummary %>
<% // ********************************************************* // yellow footer table // ********************************************************* %> <% // ********************************************************* // 10 pixel wide yellow column for spacing // ********************************************************* %> <% // ********************************************************* // 50% of remainder of screen for "liquid spacing" // ********************************************************* %> <% // ********************************************************* // "Governor" data section // ********************************************************* %>
<% // ********************************************************* // 1 to 8 featured items // ********************************************************* %> <% // ********************************************************* // end of 1 to 8 featured items // ********************************************************* %>
Digital States Survey Winner 2006: fifth place
<% // ********************************************************* // end of yellow footer table // ********************************************************* %> <% // ********************************************************* // "Footer navigation" data section // ********************************************************* %> <% // ********************************************************* // menus for Dynamic HTML, in case JavaScript is turned off, these appear at the bottom // ********************************************************* %>