WebRoot/admin/modifyname.jsp

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<jsp:include flush="true" page="/admin/top.jsp"/>
<%
ArrayList adminlogin = (ArrayList)session.getAttribute("adminlogin");
if(adminlogin == null || adminlogin.size() == 0){
	%><script>alert('您还没有登录!');window.navigate('index.jsp');</script><%
}else{
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<script language="JavaScript">
function check()
{
	var pattern = /^[a-zA-Z0-9_]+$/;
	if (document.form1.oldname.value == "" ) 
	{
		alert("请输入原用户名!");
		document.form1.oldname.focus();
		return false;
	}
	if (document.form1.oldname.value != "<%=adminlogin.get(1) %>" ) 
	{
		alert("原用户名错误!");
		document.form1.oldname.focus();
		return false;
	}
	if (document.form1.newname.value == ""  )  
	{
		alert("请输入新用户名!");
		document.form1.newname.focus();
		return false;
	}
	if (document.form1.newname.value.length < 3 )  
	{
		alert("用户名长度最少3个字符!");
		document.form1.newname.focus();
		return false;
	}
	if (!pattern.test(document.form1.newname.value) )  
	{
		alert("用户名只能包含字母、数字!");
		document.form1.newname.focus();
		return false;
	}
	if (document.form1.repetition.value == ""  )  
	{
		alert("请输入重复新用户名!");
		document.form1.repetition.focus();
		return false;
	}
	if (document.form1.repetition.value != document.form1.newname.value  )  
	{
		alert("两次用户名不一致!");
		document.form1.repetition.focus();
		return false;
	}
}
</script>
<html>
后面还有 58 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。