📄 index_order.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.sql.*"%>
<jsp:useBean id="databean" scope="session" class="ConnBean.conn" />
<%@ page import="java.util.Date"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>填写订单</title>
</head>
<script language="javascript">
<!--
function check(){
if(form1.name.value==""){
alert("请输入你的真实姓名");
return false;
history.back();
form1.name.focus();
}
if(form1.post.value==""){
alert("请输入你邮政编码");
return false;
history.back()
form1.post.focus();
}
}
-->
</script>
<link href="../images/style.css" rel="stylesheet">
<body>
<%
Date date = new Date();
//Condb con=new Condb();
int year = date.getYear() + 1900;
int month = date.getMonth() + 1;
int dat = date.getDate();
int hour = date.getHours();
int min = date.getMinutes();
int second = date.getSeconds();
long time = date.getTime() / 600000000;
String yea = String.valueOf(year);
String mon = String.valueOf(month);
String da = String.valueOf(dat);
String hou = String.valueOf(hour);
String mi = String.valueOf(min);
String sec = String.valueOf(second);
String tim = String.valueOf(time);
String sub = yea + mon + da + hou + mi + sec + tim;
String stime = yea + "-" + mon + "-" + da + " " + hou + ":" + mi
+ ":" + sec;
if (session.getAttribute("user") == null
|| session.getAttribute("user").equals("")) {
%>
<script language="javascript">
alert("请您先登录再订购商品");
window.location.href="../index.jsp";
</script>
<%
} else {
String sql = "select * from userinfo where UserName='"
+ session.getAttribute("user") + "'";
ResultSet rs = databean.executeQuery(sql);
if (rs.next()) {
String name = rs.getString("UserName");
String Rname = rs.getString("RealName");
String userid = rs.getString("UserID");
String totalprice = request.getParameter("buy3");
String address = rs.getString("Address");
String post = rs.getString("Post");
String teleph = rs.getString("Telephone");
%>
<table width="800" height="428" border="0" align="center"
cellpadding="0" cellspacing="0" bgcolor="#E8FFFF" class="tableBorder">
<TABLE align="center"
style="BORDER-RIGHT: #4f7fc7 1px solid; BORDER-TOP: #4f7fc7 1px solid; BORDER-LEFT: #4f7fc7 1px solid; BORDER-BOTTOM: #4f7fc7 1px solid; BORDER-COLLAPSE: collapse"
cellPadding=3 width="588" height="258" border="1">
<form action="manage.jsp" method="post" name="form1">
<tr align="center">
<td height="37" colspan="3" class="bgcolor">
<marquee direction="left" scrollamount="1">
请仔细填写各条信息,以免给购物带来不必要的麻烦
</marquee>
</td>
</tr>
<tr align="center">
<td height="25" colspan="3" bgcolor="#6BD763" class="head">
填写订单
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
订单号
</td>
<td height="24">
<%
out.print(sub);
%>
</td>
<td height="24">
<input name="subid" type="hidden" class="txt_grey" size="40"
value="<%=sub%>">
</td>
</tr>
<tr>
<td width="112" height="24" class="bgcolor">
用户名
</td>
<td height="24">
<%
out.print(name);
%>
</td>
<td height="24">
<input name="username" type="hidden" class="txt_grey" size="40"
value="<%=name%>" readonly="yes">
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
真实姓名
</td>
<td height="24">
<input name="rname" type="text" class="txt_grey" size="40"
value="<%=Rname%>">
</td>
<td height="24">
<input name="userid" type="hidden" class="txt_grey" size="40"
value="<%=userid%>">
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
金额
</td>
<td height="24">
<%
out.print(totalprice);
%>
</td>
<td height="24">
<input name="totalprice" type="hidden" class="txt_grey" size="40"
value="<%=totalprice%>">
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
用户地址
</td>
<td height="24">
<input name="address" type="text" class="txt_grey" size="40"
value="<%=address%>">
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
邮编
</td>
<td height="24">
<input name="post" type="text" class="txt_grey" size="40"
value="<%=post%>">
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
付款方式
</td>
<td height="24">
<select name="pay" class="wenbenkuang">
<option>
银行付款
</option>
<option>
邮政付款
</option>
<option>
现金支付
</option>
</select>
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
送货方式
</td>
<td height="24">
<select name="sendway" class="wenbenkuang">
<option>
特快专递
</option>
<option>
普通邮寄
</option>
<option>
送货上门
</option>
</select>
*具体邮费以邮寄地计算,打印的订单显示</td>
</tr>
<tr>
<td height="24" class="bgcolor">
提交时间
</td>
<td height="24">
<%
out.print(stime);
%>
</td>
<td height="24">
<input name="stime" type="hidden" class="txt_grey" size="40"
value="<%=stime%>">
</td>
</tr>
<tr>
<td height="24" class="bgcolor">
联系电话
</td>
<td height="24">
<input name="teleph" type="text" class="txt_grey" size="40"
value="<%=teleph%>">
</td>
</tr>
<tr align="center">
<td height="75" align="left" class="bgcolor">
备注
</td>
<td height="75" align="left">
<textarea name="demo" cols="39" rows="5" class="txt_grey"></textarea>
</td>
</tr>
<tr align="center" valign="middle">
<td height="25" colspan="3" bgcolor="#6BD763">
<input name="Submit" type="submit" class="btn_grey" value="提交"
onClick="return check()">
<input name="Submit2" type="reset" class="btn_grey" value="重置">
</td>
</tr>
<tr align="left" valign="top">
<td height="48" colspan="3">
<font color="#0000cc" class="bgcolor"> 注意: <br>
1.请您按正确方式认真填写,不要填写一些非法字符,认真核对你所填写的订单准确无误后按提交按钮. <br>
2.请您牢记你的订单号码,以便查询订单的执行状态. <br> 3.当您的款项汇到我们的帐号请您尽快与我们取得联系. </font>
</td>
</tr>
</table>
</table>
<%
}
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -