in-changehw.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:8k
源码类别:

百货/超市行业

开发平台:

Java

  1. <%   boolean founderr=false;
  2.  String hw_ids ,hw_cashs,sort_ids,pifas,dailis,errmsg,datas,tuijians,Nsort_ids;
  3.  hw_ids=request.getParameter("hw_id");
  4.  if(hw_ids!=null)
  5.  {
  6.  //--------------------------------------hw_ids!=null---------------------------------------------
  7.       hw_id=Cint(hw_ids);
  8.       if(hw_id!=0){
  9.         sql="SELECT * from hw where hw_id="+hw_id; 
  10.             rs=mdb.executeQuery(sql);
  11. if(rs.next())
  12. {
  13.                   hw_name=rs.getString("hw_name");
  14.                  hw_cash=rs.getInt("hw_cash");
  15.                  hw_pic=rs.getString("hw_pic");
  16.                 hw_sn=rs.getString("hw_sn");
  17.                  sort_id=rs.getInt("sort_id");
  18.                 Nsort_id=rs.getInt("Nsort_id");
  19.             tuijian=rs.getBoolean("tuijian");
  20.             hw_content=rs.getString("hw_content");
  21. hw_content=hw_content.replaceAll("<br>",String.valueOf(' '));
  22.         hw_content2=rs.getString("hw_content2");
  23. hw_content2=hw_content2.replaceAll("<br>",String.valueOf(' '));
  24.              hw_views=rs.getInt("hw_views");
  25.             hw_buys=rs.getInt("hw_buys");
  26.              chubsh=rs.getString("chubsh");
  27.            zhuang=rs.getString("zhuang");
  28.            hw_sn=rs.getString("hw_sn");
  29.            company=rs.getString("company");
  30.            yeshu=rs.getString("yeshu");
  31.            kaiben=rs.getString("kaiben");
  32.            isbn=rs.getString("isbn");
  33.            pifa=rs.getInt("pifa");
  34.            daili=rs.getInt("daili");
  35.            data=rs.getDate("data");
  36.            rs.close();
  37. %>
  38. <!-----------------------------------table to show the modify info---------------------------------------->
  39. <table width="500" border="0" cellspacing="0" cellpadding="0" align="center" height="100" bgcolor="808080">
  40.   <tr> 
  41.     <td height="175"> 
  42.       <form name="form1" method="post" action="changehw.jsp?hw_id=<%=hw_id%>&action=save">
  43.         <table border="0" width="100%" cellspacing="1">
  44.           <tr bgcolor="#FFFFFF"> 
  45.             <td colspan="2"><font color="#FF0000">商品名称</font> 
  46.               <input type="text" name="hw_name" size="20" class=input value="<%=hw_name%>">
  47.               <font color="#FF0000"> &nbsp;&nbsp;&nbsp;&nbsp; 商品类别 </font> 
  48.               <select class="smallSel" name="sort_id" size="1">
  49. <%
  50.        sort_ids=request.getParameter("sort_id");
  51.        Nsort_ids=request.getParameter("Nsort_id");
  52.            String sel;
  53.           sql="select * from sort";
  54.            rs=mdb.executeQuery(sql);
  55.       if (!rs.next()){
  56.         out.print("Not record.");
  57.        }else
  58.        {  rs.previous();
  59.           while(rs.next())
  60.           {    sort_id=rs.getInt("sort_id");
  61.                     if (sort_id==Cint(sort_ids))
  62.                        {      sel="selected";
  63.                 }
  64.                     else
  65.             {
  66.                       sel="";
  67.                      }
  68.                   out.print("<option " +sel + " value='"+sort_id+"' name=sort_id>"+rs.getString("sort_name")+"</option>");
  69.               }
  70.       }
  71.      rs.close();
  72. %>
  73.               </select>
  74.               &nbsp;&nbsp;<font color="#FF0000">选择分类</font>: 
  75.               <select name="Nsort_id" size="1">
  76.                 <%
  77.        sql="select * from Nsort";
  78.         rs=mdb.executeQuery(sql);
  79.     if(!rs.next())
  80.     { out.print("Not record.");
  81.      }else
  82.     {  rs.previous();
  83.             while(rs.next())
  84.          { 
  85.              Nsort_id=rs.getInt("Nsort_id");
  86.                  if(Nsort_id==Cint(Nsort_ids))
  87.                  {       sel="selected";
  88.          }
  89.                  else
  90.           {
  91.                          sel="";
  92.                   }
  93.                  out.print( "<option " + sel + " value='" +  Nsort_id + "'>" + rs.getString("Nsort_name") + "</option>");
  94.         
  95.                   }
  96.          }
  97.              rs.close();
  98. %>
  99.               </select>
  100.               ** </td>
  101.           </tr>
  102.           <tr bgcolor="#FFFFFF"> 
  103.             <td colspan="2"><font color="#FF0000">图书原价</font> 
  104.               <input type="text" name="pifa" size="7" class=input value="<%=pifa%>">
  105.               元 <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;会员价格</font> 
  106.               <input type="text" name="hw_cash" size="7" class=input value="<%=hw_cash%>">
  107.               元 <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;VIP价格 </font> 
  108.               <input type="text" name="daili" size="7" class=input value="<%=daili%>">
  109.               元 </td>
  110.           </tr>
  111.           <tr bgcolor="#FFFFFF"> 
  112.             <td height="5" colspan="2"> 
  113.               <hr noshade size="1">
  114.             </td>
  115.           </tr>
  116.           <tr bgcolor="#FFFFFF"> 
  117.             <td width="25%"><font color="#000000">作者</font> 
  118.               <input type="text" name="hw_sn" size="10" class=input value="<%=hw_sn%>">
  119.             </td>
  120.             <td width="75%"><font color="#000000">出版社</font> 
  121.               <input type="text" name="chubsh" size="30" class=input value="<%=chubsh%>">
  122.             </td>
  123.           </tr>
  124.           <tr bgcolor="#FFFFFF"> 
  125.             <td width="25%"><font color="#000000">页数</font> 
  126.               <input type="text" name="yeshu" size="10" class=input value="<%=yeshu%>">
  127.             </td>
  128.             <td width="75%"><font color="#000000">出版日期</font> 
  129.               <input type="text" name="data" size="24" class=input value="<%=data%>">
  130.               格式:2002-10-10</td>
  131.           </tr>
  132.           <tr bgcolor="#FFFFFF"> 
  133.             <td width="25%"><font color="#000000">颜色</font> 
  134.               <input type="text" name="kaiben" size="10" class=input value="<%=kaiben%>">
  135.             </td>
  136.             <td width="75%"><font color="#000000">ISBN号码</font> 
  137.               <input type="text" name="isbn" size="30" class=input value="<%=isbn%>">
  138.             </td>
  139.           </tr>
  140.           <tr bgcolor="#FFFFFF"> 
  141.             <td height="5" colspan="2"> 
  142.               <hr noshade size="1">
  143.             </td>
  144.           </tr>
  145.           <tr bgcolor="#FFFFFF"> 
  146.             <td colspan="2"> <font color="#000000">装帧</font> 
  147.               <input type="text" name="zhuang" size="30" class=input value="<%=zhuang%>">
  148.             </td>
  149.           </tr>
  150.           <tr bgcolor="#FFFFFF"> 
  151.             <td colspan="2"><font color="#FF0000">简单内容介绍</font></td>
  152.           </tr>
  153.           <tr bgcolor="#FFFFFF"> 
  154.             <td valign="top" colspan="2"> 
  155.               <textarea rows="3" name="hw_content" cols="50" class=input><%=hw_content%></textarea>
  156.             </td>
  157.           </tr>
  158.           <tr bgcolor="#FFFFFF"> 
  159.             <td valign="top" colspan="2"><font color="#FF0000">详细内容介绍</font></td>
  160.           </tr>
  161.           <tr bgcolor="#FFFFFF"> 
  162.             <td valign="top" colspan="2"> 
  163.               <textarea rows="10" name="hw_content2" cols="50" class=input><%=hw_content2%></textarea>
  164.             </td>
  165.           </tr>
  166.           <tr bgcolor="#FFFFFF"> 
  167.             <td colspan="2"> <font color="#FF0000">商品图片</font> 
  168.               <input type="text" name="hw_pic" size="46" class=input value="<%=hw_pic%>"><a href="up.jsp" target="_blank">上传图片</a></td>
  169.           </tr>
  170.           <tr bgcolor="#FFFFFF"> 
  171.             <td colspan="2" height="24"> 
  172.               <input type="radio" name="tuijian" value="1">
  173.               推荐此商品 
  174.               <input type="radio" name="tuijian" value="0" checked>
  175.               不推荐
  176.               <input name="hw_id" type="hidden" id="hw_id" value="<%=hw_id%>"></td>
  177.           </tr>
  178.           <tr bgcolor="#FFFFFF" align="center"> 
  179.             <td colspan="2"> 
  180.               <input type="submit" name="Submit" value="修改">
  181.             </td>
  182.           </tr>
  183.         </table>
  184.       </form>
  185.     </td>
  186.   </tr>
  187. </table>
  188. <%        }//---------------------------rs.next end---------------------------------
  189.    }//---------------------------hw_id!=0 check end------------------------------------------------------
  190.     }//----------------------------hw_id!=null end-------------------------------------------------------------
  191. %>
  192.