<html>
<head>
<title>TSVN密码更改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
BODY { FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; line-height:2; }
TD { FONT-SIZE: 9pt; FONT-FAMILY: "宋体" }
A { text-transform: none; color: black; text-decoration: none }
A:hover { color: red; text-decoration: underline }
.style1 {font-family: "楷体_GB2312"}
</STYLE>
<script language="javascript">
function mycheck()
{
if (document.myform.name.value == "0")
{ alert("请选择用户名!");
document.myform.name.focus();
return;
}
if (document.myform.password.value == "")
{ alert("请输入密码!");
document.myform.password.focus();
return;
}
if (document.myform.password.value.length < 2)
{ alert("密码位数必须大于2位!");
document.myform.password.focus();
return;
}
if (document.myform.password2.value == "")
{ alert("请输入新密码!");
document.myform.password2.focus();
return;
}
if (document.myform.password2.value.length < 2)
{ alert("新密码位数必须大于2位!");
document.myform.password2.focus();
return;
}
if (document.myform.password2.value!=document.myform.password3.value)
{ alert("新密码确认错误,请重新输入!");
document.myform.password3.focus();
return;
}
document.myform.submit();
}
</script>
</head>
<%@page contentType="text/html;charset=gb2312"%>
<%@page import="java.io.*"%>
<body bgcolor="#CFF1E1">
<center>
<h2 class="style1">TSVN用户更改密码
</h2>
</center>
<form action="change_passwd.jsp" method="post" name="myform" id="myform">
<table width="230" border="1" align="center">
<tr>
<td width="88"><div align="center">用户名:</div></td>
<td width="141"></div>
<select name="name" id="name" >
<option value="0" selected></option>
<%
String UserName="";
String passwd ="E:/SVN/Repository/conf/passwd"; //SVN库中passwd文件
int n=0;
FileReader fr=new FileReader(passwd);
BufferedReader br=new BufferedReader(fr);
UserName=br.readLine();
while(UserName!=null){
if (UserName.indexOf("=")>0)
{
n++;
UserName=UserName.substring(0,UserName.indexOf("="));
// UserName=(new String(UserName.getBytes("ISO-8859-1"),"UTF8"));
%>
<option value=<%=n%>><%=UserName%></option>
<%
}
UserName=br.readLine();
}
br.close();
fr.close();
%>
</select></td>
</tr>
<tr>
<td><div align="center">密码:</div></td>
<td><input name="password" type="text" id="password" size="14" maxlength="14"></td>
</tr>
<tr>
<td><div align="center">新密码:</div></td>
<td><input name="password2" type="password" id="password2" size="14" maxlength="14"></td>
</tr>
<tr>
<td><div align="center">密码确认:</div></td>
<td><input name="password3" type="password" id="password3" size="14" maxlength="14">
</div></td>
</tr>
<tr>
</tr>
<tr>
<td height="20" colspan="2"><div align="center">
<input type="button" name="Submit" value="提交" onClick="mycheck()">
</div></td>
</tr>
</table>
</form>
</body>
</html>
- 1
- 2
前往页