- <%@ page contentType="text/html; charset=GBK" %>
- <%@ page import="java.sql.*"%>
- <%
- try{
- //数据库连接
- Class.forName("oracle.jdbc.driver.OracleDriver");
- String strUrl = "jdbc:oracle:thin:@slight:1521:LOCAL";
- String strUser = "eshop";
- String strPassword = "eshop";
- String strId = (String)request.getSession(true).getAttribute("LoginSuccess");
- Connection con = DriverManager.getConnection(strUrl, strUser,strPassword);
- Statement st = con.createStatement();
- String sql = "select * from reguser where userid ='" + strId +"'";
- ResultSet rs = st.executeQuery(sql);
- %>
- <html>
- <head>
- <title>
- 商品结算
- </title>
- <link rel="stylesheet" type="text/css" href="style.css">
- <SCRIPT language=javascript>
- function FORM1_onsubmit()
- {
- if (document.FORM1.Name.value.length==0)
- {
- alert("请输入正确的会员帐号。");
- document.FORM1.Name.focus();
- return false;
- }
- if (document.FORM1.Address.value.length==0)
- {
- alert("请输入正确的会员帐号。");
- document.FORM1.Address.focus();
- return false;
- }
- if (document.FORM1.Phone.value.length==0)
- {
- alert("请输入正确的会员帐号。");
- document.FORM1.Phone.focus();
- return false;
- }
- if (document.FORM1.Zip.value.length==0)
- {
- alert("请输入正确的会员帐号。");
- document.FORM1.Zip.focus();
- return false;
- }
- if (document.FORM1.Email.value.length==0)
- {
- alert("请输入正确的会员帐号。");
- document.FORM1.Email.focus();
- return false;
- }
- }
- </SCRIPT>
- </head>
- <BODY>
- <%
- if (rs.next()){
- %>
- <DIV align=center>
- <p> </p>
- <FORM language=javascript name=FORM1 onsubmit="return FORM1_onsubmit()"
- action=ment2.jsp method=post>
- <INPUT type=hidden value=<%=rs.getString("UserId")%> name=UserId>
- <TABLE cellSpacing=0 cellPadding=0 width=362>
- <TBODY>
- <TR>
- <TD align=middle width="372">
- <TABLE cellSpacing=1 cellPadding=4 width=388 bgColor=#000000>
- <TBODY>
- <TR vAlign=top bgColor=#eeeeee>
- <TD colSpan=2 width="374" bgcolor="#006699">
- <p align="center"><font color="#FFFFFF">购物结算--(第一步)收货人信息</font></p>
- </TD></TR>
- <TR bgColor=#eeeeee>
- <TD width=103 bgColor=#EEEEEE height=7 align="right">
- <p align="center">收货人姓名:</p>
- </TD>
- <TD width=259 height=7 bgcolor="#EEEEEE">
- <p><INPUT maxLength=16 size=13 value="<%=rs.getString("Name")%>"
- name="Name" style="font-size: 14px"> </p>
- </TD></TR>
- <tr>
- <TD width=103 bgColor=#EEEEEE height=7 align="right">
- <p align="center">收货人地址<SPAN
- >:</SPAN></p>
- </TD>
- <TD width=259 height=7 bgcolor="#EEEEEE">
- <p align="center"><INPUT maxLength=16 size=36 value="<%=rs.getString("haddr")%>"
- name=Address style="font-size: 14px" > </p>
- </TD>
- </tr>
- <tr>
- <TD width=103 bgColor=#EEEEEE height=7 align="right">
- <p align="center">邮政编码:</p>
- </TD>
- <TD width=259 height=7 bgcolor="#EEEEEE">
- <p><INPUT maxLength=16 size=13 value="<%=rs.getString("postcode")%>"
- name=Zip style="font-size: 14px"> </p>
- </TD>
- </tr>
- <tr>
- <TD width=103 bgColor=#EEEEEE height=7 align="right">
- <p align="center">联系电话:</p>
- </TD>
- <TD width=259 height=7 bgcolor="#EEEEEE">
- <p><INPUT maxLength=16 size=23 value="<%=rs.getString("usephone")%>"
- name=Phone style="font-size: 14px"> </p>
- </TD>
- </tr>
- <tr>
- <TD width=103 bgColor=#EEEEEE height=7 align="right">
- <p align="center">电子信箱:</p>
- </TD>
- <TD width=259 height=7 bgcolor="#EEEEEE">
- <p><INPUT maxLength=16 size=32 value="<%=rs.getString("Email")%>"
- name=Email style="font-size: 14px"> </p>
- </TD>
- </tr>
- <TR vAlign=top bgColor=#eeeeee>
- <TD colSpan=2 width="374" bgcolor="#EEEEEE">
- <p align="center">你可以修改以上内容</TD></TR>
- <TR bgColor=#eeeeee>
- <TD colSpan=2 width="374" bgcolor="#006699">
- <DIV align=center>
- <p align="center"><INPUT class=main type=submit size=3 value=下一步 name=Submit2>
- </DIV></TD></TR></TBODY></TABLE>
- </TD></TR></TBODY></TABLE>
- <p align="center"><BR></FORM>
- </DIV>
- <%
- }
- %>
- </BODY>
- </html>
- <%
- }catch(Exception e){
- throw (e);
- }
- %>