<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)admin_logs.jsp    1.16    03/08/21     SMI"
   * 
   */
 --%>
<%@ include file="/layout/toptags.jsp"%>
<%@ page import="java.util.Iterator"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.StringTokenizer"%>
<!-- locale stuff -->
<html:html locale="true">
<!-- end locale -->

<!-- Place Java Script Here -->

<!-- HTML -->
<head>
<%@include file="/layout/page_head_section.jsp"%>
	<title>
		<bean:message  key="admin.general.title"/>
	</title>
</head>
<%@ include file="/layout/bodytag.jsp"%>
<html:form action="/root.menu.item3.item5.do">
<%@include file="/layout/top.jsp"%>
<%@include file="/layout/breadcrumb.jsp"%>
<%@include file="/layout/spacer.jsp"%>
<%@include file="/layout/user_messages.jsp"%>

<jsp:include page="../layout/section_header.jsp" flush="true">
	<jsp:param name="sectionname" value="admin.logs.sectiontitle" />
	<jsp:param name="sectiondescr" value="admin.logs.sectiondescr" />
</jsp:include>

<!-- hidden element which specifies the action for this form -->
<input type="hidden" name="action" value="<%=request.getAttribute("action")%>">
<table align="center" width="600">
<tr>
<td width="100%">
<%@include file="/layout/prevnext.jsp"%>
</td>
</tr>
<tr>
<td nowrap>
<div class="content-layout">
  <table class="back-table" border="0" cellspacing="0" cellpadding="1" align="center" width="600">
    <tr>
      <td>
        <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="600">
          <tr class="header-row">
          <td>
              <div class="table-header-text">
                <bean:message key="admin.logs.time" />
              </div>
            </td>
            <td colspan="2">
              <div class="table-header-text">
                &nbsp;
                <bean:message key="admin.logs.description" />
              </div>
            </td>
            <td>
          </tr>
          <%
          Trace.verbose(this, "admin_logs.jsp", "Get attribute");
          List logList = (List) session.getAttribute("LogList");
          Trace.verbose(this, "admin_logs.jsp", "Number of entries:" + logList.size());
          int beginIndex = ((Integer)request.getAttribute("beginIndex")).intValue();
          int maxRows = ((Integer)request.getAttribute("maxRowsPerListing")).intValue();
          for(int i = beginIndex; i < maxRows+beginIndex && i < logList.size(); i++) {
          //for (Iterator i = logList.iterator(); i.hasNext(); ) {
              try {
                  //String entry = (String) i.next();
                  String entry = (String)logList.get(i);
                  StringTokenizer tokenizer = new StringTokenizer(entry, "|");
                  String timeStamp = tokenizer.nextToken();
                  String event = tokenizer.nextToken();
                  String text = tokenizer.nextToken();
                  out.print("<tr><td nowrap align='left' valign='bottom'>");
                  out.print(timeStamp);
                  out.print("</td>");
                  %>
                  	<td><img alt src="images/dot.gif" width="20" height="1"></td>
                  <%
                  out.print("<td align='left'>");
                  out.print(text);
                  out.print("</td></tr>");
              } catch (Throwable x) {
              	Trace.verbose(this, "admin_logs.jsp", x);
              }
          }
          %>
          <tr>
            <td class="line-row" colspan="4"><img alt src="images/dot.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td class="line-row" colspan="4"><img alt src="images/dot.gif" width="1" height="1"></td>
          </tr>
        </table>

      </td>
    </tr>
  </table>
</div>
</td>
</tr>
<tr>
<td>
<%@include file="/layout/prevnext.jsp"%>
</td>
</tr>
</table>



</html:form>
</body>

</html:html>
