%@ 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() ); } %>
|
<%
// *********************************************************
// Find by category section
// *********************************************************
%>
|
|
<%
// *********************************************************
// Quick Links section
// *********************************************************
%>
||