WebRoot/WEB-INF/jsp/product.jsp

(开头部分) 8KB

这里只显示每个文件的开头 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/product.css"
	rel="stylesheet" type="text/css" />
<script>
	function saveCart() {
		document.getElementById("cartForm").submit();
	}
</script>

</head>


<% 
    String id =  request.getParameter("pid");
	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 pinglun(username,title,con,riqi,proID) values('"
	    + existUserName +"','"+ x1 +"','"+ x2 +"','"+ str_date1 +"','"+ id +"') ";
	    
	    System.out.println(sql);
	    db1.executeMysql(sql);
	}
%>

<body>

	<%@ include file="menu.jsp"%>

	<div class="container productContent">
后面还有 242 行代码,购买后查看完整代码

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

AI 解读 AI

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

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