WebRoot/shenqing.jsp
(完整代码) 1KB<%@ page language="java" import="java.text.SimpleDateFormat" import="java.util.Date" pageEncoding="gb2312" import="java.sql.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
request.setCharacterEncoding("gb2312");
response.setCharacterEncoding("gb2312");
%>
<jsp:useBean id="connDbBean" scope="page" class="db.db"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'adminyanzheng.jsp' starting page</title>
</head>
<body>
<%
if(request.getSession().getAttribute("username")==null)
{
out.print("<script>alert('请先登录!');window.history.go(-1);</script>");
return;
}
String yonghuming=request.getParameter("yonghuming");
ResultSet RS_result=connDbBean.executeQuery("select * from haoyoushenqing where shenqingren='"+request.getSession().getAttribute("username")+"' and beishenqingren='"+yonghuming+"'");
if(RS_result.next())
{
out.print("<script>alert('你已经申请加他为好友,不能重复!');window.history.go(-1);</script>");
}
else
{
String sql="insert into haoyoushenqing(shenqingren,beishenqingren,shenqingshijian,zhuangtai) values('"+request.getSession().getAttribute("username")+"','"+yonghuming+"','"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+"','申请中')";
connDbBean.executeUpdate(sql);out.print("<script>alert('操作成功!!');window.history.go(-1);</script>");
}
RS_result.close();
%>
</body>
</html>
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。