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

📄 goods_modify.jsp

📁 解压在c盘
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%> 
<%@ page import="java.sql.*"%> 
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<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();

 int ID=Integer.parseInt(request.getParameter("ID")); 

ResultSet rs=stmt.executeQuery("select * from goods where maijianame='"+maijianame+"'");
   if(rs.next()){
   String goodsname=rs.getString(2);
   String zhonglei=rs.getString(3);
   int number=rs.getInt(4);
   String introduct=rs.getString(5);
   String pic=rs.getString(6);
   int price=rs.getInt(7);
  
%>
<body>
<table width="770" border="1" align="center">
  <tr>
    <th scope="col"><img src="../image/1.jpg" width="760" height="200" /></th>
  </tr>
  <tr>
    <th height="40" background="../image/t1.jpg" scope="row"><table width="100" border="0">
      <tr>
        <th scope="col"><a href="goodsContral.jsp">首页</a></th>
      </tr>
    </table>      </th>
  </tr>
</table>

	<table width="770" border="1" align="center">
  <tr>
 <form id="search" name="search" method="get" action="http://search1.taobao.com/browse/search_auction.htm?at_topsearch=1">
<th width="754" bgcolor="#A6BBFC" scope="col" >搜索宝贝:
&nbsp; 
      <select name="search_type" height="20">
        <option selected="selected" value="auction" >类型</option>
        <option value="shop">数码</option>
        <option value="nick">服装</option>
        <option value="info">饰品</option>
        <option value="web">电器</option>
        <option value="product">食品</option>
        <option value="web">日用</option>
      </select>
&nbsp; 
<select name="search_type" height="20">
        <option selected="selected" value="auction" >价格</option>
        <option value="shop">数码</option>
        <option value="nick">服装</option>
        <option value="info">饰品</option>
        <option value="web">电器</option>
        <option value="product">食品</option>
        <option value="web">日用</option>
      </select>
&nbsp; 
<input  name="q" id="q"  height="15"/>
&nbsp;
<button id="DoSearch" type="submit"> 搜 索 </button></th>
    </form>
  </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="200" bgcolor="#FFF8B0" scope="col" valign="top">
         
		   <%  if (maijianame==null || maijianame==""){%>
          <form name="form1" method="post" action="Login_U2.jsp">
            <table width="100%"  border="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"  >
                  <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>
        <th width="554" rowspan="2" bgcolor="#FFFACE">
        <form action="goods_modify_deal.jsp" method="post" name="form1">
			    <table width="100%"  border="0" align="center" cellpadding="-2" cellspacing="-2" bordercolordark="#FFFFFF">
                  <tr>
                    <td height="27">&nbsp;
                   商品编号:<input type="hidden" name="ID" value="<%=ID%>"></td>
                    <td height="27" colspan="3">&nbsp;
      					<%=ID%>					</td>
                  </tr>
                  <tr>
                    <td height="27">&nbsp; 商品名称: </td>
                    <td height="27" colspan="3">&nbsp; <input name="goodsname" type="text"  value="<%=goodsname%>" size="20">
</td>
                  </tr>
                  <tr>
                    <td width="47%" height="27">&nbsp;
                    商品种类:                 </td>
                    <td height="27" >&nbsp;
                      <input name="goodsName" type="text"  value="<%=zhonglei%>" size="20">
                      &nbsp;&nbsp;                    </td>
                  </tr>
                  <tr>
                    <td height="27">&nbsp;
                   图片文件:</td>
                    <td height="27" >&nbsp;
                        <input name="pic" type="text"  value="<%=pic%>" size="20"> 
                        (此处只填写图片文件名)                         </td>
                  </tr>
					<tr>
                    <td height="30"  >&nbsp; 数 &nbsp; 量:</td>
                    <td >&nbsp;&nbsp;<input name="number" type="text"  value="<%=number%>" size="14"></td>
                  </tr>
                  <tr>
                    <td height="30"  >&nbsp; 定 &nbsp; 价:</td>
                    <td >&nbsp;&nbsp;<input name="price" type="text"  value="<%=price%>" size="14">
(元)</td>
                  </tr>
                  
                  <tr>
                    <td height="103">&nbsp;
                   商品简介:</td>
                    <td colspan="3"><span class="style5">&nbsp; </span>
                        <textarea name="introduct" cols="60" rows="5" id="introduce"><%=introduct%></textarea></td>
                  </tr>
                  <tr>
                    <td height="38" colspan="4" align="center">
                        <input name="Button" type="submit"  value="保存" >
&nbsp;                        
<input name="Submit2" type="reset" class="btn_grey" value="重置">
                        &nbsp;
                        <input name="Submit3" type="button"  value="返回" onClick="JScript:history.back()">                    </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>
	      电子商务交易平台&nbsp;  版权所有</font></p><br>
		</th>
      </tr>
    </table>          
            
</body>      
</html>           
           
<%
	rs.close(); 
stmt.close(); 
conn.close();
}
}

%>

⌨️ 快捷键说明

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