<%@ page import = "AALADbBean" %> <%@ page import = "java.sql.*" %> <%@ page import = "java.lang.*" %> <%@ page import = "java.util.Date" %> <%@ page import = "java.util.*" %> <%@ page import = "java.io.*" %> <%@ page import = "javax.mail.*" %> <%@ page import = "javax.mail.internet.*" %> <%@ page import = "javax.activation.*" %> <% String listType = request.getParameter("listType"); if (listType == null) listType = ""; String typeKey = ""; String typeName = ""; String action = request.getParameter("action"); if (action == null) action = ""; String key = request.getParameter("key"); if (key == null) key = ""; String docKey = request.getParameter("docKey"); if (docKey == null) docKey = ""; String url = request.getParameter("url"); if (url == null) url = ""; url = db.replaceQuotes(url); String title = request.getParameter("title"); if (title == null) title = ""; title = db.replaceQuotes(title); String description = request.getParameter("description"); if (description == null) description = ""; description = db.replaceQuotes(description); String type = request.getParameter("type"); if (type == null) type = ""; type = db.replaceQuotes(type); String category = request.getParameter("category"); if (category == null) category = ""; category = db.replaceQuotes(category); String date = request.getParameter("date"); if (date == null) date = ""; date = db.replaceQuotes(date); String fileName = request.getParameter("fileName"); if (fileName == null) fileName = ""; fileName = db.replaceQuotes(fileName); String graphic1 = request.getParameter("graphic1"); if (graphic1 == null) graphic1 = ""; graphic1 = db.replaceQuotes(graphic1); String graphic2 = request.getParameter("graphic2"); if (graphic2 == null) graphic2 = ""; graphic2 = db.replaceQuotes(graphic2); String graphic3 = request.getParameter("graphic3"); if (graphic3 == null) graphic3 = ""; graphic3 = db.replaceQuotes(graphic3); // // docDisplay stuff // String fileDir = ""; String document = ""; String go = "y"; int docLevel = 99; int count = 0; // // Keys // String adminOpeningKey = ""; String contractUpdateKey = ""; found = "n"; %> <%! int numColumns; ResultSet rs = null; ResultSetMetaData rsmd = null; String errorMessage = null; String controlFound = "n"; String found = "n"; String staff = ""; String newLocation = ""; String aalaDoc = ""; String loginServlet = ""; String aalaDocs = ""; String aalaKB = ""; String aalaLinks = ""; String aalaSearch = ""; String contactEmail = ""; String sql = ""; String tempDir = ""; String tempPrivateDir = ""; String docURL = ""; String statusMessage = null; int workNo = 0; int todaysDateNum; int loginExp; Date expireDate; Date todaysDate; %> <% // response.setHeader("Pragma","No-cache"); // response.setDateHeader("Expires",0); // response.setHeader("Cache-Control", "no-cache"); String referringURL = request.getHeader("Referer"); String iaAddress = request.getRemoteAddr(); try { db.connect(); } catch (ClassNotFoundException e) { errorMessage = "
Database drivers not available:

" + e + "

"; %> <%= errorMessage %> <% } catch (SQLException e) { errorMessage = "
Database URL is wrong:

" + e + "

