📄 checkmodify.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改数据库</title>
<style type="text/css">
<!--
body {
background-image: url(../Picture/index-top_2.gif);
margin-left: 50px;
}
.style1 {
font-size: 16px;
font-weight: bold;
}
-->
</style></head>
<body>
<% String busid=(String)session.getAttribute("busid");
String detail=new String(request.getParameter("detail").getBytes("ISO8859_1"),"GBK");
String a_startime=request.getParameter("a_startime");
String a_endtime=request.getParameter("a_endtime");
String w_startime=request.getParameter("w_startime");
String w_endtime=request.getParameter("w_endtime");
int t_value=Integer.parseInt(request.getParameter("t_value"));
int sort=Integer.parseInt(request.getParameter("value"));
// out.println(sort);
Statement sql1=null;
Connection con=null;
try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e){
e.printStackTrace();
}
try{ con=DriverManager.getConnection("jdbc:odbc:nbos","","");
sql1=con.createStatement();
String condition1="update bus set Detail='"+detail+"',A_STime='"+a_startime+"',W_STime='"+w_startime+"',A_ETime='"+a_endtime+"',W_ETime='"+w_endtime+"',T_Value="+t_value+",Sort="+sort+" where BusID='"+busid+"'";
sql1.executeUpdate(condition1);
%>
<table width="302" height="107" border="0">
<tr>
<td width="239" height="20" background="../Picture/topbg.gif"><div align="center"><span class="style1">车次修改成功</span></div></td>
</tr>
<tr>
<td height="31" background="../Picture/l33.gif"><div align="center">
<p>你已成功修改<font color="#FF0000"><%=busid%></font>车次的信息!</p>
</div></td>
</tr>
<tr>
<td height="25" background="../Picture/l33.gif"><div align="center">继续修改<a href="modify.jsp"><strong>点击这里</strong></a></div></td>
</tr>
<tr>
<td background="../Picture/bottombg.gif"> </td>
</tr>
</table>
<%
}
catch (Exception e) {
e.printStackTrace();
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -