📄 mod_order.jsp
字号:
<html>
<head>
<title> 淳.清凉网上鲜花坊</title>
<%@ page contentType="text/html;charset=gb2312" import="java.sql.*"%>
<meta name="keywords" content="淳.清凉花坊">
<meta name="description" content="淳.清凉花坊">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 12px}
.style2 {font-size: 12px}
.style3 {
color: #006600;
font-size: 12px;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" >
<%! public String getString(String s)
{if(s==null) s="";
try {byte a[]=s.getBytes("ISO-8859-1");
s=new String(a);
}
catch(Exception e)
{}
return s;
}
%>
<% //获取session值,以及防止非法访问本页面
String id=request.getParameter("id");
id=getString(id);
String status=request.getParameter("status");
status=getString(status);
String paid=request.getParameter("paid");
paid=getString(paid);
Connection con=null;
Statement sql=null;
ResultSet rs=null;
try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }
catch(ClassNotFoundException event) { }
try {
con=DriverManager.getConnection("jdbc:odbc:sun","sa","");
sql=con.createStatement();
String condition="select * from orderinfo where orderid='"+id+"'";
rs =sql.executeQuery(condition);
if(rs.next())
{
String strSQL="UPDATE orderinfo SET status="+"'"+status+"'"+","+"paid="+"'"+paid+"'"+"where orderid="+"'"+id+"'";
sql.executeUpdate(strSQL);
// out.print("here");
%>
<script language="javascript">
alert("订单状态更新成功!");
window.location.href = "admin_order.jsp";
</script>
<%
}
con.close();
}
catch(SQLException e1) {
// out.print(here);
}
%>
<script language="javascript">
alert("error input!");
history.go(-1);
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -