📄 cart_checkout.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<%
String spath="wangye/ec.mdb";
String dbpath = application.getRealPath(spath);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
String url="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+dbpath;
Connection conn= DriverManager.getConnection(url,"","");
Statement stmt=conn.createStatement();
%>
<%
String username=(String)session.getAttribute("username");
ResultSet rs=stmt.executeQuery("select * from person where username='"+username+"'");
if(rs.next()){
String truename=rs.getString(3);
String address=rs.getString(5);
String postcode=rs.getString(6);
String tel=rs.getString(8);
%>
<html >
<head>
<title>无标题文档</title>
</head>
<body>
<table width="770" border="1" align="center">
<tr>
<th colspan="7" scope="col"><img src="../image/1.jpg" width="760" height="200" /></th>
</tr>
<tr>
<th width="104" height="40" background="../image/t1.jpg" scope="row"><table width="100" border="0">
<tr>
<th scope="col"><a href="../index.jsp">首页</a></th>
</tr>
</table></th>
<td width="104" background="../image/t1.jpg"><table width="100" border="0">
<tr>
<th scope="col"><a href="zhanshi.jsp">数码</a></th>
</tr>
</table></td>
<td width="104" background="../image/t1.jpg"><table width="100" border="0">
<tr>
<th scope="col">服装</th>
</tr>
</table></td>
<td width="104" background="../image/t1.jpg"><table width="100" border="0">
<tr>
<th scope="col">饰品</th>
</tr>
</table></td>
<td width="104" background="../image/t1.jpg"><table width="100" border="0">
<tr>
<th scope="col">家电</th>
</tr>
</table></td>
<td width="104" background="../image/t1.jpg"><table width="100" border="0">
<tr>
<th scope="col">食品</th>
</tr>
</table></td>
<td width="100" background="../image/t1.jpg"><table width="100" border="0">
<tr>
<th scope="col">日用</th>
</tr>
</table></td>
</tr>
</table>
<table width="770" border="1" align="center">
<tr>
<th width="754" bgcolor="#A6BBFC" scope="col" ><marquee direction="left" scrollamount="1" scrolldelay="1" onMouseOver="this.stop();" onMouseOut="this.start();"><%if(username==null || username==""){%>
<font color="#330000">顾客您好!购买商品请先登录</font> <a href="../zhuce.jsp" >[新用户注册]</a>
<%}else{%><%=username%> <font color="#330000">您好! 电子商务交易平台欢迎您!</font>
<%}%>
</marquee></th>
</tr>
</table>
<table width="770" border="1" align="center">
<tr>
<th width="200" height="180" valign="top" bgcolor="#FFF8B0" >
<form name="form1" method="post" action="Login_U.jsp">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="94%" height="31" align="center" >[<%=username%>]您好!<br>
您现在可以购物了!</td>
</tr>
<tr>
<td height="24" align="center">
<input name="Submit22" type="button" value="修改资料" onClick="window.location.href='modifyMember.jsp';">
<input name="Submit33" type="button" value="购 物 车" onClick="window.location.href='cart_see.jsp';">
<input name="Submit32" type="button" value="订单管理" onClick="window.location.href='ordermanage.jsp';"></td>
</tr>
<tr>
</tr>
</table>
</form>
</th>
<th width="554" rowspan="2" bgcolor="#FFFACE">
<form method="post" action="cart_order.jsp" name="form2">
<table width="100%" height="339" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="7%" height="26"> </td>
<td height="26" colspan="2" >注意:请您不要恶意或非法提交订单以免造成不必要的麻烦!</td>
</tr>
<tr>
<td height="26" colspan="2" align="center">用 户 名:</td>
<td width="74%"><input name="username" type="text" id="username" value="<%=username%>" readonly="yes">
*</td>
</tr>
<tr>
<td height="26" colspan="2" align="center">真实姓名:</td>
<td><input name="truename" type="text" id="truename" value="<%=truename%>">
*</td>
</tr>
<tr>
<td height="26" colspan="2" align="center">联系地址:</td>
<td><input name="address" type="text" id="address" value="<%=address%>">
*</td>
</tr>
<tr>
<td height="26" colspan="2" align="center">邮政编码:</td>
<td><input name="postcode" type="text" id="postcode" value="<%=postcode%>">
*</td>
</tr>
<tr>
<td height="26" colspan="2" align="center">联系电话:</td>
<td><input name="tel" type="text" id="tel" value="<%=tel%>">
*</td>
</tr>
<tr>
<td height="26" colspan="2" align="center">付款方式:</td>
<td><select name="pay" >
<option value="bank">银行付款</option>
<option value="mail">邮政付款</option>
<option value="cash">现金支付</option>
</select>
*</td>
</tr>
<tr>
<td height="26" colspan="2" align="center">运送方式:</td>
<td><select name="carry" >
<option value="nomal">普通邮寄</option>
<option value="express">特快专递</option>
<option value="EMS">EMS专递方式</option>
</select>
*</td>
</tr>
<tr>
<td height="101" colspan="2" align="center">备 注:</td>
<td><textarea name="bz" cols="50" rows="5" class="textarea" id="bz"></textarea></td>
</tr>
<tr align="center">
<td colspan="3"><input name="Button" type="submit" value="提交" >
<input name="Submit2" type="button" value="返回" onClick="history.back(1);"></td></tr>
</table>
</form>
</th>
</tr>
</table>
<table width="770" border="1" align="center">
<tr>
<th background="../image/2.jpg" scope="col"><br>
<p><a href="#"><font size="2">关于我们</font></a>
<font size="2"> |
<a href=# onclick="">加入收藏</a> | <a href=# onClick="">设为首页</a> | <a href="#">请您留言</a><br><br>
电子商务交易平台 版权所有</font></p><br>
</th>
</tr>
</table>
<%
}
stmt.close();
conn.close();
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -