|
<%
//
// 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 = " ";
%>
<%= errorMessage %>
<%
} catch (NullPointerException e)
{
errorMessage = " ";
%>
<%= 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) {
%>
| • |
<%= title %>
|
<%
} // end count if
}
rs.close();
%>
<%
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 = " ";
%>
<%= errorMessage %>
<%
} catch (NullPointerException e)
{
// throw new ServletException("NullPointerException", e);
errorMessage = " ";
%>
<%= 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) {
%>
| • |
<%= title %>
|
<%
} // end count if
}
rs.close();
%>
<%
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 = " ";
%>
<%= errorMessage %>
<%
} catch (NullPointerException e)
{
errorMessage = " ";
%>
<%= 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) {
%>
| • |
<%= title %>
|
<%
} // end count if
}
rs.close();
%>
<%
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 %>
<%
}
%>
|
|
|