home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 May
/
CMCD0505.ISO
/
Software
/
Shareware
/
Programare
/
bugzero
/
jsp
/
prefs.jsp
< prev
next >
Wrap
Text File
|
2004-12-10
|
4KB
|
122 lines
<%@ page
import="com.websina.bean.*,com.websina.util.*,com.websina.util.log.Log"
%>
<html>
<head>
<head><title>User Preferences</title>
</head>
<body topmargin=0>
<%@ include file="_header.jspf" %>
<%
if (com.websina.bean.Group.getInstance().isGuest(person.getGroup()) && !guestPrefsAllowed) {
response.sendRedirect("home.jsp");
return;
}
String title = label.get("user_preferences");
String tmp;
String requiredMark = "<font color=red>*</font>";
%>
<center>
<%-- the title part --%>
<table bgcolor="#ffffff" cellpadding=0 cellspacing=0 width=100% border=0>
<tr><td align=center height=30><font size=+1><b><%=title%></b></font>
</table>
<% String msg = request.getParameter("msg");
if (msg != null) { %>
<p><font color=red><b><%=msg%></b></font>
<% } %>
<p>
<form name="prefForm" method="post" action="<%=contextPath%>/servlet/prefs">
<table cellpadding=2 cellspacing=0 border=0 class="box">
<%-- the name part --%>
<tr><td class="e8" colspan=2 align=center>
<b><%=label.get("username")%>:</b> <font color="#cccc00"><b><%=person.getUsername()%></b></font>
</td></tr>
<tr>
<td><b><%=label.get("password")%></b></td>
<td><input type=password name="password" size=32 maxlength=50></td>
</tr>
<tr>
<td><b><%=label.get("confirm_password")%></b></td>
<td><input type=password name="password2" size=32 maxlength=50></td>
</tr>
<tr>
<td><b><%=label.get("email")%></b><%=requiredMark%></td>
<%
tmp = person.getEmail();
if (tmp == null) tmp = "";
%>
<td><input type=text name="email" value="<%=tmp%>" size=32 maxlength=100></td>
</tr>
<tr>
<td><b><%=label.get("fullname")%></b><%=requiredMark%></td>
<%
tmp = person.getFullname();
if (tmp == null) tmp = "";
%>
<td><input type=text name="fullname" value="<%=tmp%>" size=32 maxlength=100></td>
</tr>
<tr height=32 valign=top>
<td><b><%=label.get("default_project")%></b> </td>
<td>
<select name="default_project">
<%=ListMaker.makeOptionList(person.getProjectList(), person.getProject()) %>
</select></td>
</tr>
<tr><td colspan=2><b><%=label.get("signature")%></b></td></tr>
<tr><td colspan=2>
<textarea name=signature rows=5 cols=40 style="width: 100%; overflow: auto;">
<%=HtmlParser.escapeTag(person.getSignature())%></textarea></td></tr>
<%-- the save/cancel buttons --%>
<tr><td colspan=2 align=center height=30>
<input class="button" type="button" value="<%=label.get("save_button")%>" onClick="
if(!isEqual(form.password,form.password2, 'Password does not match, please re-enter')) return false;
if(isEmpty(form.email,'Email is required.')) return false;
if(!validEmail(form.email.value))return false;
if(isEmpty(form.fullname,'Full name is required')) return false;
this.disabled=true; submit();">
<input class="button" type="button" value="<%=label.get("cancel_button")%>"
onClick="location.href='prefs.jsp';">
</td></tr>
</table>
<% String mode = person.getBrowseMode();
String mode1 = null;
String mode2 = null;
if (mode==null || mode.equals("0")) {
mode = "0";
mode1 = "checked";
mode2 = "";
} else {
mode1 = "";
mode2 = "checked";
}
%>
<table bgcolor="#ffffff" cellpadding=4 cellspacing=4 border=0>
<tr><td height=20> </td></tr>
<tr><td>
<b><%=label.get("browse_mode")%></b>
</td><td>
<%=label.get("browse_mode_list")%>:
<input type=radio name="browse_mode" <%=mode1%> value="0"
onClick="if(<%=mode%>!='0')location.href='<%=contextPath%>/servlet/prefs?browse_mode=0';">
</td><td>
<%=label.get("browse_mode_next")%>:
<input type=radio name="browse_mode" <%=mode2%> value="1"
onClick="if(<%=mode%>!='1')location.href='<%=contextPath%>/servlet/prefs?browse_mode=1';">
</td></tr>
<tr><td colspan=2>
<b><%=label.get("prefs_email_notification")%></b>
</td><td align=right>
<input class="button" type="button" value="<%=label.get("go_button")%>"
onClick="location.href='trigger.jsp';">
</td></tr>
</table>
</form>
</center>
</body>
</html>