home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 July
/
CMCD0703.ISO
/
Software
/
Freeware
/
Programare
/
bugzero
/
jsp
/
_header.jspf
< prev
next >
Wrap
Text File
|
2003-06-09
|
4KB
|
104 lines
<%@ page language="java"
session="true"
import="com.websina.util.*,com.websina.bean.Person,com.websina.util.log.Log"
errorPage="error.jsp"
%>
<%
String contextPath = request.getContextPath();
Person person = (Person)session.getAttribute("person");
int CUSTOM_FIELDS = com.websina.bean.Schema.CUSTOM_FIELDS;
if(person == null) {
String projectId = request.getParameter("projectId");
String issueId = request.getParameter("issueId");
String requestUri = request.getRequestURI();
StringBuffer buf = new StringBuffer("?msg=");
String msg = java.net.URLEncoder.encode(MessageCode.get("servlet.cookie_setting_error"));
buf.append(msg);
buf.append("&requestUri=").append(requestUri.trim());
if (projectId != null && projectId.trim().length()>0) {
buf.append("&projectId="+projectId.trim());
}
if (issueId != null && issueId.trim().length()>0) {
buf.append("&issueId="+issueId.trim());
}
response.sendRedirect("login.jsp"+buf.toString());
return;
}
if(person.isAdmin()) {
response.sendRedirect("error.jsp?"
+java.net.URLEncoder.encode(MessageCode.get("servlet.not_user")));
return;
} else {
String projectId = request.getParameter("projectId");
if (projectId != null && projectId.trim().length()>0) {
person.switchProject(projectId);
}
}
Label label = Label.getInstance();
%>
<script LANGUAGE="JavaScript" src="script/utils.js"></script>
<LINK rel="StyleSheet" href="css/styles.css" type="text/css">
<form action="edit.jsp" onsubmit="trim(issueId); return(issueId.value.length>0);">
<!-- you may redo the interface below -->
<table bgcolor="#3c5c84" cellspacing=0 cellpadding=0 width="100%" border=0>
<tr><td rowspan=2 valign=top>
<a title="About..." href="#" onClick="window.open ('about.html','_blank','height=240,width=320')">
<img border=0 src="img/<%=label.get("logo.gif")%>"></a>
</td>
<td valign=top align=right><img src="img/curve.gif"></td>
<td bgcolor="#000000">
<font color="#ffffff" size=-1><b><%=person.getDisplay()%></font>
<font color="#ffffff" size=-1> / <b><%=person.getAccessCode()%></b></font>
</td>
<td bgcolor="000000" align=right>
<% if (!com.websina.bean.Group.isGuest(person.getGroup())) { %>
<a href="prefs.jsp" class="clickme">
<%=label.get("prefs_button")%></a><font color="ffffff"> | </font>
<% } %>
<a href="help.jsp" class="clickme">
<%=label.get("help_button")%></a><font color="ffffff"> | </font>
<a href="<%=contextPath%>/servlet/login?action=logoff" class="clickme">
<%=label.get("logoff_button")%></a>
</td></tr>
<tr>
<td colspan=3 height=30> </td>
</tr>
<tr><td colspan=3>
<a href="home.jsp" class="clickme">
<%=label.get("home_button")%></a><font color="ffffff"> | </font>
<% if (person.isAllowed("create")) { %>
<a href="create.jsp" class="clickme">
<%=label.get("create_button")%></a><font color="ffffff"> | </font>
<% }
if (person.isAllowed("query")) { %>
<a href="query.jsp" class="clickme">
<%=label.get("query_button")%></a><font color="ffffff"> | </font>
<% }
if (person.isAllowed("report")) { %>
<a href="report.jsp" class="clickme">
<%=label.get("report_button")%></a><font color="ffffff"> | </font>
<% } %>
<nobr><a href="#" class="clickme"
onClick="trim(issueId);if(issueId.value.length>0)submit();">
<%=label.get("open_button")%></a>
<input type=text name=issueId size=6
style="font-size:12px;
font-face:arial;
margin-bottom:0;
margin-top:0;"></nobr>
</td>
<td align=right><font color="#ffffff" size="-1"><b><%=label.get("project_label")%></b></font>
<select name="project"
style="font-size:14px;font-face:arial;"
onChange="location.href='<%=contextPath%>/servlet/login?action=relogin&projectId='+project.options[project.selectedIndex].value;">
<%=ListMaker.makeOptionList(person.getProjectList(), person.getProject()) %>
</select></td>
</tr>
</table>
</form>