WebRoot/qiantai/gonggaoList.jsp
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<jsp:useBean id="db1" scope="page" class="com.dao.DB"/>
<%@ page import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>新闻公告</title>
<link href="${pageContext.request.contextPath}/css/common.css"
rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/register.css"
rel="stylesheet" type="text/css" />
<script>
function checkForm() {
// 校验用户名:
// 获得用户名文本框的值:
var username = document.getElementById("t1").value;
if (username == null || username == '') {
alert("不能为空!");
return false;
}
}
</script>
<%
request.setCharacterEncoding("UTF-8");
String x1 = request.getParameter("t1");
String x2 = request.getParameter("t2");
String existUserName="";
if(session.getAttribute("existUserName")!=null)
{
existUserName= session.getAttribute("existUserName").toString();
}
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
java.util.Date currentTime = new java.util.Date();//得到当前系统时间
String str_date1 = formatter.format(currentTime); //将日期时间格式化
String str_date2 = currentTime.toString(); //将Date型日期时间转换成字符串形式
if(x1==null || x1.equals(""))
{
}
else
{
String sql="insert into Messages(username,title,con,riqi,huifi) values('"
+ existUserName +"','"+ x1 +"','"+ x2 +"','"+ str_date2 +"','') ";
System.out.println(sql);
db1.executeMysql(sql);
}
%>
</head>
后面还有 79 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。