home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.rsa.com
/
2014.05.ftp.rsa.com.tar
/
ftp.rsa.com
/
pub
/
partner_engineering
/
ClearTrust
/
Verity
/
header.jnc
next >
Wrap
Text File
|
2014-05-02
|
7KB
|
206 lines
<%@ include file="HTMLEncode.jnc" %>
<%@ include file="cookies.jnc" %>
<%
// Initialize the servlet context.
ServletContext contxt = getServletConfig().getServletContext();
// Get all the tab names and the URLs and view source links.
Vector tabs = new Vector();
Vector tabURLs = new Vector();
Vector tabViewSource = new Vector();
int Hdri = 1;
String tabi = "tab";
tabi = tabi + Integer.toString(Hdri);
String s = null;
while ((s = contxt.getInitParameter(tabi)) != null){
tabs.addElement(s);
// Get the URL associated with this tab
tabi = tabi + "URL";
// <Bruce Bordelon>
// changed reference to /verity_templates to request.getContextPath()
// so that contexts could be arbitrary
String tabURL = request.getContextPath() + contxt.getInitParameter(tabi);
// </Bruce Bordelon>
tabURLs.addElement(tabURL);
// Get the view sourceURL associated with this tab
tabi = tabi + "VS";
// <Bruce Bordelon>
// changed reference to /verity_templates to request.getContextPath()
// so that contexts could be arbitrary
String tabVS = request.getContextPath() + contxt.getInitParameter(tabi);
// </Bruce Bordelon>
tabViewSource.addElement(tabVS);
Hdri++;
tabi = "tab" + Integer.toString(Hdri);
}
String hdrSSpec = request.getParameter("serverSpec");
if(hdrSSpec == null || hdrSSpec.equals("")){
hdrSSpec = (String)System.getProperty("VERITY_K2_HOSTPORT");
// <Bruce Bordelon>
// also check the context configuration for the VERITY_K2_HOSTPORT property
if (hdrSSpec == null || hdrSSpec.equals(""))
hdrSSpec = (String)getServletConfig().getServletContext().getInitParameter("VERITY_K2_HOSTPORT");
// </Bruce Bordelon>
}
%>
<html>
<script language="Javascript">
function focusQueryText() {
// Search/AdvSearch/Recommendation search query text box
if(document.echo && document.echo.QueryText){
document.echo.QueryText.focus();
}
// Browse search query text box
else if(document.Content && document.Content.QueryText){
document.Content.QueryText.focus();
}
}
//function ticketprompt(){
// var rATTR = "copyhistory=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,height=325,width=300";
// var url = '../ticket.jsp?serverSpec=' + '<%=hdrSSpec%>';
// window.open(url, "", rATTR);
//}
//function logout(){
// var rATTR = "copyhistory=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,height=325,width=300";
// var url = '../ticket.jsp?logout=true&serverSpec=' + '<%=hdrSSpec%>';
// window.open(url, "", rATTR);
//}
<%
// <Bruce Bordelon>
// Javascript function added to popup doc view windows instead of just using a TARGET spec
%>
function popup(wdwName){
viewwdw = window.open("<%=request.getContextPath()%>/common/blank.html",wdwName,'width=800,height=600,scrollbars=yes,resizable=yes,location=yes,toolbar=yes,status=yes');
viewwdw.focus();
//viewwdw.location.href=href;
//return false;
}
<%
// </Bruce Bordelon>
%>
</script>
<head>
<title>Verity K2 Enterprise</title>
<%
// <Bruce Bordelon>
// changed reference to /verity_templates to request.getContextPath()
// so that contexts could be arbitrary
%>
<link rel="stylesheet" href="<%=request.getContextPath()%>/common/site.css">
<%
// </Bruce Bordelon>
%>
<script type="text/javascript" src="../../common/check_all.js"></script>
</head>
<body bgcolor="#ffffff" onload="focusQueryText();">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<% int HdrTabNum;
for (HdrTabNum = 0; HdrTabNum < tabViewSource.size(); HdrTabNum++){
if (HdrTabNum == currentTab){ //currentTab is defined in main page.
%>
<b><A target = "view_source" href=<%=(String)tabViewSource.elementAt(HdrTabNum)%>>view source</a> </b>
<% }
}
%>
<%
String enableTicket = contxt.getInitParameter("EnableTicket");
if( enableTicket != null && enableTicket.equals("1") )
{
%>
<%@ include file="../jsp/ticket.jnc"%>
<% HttpSession Hdrsess = request.getSession(true);
String Hdrticket = (String)Hdrsess.getAttribute("ticket");
String HdrUser = (String)Hdrsess.getAttribute("user");
String strCookieLoggedOn = getCookieValue(request.getCookies(),"SAMPLE_TEMPLATES_LOGGEDON", "");
// if ((Hdrticket == null) || (Hdrticket.equals(""))) {
// if ( !strCookieLoggedOn.equals("") ) { // session has timed out
%>
<!-- <script type="text/javascript">ticketprompt();</script> -->
<%
// }
%> <!-- <A href="javascript:ticketprompt();">login</a></b> --> </td>
<%
// } else {
%> User: <%=HdrUser%> </b></td>
<% } %>
<% } %>
<td align="right" rowspan="2">
<div align="right">
<%
// <Bruce Bordelon>
// add a version indicator
%>
<font size="-2"><i>v 1.3</i></font>
<%
// </Bruce Bordelon>
%>
<%
// <Bruce Bordelon>
// changed reference to /verity_templates to request.getContextPath()
// so that contexts could be arbitrary
%>
<a target = "verity_home" href="http://www.verity.com"><IMG border=0 height=66 src="<%=request.getContextPath()%>/images/verity_logo.gif" vspace=7 width=133></a></div></td>
<%
// </Bruce Bordelon>
%>
</tr>
<tr>
<td align="left" valign="bottom">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<% for (HdrTabNum = 0; HdrTabNum < tabs.size(); HdrTabNum++){
if (HdrTabNum == currentTab){ // currentTab is defined in main page.
%>
<%
// <Bruce Bordelon>
// changed reference to /verity_templates to request.getContextPath()
// so that contexts could be arbitrary
%>
<td><IMG border=0 height=19 id=IMG1 src="<%=request.getContextPath()%>/images/tabs_0<%=HdrTabNum+1%>.gif" ></td>
<%
// </Bruce Bordelon>
%>
<% } else {
%>
<%
// <Bruce Bordelon>
// changed reference to /verity_templates to request.getContextPath()
// so that contexts could be arbitrary
%>
<td><a href=<%=(String)tabURLs.elementAt(HdrTabNum)%>?serverSpec=<%=hdrSSpec%> target="_top"><IMG border=0 height=19 id=IMG1 src="<%=request.getContextPath()%>/images/tabs_black_0<%=HdrTabNum+1%>.gif" ></a></td>
<%
// </Bruce Bordelon>
%>
<%
}
}
%>
</tr>
</table>
</td>
</tr>
</table>