"; %> <%= errorMessage %> <% } try { sql = "select * from AALACONTROL WHERE CONTROLKEY = 'KEY'"; rs = db.execSQL(sql); } catch (SQLException e) { errorMessage = "
Database URL is wrong:

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } try { while (rs.next()) { newLocation = rs.getString("STAFFLOGIN"); loginServlet = rs.getString("LOGINSERVLET"); aalaDoc = rs.getString("AALADOC"); aalaDocs = rs.getString("AALADOCS"); aalaKB = rs.getString("AALAKB"); aalaLinks = rs.getString("AALALINKS"); aalaSearch = rs.getString("AALASEARCH"); contactEmail = rs.getString("CONTACTEMAIL"); tempDir = rs.getString("DOCDIR"); tempPrivateDir = rs.getString("PRIVATEDOCDIR"); docURL = rs.getString("DOCURL"); controlFound = "y"; } rs.close(); } catch (SQLException e) { errorMessage = "
Database error. The query worked, " + "but the display didn't:

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } try { db.close(); } catch (SQLException e) { errorMessage = "
Cannot close database error:

" + e + "

"; %> <%= errorMessage %> <% } // // Check cookie for login info // String aalaUsername = ""; String aalaLogin = ""; String aalaLevel = ""; Cookie[] cookies = request.getCookies(); if (cookies != null) { for (int i = 0; i < cookies.length; i++) { if (cookies[i].getName().equals("aalaUsername")) { aalaUsername = cookies[i].getValue(); loginExp = cookies[i].getMaxAge(); } if (cookies[i].getName().equals("aalaLogin")) { aalaLogin = cookies[i].getValue(); } if (cookies[i].getName().equals("aalaLevel")) { aalaLevel = cookies[i].getValue(); } } } int userLevel = 99; try { userLevel = Integer.parseInt(aalaLevel.trim()); } catch (NumberFormatException e) { userLevel = 99; } %>

AALA

AALA Home

<% // // This is the default for fileDir; // fileDir = tempDir; // // Look for doctitle = "HomePage" // sql = "select * from aaladocs where doctitle = 'HomePage'"; try { db.connect(); rs = db.execSQL(sql); while (rs.next()) { fileName = rs.getString("DOCFILE"); try { docLevel = Integer.parseInt(rs.getString("DOCLEVEL").trim()); } catch (NumberFormatException e) { docLevel = 99; } } db.close(); } catch(ClassNotFoundException e) { go = "n"; document = "ClassNotFoundException error: " + e.getMessage(); } catch(SQLException e) { go = "n"; document = "SQLException error: " + e.getMessage(); } // end Document test try if (docLevel < 99) fileDir = tempPrivateDir; if (go.equals("y")) { String filePath = fileDir + fileName; try { FileInputStream FIS = new FileInputStream(filePath); ByteArrayOutputStream BAOS = new ByteArrayOutputStream(); int a; byte[] bytes = new byte[1024]; // 1024 is the bufferSize while( true ) { a = FIS.read( bytes ); if ( a == -1 ) break; BAOS.write(bytes, 0, a); } document = BAOS.toString(); //new String( totalBytes ); FIS.close(); } catch (IOException e) { document = "File IO Error: " + e; } } // end go if %> <%= document %>  

What’s New

<% try { db.connect(); } catch (ClassNotFoundException e) { // throw new ServletException("Database drivers not available", e); errorMessage = "
Database drivers not available:

" + e + "

"; %> <%= errorMessage %> <% } catch (SQLException e) { // throw new ServletException("Database URL is wrong", e); errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } try { // // General Listing of What's New Items; // %> <% count = 0; sql = "SELECT * FROM AALAWHATSNEW ORDER BY WNKEY DESC"; rs = db.execSQL(sql); while (rs.next()) { count++; docKey = rs.getString("WNKEY"); if (docKey == null) docKey = ""; url = rs.getString("URL"); if (url == null) url = ""; title = rs.getString("TITLE"); if (title == null) title = ""; description = rs.getString("DESCRIPTION"); if (description == null) description = ""; type = rs.getString("TYPE"); if (type == null) type = ""; category = rs.getString("CATEGORY"); if (category == null) category = ""; date = rs.getString("DATEVALUE"); if (date == null) date = ""; // // Count if // if (count < 11) { %> <% } // end count if } rs.close(); %>
<%= title %>
<% db.close(); } catch (SQLException e) { errorMessage = "
Database SQL Error (usually means duplicate record. action=" + action + "):

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { errorMessage = "
Error (action=" + action + "):

" + e + "

"; %> <%= errorMessage %> <% } %>  

Administrative Openings

<% try { db.connect(); } catch (ClassNotFoundException e) { // throw new ServletException("Database drivers not available", e); errorMessage = "
Database drivers not available:

" + e + "

"; %> <%= errorMessage %> <% } catch (SQLException e) { // throw new ServletException("Database URL is wrong", e); errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { // throw new ServletException("NullPointerException", e); errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } try { // // Get Administrative Opening key // sql = "SELECT * FROM AALATYPES WHERE TYPENAME = 'Administrative Openings'"; rs = db.execSQL(sql); while (rs.next()) { adminOpeningKey = rs.getString("TYPEKEY"); if (adminOpeningKey == null) adminOpeningKey = ""; } rs.close(); // // General Administrative Openings Items; // %> <% count = 0; sql = "SELECT * FROM AALADOCS WHERE DOCTYPE = '" + adminOpeningKey + "' ORDER BY DOCKEY DESC"; rs = db.execSQL(sql); while (rs.next()) { count++; docKey = rs.getString("DOCKEY"); if (docKey == null) docKey = ""; url = rs.getString("DOCURL"); if (url == null) url = ""; title = rs.getString("DOCTITLE"); if (title == null) title = ""; description = rs.getString("DOCDESCRIPTION"); if (description == null) description = ""; type = rs.getString("DOCTYPE"); if (type == null) type = ""; fileName = rs.getString("DOCFILE"); if (fileName == null) fileName = ""; // // Count if // if (count < 11) { %> <% } // end count if } rs.close(); %>
<%= title %>
<% db.close(); } catch (SQLException e) { errorMessage = "
Database SQL Error (usually means duplicate record. action=" + action + "):

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { errorMessage = "
Error (action=" + action + "):

" + e + "

"; %> <%= errorMessage %> <% } %>  

Contract Updates

<% try { db.connect(); } catch (ClassNotFoundException e) { errorMessage = "
Database drivers not available:

" + e + "

"; %> <%= errorMessage %> <% } catch (SQLException e) { errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { errorMessage = "
Error:

" + e + "

"; %> <%= errorMessage %> <% } try { // // Get Contract Updates key // sql = "SELECT * FROM AALATYPES WHERE TYPENAME = 'Contract Updates'"; rs = db.execSQL(sql); while (rs.next()) { contractUpdateKey = rs.getString("TYPEKEY"); if (contractUpdateKey == null) contractUpdateKey = ""; } rs.close(); // // General Listing of Contract Update Items; // %> <% count = 0; sql = "SELECT * FROM AALADOCS WHERE DOCTYPE = '" + contractUpdateKey + "' ORDER BY DOCKEY DESC"; rs = db.execSQL(sql); while (rs.next()) { count++; docKey = rs.getString("DOCKEY"); if (docKey == null) docKey = ""; url = rs.getString("DOCURL"); if (url == null) url = ""; title = rs.getString("DOCTITLE"); if (title == null) title = ""; description = rs.getString("DOCDESCRIPTION"); if (description == null) description = ""; type = rs.getString("DOCTYPE"); if (type == null) type = ""; fileName = rs.getString("DOCFILE"); if (fileName == null) fileName = ""; // // Count if // if (count < 11) { %> <% } // end count if } rs.close(); %>
<%= title %>
<% db.close(); } catch (SQLException e) { errorMessage = "
Database SQL Error (usually means duplicate record. action=" + action + "):

" + e + "

"; %> <%= errorMessage %> <% } catch (NullPointerException e) { errorMessage = "
Error (action=" + action + "):

" + e + "

"; %> <%= errorMessage %> <% } %>  

[Home] [About] [What's New] [Contract Updates] [Openings] [Newsletters] [Library] [Links] [Login]