📄 ok_bid.jsp
字号:
<html>
<head>
<title>写入数据库</title>
<link rel=stylesheet href="../../style.css" type="text/css">
<%@ page contentType="text/html;charset=gb2312" %>
</head>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="bidBean" scope="page" class="firm.firm" />
<%
String name = (String) session.getValue("username");
String pid=request.getParameter("product_id");
int id=Integer.parseInt(pid);
String amount=request.getParameter("amount");
int n1=Integer.parseInt(amount);
String numb=request.getParameter("numb");
int n2=Integer.parseInt(numb);
String sprice=request.getParameter("sprice");
int sp=Integer.parseInt(sprice);
String nprice=request.getParameter("nprice");
int np=Integer.parseInt(nprice);
String info= new String(request.getParameter("say").getBytes("8859_1"));
%>
<%
String strSQL="insert into bid (bidman,product_id,amount,new_price,word) values('" + name + "'," + id + ",'" + amount + "','" + sprice + "','" + info + "')";
bidBean.executeUpdate(strSQL);
out.print("添加成功!");
//增加投标数量
String strSQL1="update product set bids=bids+1 where product_id=" + id ;
bidBean.executeUpdate(strSQL1);
//更新最新价格
String strSQL2="update product set nprice='"+ sprice +"' where product_id=" + id ;
bidBean.executeUpdate(strSQL2);
%>
<body onload="load2()">
<script language=javascript>
function load2(){
opener.parent.frames("main").setTimeout("submit11()",1500)
self.setTimeout("exit()",1500)
}
function exit(){
window.close()
}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -