⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goodscontral.jsp

📁 解压在c盘
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%> 
<%@ page import="java.sql.*"%> 
<html >
<head>
<title>无标题文档</title>
</head>
<%
String maijianame=(String)session.getAttribute("maijianame");

if(maijianame=="" || maijianame==null){
	out.println("<script language='javascript'>alert('请先登录!');window.location.href='maijiadengru.jsp';</script>");
}else{
	
String spath="wangye/ec.mdb";   
String dbpath = application.getRealPath(spath);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); 
String url="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+dbpath;
Connection conn= DriverManager.getConnection(url,"",""); 
Statement stmt=conn.createStatement();


  
%>
<body>
<table width="770" border="1" align="center">
  <tr>
    <th width="724" scope="col"><img src="../image/1.jpg" width="760" height="200" /></th>
  </tr>
</table>

	<table width="770" border="1" align="center">
  <tr>
 <th width="754" bgcolor="#A6BBFC" scope="col" >

 <%  if (maijianame==null || maijianame==""){%>
          <form name="form1" method="post" action="Login_U2.jsp">
            <table width="100%"  border="0" cellpadding="0" cellspacing="0">
                <tr>&nbsp;</tr>
				<tr>
                  <td width="94%" height="24"> <div align="center">会员名
                    <input name="username" type="text"  id="username" size="16">
                  </div></td>
                </tr>
                <tr>
                  <td height="24"><div align="center">密&nbsp;&nbsp;码
                    <input name="PWD" type="password"   size="16" >
                  </div></td>
                </tr>
				
                <tr>
                  <td height="31">
			
                    <div align="center">
					<input name="Button" type="button"  value="注册" onClick="window.location.href='zhuce3.htm'">
         
					&nbsp;
                    <input name="Submit2" type="submit"  value="登录" > 
					 <input name="Submit3" type="reset"  value="重置">
                    </div></td>
                </tr>
            </table>
			  <%}else{%>
			    
                <table width="100%"  border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="94%" height="31" align="center" >[<%=maijianame%>]您好!<br>
                      您现在可以管理你的商品了!</td>
                   
                  </tr>
                  <tr>
                    <td height="24" align="center"><input name="Submit21" type="button"  value="修改资料" onClick="window.location.href='modifyMember2.jsp';">
					<input name="Submit31" type="button"  value="商品管理" onClick="window.location.href='goodsContral.jsp';">
					<input name="Submit3" type="button"  value="产品添加" onClick="window.location.href='zhuce2.html';">
					<input name="Submit32" type="button"  value="订单管理" onClick="window.location.href='ordermanage2.jsp';"></td>
                   
                  </tr>
                  <tr>
                  </tr>
                </table>
				
			    
		</form>	   




</th>
  </tr>
  <tr>
    <th bgcolor="#A6BBFC" scope="col" ><marquee direction="left" scrollamount="1" scrolldelay="1" onMouseOver="this.stop();" onMouseOut="this.start();">
			<%=maijianame%> <font color="#330000">您好! 电子商务交易平台欢迎您!</font>
	
    </marquee></th>
  </tr>
</table>

    <table width="770" border="1" align="center">
      <tr>
        
        <th width="770" rowspan="2" bgcolor="#FFFACE">
	  
	  <table width="92%" height="192"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <th valign="top">
		  
	<%	 int ID=0;
	String goodsname="";
	String zhonglei="";
	  int number=0;
	  String introduct="";
	  int price=0;
	  
	ResultSet rs=stmt.executeQuery("select * from goods where maijianame='"+maijianame+"'");
   while(rs.next()){
    ID=rs.getInt(1);
    goodsname=rs.getString(2);
    zhonglei=rs.getString(3);
    number=rs.getInt(4);
    introduct=rs.getString(5);
    price=rs.getInt(7);
   %>
           <table width="100%" height="14"  border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="13" align="center">&nbsp;</td>
            </tr>
          </table>
            <table width="100%" height="48"  border="1"  >
              <tr bgcolor="#eeeeee">
                <td width="11%" height="24" align="center">商品名称</td>
                <td width="7%" align="center">种类</td>
                <td width="8%" align="center">数量</td>
                <td width="32%" align="center">简介</td>
                <td width="13%" align="center">价格</td>
                <td width="9%" align="center">修改</td>
                <td width="10%" align="center">删除</td>
              </tr>

              <tr >
                <td height="20" align="center"><%=goodsname%></a></td>
                <td align="center"><%=zhonglei%></td>
                <td align="center"><%=number%></td>
                <td align="center"><%=introduct%></td>
                <td align="center"><%=price%></td>
                <td align="center"><a href="goods_modify.jsp?ID=<%=ID%>"><img src="../image/modify.gif" width="15" height="15"></a></td>
                <td align="center"><a href="goods_del.jsp?ID=<%=ID%>"><img src="../image/del.gif" width="16" height="16"></a></td>
              </tr>

            </table>
			<%}%>
	  </th>
        </tr>
      </table>
	  
	  <%}%> 
	  </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>
	      电子商务交易平台&nbsp;  版权所有</font></p><br>
		</th>
      </tr>
    </table>          
            
</body>      
</html>           
           
<%

stmt.close(); 
conn.close();	

}

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -