📄 admin_del_reply.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<%
request.setCharacterEncoding("GBK");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>删除确认</title>
</head>
<body>
<!-- 载入页头 -->
<jsp:include page="admin_include.jsp"></jsp:include>
<%
String username = "";
int permission = 0;
if ((null != session.getAttribute("adminlogin"))
&& (null != session.getAttribute("permission"))) {
username = session.getAttribute("adminlogin").toString();
permission = Integer.parseInt(session
.getAttribute("permission").toString());
//接收id参数
String id = request.getParameter("id");
int tmp = 0;
String vcode = "";
//生成验证码 1001-9999
do {
tmp = (int) (Math.random() * 10000 - 1);
} while (tmp <= 1000);
vcode = String.valueOf(tmp);
%>
<script type="text/javascript">
function check(){
if(form.vcode.value==""){
alert("验证码不能为空!");
return false;
}
if(form.vcode.value!=<%=vcode%>){
alert("验证码不正确!");
return false;
}
}
</script>
<div align="center">
删除回复
<br>
<div align="left">
<form method="post" action="admin_del_reply_Action.jsp" name="form"
onsubmit="return check()">
<p>
帖子id:
<input type="hidden" value="<%=id%>" name="id">
<font color="blue"><%=id%></font>
</p>
<p>
验证码:
<input type="text" name="vcode" size="4" maxlength="4">
<font color="red"><%=vcode%></font>
</p>
<p>
<input type="submit" value="确定" name="submit">
<br>
<br>
<%
String Referer = "";
if (null != request.getHeader("Referer")) {
Referer = request.getHeader("Referer");
%>
<a href="<%=Referer%>">返回上一页</a>
<%
} else {
%>
<a href="adminindex.jsp">返回管理员主页</a>
<%
}
%>
</p>
</form>
</div>
</div>
<%
} else {
response.sendRedirect("../error.jsp");
}
%>
<!-- 载入页尾 -->
<jsp:include page="../include/foot.jsp"></jsp:include>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -